/* ==========================================================================
   RiskFramework.org — site.css
   Build spec v1.1 · One typeface, one accent, one philosopher.
   Sections: 1 fonts · 2 tokens · 3 base + type · 4 layout · 5 header/footer
             6 buttons · 7 components · 8 content elements · 9 map walk
             10 dark mode · 11 print
   ========================================================================== */

/* 1. Fonts — self-hosted Figtree (latin subset). Note: latin-ext (needed for
   the Greek gloss words epistēmē/technē) is not bundled yet; add
   figtree-latin-ext-*.woff2 alongside these when Thinking launches. */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/figtree-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/figtree-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/figtree-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/figtree-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/figtree-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/figtree-latin-800-normal.woff2') format('woff2'); }

/* 2. Tokens — §2. Semantic tokens swap in dark mode; raw brand colours don't. */
:root {
  --navy: #14275A;
  --slate: #3C4A6B;
  --mist: #F4F6FA;
  --mist-2: #EEF1F7;
  --hairline: #DFE4EE;
  --white: #FFFFFF;
  --teal: #1F7A8C;
  --green: #4F9A6E;
  --green-ink: #2F6B4F;
  --green-tint: #E6F2EE;
  --pin: #EE7A1A;            /* never as text on white */
  --text-orange: #C8560C;
  --warm-tint: #FDF1E4;
  --gold: #D99A1E;
  --badge-mist: #E3E8F1;
  --tile: #E3ECF6;           /* benefit icon tile */

  /* semantic (light) */
  --ground: var(--white);
  --ink: var(--navy);        /* headings, wordmark, rules */
  --body: var(--slate);
  --panel: var(--mist);
  --chip: var(--mist-2);
  --line: var(--hairline);
  --accent: var(--teal);     /* hero highlight word */
  --link: var(--text-orange);
  --rule-top: var(--navy);
  --badge-primary: var(--navy);      /* fill behind the point pose */
  --btn-secondary-bg: var(--navy);
  --btn-secondary-ink: var(--white);
  --menu-org: var(--text-orange);
  --spectrum: linear-gradient(90deg, #14275A, #1F7A8C 45%, #4F9A6E 75%, #EE7A1A);
}

/* 3. Base + type — §3 */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 17.5px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .85; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
code, pre, .citation { font-family: ui-monospace, Menlo, Consolas, monospace; }

h1, h2, h3, h4 { margin: 0; color: var(--ink); }
.display-h1 { font-size: 64px; line-height: 1.02; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.page-h1 { font-size: 64px; line-height: 1; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
h2, .h2 { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.025em; }
.h2-feature { font-size: 48px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
h3, .h3 { font-size: 21px; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; }
h4, .h4 { font-size: 16px; line-height: 1.4; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--body); }
.lede { font-size: 21px; line-height: 1.5; color: var(--body); text-wrap: pretty; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
  font-size: 15px; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* JS gating: elements that only work with JS carry .needs-js */
.needs-js { display: none; }
.js .needs-js { display: revert; }

/* 4. Layout — §4 */
.container { max-width: 1128px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.rule-top { height: 6px; background: var(--rule-top); }
.spectrum-rule { height: 3px; border: 0; margin: 0; background: var(--spectrum); }
.hairline-rule { height: 1px; background: var(--line); }

@media (max-width: 719px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .rule-top { height: 5px; }
  .display-h1 { font-size: 42px; }
  .page-h1 { font-size: 44px; }
  h2, .h2 { font-size: 24px; }
  .h2-feature { font-size: 36px; }
}

/* 5. Header, nav, mobile menu, footer — §5 */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.wordmark { display: flex; align-items: center; gap: 12px; }
.wordmark-text { font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.wordmark-text .org { color: var(--link); }

.badge { display: block; border-radius: 50%; overflow: hidden; flex: none; }
.badge img { width: 100%; height: 100%; display: block; }
.badge-navy { background: var(--badge-primary); }
.badge-mist-fill { background: var(--badge-mist); }
.badge-teal { background: var(--teal); }
.badge-pin { background: var(--pin); }
.badge-36 { width: 36px; height: 36px; }
.badge-72 { width: 72px; height: 72px; }
.badge-120 { width: 120px; height: 120px; }
.badge-150 { width: 150px; height: 150px; }
.badge-220 { width: 220px; height: 220px; }

.site-nav { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 600; }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--pin); padding-bottom: 2px; }
.nav-icons { display: inline-flex; gap: 10px; }
.nav-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }
.nav-icon svg { width: 22px; height: 22px; display: block; }

.menu-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 15px 8px; /* ≥44px hit area */
}
.menu-toggle .bar { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; display: block; }

/* Full-screen navy sheet — mock-up 5c */
.mobile-menu {
  position: fixed; inset: 0; z-index: 20; background: var(--navy); color: #fff;
  display: none; flex-direction: column;
}
.mobile-menu.open { display: flex; }
.mobile-menu .rule-top { height: 5px; background: var(--pin); }
.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.mobile-menu-header .badge { background: #fff; }
.mobile-menu-header .org { color: #F0934A; }
.menu-close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; font-weight: 500; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.mobile-menu nav { padding: 28px 20px 0; display: flex; flex-direction: column; }
.mobile-menu nav a { font-size: 34px; font-weight: 800; letter-spacing: -.03em; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.18); color: #fff; }
.mobile-menu-social { padding: 26px 20px 0; display: flex; gap: 12px; }
.mobile-menu-social a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid rgba(255,255,255,.35); border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 700; color: #fff; }
.mobile-menu-social svg { width: 18px; height: 18px; }
.mobile-menu-tagline { margin: auto 20px 24px; padding-top: 26px; font-size: 13px; color: #C9D1E6; line-height: 1.5; }

@media (max-width: 719px) {
  .site-header .container { padding: 14px 18px; }
  .wordmark-text { font-size: 17px; }
  .wordmark .badge-36 { width: 30px; height: 30px; }
  .js .site-nav { display: none; }
  .js .menu-toggle { display: flex; }
  /* no-JS fallback: nav stays visible and wraps */
  .site-nav { gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
}

.site-footer { font-size: 14px; color: var(--body); line-height: 1.5; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 36px; padding-bottom: 44px; }
.site-footer .footer-channels { font-weight: 600; color: var(--ink); }
.site-footer .footer-channels a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer .footer-licence { text-align: right; max-width: 460px; }
.site-footer.footer-ruled { border-top: 1px solid var(--line); }
@media (max-width: 719px) {
  .site-footer .container { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 24px; padding-bottom: 36px; }
  .site-footer .footer-licence { text-align: left; }
}

/* 6. Buttons — §5 */
.btn { display: block; border-radius: 12px; text-align: center; font-weight: 700; font-size: 16px; padding: 15px 24px; }
.btn-primary { background: var(--pin); color: var(--navy); }
.btn-secondary { background: var(--btn-secondary-bg); color: var(--btn-secondary-ink); }
.btn-tertiary { border: 2px solid var(--ink); padding: 13px 22px; }
.btn-inline { display: inline-block; }
.btn-sm { font-size: 15px; padding: 13px 18px; }
.text-link { color: var(--link); font-weight: 700; }
button.text-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; font-size: 14px; color: var(--link); cursor: pointer; }

/* 7. Components — §5 */

/* Meta strip */
.meta-strip { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 700; }
.meta-strip .pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--chip); }
.meta-strip .pill-type { background: var(--navy); color: #fff; }
.meta-strip .pill .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.meta-strip .pill-stable { background: var(--green-tint); color: var(--green-ink); }
.meta-strip .pill-stable .dot { background: var(--green); }
.meta-strip .pill-experimental { background: var(--warm-tint); color: var(--text-orange); }
.meta-strip .pill-experimental .dot { background: transparent; border: 2px solid currentColor; box-sizing: border-box; }
.meta-strip + .spectrum-rule { margin-top: 28px; }
@media (max-width: 719px) {
  .meta-strip { gap: 6px; font-size: 12px; }
  .meta-strip .pill { padding: 6px 10px; }
  .meta-strip .pill .dot { width: 7px; height: 7px; }
  .meta-strip + .spectrum-rule { margin-top: 22px; }
}

/* Type-colour dots — taxonomy §8, single source for dot colours */
.dot-map { background: var(--pin); }
.dot-template { background: var(--green); }
.dot-model { background: var(--navy); }
.dot-framework { background: var(--gold); }
.dot-assessment { background: var(--text-orange); }
.dot-claude-skill { background: var(--slate); }
.dot-explainer { background: var(--teal); }
.dot-technique { background: var(--green); }
.dot-point-of-view { background: var(--gold); }

/* Type label + Greek gloss (§5; tooltip shows on hover/focus, JS adds tap) */
.type-label { display: inline-flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.type-label .dot { width: 9px; height: 9px; border-radius: 50%; align-self: center; flex: none; }
.gloss { position: relative; }
.gloss > em { font-style: italic; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--body); border-bottom: 1px dotted currentColor; cursor: help; }
.gloss .gloss-tip {
  visibility: hidden; position: absolute; left: 0; top: calc(100% + 10px); z-index: 5;
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 500; letter-spacing: 0;
  text-transform: none; line-height: 1.45; padding: 10px 12px; border-radius: 10px; width: 250px;
  box-shadow: 0 8px 24px rgba(20,39,90,.18);
}
.gloss .gloss-tip::before { content: ""; position: absolute; left: 16px; top: -6px; width: 12px; height: 12px; background: var(--navy); rotate: 45deg; }
.gloss:hover .gloss-tip, .gloss:focus-within .gloss-tip, .gloss.gloss-open .gloss-tip { visibility: visible; }

/* Hero (home) */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: center; padding-top: 88px; padding-bottom: 72px; }
.hero .accent { color: var(--accent); }
.quote-panel { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 28px 22px; background: var(--panel); border-radius: 24px; }
.quote-panel .quote { font-size: 17px; line-height: 1.4; margin: 0; font-weight: 600; }
.quote-panel .quote-attr { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; margin: 0; color: var(--link); font-weight: 700; }
@media (max-width: 719px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 44px; padding-bottom: 40px; }
  .quote-panel { flex-direction: row; text-align: left; align-items: center; gap: 16px; padding: 20px; }
  .quote-panel .badge-150 { width: 72px; height: 72px; }
}

/* Featured block (home) */
.featured-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 2px solid var(--ink); padding-top: 20px; flex-wrap: wrap; }
.featured-head .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.featured-head .eyebrow .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.featured-stats { font-size: 14px; font-weight: 600; color: var(--body); }
.featured-grid { display: grid; grid-template-columns: 380px 1fr; gap: 48px; align-items: center; margin-top: 28px; }
.featured-lede { font-size: 19px; line-height: 1.5; color: var(--body); text-wrap: pretty; }
.featured-actions { display: flex; flex-direction: column; gap: 12px; }
.graphic-panel { background: var(--panel); border-radius: 24px; padding: 5% 6%; display: flex; align-items: center; justify-content: center; }
.graphic-panel img { width: 100%; height: auto; display: block; }
@media (max-width: 719px) {
  .featured-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 22px; }
  .featured-grid .graphic-panel { order: -1; }
}

/* Benefits row — 72px icons on piece opener (8a), 56px on home (8c) */
.benefits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; width: 100%; text-align: left; }
.benefits li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: start; padding: 0 24px; }
.benefits li:first-child { padding-left: 0; }
.benefits li:last-child { padding-right: 0; }
.benefits li + li { border-left: 1px solid var(--line); }
.benefit-icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--tile); overflow: hidden; }
.benefit-icon img { width: 100%; height: 100%; display: block; }
.benefits strong { display: block; font-size: 19px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; color: var(--ink); }
.benefits .benefit-line { font-size: 15px; line-height: 1.5; color: var(--body); }
.benefits-56 li { grid-template-columns: 56px 1fr; gap: 14px; padding: 0 20px; }
.benefits-56 li:first-child { padding-left: 0; }
.benefits-56 li:last-child { padding-right: 0; }
.benefits-56 .benefit-icon { width: 56px; height: 56px; }
.benefits-56 strong { font-size: 16px; margin-bottom: 4px; }
.benefits-56 .benefit-line { font-size: 14px; line-height: 1.45; }
@media (max-width: 719px) {
  .benefits, .benefits-56 { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .benefits li, .benefits-56 li { display: flex; flex-direction: column; gap: 10px; padding: 0; border-left: 0 !important; }
  .benefits .benefit-icon { width: 56px; height: 56px; }
  .benefits strong { font-size: 16px; margin-bottom: 4px; }
  .benefits .benefit-line { font-size: 14px; line-height: 1.45; }
}

/* Piece opener — 8a/8b */
.opener { display: flex; flex-direction: column; align-items: center; text-align: center; }
.opener-graphic { width: 640px; max-width: 100%; height: auto; display: block; }
.opener h1 { font-size: 72px; line-height: 1; font-weight: 800; letter-spacing: -.035em; margin: 28px 0 0; text-transform: uppercase; }
.opener .spectrum-rule { height: 4px; width: 520px; max-width: 100%; margin: 22px 0 18px; }
.opener-tagline { font-size: 24px; line-height: 1.4; margin: 0; color: var(--body); max-width: 620px; text-wrap: balance; }
.opener .benefits { margin-top: 56px; }
@media (max-width: 719px) {
  .opener h1 { font-size: 44px; margin-top: 20px; }
  .opener .spectrum-rule { height: 3px; width: 220px; margin: 16px 0 14px; }
  .opener-tagline { font-size: 18px; }
  .opener .benefits { margin-top: 36px; }
}

/* Piece page two-column body + rail */
.piece-grid { display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; }
.rail { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.rail-card { border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.rail-card h3 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; color: var(--body); }
.getit-list { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 600; }
.getit-list li { display: flex; justify-content: space-between; gap: 12px; }
.getit-list .fmt { color: var(--body); font-weight: 500; }
.citation { font-size: 12.5px; line-height: 1.55; margin: 0 0 12px; color: var(--ink); background: var(--panel); padding: 12px; border-radius: 10px; overflow-wrap: anywhere; }
.citation.copied { outline: 2px solid var(--green); }
.copied-note { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--green-ink); }
.copied-note .tick { width: 16px; height: 16px; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; }
.rail-note { font-size: 15px; line-height: 1.5; margin: 0; color: var(--body); }
@media (max-width: 719px) {
  .piece-grid { grid-template-columns: 1fr; gap: 0; }
  .rail { position: static; }
  .rail-card { border-radius: 14px; padding: 18px; }
}
/* "Get it" appears in the rail on desktop, in-flow after the map on mobile (§4).
   Both copies exist in the HTML; exactly one is shown. */
.getit-mobile { display: none; }
@media (max-width: 719px) {
  .getit-mobile { display: block; }
  .getit-desktop { display: none; }
}

/* Map viewer — §5, with the walk animation inside (§9 of this file) */
.map-viewer { margin-top: 28px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--panel); }
.map-viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13.5px; font-weight: 600; color: var(--body); flex-wrap: wrap; }
.map-viewer-bar .pills { display: inline-flex; gap: 6px; }
.map-viewer-bar .pill-link { background: var(--ground); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; color: var(--ink); font-weight: 600; }
@media (max-width: 719px) {
  .map-viewer { border-radius: 14px; margin-top: 20px; }
  .map-viewer-bar { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 14px; font-size: 13px; }
  .map-viewer-bar .pill-link { padding: 8px 12px; }
}

/* How-to cards (3 max — §9) */
.howto-cards { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.howto-cards li { background: var(--panel); border-radius: 18px; padding: 22px 20px; }
.howto-cards .howto-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.howto-cards .howto-text { font-size: 15.5px; line-height: 1.5; color: var(--body); }
.howto-teal { color: var(--teal); }
.howto-green { color: var(--green); }
.howto-orange { color: var(--link); }
.howto-cards code { font-size: 13.5px; background: var(--ground); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 719px) {
  .howto-cards { grid-template-columns: 1fr; gap: 10px; }
  .howto-cards li { border-radius: 14px; padding: 16px 18px; }
}

/* "What it is not / Limitations" panel with chin badge — 4d/5a */
.notbox { margin-top: 56px; background: var(--panel); border-radius: 24px; padding: 36px 40px; display: grid; grid-template-columns: 1fr 168px; gap: 32px; }
.notbox-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.notbox h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.notbox h2 .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.notbox ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 15px; line-height: 1.5; color: var(--body); }
.notbox strong { color: var(--ink); font-weight: 700; }
.notbox figure { margin: 0; text-align: center; align-self: center; }
.notbox figcaption { font-size: 13px; font-weight: 600; color: var(--body); margin-top: 10px; line-height: 1.35; }
.notbox figure .badge { margin: 0 auto; width: 150px; height: 150px; }
@media (max-width: 719px) {
  .notbox { margin-top: 32px; border-radius: 18px; padding: 24px 22px; grid-template-columns: 1fr; gap: 0; }
  .notbox-cols { grid-template-columns: 1fr; gap: 22px; }
  .notbox h2 { font-size: 20px; }
  .notbox figure { order: -1; display: flex; align-items: center; gap: 14px; text-align: left; margin-bottom: 18px; }
  .notbox figure .badge { margin: 0; width: 72px; height: 72px; }
  .notbox figcaption { margin-top: 0; }
}

/* Two-column prose (Why this exists / House rules) — §4 grids */
.two-col-prose { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-top: 72px; padding-bottom: 72px; }
.h2-prose { font-size: 30px; line-height: 1.1; margin-bottom: 18px; }
.prose-wide { font-size: 18px; line-height: 1.55; margin: 0; color: var(--body); text-wrap: pretty; }
@media (max-width: 719px) {
  .two-col-prose { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; padding-bottom: 44px; }
  .h2-prose { font-size: 24px; }
}

/* House rules (home) */
.house-rules { margin: 0; padding: 0; list-style: none; font-size: 17px; line-height: 1.5; color: var(--body); }
.house-rules li { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.house-rules li:last-child { border-bottom: 1px solid var(--line); }
.house-rules strong { color: var(--ink); font-weight: 700; }
@media (max-width: 719px) {
  .house-rules li { grid-template-columns: 1fr; gap: 2px; }
}

/* Tools index — mock-up 5e. Filters appear only once ≥3 pieces share a type. */
.index-head { display: grid; grid-template-columns: 1fr 140px; gap: 40px; align-items: center; padding-top: 56px; }
.index-head h1 { font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -.03em; margin-bottom: 14px; }
.index-head .index-lede { font-size: 18px; line-height: 1.5; margin: 0; color: var(--body); max-width: 600px; text-wrap: pretty; }
.badge-140 { width: 140px; height: 140px; }
.index-list { margin: 0; padding: 0; list-style: none; }
.index-row { display: grid; grid-template-columns: 150px 1fr 160px; gap: 24px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.index-row:last-child { border-bottom: 1px solid var(--line); }
.index-row .row-title { font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.index-row .row-summary { display: block; font-size: 15px; color: var(--body); margin-top: 2px; }
.index-row .row-meta { font-size: 13px; font-weight: 600; color: var(--body); text-align: right; }
@media (max-width: 719px) {
  .index-head { grid-template-columns: 1fr; gap: 20px; padding-top: 36px; }
  .index-head h1 { font-size: 40px; }
  .index-head .badge-140 { width: 96px; height: 96px; order: -1; }
  .index-row { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }
  .index-row .row-meta { text-align: left; }
}

/* Retention gates (How it was built) — §6 definition-list style */
.gates-list { display: grid; grid-template-columns: 180px 1fr; gap: 0 16px; margin: 0; font-size: 16px; line-height: 1.5; }
.gates-list dt { border-top: 1px solid var(--line); padding: 10px 0; color: var(--ink); font-weight: 700; }
.gates-list dd { border-top: 1px solid var(--line); padding: 10px 0; margin: 0; color: var(--body); }
.gates-list dd:last-of-type, .gates-list dt:last-of-type { border-bottom: 1px solid var(--line); }
@media (max-width: 719px) {
  .gates-list { grid-template-columns: 1fr; gap: 0; }
  .gates-list dt { padding-bottom: 2px; }
  .gates-list dd { border-top: 0; padding-top: 0; }
  .gates-list dt:last-of-type { border-bottom: 0; }
}

/* Lists inside callouts (poster caveats etc.) */
.callout ol { margin: 0; padding-left: 20px; }
.callout ol li { margin-bottom: 6px; }
.callout ol li:last-child { margin-bottom: 0; }

/* About page — mock-up 4e / 5b */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding-top: 64px; }
.about-h1 { font-size: 56px; line-height: 1.02; font-weight: 800; letter-spacing: -.03em; margin-bottom: 22px; text-wrap: balance; }
.about-photo { margin: 0; }
.about-photo .frame { border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--panel); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; display: block; }
.about-photo figcaption { font-size: 13px; color: var(--body); margin-top: 10px; font-weight: 600; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; padding-top: 72px; }
.about-h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.about-body { font-size: 16.5px; line-height: 1.55; margin: 0; color: var(--body); text-wrap: pretty; }
.phil-card { background: var(--panel); border-radius: 24px; padding: 36px; display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: center; }
.phil-card .about-h2 { margin-bottom: 10px; }
.about-footnote { font-size: 13px; color: var(--body); line-height: 1.5; margin: 56px auto 0; }
@media (max-width: 719px) {
  .about-hero { grid-template-columns: 1fr; gap: 24px; padding-top: 36px; }
  .about-h1 { font-size: 36px; margin-bottom: 16px; }
  .about-cols { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .phil-card { padding: 22px; grid-template-columns: 72px 1fr; gap: 16px; }
  .phil-card .badge-120 { width: 72px; height: 72px; }
  .about-footnote { margin-top: 36px; }
}

/* 404 — mock-up 4f */
.notfound { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; padding-top: 110px; padding-bottom: 130px; }
.notfound .eyebrow-404 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--link); margin: 8px 0 0; }
.notfound h1 { font-size: 52px; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; margin: 0; max-width: 720px; text-wrap: balance; }
@media (max-width: 719px) {
  .notfound { padding-top: 56px; padding-bottom: 72px; gap: 18px; }
  .notfound .badge-220 { width: 160px; height: 160px; }
  .notfound h1 { font-size: 34px; }
}

/* 8. Content elements — §6 (piece pages; several unused on Day 1, kept for authors) */
.prose p { font-size: 17.5px; line-height: 1.6; color: var(--body); margin: 0 0 16px; text-wrap: pretty; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pin); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); opacity: 1; }
.prose code { font-size: 15px; background: var(--panel); padding: 1px 6px; border-radius: 5px; }
.prose abbr { text-decoration: underline dotted; cursor: help; }
.prose ul { list-style: none; margin: 0 0 16px; padding: 0; }
.prose ul > li { display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--body); margin-bottom: 8px; }
.prose ul > li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pin); margin-top: 9px; }
.prose ul ul { margin: 8px 0 0; }
.prose ul ul > li { grid-template-columns: 16px 1fr; }
.prose ul ul > li::before { background: transparent; border: 2px solid var(--pin); width: 6px; height: 6px; box-sizing: content-box; }
.prose ol { list-style: none; counter-reset: rf; margin: 0 0 16px; padding: 0; }
.prose ol > li { counter-increment: rf; display: grid; grid-template-columns: 26px 1fr; gap: 0; color: var(--body); margin-bottom: 8px; }
.prose ol > li::before { content: counter(rf); font-weight: 800; font-size: 15px; color: var(--ink); }
.prose dl { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0 0 16px; }
.prose dt { border-top: 1px solid var(--line); padding-top: 8px; color: var(--ink); font-weight: 700; }
.prose dd { border-top: 1px solid var(--line); padding-top: 8px; margin: 0; color: var(--body); }
.callout { border-radius: 16px; padding: 20px 24px; margin: 0 0 20px; background: var(--panel); font-size: 15px; line-height: 1.5; color: var(--body); }
.callout-title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; color: var(--ink); margin: 0 0 8px; }
.callout-title .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.callout-note .dot { background: var(--teal); }
.callout-try .dot { background: var(--green); }
.callout-careful { background: var(--warm-tint); }
.callout-careful .callout-title { color: var(--text-orange); }
.callout-careful .dot { background: var(--text-orange); }
.callout-wrong { background: transparent; border: 2px solid var(--ink); display: grid; grid-template-columns: 1fr 72px; gap: 20px; align-items: center; }
.prose blockquote { border-left: 3px solid var(--pin); margin: 0 0 20px; padding-left: 24px; font-size: 21px; line-height: 1.45; font-weight: 500; color: var(--ink); font-style: normal; }
.prose blockquote footer { font-size: 14px; font-weight: 600; color: var(--body); margin-top: 8px; }
.prose blockquote cite { font-style: italic; }
.aside-phil { background: var(--panel); border-radius: 18px; padding: 16px 20px; display: flex; align-items: center; gap: 14px; font-size: 16px; font-weight: 600; margin: 0 0 20px; }
.aside-phil .badge { width: 56px; height: 56px; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--body); }
.prose caption { text-align: left; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; color: var(--body); }
.prose th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--body); text-align: left; border-bottom: 2px solid var(--ink); padding: 12px; }
.prose td { border-bottom: 1px solid var(--line); padding: 12px; }
.prose td.num, .prose th.num { text-align: right; font-variant-numeric: tabular-nums; }
.figure-screenshot { margin: 0 0 20px; }
.figure-screenshot .frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.figure-screenshot figcaption { font-size: 13.5px; font-weight: 600; color: var(--body); margin-top: 10px; }
.figure-diagram { margin: 0 0 20px; background: var(--panel); border-radius: 18px; padding: 28px 32px; }
.prose pre { background: var(--navy); color: #E9EDF5; border-radius: 14px; padding: 20px 24px; font-size: 14px; line-height: 1.6; overflow-x: auto; margin: 0 0 20px; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.download-list { margin: 0 0 20px; padding: 0; list-style: none; }
.download-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.download-list li:last-child { border-bottom: 1px solid var(--line); }
.download-list .dl-pill { background: var(--chip); padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; flex: none; }
sup.fn { font-size: 11px; color: var(--link); font-weight: 700; }
.footnotes { font-size: 13.5px; line-height: 1.5; color: var(--body); }
.footnotes::before { content: ""; display: block; width: 120px; height: 3px; background: var(--spectrum); margin-bottom: 16px; }
.prose hr { border: 0; width: 120px; height: 3px; background: var(--spectrum); margin: 32px 0; }
.photo { border-radius: 24px; }

/* 9. Motion — §7 map walk. CSS only; reduced motion shows the first frame. */
.map-walk { position: relative; height: 420px; overflow: hidden; background: #E9E2D4; }
/* Static state (reduced motion / no animation support) = the final frame:
   column in view, factor circled — so the caption stays true. */
.map-walk-layer { position: absolute; left: 0; top: 0; width: 240%; transform-origin: 0 0; transform: translate(-48.2%, -35.1%); }
.map-walk-layer img { width: 100%; display: block; }
.map-walk-loop { position: absolute; left: 59.5%; top: 45%; width: 24%; height: auto; overflow: visible; }
.map-walk-loop path { stroke-dashoffset: 0; }
.map-walk-fade { position: absolute; inset: 0; background: #E9E2D4; pointer-events: none; opacity: 0; }
@media (max-width: 719px) { .map-walk { height: 300px; } }
/* Sequence: hold the full poster width (zoomed out) → zoom into the column top
   → walk down the column → circle one factor → hold. 22s loop.
   Original §7 single-stage values, kept for easy revert:
   rfPan { 0%,10% translate(-48.2%,0); 45%,100% translate(-48.2%,-35.1%) } over 16s,
   rfDraw 0,48% → 60%, rfFade 0,3% / 9,93% / 98,100%. */
@media (prefers-reduced-motion: no-preference) {
  .map-walk-layer { animation: rfPan 22s cubic-bezier(.5,.05,.3,.95) infinite; }
  .map-walk-loop path { animation: rfDraw 22s linear infinite; }
  .map-walk-fade { animation: rfFade 22s linear infinite; }
}
@keyframes rfPan {
  0%, 8%    { transform: translate(0, -6%) scale(.4167); }   /* full width in view */
  20%, 28%  { transform: translate(-48.2%, 0) scale(1); }    /* zoomed to column top */
  52%, 100% { transform: translate(-48.2%, -35.1%) scale(1); } /* walked down */
}
@keyframes rfDraw { 0%, 55% { stroke-dashoffset: 520; } 66%, 100% { stroke-dashoffset: 0; } }
@keyframes rfFade { 0%, 2% { opacity: 1; } 8%, 94% { opacity: 0; } 98%, 100% { opacity: 1; } }
/* Everything else: hover opacity transition only. */
a, button { transition: opacity .15s; }

/* 10. Dark mode — §2. Semantic token swap; pin button unchanged. */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0C1633;
    --ink: #E9EDF5;
    --body: #B7C2DB;
    --panel: #16224A;
    --chip: rgba(255,255,255,.08);
    --line: rgba(255,255,255,.14);
    --accent: #5CB3C4;
    --link: #F0934A;
    --rule-top: #EE7A1A;          /* navy would vanish */
    --badge-primary: #E9EDF5;     /* badge inverts; pose PNG unchanged */
    --btn-secondary-bg: #E9EDF5;
    --btn-secondary-ink: #0C1633;
    --tile: #16224A;
  }
  .btn-primary { background: #EE7A1A; color: #14275A; }   /* unchanged by design */
  .meta-strip .pill-type { border: 1px solid var(--line); }
  .graphic-panel.graphic-panel-map { padding: 0; overflow: hidden; }  /* dark map edge-to-edge */
  .gloss .gloss-tip, .gloss .gloss-tip::before { background: #16224A; }
  .prose pre { background: #16224A; }
  .mobile-menu { background: #0C1633; }
}

/* 11. Print — piece pages: no chrome, keep the meta strip, show link URLs */
@media print {
  .rule-top, .site-header, .menu-toggle, .mobile-menu, .rail, .map-walk,
  .map-viewer, .site-footer .footer-channels, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .piece-grid { display: block; }
  .meta-strip { display: flex !important; }
  .meta-strip .pill-type { background: none; color: #000; border: 1px solid #000; }
  main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; font-weight: 400; }
  .notbox, .callout, .howto-cards li { border: 1px solid #999; background: none; }
}
