/* ==========================================================================
   Articles — editorial design system for the CD Digital Chess articles section.
   Serif display + serif body on warm paper; Manrope/Inter for UI chrome.
   Second pass: tighter hero, editorial series nav, section numbering,
   rule-based stats, method callout, sticky reading rail on wide screens.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("/assets/Inter/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/Inter/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/Manrope/Manrope-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Theme tokens mirror the CD Digital Chess lesson theme defined in
   lessons/endgame-lesson.css (:root light tokens + [data-theme="dark"] dark
   tokens), so Articles reads as the editorial expression of the same palette.
   Light mode keeps the warm editorial paper tone, which sits comfortably
   beside the lesson theme's cool neutrals. */
:root {
  color-scheme: light dark;
  --paper: #f7f5f0;
  --paper-raised: #fffefb;
  --ink: #172127;
  --ink-soft: #52606a;
  --muted: #7b8790;
  --hairline: rgba(190, 202, 207, 0.78);
  --accent: #1d6f78;
  --accent-strong: #155e67;
  --accent-soft: rgba(29, 111, 120, 0.11);
  /* The hero is always a dark band, in both color schemes. */
  --hero-bg: #0c1a1d;
  --hero-ink: #f7faf5;
  --hero-muted: #899695;
  --hero-dek: #b9c6c3;
  --hero-rule: rgba(52, 74, 78, 0.9);
  --font-ui: "Inter", system-ui, sans-serif;
  --font-label: "Manrope", "Inter", system-ui, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #071012;
    --paper-raised: #1a2b2f;
    --ink: #f7faf5;
    --ink-soft: #b9c6c3;
    --muted: #899695;
    --hairline: rgba(52, 74, 78, 0.9);
    --accent: #8ad8b7;
    --accent-strong: #b0e8cf;
    --accent-soft: rgba(138, 216, 183, 0.16);
    --hero-bg: #040d0e;
    --hero-ink: #f7faf5;
    --hero-muted: #899695;
    --hero-dek: #b9c6c3;
    --hero-rule: rgba(52, 74, 78, 0.9);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-ui);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}

.masthead-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-label);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 26px;
}

.nav-link {
  position: relative;
  color: var(--ink-soft);
  font-family: var(--font-label);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 4px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transition: right 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.is-active::after {
  right: 0;
}

/* --------------------------------------------------------------------------
   Hero — full-bleed editorial band
   -------------------------------------------------------------------------- */

.hero {
  /* The hero band is always dark, so it uses the dark-theme accent values
     from the lesson theme regardless of the page's color scheme. */
  --accent: #8ad8b7;
  --accent-strong: #b0e8cf;
  --accent-soft: rgba(138, 216, 183, 0.16);
  position: relative;
  background: var(--hero-bg);
  color: var(--hero-ink);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(42px, 6.5vw, 78px) 0 clamp(30px, 4.5vw, 52px);
}

.hero-piece {
  position: absolute;
  right: max(-48px, calc((100vw - 1180px) / -2 - 48px));
  bottom: -64px;
  width: clamp(200px, 26vw, 380px);
  opacity: 0.065;
  transform: rotate(10deg);
  pointer-events: none;
  user-select: none;
}

.hero-checkers {
  height: 12px;
  background-image: conic-gradient(var(--paper) 0 25%, transparent 0 50%, var(--paper) 0 75%, transparent 0);
  background-size: 24px 24px;
  background-color: var(--hero-bg);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--hero-muted);
  font-family: var(--font-label);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--accent);
}

h1,
h2,
h3 {
  font-style: normal;
}

h1 {
  max-width: 940px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.15rem, 4.8vw, 4.05rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.standfirst {
  max-width: 62ch;
  margin: 20px 0 0;
  color: var(--hero-dek);
  font-family: var(--font-body);
  font-size: clamp(1.02rem, 1.8vw, 1.18rem);
  line-height: 1.58;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 24px;
  color: var(--hero-muted);
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.article-meta .meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--hero-muted);
}

.article-tag {
  border: 1px solid var(--hero-rule);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--hero-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Hero with editorial image (articles index) — text left, artwork right */
.hero-inner.has-media {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-media {
  margin: 0;
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--hero-rule);
  border-radius: 6px;
}

/* Feature image between hero and article column (Parts 1–4) */
.article-figure {
  width: min(1150px, calc(100% - 48px));
  margin: clamp(28px, 4.5vw, 48px) auto 0;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--paper-raised);
}

.article-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: right;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Series navigation — editorial numbered row
   -------------------------------------------------------------------------- */

.series-pills {
  display: flex;
  flex-wrap: nowrap;
  margin-top: 30px;
  border-top: 1px solid var(--hero-rule);
  overflow-x: auto;
  scrollbar-width: none;
}

.series-pills::-webkit-scrollbar {
  display: none;
}

.series-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 22px 12px 0;
  color: var(--hero-muted);
  font-family: var(--font-label);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease;
}

.series-pill + .series-pill {
  margin-left: 22px;
  padding-left: 22px;
  border-left: 1px solid var(--hero-rule);
}

.series-pill .pill-num {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.series-pill:hover,
.series-pill:focus-visible {
  color: var(--hero-ink);
}

.series-pill.is-current {
  color: var(--hero-ink);
  border-bottom-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Layout containers
   -------------------------------------------------------------------------- */

.article-body {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(36px, 5.5vw, 60px) 24px clamp(52px, 7vw, 80px);
  counter-reset: secnum;
}

.page-footer {
  border-top: 1px solid var(--hairline);
}

.page-footer-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   Article typography
   -------------------------------------------------------------------------- */

.article-body p {
  margin: 1.3em 0;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 1.13rem;
  line-height: 1.74;
}

.article-body .lede {
  color: var(--ink);
  font-size: clamp(1.3rem, 2vw, 1.56rem);
  line-height: 1.56;
}

.article-body .lede::first-letter {
  float: left;
  padding: 5px 12px 0 0;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 3.1em;
  font-weight: 700;
  line-height: 0.82;
}

.article-body h2 {
  margin: 2.5em 0 0.7em;
  scroll-margin-top: 48px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.42rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.22;
}

.article-body h3 {
  margin: 1.9em 0 0.5em;
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.article-body ul,
.article-body ol {
  margin: 1.25em 0;
  padding-left: 1.35em;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.74;
}

.article-body li + li {
  margin-top: 0.55em;
}

.article-body li::marker {
  color: var(--accent);
}

.article-body a,
.article-body a:visited {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent-strong) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.article-body a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.article-body strong {
  color: var(--ink);
}

/* Section numbering: "01 · KICKER" driven by a counter on each h2's kicker */
.h2-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.h2-kicker::before {
  counter-increment: secnum;
  content: counter(secnum, decimal-leading-zero) "\2002—\2002";
  color: var(--muted);
}

hr.article-rule {
  margin: 3em auto;
  border: none;
  width: 60px;
  height: 2px;
  background: var(--hairline);
}

/* --------------------------------------------------------------------------
   In-this-part TOC (in-flow; becomes a sticky rail on wide screens)
   -------------------------------------------------------------------------- */

.part-toc {
  margin: 2.2em 0;
  padding: 20px 0 22px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--hairline);
}

.part-toc-series {
  display: none;
  margin: 0 0 14px;
  color: var(--accent);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.part-toc-title {
  margin: 0 0 10px;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.part-toc ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: toc;
}

.part-toc li {
  counter-increment: toc;
}

.part-toc a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  color: var(--ink);
  font-family: var(--font-label);
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.15s ease;
}

.part-toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.part-toc a:hover,
.part-toc a:focus-visible {
  color: var(--accent-strong);
}

.part-toc a.is-here {
  color: var(--accent-strong);
}

.part-toc a.is-here::before {
  color: var(--accent);
}

/* Wide screens: TOC becomes a quiet sticky rail left of the column.
   Scoped with :has() so pages without a TOC stay centered. */
@media (min-width: 1360px) {
  .article-body:has(> .part-toc) {
    display: grid;
    grid-template-columns: 215px minmax(0, 44rem);
    column-gap: 88px;
    justify-content: center;
    max-width: 1280px;
  }

  .article-body > * {
    grid-column: 2;
  }

  .article-body > .part-toc {
    grid-column: 1;
    grid-row: 1 / -1;
    position: sticky;
    top: 72px;
    align-self: start;
    margin: 0;
    padding: 20px 0 0;
    border-bottom: none;
  }

  .article-body > .part-toc .part-toc-series {
    display: block;
  }

  .article-body > .part-toc .part-toc-title {
    margin-bottom: 6px;
  }
}

/* --------------------------------------------------------------------------
   By-the-numbers stats — editorial rule treatment
   -------------------------------------------------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin: 2.2em 0;
}

.stat-card {
  padding: 0 2px;
}

.stat-value {
  display: block;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.stat-label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Pull quote — centered magazine style
   -------------------------------------------------------------------------- */

.pull-quote {
  position: relative;
  margin: 2.6em 0;
  padding: 0 24px;
  text-align: center;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.28rem, 2.8vw, 1.6rem);
  font-style: italic;
  line-height: 1.5;
}

.pull-quote::before {
  content: "\201C";
  display: block;
  height: 0.5em;
  color: var(--accent);
  font-size: 2.6em;
  font-style: normal;
  line-height: 1;
}

.pull-quote cite {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Key-points panel ("Why it works")
   -------------------------------------------------------------------------- */

.why-it-works {
  margin: 2.2em 0;
  padding: 24px 28px;
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--accent);
  background: var(--paper-raised);
}

.why-it-works-title {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.why-it-works ul {
  margin: 0;
  padding-left: 1.2em;
}

/* --------------------------------------------------------------------------
   Method feature — magazine pull-out sidebar
   -------------------------------------------------------------------------- */

.method-feature {
  margin: 2.4em 0;
  padding: 26px 0 8px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--hairline);
}

.method-feature-title {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.method-feature-dek {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.5;
}

.method-feature ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: method;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
}

.method-feature li {
  counter-increment: method;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft);
  font-family: var(--font-label);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.5;
}

.method-feature li::before {
  content: counter(method, decimal-leading-zero);
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   Comparison table
   -------------------------------------------------------------------------- */

.fact-table-wrap {
  overflow-x: auto;
  margin: 2em 0;
}

.fact-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-family: var(--font-label);
  font-size: 0.88rem;
  line-height: 1.55;
}

.fact-table caption {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.fact-table th,
.fact-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}

.fact-table thead th {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fact-table tbody td:first-child {
  color: var(--ink);
  font-weight: 800;
}

.fact-table tbody tr:hover td {
  background: var(--paper-raised);
}

/* --------------------------------------------------------------------------
   Sources
   -------------------------------------------------------------------------- */

.sources {
  margin: 3em 0 0;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.sources h2 {
  margin: 0 0 1em;
  font-family: var(--font-label);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sources ol {
  margin: 0;
  padding-left: 1.4em;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.84rem;
  line-height: 1.7;
}

.sources li {
  padding-left: 6px;
}

.sources li + li {
  margin-top: 0.6em;
}

.sources li::marker {
  color: var(--accent);
  font-weight: 800;
}

.sources a,
.sources a:visited {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent-strong) 40%, transparent);
  text-underline-offset: 2px;
}

.sources a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Next-part transition — strong editorial block
   -------------------------------------------------------------------------- */

.part-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin: 3.4em 0 0;
  padding: 30px 0 34px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.part-next-eyebrow {
  display: block;
  color: var(--accent);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.part-next-part {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.part-next-title {
  display: block;
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.16;
  transition: color 0.15s ease;
}

.part-next:hover .part-next-title,
.part-next:focus-visible .part-next-title {
  color: var(--accent-strong);
}

.part-next-dek {
  display: block;
  margin-top: 10px;
  max-width: 52ch;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.55;
}

.part-next-meta {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.part-next-arrow {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-label);
  font-size: 1.35rem;
  transition: border-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.part-next:hover .part-next-arrow,
.part-next:focus-visible .part-next-arrow {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateX(5px);
}

.article-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2.4em;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}

.article-nav a {
  color: var(--accent-strong);
  font-family: var(--font-label);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.article-nav a:hover,
.article-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Reading progress bar
   -------------------------------------------------------------------------- */

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}

.read-progress-bar {
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* --------------------------------------------------------------------------
   Index page — editorial list
   -------------------------------------------------------------------------- */

.index-body {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) 0 clamp(56px, 8vw, 88px);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

.series-feature {
  border-top: 2px solid var(--ink);
}

.series-feature-head {
  display: block;
  padding: 30px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  text-decoration: none;
}

.series-feature-head .card-kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.series-feature-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.16;
  transition: color 0.15s ease;
}

a.series-feature-head:hover .series-feature-title,
a.series-feature-head:focus-visible .series-feature-title {
  color: var(--accent-strong);
}

.series-feature-copy {
  max-width: 68ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.part-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  text-decoration: none;
}

.part-num {
  flex: 0 0 auto;
  width: 84px;
  color: var(--hairline);
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  transition: color 0.15s ease;
}

.part-row:hover .part-num,
.part-row:focus-visible .part-num {
  color: var(--accent);
}

.part-row-body {
  flex: 1;
  min-width: 0;
}

.part-row-title {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.26;
  transition: color 0.15s ease;
}

.part-row:hover .part-row-title,
.part-row:focus-visible .part-row-title {
  color: var(--accent-strong);
}

.part-row-desc {
  display: block;
  margin-top: 7px;
  max-width: 56ch;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.55;
}

.part-row-time {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.part-row-arrow {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-label);
  font-size: 1.1rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.part-row:hover .part-row-arrow,
.part-row:focus-visible .part-row-arrow {
  border-color: var(--accent);
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .hero-inner.has-media {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 720px) {
  .masthead-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 18px;
  }

  .hero-piece {
    width: 170px;
    right: -30px;
    bottom: -44px;
    opacity: 0.05;
  }

  .stat-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stat-card {
    padding-bottom: 4px;
  }

  .method-feature ol {
    grid-template-columns: 1fr;
  }

  .part-num {
    width: 52px;
    font-size: 2rem;
  }

  .part-row {
    gap: 16px;
    padding: 20px 0;
  }

  .part-row-arrow {
    width: 38px;
    height: 38px;
  }

  .part-next {
    align-items: flex-start;
  }

  .part-next-arrow {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    margin-top: 4px;
  }

  .page-footer-inner {
    flex-direction: column;
    gap: 6px;
  }
}
