/* Delicate Fire — site system v1 (2026-11-30, tony@greenfield)
   Night + candle palette. Every element that sets a background also sets its text color. */

@layer reset, tokens, base, layout, components, pages, motion;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
  img, svg, video, canvas { display: block; max-width: 100%; }
  img, video { height: auto; }
  button, input, textarea, select { font: inherit; color: inherit; }
  :where(ul, ol)[role="list"] { list-style: none; padding: 0; }
  [hidden] { display: none !important; }
}

@layer tokens {
  :root {
    color-scheme: dark;
    --night: #08110d;
    --night-2: #0c1813;
    --night-3: #12241b;
    --night-4: #1a3226;
    --line: rgb(236 230 214 / 0.12);
    --line-2: rgb(236 230 214 / 0.22);
    --ink: #ece6d6;
    --ink-2: #bcc5bd;
    --ink-3: #93a198;
    --ember: #4fd896;
    --ember-2: #2fb873;
    --brand: #096b40;
    --candle: #f2c47c;
    --candle-2: #e49a48;
    --paper: #f3ecdc;
    --paper-2: #e9e0cb;
    --paper-ink: #19211c;
    --paper-ink-2: #46524a;
    --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
    --f-body: "Newsreader", "Iowan Old Style", Georgia, serif;
    --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
    --step-0: clamp(1.06rem, 1.02rem + 0.2vw, 1.18rem);
    --step-1: clamp(1.3rem, 1.2rem + 0.45vw, 1.55rem);
    --step-2: clamp(1.6rem, 1.4rem + 0.9vw, 2.15rem);
    --step-3: clamp(2rem, 1.6rem + 1.8vw, 3.1rem);
    --step-4: clamp(2.6rem, 1.9rem + 3.4vw, 4.8rem);
    --step-5: clamp(3.1rem, 2rem + 6vw, 7.6rem);
    --r-1: 10px; --r-2: 18px; --r-3: 28px; --r-pill: 999px;
    --wrap: 1180px;
    --prose: 44rem;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
    --header-h: 64px;
  }
}

@layer base {
  html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body {
    background: var(--night);
    color: var(--ink);
    font-family: var(--f-body);
    font-size: var(--step-0);
    line-height: 1.65;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    min-height: 100dvh;
    display: flex; flex-direction: column;
  }
  main { flex: 1; }
  h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 420; line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; font-variation-settings: "SOFT" 60; }
  h1 { font-size: var(--step-4); }
  h2 { font-size: var(--step-3); }
  h3 { font-size: var(--step-1); line-height: 1.2; }
  h4 { font-size: var(--step-0); line-height: 1.3; font-weight: 560; }
  p, li { text-wrap: pretty; }
  a { color: var(--ember); text-decoration-thickness: 1px; text-underline-offset: 0.18em; transition: color .2s, text-decoration-color .2s; }
  a:hover { color: var(--candle); }
  :focus-visible { outline: 2px solid var(--candle); outline-offset: 3px; border-radius: 4px; }
  ::selection { background: var(--candle); color: var(--night); }
  strong { font-weight: 650; }
  hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); margin: 3rem 0; }
  .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--candle); color: var(--night); padding: .6rem 1rem; border-radius: var(--r-1); font-family: var(--f-ui); font-weight: 600; }
  .skip:focus { top: 1rem; }
}

@layer layout {
  .wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
  .wrap-prose { width: min(100% - 2.5rem, var(--prose)); margin-inline: auto; }
  .band { padding-block: clamp(4rem, 3rem + 6vw, 8.5rem); position: relative; }
  .band-tight { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
  .band.night-2 { background: var(--night-2); color: var(--ink); }
  .band.paper { background: var(--paper); color: var(--paper-ink); }
  .band.paper a { color: #0b6a3f; }
  .band.paper a:hover { color: #8a4a12; }
  .band.paper :focus-visible { outline-color: #8a4a12; }
  .band.paper .eyebrow { color: #0b6a3f; }
  .band.paper .muted { color: var(--paper-ink-2); }
  .grid { display: grid; gap: clamp(1rem, .8rem + 1vw, 1.6rem); }
  .grid-auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
  .stack > * + * { margin-top: var(--gap, 1rem); }
  .center { text-align: center; }
  .muted { color: var(--ink-2); }
}

@layer components {
  /* ---------- header ---------- */
  .site-header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    background: rgb(8 17 13 / 0.72); color: var(--ink);
    -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--line);
    view-transition-name: site-header;
  }
  .site-header .wrap { height: 100%; display: flex; align-items: center; gap: 1rem; }
  .brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-family: var(--f-display); font-size: 1.22rem; letter-spacing: -.01em; margin-right: auto; }
  .brand:hover { color: var(--ink); }
  .brand svg { width: 30px; height: 30px; color: var(--ember); filter: drop-shadow(0 0 10px rgb(79 216 150 / .35)); transition: filter .4s, transform .6s var(--ease-spring); }
  .brand:hover svg { filter: drop-shadow(0 0 16px rgb(242 196 124 / .55)); transform: translateY(-2px) rotate(-4deg); }
  .nav-list { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
  .nav-list a { display: block; padding: .45rem .8rem; border-radius: var(--r-pill); color: var(--ink-2); font-family: var(--f-ui); font-size: .9rem; font-weight: 500; text-decoration: none; transition: background .2s, color .2s; }
  .nav-list a:hover { color: var(--ink); background: rgb(236 230 214 / .07); }
  .nav-list a[aria-current="page"] { color: var(--night); background: var(--ink); }
  .icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 38px; min-width: 38px; padding-inline: .7rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: rgb(236 230 214 / .04); color: var(--ink); font-family: var(--f-ui); font-size: .85rem; cursor: pointer; transition: border-color .2s, background .2s; }
  .icon-btn:hover { border-color: var(--candle); background: rgb(242 196 124 / .08); }
  .icon-btn kbd { font-family: var(--f-ui); font-size: .72rem; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 .3rem; }
  .icon-btn svg { width: 17px; height: 17px; }
  .menu-btn { display: none; }
  .mobile-menu { margin: 0; inset: var(--header-h) .75rem auto auto; width: min(20rem, calc(100vw - 1.5rem)); border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--night-2); color: var(--ink); padding: .6rem; box-shadow: 0 30px 80px rgb(0 0 0 / .55); }
  .mobile-menu ul { list-style: none; margin: 0; padding: 0; }
  .mobile-menu a { display: block; padding: .8rem 1rem; border-radius: var(--r-1); color: var(--ink); text-decoration: none; font-family: var(--f-ui); font-weight: 500; }
  .mobile-menu a:hover, .mobile-menu a[aria-current="page"] { background: var(--night-3); color: var(--candle); }
  @media (max-width: 860px) {
    .site-header .nav-list { display: none; }
    .menu-btn { display: inline-flex; }
    .search-btn .label, .search-btn kbd { display: none; }
  }

  /* ---------- buttons ---------- */
  .btn { --bg: var(--ink); --fg: var(--night); display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.35rem; border-radius: var(--r-pill); background: var(--bg); color: var(--fg); font-family: var(--f-ui); font-size: .95rem; font-weight: 600; letter-spacing: -.005em; text-decoration: none; border: 1px solid transparent; cursor: pointer; position: relative; isolation: isolate; overflow: hidden; transition: transform .35s var(--ease-spring), box-shadow .35s, background .25s, color .25s; }
  .btn:hover { color: var(--fg); transform: translateY(-2px); box-shadow: 0 14px 34px -12px rgb(242 196 124 / .5); }
  .btn:active { transform: translateY(0) scale(.98); }
  .btn .arr { transition: transform .35s var(--ease-spring); }
  .btn:hover .arr { transform: translateX(4px); }
  .btn-candle { --bg: var(--candle); --fg: #1d1408; }
  .btn-ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line-2); }
  .btn-ghost:hover { --fg: var(--candle); border-color: var(--candle); box-shadow: none; }
  .band.paper .btn { --bg: var(--paper-ink); --fg: var(--paper); }
  .band.paper .btn-ghost { --bg: transparent; --fg: var(--paper-ink); border-color: rgb(25 33 28 / .3); }
  .band.paper .btn-ghost:hover { --fg: #7b3f0b; border-color: #7b3f0b; }
  .btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
  .link-arrow { font-family: var(--f-ui); font-weight: 600; font-size: .95rem; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
  .link-arrow::after { content: "→"; transition: transform .3s var(--ease-spring); }
  .link-arrow:hover::after { transform: translateX(4px); }

  .eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--f-ui); font-size: .76rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--candle); }
  .eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: currentColor; opacity: .7; }
  .lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 38em; }
  .band.paper .lead { color: var(--paper-ink-2); }
  .section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); max-width: 46rem; }
  .section-head.center { margin-inline: auto; justify-items: center; }

  /* ---------- cards ---------- */
  .card { container-type: inline-size; position: relative; display: flex; flex-direction: column; gap: .75rem; padding: clamp(1.3rem, 1rem + 1.2vw, 2rem); border-radius: var(--r-2); background: linear-gradient(180deg, #131e19, #0d1813); color: var(--ink); border: 1px solid var(--line); transition: border-color .3s, transform .5s var(--ease-spring), background .3s; }
  .card:hover { border-color: var(--line-2); }
  .card h3 { font-size: var(--step-1); }
  .card p { color: var(--ink-2); }
  .card .card-foot { margin-top: auto; padding-top: .5rem; }
  .card.link-card { cursor: pointer; }
  .card.link-card:hover { transform: translateY(-4px); background: linear-gradient(180deg, #1f2419, #0d1813); }
  .card .glyph { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgb(79 216 150 / .1); color: var(--ember); border: 1px solid rgb(79 216 150 / .25); }
  .card .glyph svg { width: 22px; height: 22px; }
  .band.paper .card { background: #fbf7ee; color: var(--paper-ink); border-color: rgb(25 33 28 / .12); box-shadow: 0 1px 0 rgb(255 255 255 / .6) inset, 0 20px 40px -30px rgb(25 33 28 / .35); }
  .band.paper .card p { color: var(--paper-ink-2); }
  .band.paper .card .glyph { background: rgb(9 107 64 / .08); color: #0b6a3f; border-color: rgb(9 107 64 / .25); }
  .band.paper .card.link-card:hover { background: #fffaf0; }
  .tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); }
  .card .spot { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgb(242 196 124 / .12), transparent 45%); }
  .card:hover .spot { opacity: 1; }
  .band.paper .card .spot { background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgb(228 154 72 / .14), transparent 45%); }
  .stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

  /* ---------- quote ---------- */
  .bigquote { font-family: var(--f-display); font-size: var(--step-3); line-height: 1.18; font-weight: 340; letter-spacing: -.02em; max-width: 22em; margin-inline: auto; text-align: center; color: var(--ink); font-variation-settings: "SOFT" 100; }
  .bigquote .w { display: inline-block; }
  .bigquote em { color: var(--candle); font-style: italic; }
  .bigquote-cite { margin-top: 1.5rem; font-family: var(--f-ui); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-align: center; }

  /* ---------- footer ---------- */
  .site-footer { background: #050b08; color: var(--ink-2); border-top: 1px solid var(--line); padding-block: 4rem 2.5rem; font-family: var(--f-ui); font-size: .9rem; }
  .site-footer .wrap { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
  .site-footer .brand { font-size: 1.35rem; }
  .site-footer p { color: var(--ink-3); margin-top: .7rem; max-width: 22rem; font-family: var(--f-body); font-size: 1rem; }
  .site-footer h2 { font-family: var(--f-ui); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: .9rem; }
  .site-footer ul { list-style: none; padding: 0; display: grid; gap: .45rem; }
  .site-footer a { color: var(--ink-2); text-decoration: none; }
  .site-footer a:hover { color: var(--candle); }
  .site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; color: var(--ink-3); }

  /* ---------- search dialog ---------- */
  dialog.search { width: min(42rem, calc(100vw - 1.5rem)); max-height: min(36rem, calc(100dvh - 6rem)); margin: 10vh auto auto; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--night-2); color: var(--ink); box-shadow: 0 40px 120px rgb(0 0 0 / .7); overflow: hidden; }
  dialog.search[open] { display: flex; flex-direction: column; }
  dialog.search::backdrop { background: rgb(3 7 5 / .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .search-field { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
  .search-field svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
  .search-field input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; font-family: var(--f-ui); font-size: 1.05rem; color: var(--ink); }
  .search-field input::placeholder { color: var(--ink-3); }
  .search-results { overflow-y: auto; overscroll-behavior: contain; padding: .5rem; list-style: none; margin: 0; }
  .search-results a { display: block; padding: .8rem 1rem; border-radius: var(--r-1); text-decoration: none; color: var(--ink); }
  .search-results a[aria-selected="true"], .search-results a:hover { background: var(--night-3); }
  .search-results .t { font-family: var(--f-ui); font-weight: 600; font-size: .95rem; }
  .search-results .s { display: block; color: var(--ink-2); font-size: .92rem; margin-top: .15rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .search-results .k { font-family: var(--f-ui); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--candle); margin-right: .5rem; }
  .search-results mark { background: rgb(242 196 124 / .25); color: var(--ink); border-radius: 3px; padding-inline: 1px; }
  .search-empty { padding: 1.5rem 1.2rem; color: var(--ink-3); font-family: var(--f-ui); font-size: .9rem; }
  .search-foot { display: flex; gap: 1rem; padding: .6rem 1.2rem; border-top: 1px solid var(--line); font-family: var(--f-ui); font-size: .75rem; color: var(--ink-3); }

  /* ---------- popover glossary ---------- */
  .term { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: help; text-decoration: underline dotted rgb(242 196 124 / .7); text-underline-offset: .22em; }
  .term:hover { color: var(--candle); }
  .band.paper .term:hover { color: #7b3f0b; }
  [popover].gloss { margin: 0; position: fixed; inset: auto; width: min(22rem, calc(100vw - 2rem)); padding: 1.1rem 1.2rem; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--night-2); color: var(--ink); box-shadow: 0 24px 60px rgb(0 0 0 / .55); font-size: 1rem; line-height: 1.5; }
  [popover].gloss h4 { font-family: var(--f-ui); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--candle); font-weight: 600; margin-bottom: .4rem; }
  [popover].gloss p { color: var(--ink-2); }
  @supports (position-anchor: --a) {
    [popover].gloss { position-try-fallbacks: flip-block, flip-inline; }
  }

  /* ---------- toast ---------- */
  .toast { position: fixed; left: 50%; bottom: 1.25rem; translate: -50% 0; z-index: 70; background: var(--ink); color: var(--night); padding: .7rem 1.1rem; border-radius: var(--r-pill); font-family: var(--f-ui); font-size: .88rem; font-weight: 500; box-shadow: 0 20px 50px rgb(0 0 0 / .5); }
}

@layer pages {
  /* ================= HOME ================= */
  .hero { position: relative; min-height: min(100svh, 980px); display: grid; align-items: start; padding-block: clamp(7.5rem, 17vh, 12rem) 6rem; background: radial-gradient(120% 80% at 50% 110%, #123222 0%, var(--night) 58%); color: var(--ink); overflow: hidden; isolation: isolate; margin-top: calc(var(--header-h) * -1); }
  .hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
  .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(55% 40% at 50% 30%, rgb(8 17 13 / .7), transparent 75%), linear-gradient(180deg, rgb(8 17 13 / .5), transparent 25%, transparent 82%, var(--night)); }
  .hero-inner { display: grid; justify-items: center; text-align: center; gap: 1.6rem; }
  .hero h1 { font-size: var(--step-5); font-weight: 300; letter-spacing: -.035em; line-height: .95; font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--ink); text-shadow: 0 0 60px rgb(8 17 13 / .9); }
  .hero h1 .ch { display: inline-block; }
  .hero h1 em { font-style: italic; color: var(--candle); font-weight: 340; }
  .hero .lead { margin-inline: auto; color: var(--ink); text-shadow: 0 0 30px rgb(8 17 13 / 1); }
  .hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.6rem; margin-top: .4rem; font-family: var(--f-ui); font-size: .9rem; color: var(--ink-2); }
  .hero-meta span::before { content: "•"; color: var(--ember); margin-right: .6rem; }
  .motion-toggle { position: absolute; right: 1.25rem; bottom: 1.25rem; z-index: 2; }
  .scroll-cue { position: absolute; left: 50%; bottom: 1.6rem; translate: -50% 0; width: 22px; height: 36px; border: 1.5px solid var(--line-2); border-radius: 12px; }
  .scroll-cue::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--candle); }

  .statements { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); margin-top: 2.5rem; }
  .statement { padding: 1.8rem; border-radius: var(--r-2); background: #fbf7ee; color: var(--paper-ink); border: 1px solid rgb(25 33 28 / .1); display: grid; gap: .6rem; }
  .statement .n { font-family: var(--f-display); font-size: 2.6rem; line-height: 1; color: #0b6a3f; font-weight: 300; }
  .statement p { font-size: var(--step-1); line-height: 1.35; font-family: var(--f-display); font-weight: 380; color: var(--paper-ink); }
  .prose-intro { font-size: var(--step-1); line-height: 1.55; max-width: 40rem; }
  .prose-intro p + p { margin-top: 1rem; }

  /* triad explorer */
  .triad-wrap { display: grid; gap: clamp(2rem, 1rem + 4vw, 4.5rem); grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; }
  @media (max-width: 900px) { .triad-wrap { grid-template-columns: 1fr; } }
  .triad-stage { position: relative; aspect-ratio: 1 / .93; width: min(100%, 560px); margin-inline: auto; }
  .triad-stage svg { width: 100%; height: 100%; overflow: visible; }
  .triad-stage .edge { stroke: var(--line-2); stroke-width: 1.2; fill: none; }
  .triad-stage .edge-glow { stroke: var(--ember); stroke-width: 1.5; fill: none; stroke-dasharray: 4 10; opacity: .55; }
  .triad-stage .fillx { fill: url(#triFill); }
  .vertex circle { fill: var(--night-2); stroke: var(--ember); stroke-width: 1.5; transition: r .5s var(--ease-spring), fill .3s; }
  .vertex.on circle { fill: var(--ember); }
  .vertex text { font-family: var(--f-ui); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; fill: var(--ink-2); font-weight: 600; }
  .triad-term { position: absolute; translate: -50% -50%; font-family: var(--f-display); font-size: clamp(1.15rem, .9rem + 1.2vw, 1.9rem); font-weight: 380; color: var(--ink); white-space: nowrap; padding: .2rem .7rem; border-radius: var(--r-pill); background: rgb(8 17 13 / .75); border: 1px solid var(--line); transition: color .3s, border-color .3s; cursor: pointer; }
  .triad-term:hover, .triad-term.on { color: var(--candle); border-color: rgb(242 196 124 / .6); }
  .triad-term.unnamed { color: var(--ink-3); font-style: italic; }
  .triad-term[data-pos="o"] { left: 13%; top: 15.8%; }
  .triad-term[data-pos="t"] { left: 87%; top: 15.8%; }
  .triad-term[data-pos="i"] { left: 50%; top: 84.2%; }
  .triad-term { max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
  .triad-term .tag { display: none; }
  @media (max-width: 640px) {
    /* phones: corner name + word form one chip that sits on its corner dot */
    .vertex text { display: none; }
    .triad-term { font-size: 1rem; line-height: 1.2; padding: .3rem .6rem .35rem; border-radius: 14px; white-space: normal; max-width: 42%; overflow-wrap: anywhere; border-color: rgb(242 196 124 / .45); }
    .triad-term .tag { display: block; font-family: var(--f-ui); font-size: .62rem; font-style: normal; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--candle); margin-bottom: .1rem; }
    .triad-term[data-pos="o"] { left: max(0px, calc(12.5% - 18px)); translate: 0 -50%; text-align: left; }
    .triad-term[data-pos="t"] { left: auto; right: max(0px, calc(12.5% - 18px)); translate: 0 -50%; text-align: right; }
    .triad-term[data-pos="i"] { text-align: center; }
    .triad-stage .triad-center { top: 50%; }
  }
  .triad-center { position: absolute; left: 50%; top: 38%; translate: -50% -50%; text-align: center; font-family: var(--f-ui); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
  .triad-center b { display: block; font-family: var(--f-display); font-size: 1.6rem; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 340; }
  .triad-copy dl { display: grid; gap: 1rem; margin: 1.6rem 0 2rem; }
  .triad-copy dt { font-family: var(--f-ui); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--candle); font-weight: 600; }
  .triad-copy dd { color: var(--ink-2); }
  .triad-controls { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
  .triad-count { font-family: var(--f-ui); font-size: .82rem; color: var(--ink-3); }

  /* episode rail */
  .rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 22rem); gap: 1.1rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: .5rem 1.25rem 1.5rem; scroll-padding-inline: 1.25rem; scrollbar-width: thin; scrollbar-color: var(--night-4) transparent; }
  @media (min-width: 1240px) { .rail { padding-inline: calc((100vw - var(--wrap)) / 2); scroll-padding-inline: calc((100vw - var(--wrap)) / 2); } }
  .rail > * { scroll-snap-align: start; }
  .rail-nav { display: flex; gap: .5rem; }

  /* episode card */
  .ep-card { position: relative; display: flex; flex-direction: column; border-radius: var(--r-2); overflow: hidden; background: var(--night-2); color: var(--ink); border: 1px solid var(--line); transition: transform .5s var(--ease-spring), border-color .3s, box-shadow .4s; }
  .ep-card:hover { transform: translateY(-5px); border-color: rgb(242 196 124 / .45); box-shadow: 0 30px 60px -30px rgb(242 196 124 / .35); }
  .ep-card .poster { position: relative; aspect-ratio: 16 / 9; background: var(--night-3); overflow: hidden; }
  .ep-card .poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter .6s; filter: saturate(.85) brightness(.85); }
  .ep-card:hover .poster img { transform: scale(1.06); filter: saturate(1) brightness(1); }
  .ep-card .poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgb(8 17 13 / .85)); }
  .ep-card .poster video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
  .ep-card .poster video.on { opacity: 1; }
  .ep-card .peek { position: absolute; z-index: 1; right: .8rem; bottom: .7rem; font-family: var(--f-ui); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--candle); opacity: 0; transition: opacity .3s; }
  .ep-card:hover .peek { opacity: 1; }
  .ep-card .badge { position: absolute; z-index: 1; left: .8rem; bottom: .7rem; font-family: var(--f-ui); font-size: .74rem; font-weight: 600; letter-spacing: .04em; color: var(--ink); background: rgb(8 17 13 / .8); padding: .25rem .6rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); }
  .ep-card .num { position: absolute; z-index: 1; right: .9rem; top: .55rem; font-family: var(--f-display); font-size: 2.6rem; font-weight: 300; color: rgb(236 230 214 / .9); text-shadow: 0 2px 18px rgb(0 0 0 / .6); }
  .ep-card .body { padding: 1.1rem 1.2rem 1.3rem; display: grid; gap: .35rem; }
  .ep-card .series { font-family: var(--f-ui); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ember); font-weight: 600; }
  .ep-card h3 { font-size: 1.32rem; }
  .ep-card h3 a { color: var(--ink); text-decoration: none; }
  .ep-card h3 a::after { content: ""; position: absolute; inset: 0; }
  .ep-card p { color: var(--ink-2); font-size: .98rem; line-height: 1.5; }
  .ep-card .progress { height: 3px; background: var(--night-4); position: relative; z-index: 1; }
  .ep-card .progress i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--ember), var(--candle)); }
  .ep-card .state { font-family: var(--f-ui); font-size: .74rem; color: var(--candle); font-weight: 600; }
  .ep-card.unavailable .poster img { filter: grayscale(1) brightness(.5); }

  /* ================= EPISODES INDEX ================= */
  .page-hero { padding-block: clamp(4rem, 3rem + 5vw, 7.5rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); position: relative; overflow: hidden; background: radial-gradient(90% 120% at 85% -20%, #163a28 0%, transparent 55%), var(--night); color: var(--ink); }
  .page-hero .wrap { display: grid; gap: 1.2rem; }
  .page-hero h1 { font-weight: 330; font-variation-settings: "SOFT" 100; }
  .page-hero .ember-orb { position: absolute; right: -8rem; top: -8rem; width: 28rem; height: 28rem; border-radius: 50%; background: radial-gradient(circle, rgb(79 216 150 / .18), transparent 65%); filter: blur(10px); pointer-events: none; }
  .filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
  .filters label { position: relative; display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--ink-2); font-family: var(--f-ui); font-size: .88rem; font-weight: 500; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
  .filters input { position: absolute; opacity: 0; pointer-events: none; }
  .filters label:has(input:checked) { background: var(--ink); color: var(--night); border-color: var(--ink); }
  .filters label:has(input:focus-visible) { outline: 2px solid var(--candle); outline-offset: 3px; }
  .filters .c { font-size: .75rem; opacity: .7; }
  .ep-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
  .ep-library:has(#f-foundations:checked) .ep-card:not([data-series="foundations"]),
  .ep-library:has(#f-aec:checked) .ep-card:not([data-series="aec"]),
  .ep-library:has(#f-progress:checked) .ep-card:not([data-started]) { display: none; }
  .ep-library:has(#f-progress:checked) .empty-progress { display: block; }
  .ep-library:has(#f-progress:checked):has(.ep-card[data-started]) .empty-progress { display: none; }
  .empty-progress { display: none; color: var(--ink-2); padding: 2rem 0; }
  .series-note { margin-top: 3rem; padding: 2rem; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--night-2); color: var(--ink); display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
  .continue { margin-bottom: 2.5rem; }

  /* ================= EPISODE ================= */
  .ep-hero { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0; background: radial-gradient(80% 90% at 50% 0%, #143323 0%, var(--night) 70%); color: var(--ink); }
  .ep-hero .crumbs { font-family: var(--f-ui); font-size: .85rem; color: var(--ink-3); display: flex; gap: .5rem; flex-wrap: wrap; }
  .ep-hero .crumbs a { color: var(--ink-2); text-decoration: none; }
  .ep-hero .crumbs a:hover { color: var(--candle); }
  .ep-hero h1 { margin-top: 1rem; font-weight: 340; font-variation-settings: "SOFT" 100; }
  .ep-hero .sub { margin-top: .8rem; font-size: var(--step-1); color: var(--ink-2); font-style: italic; max-width: 36em; }
  .ep-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
  .chip { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--f-ui); font-size: .8rem; font-weight: 500; padding: .35rem .75rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--ink-2); background: rgb(236 230 214 / .03); }
  .chip.ember { color: var(--ember); border-color: rgb(79 216 150 / .4); }
  .player-shell { margin-top: 2rem; position: relative; }
  .player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-3); overflow: hidden; background: #000; border: 1px solid var(--line-2); box-shadow: 0 50px 120px -40px rgb(79 216 150 / .28), 0 30px 60px -30px rgb(0 0 0 / .8); }
  .player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
  .player.docked { position: fixed; z-index: 60; right: 1.25rem; bottom: 1.25rem; width: min(380px, 40vw); aspect-ratio: 16 / 9; height: auto; border-radius: var(--r-2); box-shadow: 0 30px 80px rgb(0 0 0 / .7); }
  .player .undock { display: none; position: absolute; z-index: 2; top: .5rem; right: .5rem; }
  .player.docked .undock { display: inline-flex; }
  .player-placeholder { display: none; aspect-ratio: 16 / 9; border-radius: var(--r-3); border: 1px dashed var(--line-2); }
  .player-shell.is-docked .player-placeholder { display: block; }
  .player-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; font-family: var(--f-ui); font-size: .85rem; color: var(--ink-2); }
  .video-down { aspect-ratio: 16 / 9; border-radius: var(--r-3); border: 1px solid var(--line-2); background: radial-gradient(70% 70% at 50% 40%, var(--night-3), var(--night-2)); color: var(--ink); display: grid; place-items: center; text-align: center; padding: 2rem; }
  .video-down p { color: var(--ink-2); max-width: 26rem; margin: .6rem auto 0; }

  .reader { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
  @media (min-width: 1100px) { .reader { grid-template-columns: 15rem minmax(0, var(--prose)) ; justify-content: center; gap: 4rem; } }
  .toc { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; font-family: var(--f-ui); font-size: .86rem; display: none; }
  @media (min-width: 1100px) { .toc { display: block; } }
  .toc h2 { font-family: var(--f-ui); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: .8rem; }
  .toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
  .toc a { display: block; padding: .35rem 0 .35rem 1rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-3); text-decoration: none; line-height: 1.35; transition: color .2s, border-color .2s; }
  .toc a:hover { color: var(--ink); }
  .toc a.active { color: var(--candle); border-left-color: var(--candle); }
  .toc .toc-progress { margin-top: 1.2rem; height: 3px; border-radius: 3px; background: var(--night-3); overflow: hidden; }
  .toc .toc-progress i { display: block; height: 100%; width: calc(var(--read, 0) * 100%); background: linear-gradient(90deg, var(--ember), var(--candle)); }
  .read-bar { position: fixed; left: 0; top: var(--header-h); height: 2px; width: 100%; z-index: 49; transform-origin: 0 50%; transform: scaleX(var(--read, 0)); background: linear-gradient(90deg, var(--ember), var(--candle)); pointer-events: none; }
  @supports (animation-timeline: scroll()) {
    @media (prefers-reduced-motion: no-preference) {
      .read-bar { transform: scaleX(0); animation: read-grow linear both; animation-timeline: scroll(root block); }
      @keyframes read-grow { to { transform: scaleX(1); } }
    }
  }
  .prev-next { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); margin-top: 4rem; }
  .prev-next a { display: grid; gap: .3rem; padding: 1.3rem 1.4rem; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--night-2); color: var(--ink); text-decoration: none; transition: border-color .3s, transform .4s var(--ease-spring); }
  .prev-next a:hover { border-color: var(--candle); transform: translateY(-3px); }
  .prev-next small { font-family: var(--f-ui); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
  .prev-next b { font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; }
  .prev-next .next { text-align: right; }

  /* ---------- prose (episode + essay content) ---------- */
  .prose { color: var(--ink); font-size: clamp(1.08rem, 1.02rem + .3vw, 1.24rem); line-height: 1.72; }
  .prose > * + * { margin-top: 1.15em; }
  .prose h2 { font-size: var(--step-2); margin-top: 2.6em; scroll-margin-top: calc(var(--header-h) + 1.5rem); }
  .prose h3 { font-size: var(--step-1); margin-top: 1.8em; }
  .prose h4 { font-family: var(--f-ui); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 650; color: var(--candle); }
  .prose ul, .prose ol { padding-left: 1.3em; }
  .prose li + li { margin-top: .45em; }
  .prose li::marker { color: var(--ember); }
  .prose blockquote { position: relative; margin: 2.2em 0; padding: 1.2em 0 1.2em 1.6em; border-left: 2px solid var(--candle); font-family: var(--f-display); font-size: var(--step-1); line-height: 1.4; font-style: italic; font-weight: 340; color: var(--ink); }
  .prose .intro { font-size: var(--step-1); line-height: 1.55; color: var(--ink); max-width: none; margin: 0; text-align: left; }
  .prose hr { margin: 3em 0; }
  .prose img, .prose svg { max-width: 100%; height: auto; }
  .prose .video-container, .prose .dynamics-top-video-frame { border-radius: var(--r-2); overflow: hidden; border: 1px solid var(--line-2); background: #000; }
  .prose .video-container video, .prose .dynamics-top-video-frame video { width: 100%; height: auto; }
  .prose table { width: 100%; border-collapse: collapse; font-size: .95em; display: block; overflow-x: auto; }
  .prose th, .prose td { padding: .6em .8em; border-bottom: 1px solid var(--line); text-align: left; }
  /* generic boxed blocks used across episode content */
  .prose :is(.insight-box, .warning, .success, .diagnostic, .not-opposite, .source-note) { padding: 1.4em 1.5em; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--night-2); color: var(--ink); margin: 2em 0; }
  .prose :is(.insight-box, .warning, .success, .diagnostic, .not-opposite) h3 { font-family: var(--f-ui); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 650; margin: 0 0 .8em; color: var(--candle); }
  .prose .insight-box { border-color: rgb(242 196 124 / .35); background: linear-gradient(160deg, #1e231a, #0c1813 60%); }
  .prose .warning { border-color: rgb(228 154 72 / .45); background: linear-gradient(160deg, #1f1f16, #0c1813 60%); }
  .prose .success { border-color: rgb(79 216 150 / .4); background: linear-gradient(160deg, #12291e, #0c1813 60%); }
  .prose .not-opposite { border-color: var(--line-2); }
  .prose .diagnostic { border-color: rgb(79 216 150 / .4); background: linear-gradient(160deg, #12291e, #0c1813 55%); }
  .prose .diagnostic h3 { color: var(--ember); }
  .prose .source-note { font-size: .95em; color: var(--ink-2); }
  .prose [class$="-card"], .prose [class*="-card "], .prose .grid-cell, .prose .depth-level, .prose .layer, .prose .aspect-card { padding: 1.2em 1.3em; border-radius: var(--r-2); border: 1px solid var(--line); background: rgb(236 230 214 / .035); color: var(--ink); }
  .prose [class$="-card"] > * + *, .prose .grid-cell > * + * { margin-top: .5em; }
  .prose :is(.dual-grid, .triple-grid, .dimension-grid, .concept-pair, .metaphor-row, .layer-row, .grid-container > div:not([class$="-card"])) { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
  .prose .grid-container { margin: 2em 0; }
  .prose .example-card { margin: 1.6em 0; }
  .prose .example-header, .prose .concept-header, .prose .emotion-header { display: flex; align-items: center; gap: .7rem; }
  .prose :is(.example-icon, .concept-icon) { width: 2.4rem; height: 2.4rem; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--night-3); font-size: 1.2rem; }
  .prose :is(.example-title, .concept-title, .emotion-title) { font-family: var(--f-display); font-size: 1.3em; font-weight: 450; }
  .prose .def-card .definition { font-size: 1.02em; }
  .prose .def-card .key, .prose .key { font-family: var(--f-display); font-style: italic; color: var(--candle); }
  .prose .def-card.pain, .prose .grid-cell.want { border-color: rgb(228 154 72 / .45); }
  .prose .def-card.joy, .prose .grid-cell.desire { border-color: rgb(79 216 150 / .45); }
  .prose .grid-cell.need { border-color: rgb(242 196 124 / .45); }
  .prose .grid-cell h4 { color: var(--ink); font-family: var(--f-display); text-transform: none; letter-spacing: 0; font-size: 1.35em; font-weight: 450; }
  .prose .grid-cell .location, .prose .aspect, .prose .layer-label, .prose .emotion-number, .prose .right-number { font-family: var(--f-ui); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ember); font-weight: 650; }
  .prose :is(.flow-arrow, .seq-arrow, .cycle-arrow, .depth-arrow, .channel-arrow) { text-align: center; color: var(--candle); }
  .prose .negotiability { display: flex; flex-wrap: wrap; gap: .6rem; }
  .prose .negotiability span { padding: .35em .8em; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-family: var(--f-ui); font-size: .85em; }
  .prose .section-break { text-align: center; color: var(--candle); letter-spacing: .6em; margin: 2.4em 0; }
  /* practice / reflection */
  .reflect-list { list-style: none; padding: 0 !important; counter-reset: q; display: grid; gap: .8rem; }
  .reflect-list > li { counter-increment: q; position: relative; padding: 1rem 1rem 1rem 3.2rem; border-radius: var(--r-1); background: rgb(236 230 214 / .04); border: 1px solid var(--line); margin: 0 !important; }
  .reflect-list > li::before { content: counter(q); position: absolute; left: 1rem; top: 1rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-ui); font-size: .8rem; font-weight: 700; color: var(--night); background: var(--ember); }
  .reflect-list .reflect-btn { margin-top: .6rem; display: inline-flex; gap: .4rem; align-items: center; font-family: var(--f-ui); font-size: .8rem; font-weight: 600; color: var(--ember); background: none; border: 0; padding: 0; cursor: pointer; }
  .reflect-list .reflect-btn:hover { color: var(--candle); }
  .reflect-list textarea { display: block; width: 100%; margin-top: .7rem; min-height: 5.5rem; padding: .8rem .9rem; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--night); color: var(--ink); font-family: var(--f-body); font-size: 1rem; line-height: 1.5; resize: vertical; field-sizing: content; }
  .reflect-list textarea:focus { outline: 2px solid var(--candle); outline-offset: 1px; }
  .reflect-list .saved { font-family: var(--f-ui); font-size: .75rem; color: var(--ink-3); margin-top: .35rem; }
  .reflect-note { font-family: var(--f-ui); font-size: .8rem; color: var(--ink-3); margin-top: .8rem; }
  /* transcript */
  .transcript-box { margin-top: 4rem; border-radius: var(--r-2); border: 1px solid var(--line-2); background: var(--night-2); color: var(--ink); overflow: clip; }
  .transcript-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem; font-family: var(--f-ui); font-weight: 600; font-size: 1rem; color: var(--ink); }
  .transcript-box > summary::-webkit-details-marker { display: none; }
  .transcript-box > summary::before { content: none !important; }
  .transcript-box > summary .chev { transition: rotate .3s var(--ease-out); }
  .transcript-box[open] > summary .chev { rotate: 180deg; }
  .transcript-box > summary small { font-weight: 500; color: var(--ink-3); }
  .transcript-tools { position: sticky; top: var(--header-h); z-index: 2; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .8rem 1.4rem; background: var(--night-2); border-block: 1px solid var(--line); }
  .transcript-tools input { flex: 1 1 12rem; min-width: 0; padding: .55rem .9rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--night); color: var(--ink); font-family: var(--f-ui); font-size: .9rem; }
  .transcript-tools input:focus { outline: 2px solid var(--candle); outline-offset: 1px; }
  .transcript-tools .count { font-family: var(--f-ui); font-size: .8rem; color: var(--ink-3); min-width: 5.5rem; }
  .transcript-body { padding: 1.4rem; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain; font-size: 1.02rem; line-height: 1.7; }
  .transcript-body p + p, .transcript-body .utterance + .utterance { margin-top: .9em; }
  .transcript-body strong { font-family: var(--f-ui); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ember); margin-right: .35rem; }
  .transcript-body p.forrest strong, .transcript-body .forrest strong, .transcript-body .spk-forrest strong { color: var(--candle); }
  .transcript-body .timestamp { font-family: var(--f-ui); font-size: .78rem; color: var(--ink-3); margin-right: .4rem; }
  ::highlight(df-hit) { background-color: rgb(242 196 124 / .35); color: inherit; }
  ::highlight(df-current) { background-color: var(--candle); color: #1d1408; }
  mark.df-hit { background: rgb(242 196 124 / .35); color: inherit; border-radius: 2px; }
  /* comments */
  .comments-section { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); color: var(--ink); }
  .comments-section h2 { font-size: var(--step-2); margin-bottom: 1.2rem; }
  .comments-section .comment { padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .comments-section .comment-header { display: flex; align-items: center; gap: .6rem; font-family: var(--f-ui); font-size: .85rem; }
  .comments-section .comment-avatar { width: 28px; height: 28px; border-radius: 50%; }
  .comments-section .comment-date, .comments-section .comments-empty { color: var(--ink-3); }
  .comments-section .comment-body { margin-top: .4rem; color: var(--ink-2); }
  .comments-section textarea { width: 100%; min-height: 6rem; margin-top: .8rem; padding: .8rem; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--night-2); color: var(--ink); }
  .comments-section .comment-submit, .comments-section .comment-signout { margin-top: .6rem; padding: .55rem 1rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--ink); color: var(--night); font-family: var(--f-ui); font-weight: 600; cursor: pointer; }
  .comments-section .comment-signout { background: transparent; color: var(--ink-2); margin: 0 0 0 auto; }
  .comments-section .comment-user-row { display: flex; gap: .6rem; align-items: center; }
  .comments-section .comment-user-row img { width: 28px; height: 28px; border-radius: 50%; }
  .comments-section .signin-prompt p { color: var(--ink-2); margin-bottom: .8rem; }
  .comments-section .comment-success { color: var(--ember); }
  .comments-section .comment-error { color: var(--candle); }
  .comments-preview { color: var(--ink-3); font-family: var(--f-ui); font-size: .9rem; }

  /* ================= START HERE: envelope exercise ================= */
  .exercise { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; margin-top: 2.5rem; }
  @media (max-width: 900px) { .exercise { grid-template-columns: 1fr; } }
  .steps-nav { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
  .steps-nav button { font-family: var(--f-ui); font-size: .78rem; font-weight: 600; padding: .45rem .8rem; border-radius: var(--r-pill); border: 1px solid rgb(25 33 28 / .25); background: transparent; color: var(--paper-ink-2); cursor: pointer; }
  .steps-nav button[aria-current="step"] { background: var(--paper-ink); color: var(--paper); border-color: var(--paper-ink); }
  .step-panel { display: grid; gap: 1rem; view-transition-name: step-panel; }
  .step-panel[hidden] { display: none; }
  .step-panel h3 { font-size: var(--step-2); color: var(--paper-ink); }
  .step-panel p { color: var(--paper-ink-2); }
  .step-panel blockquote { font-family: var(--f-display); font-size: var(--step-1); font-style: italic; line-height: 1.4; color: var(--paper-ink); border-left: 2px solid #b5651d; padding-left: 1.2rem; }
  .step-panel cite { font-family: var(--f-ui); font-size: .8rem; font-style: normal; color: var(--paper-ink-2); }
  .choice-group { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
  .choice-group legend { font-family: var(--f-ui); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #0b6a3f; font-weight: 700; margin-bottom: .5rem; }
  .choices { display: flex; flex-wrap: wrap; gap: .5rem; }
  .choices label { cursor: pointer; padding: .55rem .95rem; border-radius: var(--r-pill); border: 1px solid rgb(25 33 28 / .25); background: #fbf7ee; color: var(--paper-ink); font-family: var(--f-ui); font-size: .9rem; font-weight: 500; transition: background .2s, color .2s; }
  .choices input { position: absolute; opacity: 0; pointer-events: none; }
  .choices label:has(input:checked) { background: var(--paper-ink); color: var(--paper); border-color: var(--paper-ink); }
  .choices label:has(input:focus-visible) { outline: 2px solid #8a4a12; outline-offset: 2px; }
  .ex-input { width: 100%; padding: .85rem 1rem; border-radius: var(--r-1); border: 1px solid rgb(25 33 28 / .3); background: #fffaf0; color: var(--paper-ink); font-family: var(--f-body); font-size: 1.1rem; }
  .ex-input:focus { outline: 2px solid #8a4a12; outline-offset: 1px; }
  .verdict { padding: 1.3rem 1.4rem; border-radius: var(--r-2); background: var(--paper-ink); color: var(--paper); display: grid; gap: .4rem; }
  .verdict b { font-family: var(--f-display); font-size: var(--step-2); font-weight: 400; color: var(--candle); }
  .verdict p { color: #d9d2c2; }
  .envelope-stage { position: sticky; top: calc(var(--header-h) + 1rem); aspect-ratio: 1; width: 100%; max-width: 460px; margin-inline: auto; border-radius: var(--r-3); background: radial-gradient(70% 70% at 50% 50%, #142a1e, #08110d); border: 1px solid rgb(25 33 28 / .2); overflow: hidden; color: var(--ink); }
  @media (max-width: 900px) { .envelope-stage { position: relative; top: 0; max-width: 360px; } }
  .envelope-stage svg { width: 100%; height: 100%; }
  .envelope-stage .env { fill: none; stroke: var(--candle); stroke-width: 1.5; stroke-dasharray: 6 8; }
  .envelope-stage .self { fill: var(--ember); }
  .envelope-stage text { font-family: var(--f-ui); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; fill: var(--ink-2); font-weight: 600; }
  .envelope-stage .mote { fill: var(--candle); }
  .envelope-stage .caption { position: absolute; left: 0; right: 0; bottom: 1rem; text-align: center; font-family: var(--f-ui); font-size: .82rem; color: var(--ink-2); padding-inline: 1rem; }

  /* paths (start here, learn) */
  .path-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
  .modal-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
  .modal-tabs button { font-family: var(--f-ui); font-size: .85rem; font-weight: 600; padding: .55rem 1rem; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer; transition: background .2s, color .2s; }
  .modal-tabs button[aria-selected="true"] { background: var(--ink); color: var(--night); border-color: var(--ink); }
  .modal-panel { padding: 1.8rem; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--night-2); color: var(--ink); min-height: 11rem; }
  .modal-panel h3 { font-size: var(--step-2); }
  .modal-panel h3 em { color: var(--candle); }
  .modal-panel p { color: var(--ink-2); margin-top: .7rem; }
  .axioms { counter-reset: ax; display: grid; gap: 1rem; list-style: none; padding: 0; }
  .axioms li { counter-increment: ax; position: relative; padding: 1.4rem 1.4rem 1.4rem 4.2rem; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--night-2); color: var(--ink); }
  .axioms li::before { content: counter(ax, upper-roman); position: absolute; left: 1.3rem; top: 1.05rem; font-family: var(--f-display); font-size: 1.8rem; color: var(--candle); font-weight: 300; }
  .axioms strong { display: block; font-family: var(--f-ui); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ember); margin-bottom: .3rem; }
  .res-list { list-style: none; padding: 0; display: grid; gap: .5rem; margin-top: .6rem; }
  .res-list a { font-family: var(--f-ui); font-size: .92rem; font-weight: 500; }
  .note { font-family: var(--f-ui); font-size: .78rem; color: var(--ink-3); }
  .band.paper .note { color: var(--paper-ink-2); }
  .person { display: grid; gap: 2rem; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); align-items: start; }
  @media (max-width: 760px) { .person { grid-template-columns: 1fr; } }
  .monogram { aspect-ratio: 1; border-radius: var(--r-3); display: grid; place-items: center; font-family: var(--f-display); font-size: 4.5rem; font-weight: 300; color: var(--candle); background: radial-gradient(80% 80% at 30% 20%, #1c4130, var(--night-2)); border: 1px solid var(--line-2); max-width: 15rem; }
  .band.paper .monogram { color: #0b6a3f; background: radial-gradient(80% 80% at 30% 20%, #ffffff, var(--paper-2)); border-color: rgb(25 33 28 / .15); }
  .prose-block { max-width: 42rem; }
  .prose-block > * + * { margin-top: 1.05em; }
  .lantern-quote { font-family: var(--f-display); font-size: var(--step-3); line-height: 1.15; font-weight: 320; font-style: italic; color: #0b6a3f; max-width: 18em; }
  .contact-card { display: grid; gap: .6rem; justify-items: start; padding: 2rem; border-radius: var(--r-3); background: var(--night-2); color: var(--ink); border: 1px solid var(--line-2); }
  .contact-card .addr { font-family: var(--f-display); font-size: var(--step-2); font-weight: 380; color: var(--ink); word-break: break-word; }
  .copy-btn[data-copied] { border-color: var(--ember); color: var(--ember); }
  .social-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
  .social-grid a { display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.2rem; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--night-2); color: var(--ink); text-decoration: none; transition: border-color .3s, transform .4s var(--ease-spring); }
  .social-grid a:hover { border-color: var(--candle); transform: translateY(-3px); color: var(--ink); }
  .social-grid b { font-family: var(--f-ui); font-weight: 600; font-size: .95rem; }
  .social-grid span { font-size: .95rem; color: var(--ink-2); }
  .hero-sm .lead { color: var(--ink-2); }
  .band.paper .eyebrow { color: #0b6a3f; }
  .band.paper .link-arrow { color: #0b6a3f; }
  .band.paper .link-arrow:hover { color: #7b3f0b; }
  .prose .dynamics-top-video { background: linear-gradient(180deg, #11261b, #0c1813); border-color: rgb(79 216 150 / .3); color: var(--ink); }
  .prose .dynamics-video-caption { color: var(--ink-2); }
  .redirect-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 4rem 1.5rem; }
}

@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
    ::view-transition-old(root) { animation: 260ms var(--ease-out) both vt-out; }
    ::view-transition-new(root) { animation: 420ms var(--ease-out) both vt-in; }
    ::view-transition-group(*) { animation-duration: 480ms; animation-timing-function: var(--ease-out); }
    @keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
    @keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

    .scroll-cue::after { animation: cue 1.8s var(--ease-out) infinite; }
    @keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

    .hero h1 .ch { animation: rise 1.1s var(--ease-out) both; animation-delay: calc(var(--i) * 45ms + 150ms); }
    .hero .lead, .hero .btn-row, .hero .eyebrow, .hero-meta { animation: rise 1s var(--ease-out) both; }
    .hero .eyebrow { animation-delay: 80ms; }
    .hero .lead { animation-delay: 650ms; }
    .hero .btn-row { animation-delay: 800ms; }
    .hero-meta { animation-delay: 950ms; }
    @keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } }

    .triad-term { animation: term-in .7s var(--ease-out) both; }
    .triad-term[data-pos="t"] { animation-delay: .08s; }
    .triad-term[data-pos="i"] { animation-delay: .16s; }
    @keyframes term-in { from { opacity: 0; scale: .85; filter: blur(4px); } }
    .edge-glow { animation: dash 8s linear infinite; }
    @keyframes dash { to { stroke-dashoffset: -140; } }

    @supports ((animation-timeline: view()) and (animation-range: entry)) {
      .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
      @keyframes reveal { from { opacity: 0; transform: translateY(40px) scale(.98); } }
      .bigquote .w { animation: word linear both; animation-timeline: view(); animation-range: entry calc(var(--i) * 2%) cover calc(18% + var(--i) * 1%); }
      @keyframes word { from { opacity: .35; filter: blur(2px); } }
      .rail .ep-card { animation: rail-card linear both; animation-timeline: view(inline); animation-range: entry 0% entry 80%; }
      @keyframes rail-card { from { opacity: .3; scale: .9; } }
      .hero-inner { animation: hero-out linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
      @keyframes hero-out { to { opacity: 0; transform: translateY(-12vh) scale(.96); } }
    }
    html:not(.sda) .reveal.io { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
    html:not(.sda) .reveal.io.in { opacity: 1; transform: none; }
  }
}
