/* Header / nav */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: var(--rule); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; max-width: var(--width-wide); margin: 0 auto; }
.brand { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; color: var(--ink); border: 0; }
.brand small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--mute); }
.site-nav ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.site-nav a { color: var(--ink-soft); border: 0; font-size: .9rem; }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--brass); padding-bottom: 2px; }

/* Eyebrow / labels */
.eyebrow { font-family: var(--font-body); font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--brass); }

/* Buttons */
.btn { display: inline-block; font-family: var(--font-body); font-size: .9rem; color: var(--paper); background: var(--ink); padding: .7rem 1.4rem; border: 2px solid var(--ink); border-radius: 2px; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn--ghost { background: transparent; color: var(--ink); }

/* Doors (home section cards) */
.doors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin: var(--space-4) 0; }
@media (max-width: 760px) { .doors { grid-template-columns: 1fr; } }
.door { display: block; background: var(--paper-alt); border: 1px solid var(--hair); border-radius: 4px; padding: var(--space-4); color: var(--ink); border-bottom: 0; transition: transform .15s, border-color .15s; }
.door:hover { transform: translateY(-3px); border-color: var(--taupe); }
.door h2 { margin: .5rem 0 .35rem; }
.door p { color: var(--ink-soft); margin: 0; }

/* Cards (article index) */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 880px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--hair); border-radius: 4px; overflow: hidden; color: var(--ink); border-bottom: 0; }
.card__img { aspect-ratio: 16/10; background: var(--paper-alt); filter: saturate(.85) contrast(1.02) sepia(.05); }
.card__body { padding: 1.1rem 1.2rem 1.4rem; }
.card__body h3 { font-size: 1.2rem; margin: .4rem 0 .35rem; }
.card__body p { font-size: .92rem; color: var(--ink-soft); margin: 0; }

/* Article prose */
.prose { max-width: var(--width-prose); margin: 0 auto; }
.prose p, .prose li { font-size: 1.05rem; line-height: 1.8; }
.prose h2 { margin: 2.2rem 0 .8rem; }
.prose img { filter: saturate(.85) contrast(1.02) sepia(.05); border-radius: 3px; margin: 1.5rem 0; }

/* Footer */
.site-footer { border-top: var(--rule); margin-top: var(--space-6); padding: var(--space-4) 0; color: var(--mute); font-size: .85rem; }
.site-footer__inner { max-width: var(--width-wide); margin: 0 auto; padding: 0 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.site-footer a { color: var(--mute); border: 0; }

/* ════════════ Plan B — editorial + timeline content components ════════════
   Ported from the source portal (../Permanent-wave.com/assets/css/components.css
   + base.css). Token mapping (source → new site tokens.css):
     --font-serif → --font-display | --font-sans → --font-body
     --muted → --mute | --muted-2 → --mute | --text → --ink-soft
     --hairline / --hairline-2 → --hair | --hairline-strong → --taupe
     --brass-soft → rgba(111,101,83,.18) | --on-ink → --paper | --on-ink-muted → --mute
     --measure → --width-prose | --container-narrow → --width-prose
     --fs-small → .92rem | --fs-eyebrow → .72rem | --fs-h3 → 1.3rem
     --radius (6px) → 4px (new site radius) | --tap → 44px | --shadow → literal
   Tokens not in the new system (--coil-brass / --coil-ink / --archive-filter)
   are inlined as the SVG data-URI / filter the source baked into them, so the
   motif + figure grade ship without touching tokens.css. */

/* ---- Layout: narrow reading column + section padding (source base.css) ---- */
.container-narrow { width: 100%; max-width: var(--width-prose); margin-inline: auto; padding-inline: 1rem; }
.section { padding-block: var(--space-5); }
.section--tight { padding-block: var(--space-4); }

/* ---- Figures (source) ---- */
.figure { margin: var(--space-3) 0; }
.figure figcaption { font-size: .9rem; color: var(--mute); margin-top: var(--space-1); max-width: var(--width-prose); }
/* Archival photo tone — keep the muted-warm grade used on .card__img / .prose img. */
.figure--archive img { filter: saturate(.85) contrast(1.02) sepia(.05); border-radius: 3px; }

/* ---- Standfirst / lede (source chapters) ---- */
.lede {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: var(--width-prose);
  margin: var(--space-3) 0 var(--space-4);
}

/* ---- Sources & further reading (source) ---- */
.sources {
  list-style: none; padding: 0;
  margin: var(--space-2) 0 var(--space-4);
  max-width: var(--width-prose);
  font-size: .9rem; color: var(--mute);
  display: grid; gap: var(--space-1);
}
.sources li { position: relative; padding-left: 1.25rem; line-height: 1.5; }
.sources li::before { content: "—"; position: absolute; left: 0; color: var(--brass); }

/* ---- Pull quote (source) ---- */
.pullquote {
  font-family: var(--font-display); font-size: 1.3rem; color: var(--ink);
  border-left: 3px solid var(--brass); padding-left: var(--space-3);
  margin: var(--space-4) 0; max-width: var(--width-prose);
}

/* ---- Data tables (source) ---- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; margin: var(--space-3) 0; }
table.data th, table.data td { border-bottom: 1px solid var(--hair); padding: .7rem .7rem; text-align: left; vertical-align: top; }
table.data thead th { border-bottom: 2px solid var(--ink); color: var(--ink); font-family: var(--font-display); }
table.data tbody tr:nth-child(even) { background: rgba(111, 101, 83, 0.05); }

/* ---- Arrow link (source) ---- */
.arrow-link { color: var(--brass); font-weight: 600; border: 0; font-size: .9rem; }
.arrow-link:hover { text-decoration: underline; border-bottom-color: transparent; }

/* ---- Chapter nav (source) ---- */
.chapter-nav {
  display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2);
  margin: var(--space-3) 0 var(--space-4);
  padding-bottom: var(--space-2); border-bottom: var(--rule);
  position: sticky; top: 64px; background: var(--paper); z-index: 5;
}
.chapter-nav a { font-size: .85rem; color: var(--mute); border: 0; padding: .25rem 0; }
.chapter-nav a:hover { color: var(--brass); border-bottom-color: transparent; }
.chapter-nav__prev { margin-inline-end: auto; }
.chapter-nav__up { order: 99; }
.chapter-nav__next { margin-inline-start: auto; }

/* ---- Chapter plan (source chapters) ---- */
.chapter-plan {
  background: var(--paper-alt);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--brass);
  border-radius: 4px;
  padding: var(--space-3) var(--space-4);
  margin: var(--space-3) 0 var(--space-4);
}
.chapter-plan ol { margin: var(--space-1) 0 0; padding-left: 1.3rem; }
.chapter-plan li { margin-block: .3rem; }

/* ---- Coil divider (source hr.coil-divider) — the flat-winding motif ----
   --coil-brass is inlined (the brass spiral data-URI baked into the source token). */
hr.coil-divider {
  border: 0; height: 34px; margin-block: var(--space-5);
  background:
    linear-gradient(var(--hair), var(--hair)) left center / calc(50% - 19px) 1px no-repeat,
    linear-gradient(var(--hair), var(--hair)) right center / calc(50% - 19px) 1px no-repeat,
    url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2040%2040'%3E%3Cpath%20d%3D'M20.00%2C20.00%20L20.18%2C20.04%20L20.33%2C20.14%20L20.45%2C20.30%20L20.51%2C20.51%20L20.50%2C20.75%20L20.41%2C21.00%20L20.25%2C21.24%20L20.00%2C21.45%20L19.68%2C21.59%20L19.31%2C21.67%20L18.90%2C21.65%20L18.47%2C21.53%20L18.05%2C21.30%20L17.66%2C20.97%20L17.34%2C20.53%20L17.11%2C20.00%20L16.99%2C19.40%20L17.00%2C18.76%20L17.15%2C18.09%20L17.45%2C17.45%20L17.89%2C16.85%20L18.48%2C16.33%20L19.19%2C15.93%20L20.00%2C15.66%20L20.88%2C15.57%20L21.80%2C15.66%20L22.71%2C15.94%20L23.58%2C16.42%20L24.36%2C17.09%20L25.01%2C17.93%20L25.49%2C18.91%20L25.78%2C20.00%20L25.85%2C21.16%20L25.67%2C22.35%20L25.26%2C23.51%20L24.60%2C24.60%20L23.71%2C25.56%20L22.63%2C26.34%20L21.37%2C26.91%20L20.00%2C27.23%20L18.56%2C27.26%20L17.10%2C27.01%20L15.68%2C26.46%20L14.38%2C25.62%20L13.24%2C24.52%20L12.32%2C23.18%20L11.67%2C21.66%20L11.33%2C20.00%20L11.32%2C18.27%20L11.66%2C16.54%20L12.34%2C14.88%20L13.36%2C13.36%20L14.68%2C12.04%20L16.27%2C10.99%20L18.06%2C10.26%20L20.00%2C9.88%20L22.01%2C9.90%20L24.01%2C10.32%20L25.92%2C11.14%20L27.66%2C12.34%20L29.16%2C13.88%20L30.35%2C15.71%20L31.16%2C17.78%20L31.56%2C20.00%20L31.52%2C22.29%20L31.01%2C24.56%20L30.06%2C26.72%20L28.69%2C28.69%20L26.92%2C30.36%20L24.84%2C31.68%20L22.50%2C32.58%20L20.00%2C33.01%20L17.43%2C32.93%20L14.88%2C32.35%20L12.47%2C31.26%20L10.29%2C29.71%20L8.43%2C27.73%20L6.98%2C25.39%20L6.00%2C22.78%20L5.55%2C20.00%20L5.65%2C17.15%20L6.31%2C14.33%20L7.53%2C11.67%20L9.27%2C9.27%20L11.47%2C7.23%20L14.05%2C5.65%20L16.93%2C4.59%20L20.00%2C4.10%20L23.14%2C4.23%20L26.22%2C4.98%20L29.13%2C6.33%20L31.75%2C8.25%20L33.97%2C10.67%20L35.69%2C13.50%20L36.83%2C16.65%20L37.34%2C20.00'%20fill%3D'none'%20stroke%3D'%236f6553'%20stroke-width%3D'1.7'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%2F%3E%3C%2Fsvg%3E") center / 34px 34px no-repeat;
}

/* ---- Brass band + stats (source) ----
   --coil-ink inlined as the band's watermark. --on-ink → --paper, --on-ink-muted → --mute. */
.band { position: relative; overflow: hidden; background: var(--brass); color: var(--paper); padding-block: var(--space-6); margin-block: var(--space-5); }
.band-inner { position: relative; z-index: 1; }
.band .eyebrow { color: var(--paper); opacity: 0.75; }
.band h2 { color: var(--paper); }
.band p { color: rgba(250, 248, 244, 0.85); max-width: 60ch; }
.band::after {
  content: ""; position: absolute; right: -3rem; top: 50%; transform: translateY(-50%);
  width: 360px; height: 360px; max-width: 60vw;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2040%2040'%3E%3Cpath%20d%3D'M20.00%2C20.00%20L20.18%2C20.04%20L20.33%2C20.14%20L20.45%2C20.30%20L20.51%2C20.51%20L20.50%2C20.75%20L20.41%2C21.00%20L20.25%2C21.24%20L20.00%2C21.45%20L19.68%2C21.59%20L19.31%2C21.67%20L18.90%2C21.65%20L18.47%2C21.53%20L18.05%2C21.30%20L17.66%2C20.97%20L17.34%2C20.53%20L17.11%2C20.00%20L16.99%2C19.40%20L17.00%2C18.76%20L17.15%2C18.09%20L17.45%2C17.45%20L17.89%2C16.85%20L18.48%2C16.33%20L19.19%2C15.93%20L20.00%2C15.66%20L20.88%2C15.57%20L21.80%2C15.66%20L22.71%2C15.94%20L23.58%2C16.42%20L24.36%2C17.09%20L25.01%2C17.93%20L25.49%2C18.91%20L25.78%2C20.00%20L25.85%2C21.16%20L25.67%2C22.35%20L25.26%2C23.51%20L24.60%2C24.60%20L23.71%2C25.56%20L22.63%2C26.34%20L21.37%2C26.91%20L20.00%2C27.23%20L18.56%2C27.26%20L17.10%2C27.01%20L15.68%2C26.46%20L14.38%2C25.62%20L13.24%2C24.52%20L12.32%2C23.18%20L11.67%2C21.66%20L11.33%2C20.00%20L11.32%2C18.27%20L11.66%2C16.54%20L12.34%2C14.88%20L13.36%2C13.36%20L14.68%2C12.04%20L16.27%2C10.99%20L18.06%2C10.26%20L20.00%2C9.88%20L22.01%2C9.90%20L24.01%2C10.32%20L25.92%2C11.14%20L27.66%2C12.34%20L29.16%2C13.88%20L30.35%2C15.71%20L31.16%2C17.78%20L31.56%2C20.00%20L31.52%2C22.29%20L31.01%2C24.56%20L30.06%2C26.72%20L28.69%2C28.69%20L26.92%2C30.36%20L24.84%2C31.68%20L22.50%2C32.58%20L20.00%2C33.01%20L17.43%2C32.93%20L14.88%2C32.35%20L12.47%2C31.26%20L10.29%2C29.71%20L8.43%2C27.73%20L6.98%2C25.39%20L6.00%2C22.78%20L5.55%2C20.00%20L5.65%2C17.15%20L6.31%2C14.33%20L7.53%2C11.67%20L9.27%2C9.27%20L11.47%2C7.23%20L14.05%2C5.65%20L16.93%2C4.59%20L20.00%2C4.10%20L23.14%2C4.23%20L26.22%2C4.98%20L29.13%2C6.33%20L31.75%2C8.25%20L33.97%2C10.67%20L35.69%2C13.50%20L36.83%2C16.65%20L37.34%2C20.00'%20fill%3D'none'%20stroke%3D'%231a1a1a'%20stroke-width%3D'1.7'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%2F%3E%3C%2Fsvg%3E") center / contain no-repeat;
  opacity: 0.08; pointer-events: none;
}
.stat-row { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-4); }
.stat { min-width: 8.5rem; }
.stat .num { font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.3rem); line-height: 1; color: var(--paper); }
.stat .cap { font-size: .85rem; color: rgba(250, 248, 244, 0.78); margin-top: .35rem; }
@media (max-width: 560px) {
  .band::after { width: 240px; height: 240px; opacity: 0.06; right: -4rem; }
}

/* ---- Reading spine: date + place marginalia per life-moment (source .beat) ---- */
.beat { display: grid; grid-template-columns: minmax(6.5rem, 7.5rem) 1fr; column-gap: 2rem; margin-block: var(--space-4); }
.beat-label { position: relative; padding-left: .75rem; }
.beat-label::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); }
.beat-date { font-family: var(--font-display); font-weight: 600; color: var(--ink); line-height: 1.1; }
.beat-place { font-family: var(--font-body); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); margin-top: .2rem; }
.beat-body > p:first-child { margin-top: 0; }
.beat-body > p:last-child { margin-bottom: 0; }
@media (max-width: 640px) {
  .beat { grid-template-columns: 1fr; row-gap: .35rem; margin-block: var(--space-3); }
}

/* ---- Roster callout (source) ---- */
.roster {
  border: 1px solid var(--hair); border-left: 3px solid var(--brass);
  border-radius: 4px; padding: var(--space-2) var(--space-3);
  margin-block: var(--space-3); background: rgba(111, 101, 83, 0.04);
}
.roster-title { margin: 0 0 .5rem; font-family: var(--font-display); color: var(--ink); }
.roster dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; column-gap: 1rem; row-gap: .2rem; }
.roster dt { font-family: var(--font-display); color: var(--ink); }
.roster dd { margin: 0; color: var(--mute); font-size: .9rem; }
@media (max-width: 540px) {
  .roster dl { grid-template-columns: 1fr; row-gap: .1rem; }
  .roster dt { font-size: .9rem; }
  .roster dd { margin: 0 0 .55rem; }
}

/* ---- Patent data table: reflow to stacked cards on phones (source) ---- */
table.patent-data { width: 100%; border-collapse: collapse; font-size: .9rem; margin: var(--space-3) 0; }
table.patent-data th, table.patent-data td { border-bottom: 1px solid var(--hair); padding: .7rem .7rem; text-align: left; vertical-align: top; }
table.patent-data thead th { border-bottom: 2px solid var(--ink); color: var(--ink); font-family: var(--font-display); }
@media (max-width: 560px) {
  table.patent-data thead { display: none; }
  table.patent-data, table.patent-data tbody, table.patent-data tr, table.patent-data td { display: block; width: 100%; box-sizing: border-box; }
  table.patent-data tbody tr {
    border: 1px solid var(--hair); border-left: 3px solid var(--brass);
    border-radius: 4px; padding: .4rem .85rem .55rem;
    margin-bottom: var(--space-2); background: rgba(111, 101, 83, 0.04);
  }
  table.patent-data td { padding: .3rem 0; border: 0; }
  table.patent-data td::before {
    content: attr(data-label) " \2014 ";
    font-family: var(--font-display); color: var(--brass);
    font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  }
  table.patent-data td:first-child {
    font-family: var(--font-display); font-size: 1.2rem; color: var(--ink);
    line-height: 1.2; border-bottom: 1px solid var(--hair);
    padding: .1rem 0 .45rem; margin-bottom: .15rem;
  }
  table.patent-data td:first-child::before { content: ""; }
}

/* ════════════ Interactive timeline (source .tl-* block, ~lines 76–119) ════════════ */
.tl-wrap { padding-block: var(--space-3); }
.tl-legend { display: flex; gap: var(--space-3); font-size: .9rem; color: var(--mute); margin-bottom: var(--space-3); }
.tl-swatch { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.tl-swatch.life { background: var(--brass); }
.tl-swatch.world { background: var(--ink); }

.tl-stage { position: relative; padding-block: 2.5rem; outline: none; }
.tl-axis { position: relative; height: 2px; background: var(--taupe); margin: 0; }
.tl-tick { position: absolute; top: 8px; transform: translateX(-50%); font-family: var(--font-display); font-size: .9rem; color: var(--mute); }
.tl-track { position: relative; height: 0; }
.tl-track--world { margin-bottom: 2px; }
.tl-track--life { margin-top: 2px; }
.tl-dot {
  position: absolute; top: 0; transform: translate(-50%, -50%);
  width: 13px; height: 13px; padding: 0; border: 0; border-radius: 50%;
  cursor: pointer; min-width: 44px; min-height: 44px; background: transparent;
}
.tl-dot::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 12px; height: 12px; border-radius: 50%; background: var(--brass);
}
.tl-dot--world::after { background: var(--ink); }
.tl-dot.is-major::after { width: 16px; height: 16px; box-shadow: 0 0 0 4px rgba(111, 101, 83, 0.18); }
.tl-dot:hover::after, .tl-dot:focus-visible::after { transform: translate(-50%, -50%) scale(1.25); }

.tl-detail { margin-top: var(--space-3); min-height: 7rem; }
.tl-card { background: var(--paper); border: 1px solid var(--hair); border-radius: 4px; box-shadow: 0 18px 55px rgba(26, 26, 26, 0.10); padding: var(--space-3); max-width: 560px; }
.tl-card-title { margin-top: .25rem; }
.tl-card p { max-width: none; }

.tl-hint { font-size: .82rem; color: var(--mute); margin-top: var(--space-1); }

@media (max-width: 620px) {
  .tl-stage { display: none; }
}
.tl-mobile { display: none; list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.tl-m-item { display: flex; gap: var(--space-2); padding: var(--space-2) 0; border-top: 1px solid var(--hair); }
.tl-m-year { font-family: var(--font-display); color: var(--brass); font-weight: 600; min-width: 3.5em; }
.tl-m-place { color: var(--mute); }
.tl-m-item p { margin: .25rem 0 0; max-width: none; }
@media (max-width: 620px) {
  .tl-mobile { display: block; }
}

/* ---- Glossary: stacked definition list (source glossary.html:11-21) ----
   Stacked layout avoids the max-content overflow the two-column .roster grid
   hits on phones when the term is a long phrase. Token mapping per the Plan B
   header above: --hairline → --hair | --muted → --mute | --font-serif →
   --font-display. Source --fs-h4 / --fs-small / --fs-xs are not in the new
   token set; ported as literals (1.3rem / .92rem / .82rem), consistent with
   the .sources / .lede treatments elsewhere in this file. */
.glossary-dl { margin: var(--space-3) 0 0; }
.glossary-dl .entry { padding-block: var(--space-3); border-top: 1px solid var(--hair); }
.glossary-dl .entry:first-child { border-top: none; }
.glossary-dl dt { font-family: var(--font-display); color: var(--ink); font-size: 1.3rem; line-height: 1.25; margin-bottom: .35rem; }
.glossary-dl dd { margin: 0; color: var(--mute); font-size: .92rem; line-height: 1.6; }
.glossary-dl dd .see { display: block; margin-top: .35rem; font-size: .82rem; }
.glossary-dl dd em { font-style: italic; color: var(--ink); }
