/* The journal and its articles share one centered reading measure. */
.blog-breadcrumb,
.blog-index-hero,
.article-hero,
.reading-wrap,
.promo-block,
#related-posts,
#post-nav {
  box-sizing: border-box;
  width: 100%;
  max-width: calc(56rem + 2 * var(--gutter));
  padding-inline: var(--gutter);
  margin-inline: auto;
}

.blog-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: .875rem;
}

.blog-breadcrumb a {
  color: var(--accent-dark);
  text-decoration: none;
}

.blog-breadcrumb a:hover,
.blog-breadcrumb a:focus-visible {
  text-decoration: underline;
}

.blog-index-hero,
.article-hero {
  text-align: center;
  background: transparent;
  border: 0;
}

.blog-index-hero {
  padding-block: 3rem 4rem;
}

.blog-kicker,
.article-kicker {
  margin: 0 0 1.2rem;
  color: var(--accent-dark);
  font: 500 .75rem/1.5 var(--font-mono);
  letter-spacing: .13em;
  text-transform: uppercase;
}

.blog-index-hero h1,
.article-hero h1 {
  margin: 0 auto;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.22;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.blog-index-hero h1 {
  max-width: 52rem;
  font-size: clamp(2rem, 5vw, 3rem);
}

.blog-index-hero h1::after,
.article-hero h1::after {
  content: "";
  display: block;
  width: 3.5em;
  height: 2px;
  margin: 1.35rem auto 0;
  border-radius: var(--r-pill);
  background: var(--accent);
}

.blog-index-hero > p:last-child,
.article-hero .article-summary {
  max-width: 44rem;
  margin: 1.5rem auto 0;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.85;
}

.blog-directory {
  border-top: 1px solid var(--border);
  padding-block: 3rem 5rem;
}

.blog-directory-inner {
  box-sizing: border-box;
  max-width: calc(70rem + 2 * var(--gutter));
  padding-inline: var(--gutter);
  margin-inline: auto;
}

.blog-directory-heading h2 {
  margin: 0;
  color: var(--text);
  font: 500 clamp(1.4rem, 3vw, 1.8rem)/1.35 var(--font-display);
  letter-spacing: -.02em;
  text-wrap: pretty;
}

.blog-directory-heading p {
  margin: .5rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 2rem;
}

.blog-filters button {
  padding: .65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--panel);
  color: var(--text-2);
  font: 500 .875rem/1.35 var(--font-body);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.blog-filters button:hover,
.blog-filters button:focus-visible,
.blog-filters button[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  color: var(--accent-dark);
}

.blog-result-count {
  margin: 2rem 0 1rem;
  color: var(--muted);
  font: .8rem/1.5 var(--font-mono);
}

.blog-post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.blog-list-card {
  min-width: 0;
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: inset 0 1px 0 var(--panel);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.blog-list-card:hover,
.blog-list-card:focus-within {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
}

.blog-card-meta,
.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  font: .78rem/1.5 var(--font-mono);
}

.blog-card-meta time {
  color: var(--muted);
}

.blog-tag {
  display: inline-block;
  padding: .3rem .7rem;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  color: var(--accent-dark);
  font: 500 .76rem/1.35 var(--font-body);
}

.blog-list-card h3 {
  margin: 1.2rem 0 .7rem;
  color: var(--text);
  font: 500 1.3rem/1.5 var(--font-display);
  letter-spacing: -.01em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.blog-list-card h3 a {
  color: inherit;
  text-decoration: none;
}

.blog-list-card h3 a:hover,
.blog-list-card h3 a:focus-visible,
.blog-read-link:hover,
.blog-read-link:focus-visible {
  color: var(--accent-dark);
}

.blog-list-card p {
  margin: 0 0 1.4rem;
  color: var(--text-2);
  font-size: .94rem;
  line-height: 1.8;
}

.blog-read-link {
  color: var(--accent-dark);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
}

.blog-read-link::after {
  content: " →";
}

.blog-empty {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  color: var(--muted);
  background: var(--panel);
}

/* Article masthead: the short rule evokes a mark on a long scroll. */
.article-hero {
  padding-block: 1.5rem 2.25rem;
}

.article-hero h1 {
  max-width: 56rem;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
}

.article-meta {
  justify-content: center;
  gap: .55rem;
  margin-top: 1.5rem;
  color: var(--text-2);
}

.article-meta time,
.article-meta .read-time {
  padding: .32rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--panel);
}

.article-body,
.reading-wrap.prose {
  margin-inline: auto;
  color: var(--text);
  font: 400 1rem/1.9 var(--font-body);
  overflow-wrap: break-word;
}

.article-body > :first-child,
.reading-wrap.prose > :first-child {
  margin-top: 0;
}

.article-body p,
.reading-wrap.prose p {
  margin-block: 0 1.4rem;
}

.article-body h2,
.reading-wrap.prose h2 {
  position: relative;
  margin: 3rem 0 1.1rem;
  padding-top: .55rem;
  border-top: 1px solid var(--border);
  color: var(--text);
  font: 500 clamp(1.3rem, 3vw, 1.6rem)/1.45 var(--font-display);
  letter-spacing: -.015em;
  text-wrap: pretty;
}

.article-body h2::before,
.reading-wrap.prose h2::before {
  content: "";
  display: inline-block;
  width: 1.2rem;
  height: .18rem;
  margin-right: .65rem;
  vertical-align: .26em;
  border-radius: var(--r-pill);
  background: var(--accent);
}

.article-body h3,
.reading-wrap.prose h3 {
  margin: 2rem 0 .8rem;
  color: var(--text);
  font: 500 1.3rem/1.5 var(--font-display);
  letter-spacing: -.01em;
  text-wrap: pretty;
}

.article-body a,
.reading-wrap.prose a {
  color: var(--accent-dark);
  text-underline-offset: .2em;
}

.article-body ul,
.article-body ol,
.reading-wrap.prose ul,
.reading-wrap.prose ol {
  padding-left: 1.5rem;
  margin: 0 0 1.5rem;
}

.article-body li,
.reading-wrap.prose li {
  padding-left: .25rem;
  margin-bottom: .5rem;
}

.article-body strong,
.reading-wrap.prose strong {
  font-weight: 600;
}

.article-body blockquote,
.reading-wrap.prose blockquote {
  margin: 1.8rem 0;
  padding: 1.2rem 1.5rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-ui) var(--r-ui) 0;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  color: var(--text-2);
}

.article-body blockquote p:last-child,
.reading-wrap.prose blockquote p:last-child {
  margin-bottom: 0;
}

/* Tables retain their intrinsic columns, but never widen the page. */
.article-body .table-scroll,
.reading-wrap.prose .table-scroll,
.reading-wrap.prose > .data-table {
  max-width: 100%;
  overflow-x: auto;
  margin-block: 1.8rem;
  border-radius: var(--r-ui);
}

.article-body table,
.reading-wrap.prose table {
  width: 100%;
  min-width: 36rem;
  border-collapse: separate;
  border-spacing: 0;
  margin-block: 1.8rem;
  font-size: .92rem;
  line-height: 1.65;
}

.article-body .table-scroll table,
.reading-wrap.prose .table-scroll table,
.reading-wrap.prose > .data-table table {
  margin-block: 0;
}

.article-body th,
.reading-wrap.prose th {
  padding: .85rem 1rem;
  background: var(--text);
  color: var(--panel);
  font-weight: 500;
  text-align: left;
}

.article-body td,
.reading-wrap.prose td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}

.article-body tbody tr:nth-child(even),
.reading-wrap.prose tbody tr:nth-child(even) {
  background: var(--panel-2);
}

.article-body tbody tr:hover,
.reading-wrap.prose tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 11%, var(--panel));
}

.article-body pre,
.reading-wrap.prose pre {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  margin: 1.8rem 0;
  padding: 2.6rem 1.25rem 1.3rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-win);
  background: var(--text);
  color: var(--panel);
  font: .85rem/1.75 var(--font-mono);
}

.article-body pre::before,
.reading-wrap.prose pre::before {
  content: "●  ●  ●";
  position: absolute;
  top: .75rem;
  left: 1.25rem;
  color: var(--accent-2);
  letter-spacing: .2em;
}

.article-body :not(pre) > code,
.reading-wrap.prose :not(pre) > code {
  padding: .12rem .35rem;
  border-radius: var(--r-chip);
  background: var(--panel-2);
  font: .86em var(--font-mono);
}

.article-body .callout,
.reading-wrap.prose .callout {
  position: relative;
  margin: 1.8rem 0;
  padding: 1.2rem 1.4rem 1.2rem 3.3rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-ui) var(--r-ui) 0;
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
  color: var(--text);
}

.callout::before {
  content: "i";
  position: absolute;
  top: 1.3rem;
  left: 1.2rem;
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid currentColor;
  border-radius: var(--r-pill);
  color: var(--accent-dark);
  font: 600 .8rem var(--font-mono);
}

.callout.warning {
  border-left-color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, var(--panel));
}

.callout.warning::before {
  content: "!";
  color: var(--warn);
}

.callout.success {
  border-left-color: var(--success);
  background: color-mix(in srgb, var(--success) 9%, var(--panel));
}

.callout.success::before {
  color: var(--success);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: .8rem;
  margin: 1.8rem 0;
}

.stat-card {
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}

.stat-card:nth-child(even) {
  border-top-color: var(--success);
  background: color-mix(in srgb, var(--success) 7%, var(--panel));
}

.stat-num,
.stat-label {
  display: block;
}

.stat-num {
  color: var(--text);
  font: 500 clamp(1.3rem, 3vw, 1.85rem)/1.3 var(--font-display);
  overflow-wrap: anywhere;
}

.stat-label {
  margin-top: .5rem;
  color: var(--text-2);
  font-size: .85rem;
  line-height: 1.6;
}

.article-body .check-list,
.reading-wrap.prose .check-list {
  padding: .7rem;
  margin: 1.8rem 0;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--panel-2);
  list-style: none;
}

.check-list li {
  margin: 0;
  padding: .85rem 1rem;
  border-radius: var(--r-ui);
  background: var(--panel);
  list-style: none;
}

.check-list li + li {
  margin-top: .5rem;
}

.verdict {
  margin: 1.8rem 0;
  padding: 1.3rem 1.5rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r-ui) var(--r-ui) 0;
  background: var(--panel-2);
  color: var(--text);
}

.verdict p:last-child {
  margin-bottom: 0;
}

/* The conversion panel remains on the same reading axis. */
.promo-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-block: 1.75rem;
  border-radius: var(--r-card);
  background: linear-gradient(120deg, var(--text), color-mix(in srgb, var(--text) 82%, var(--accent)));
  color: var(--panel);
}

.promo-block h2,
.promo-block p {
  color: var(--panel);
}

.promo-block h2 {
  margin: 0 0 .45rem;
  font: 500 1.5rem/1.4 var(--font-display);
}

.promo-block p {
  margin: 0;
  line-height: 1.75;
}

.promo-block .btn-primary {
  flex: none;
  background: var(--panel);
  border-color: var(--panel);
  color: var(--text);
  box-shadow: none;
}

.promo-block .btn-primary:hover,
.promo-block .btn-primary:focus-visible {
  background: var(--panel-2);
  border-color: var(--panel-2);
  color: var(--text);
}

#related-posts {
  padding-top: 2rem;
}

#related-posts h2 {
  margin: 0 0 1rem;
  font: 500 1.5rem/1.4 var(--font-display);
  letter-spacing: -.01em;
  text-wrap: pretty;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.related-card,
.post-nav-card {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-top: 2px solid var(--border);
  border-radius: var(--r-card);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.related-card:hover,
.related-card:focus-visible,
.post-nav-card:hover,
.post-nav-card:focus-visible {
  border-top-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
}

.related-card-meta,
.post-nav-direction {
  display: block;
  margin-bottom: .65rem;
  color: var(--accent-dark);
  font: .76rem/1.5 var(--font-mono);
}

.related-card strong,
.post-nav-card strong {
  display: block;
  font: 500 .96rem/1.6 var(--font-display);
  overflow-wrap: anywhere;
}

.related-card-summary {
  display: block;
  margin-top: .65rem;
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.65;
}

#post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

#post-nav:empty,
#related-posts:empty {
  display: none;
}

@media (max-width: 860px) {
  .article-body table,
  .reading-wrap.prose table {
    display: block;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .no-break {
    white-space: normal;
  }

  .blog-index-hero {
    padding-block: 2rem 3rem;
  }

  .blog-directory {
    padding-block: 2.5rem 4rem;
  }

  .blog-post-list,
  #post-nav {
    grid-template-columns: 1fr;
  }

  .promo-block {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-hero {
    padding-block: 1rem 1.75rem;
  }

  .article-body h2,
  .reading-wrap.prose h2 {
    margin-top: 2.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-filters button,
  .blog-list-card,
  .related-card,
  .post-nav-card {
    transition: none;
  }

  .blog-list-card:hover,
  .blog-list-card:focus-within,
  .related-card:hover,
  .related-card:focus-visible,
  .post-nav-card:hover,
  .post-nav-card:focus-visible {
    transform: none;
  }
}