/* Article Reading Surface — inherits Steel-Framed Glazier Partition tokens from styles.css */

.article-transom-top {
  display: grid;
  grid-template-columns: 1.05fr 2.9fr 1.65fr;
  gap: var(--mullion-w);
  min-height: clamp(76px, 10vh, 98px);
}

.article-back-pane {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.article-track-bar {
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.article-track-meta {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: var(--mullion-w);
}

.article-hero-primary {
  justify-content: space-between;
  padding: clamp(28px, 4.5vw, 56px) clamp(24px, 4.2vw, 52px);
  gap: 24px;
}

.article-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.article-status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background-color: var(--amber-bg);
  color: var(--ink-on-amber);
  font-size: 0.82rem;
  font-weight: 700;
}

.article-date {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-muted-on-cobalt);
}

.article-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ink-on-cobalt);
  text-wrap: balance;
}

.article-lead {
  margin: 0;
  max-width: 58ch;
  font-size: clamp(1rem, 1.2vw, 1.14rem);
  line-height: 1.6;
  color: var(--ink-muted-on-cobalt);
}

.article-outline-pane {
  justify-content: space-between;
  padding: clamp(24px, 3vw, 38px);
  gap: 20px;
}

.outline-heading {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.outline-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.outline-list a {
  display: inline-block;
  padding: 4px 0;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(127, 138, 154, 0.45);
}

.outline-list a:hover {
  color: var(--cobalt-bg);
  text-decoration-color: currentColor;
}

.article-author-box {
  padding-top: 16px;
  border-top: 1px solid rgba(127, 138, 154, 0.28);
  display: grid;
  gap: 10px;
}

.article-author-meta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.article-copy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn-outline-neutral {
  min-block-size: 44px;
  padding: 9px 16px;
  border: 2px solid var(--control-border);
  border-radius: 6px;
  background-color: var(--seeded-bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

.btn-outline-neutral:hover {
  background-color: var(--amber-bg);
  color: var(--ink-on-amber);
}

.article-copy-feedback {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cobalt-bg);
  min-height: 1.3em;
}

/* Main Reading Body Pane */
.article-body-pane {
  padding: clamp(28px, 4.5vw, 60px) clamp(20px, 4vw, 48px);
  justify-content: flex-start;
}

.prose {
  width: 100%;
  max-width: 70ch;
  margin-inline: auto;
  font-size: clamp(1rem, 1.08vw, 1.06rem);
  line-height: 1.78;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 40px 0 14px;
  padding-top: 28px;
  border-top: 1px solid rgba(127, 138, 154, 0.28);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.8vw, 1.62rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  scroll-margin-top: 20px;
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin: 26px 0 10px;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.38;
}

.prose p {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  margin: 0 0 20px;
  padding-inline-start: 1.35rem;
  display: grid;
  gap: 8px;
}

.prose li strong {
  color: var(--ink);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: var(--mist-bg);
}

.prose a {
  color: var(--cobalt-bg);
  font-weight: 600;
  text-underline-offset: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .prose a {
    color: #7ca2ff;
  }
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .prose a {
  color: #7ca2ff;
}

.callout-box {
  margin: 24px 0;
  padding: 18px 22px;
  background-color: var(--mist-bg);
  border: 1px solid rgba(127, 138, 154, 0.3);
  border-radius: 6px;
}

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

.code-figure {
  margin: 24px 0;
}

.code-figure figcaption {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.code-figure pre {
  margin: 0;
  padding: 18px 20px;
  background-color: #0e131a;
  color: #eef2f6;
  color-scheme: dark;
  border: 1px solid #273140;
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.62;
}

.code-figure pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.table-scroll {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid rgba(127, 138, 154, 0.3);
  border-radius: 6px;
}

.table-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  text-align: left;
}

.table-scroll caption {
  padding: 12px 14px;
  font-weight: 700;
  text-align: left;
  background-color: var(--mist-bg);
  border-bottom: 1px solid rgba(127, 138, 154, 0.3);
}

.table-scroll th,
.table-scroll td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(127, 138, 154, 0.22);
  vertical-align: top;
}

.table-scroll th {
  font-family: var(--font-display);
  font-weight: 700;
  background-color: var(--mist-bg);
}

.table-scroll tr:last-child td {
  border-bottom: 0;
}

/* Bottom Article Nav Transom */
.article-nav-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--mullion-w);
  min-height: 92px;
}

.article-nav-pane {
  gap: 4px;
}

.article-nav-kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.pane-cobalt .article-nav-kicker {
  color: var(--ink-muted-on-cobalt);
}

.article-nav-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 1024px) {
  .article-transom-top {
    grid-template-columns: 1fr 1fr;
  }

  .article-track-bar {
    grid-column: 1 / -1;
    order: 3;
  }

  .article-hero,
  .article-nav-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .article-transom-top {
    grid-template-columns: 1fr;
  }

  .article-track-bar {
    order: 0;
  }

  .article-hero-primary,
  .article-outline-pane,
  .article-body-pane {
    padding: 22px 18px;
  }
}
