/* ==========================================================================
   antigravity-for-pms — stylesheet
   Concrete ground, rules-only shape language, inverted accent blocks,
   vertical rail, gallery density. Written for this project; nothing reused.
   ========================================================================== */

/* --- faces ---------------------------------------------------------------
   Weight ranges are declared so 500 and 600 resolve to the real bold cut
   rather than being synthesised into a smeared fake bold. */
@font-face {
  font-family: "display";
  src: url("../fonts/display.woff2") format("woff2");
  font-weight: 1 499; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "display";
  src: url("../fonts/display700.woff2") format("woff2");
  font-weight: 500 1000; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "body";
  src: url("../fonts/body.woff2") format("woff2");
  font-weight: 1 499; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "body";
  src: url("../fonts/body700.woff2") format("woff2");
  font-weight: 500 1000; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "body";
  src: url("../fonts/bodyi.woff2") format("woff2");
  font-weight: 1 499; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "mono";
  src: url("../fonts/mono.woff2") format("woff2");
  font-weight: 1 499; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "mono";
  src: url("../fonts/mono700.woff2") format("woff2");
  font-weight: 500 1000; font-style: normal; font-display: swap;
}

/* --- tokens: full palette on bare :root ---------------------------------- */
:root {
  --slab:        #DEDAD2;
  --slab-lift:   #EAE7E0;
  --slab-sink:   #D2CDC3;
  --ink:         #17150F;
  --ink-soft:    #57513F;
  --ink-faint:   #7E7663;
  --scribe:      #BEB6A5;
  --scribe-firm: #8C8371;
  --flare:       #D2450F;
  --flare-deep:  #A63409;
  --on-flare:    #FFF4EC;
  --flare-veil:  rgba(210, 69, 15, .10);

  --state-live:  #2F6B42;
  --state-hold:  #9A6B0E;
  --state-stop:  #A32F26;

  /* the inverted block takes the opposite ground in whichever theme is live */
  --invert-bg:   #17150F;
  --invert-ink:  #F2EDE3;
  --invert-soft: #ADA48D;
  --invert-line: #453F33;

  --f-display: "display", "Trebuchet MS", system-ui, sans-serif;
  --f-body:    "body", Georgia, "Times New Roman", serif;
  --f-mono:    "mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --stage:   68rem;
  --gutter:  clamp(1.25rem, 5vw, 3.5rem);
  --railw:   84px;
  --measure: 63ch;

  --gap-band:  clamp(5rem, 10vw, 9.5rem);
  --gap-block: clamp(2.5rem, 5vw, 4.5rem);
  --gap-row:   clamp(1.5rem, 2.6vw, 2.25rem);
  --gap-tight: .75rem;

  --out:  cubic-bezier(.16, 1, .3, 1);
  --out2: cubic-bezier(.22, 1, .36, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --slab:        #1A1815;
    --slab-lift:   #232019;
    --slab-sink:   #131109;
    --ink:         #EFEADF;
    --ink-soft:    #A0977F;
    --ink-faint:   #837A63;
    --scribe:      #3A362D;
    --scribe-firm: #5F594A;
    --flare:       #F2601F;
    --flare-deep:  #FF7B3D;
    --on-flare:    #1A0E06;
    --flare-veil:  rgba(242, 96, 31, .12);

    --state-live:  #6FBF87;
    --state-hold:  #E0AC3C;
    --state-stop:  #E8756A;

    --invert-bg:   #EDE9E0;
    --invert-ink:  #17150F;
    --invert-soft: #57513F;
    --invert-line: #BEB6A5;

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --slab:        #1A1815;
  --slab-lift:   #232019;
  --slab-sink:   #131109;
  --ink:         #EFEADF;
  --ink-soft:    #A0977F;
  --ink-faint:   #837A63;
  --scribe:      #3A362D;
  --scribe-firm: #5F594A;
  --flare:       #F2601F;
  --flare-deep:  #FF7B3D;
  --on-flare:    #1A0E06;
  --flare-veil:  rgba(242, 96, 31, .12);

  --state-live:  #6FBF87;
  --state-hold:  #E0AC3C;
  --state-stop:  #E8756A;

  --invert-bg:   #EDE9E0;
  --invert-ink:  #17150F;
  --invert-soft: #57513F;
  --invert-line: #BEB6A5;

  color-scheme: dark;
}

/* --- reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--slab);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.09rem);
  line-height: 1.66;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
hr { border: 0; }

::selection { background: var(--flare); color: var(--on-flare); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--flare);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--flare); color: var(--on-flare);
  padding: .75rem 1.25rem; font-family: var(--f-mono); font-size: .8rem;
  text-decoration: none;
}
.skip:focus { left: .5rem; top: .5rem; }

/* --- headings ------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.026em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 1.5rem + 5.2vw, 5.4rem); }
h2 { font-size: clamp(2rem, 1.3rem + 3.1vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 1.08rem + .72vw, 1.7rem); line-height: 1.14; }
h4 { font-size: clamp(1.02rem, .97rem + .24vw, 1.16rem); line-height: 1.24; letter-spacing: -.012em; }

/* .sub keeps the document outline legal (no skipped levels) while letting a
   heading take the visual weight one step down. */
h2.sub { font-size: clamp(1.25rem, 1.08rem + .72vw, 1.7rem); line-height: 1.14; }
h3.sub { font-size: clamp(1.02rem, .97rem + .24vw, 1.16rem); line-height: 1.24; letter-spacing: -.012em; }

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }
code, kbd, samp {
  font-family: var(--f-mono);
  font-size: .87em;
  background: var(--flare-veil);
  padding: .1em .38em;
  color: var(--flare-deep);
  word-break: break-word;
}

/* --- shared atoms --------------------------------------------------------- */
.stamp {
  font-family: var(--f-mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
}

.lede {
  font-size: clamp(1.1rem, 1.02rem + .42vw, 1.36rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 46ch;
}
h1 + .lede, h2 + .lede, .slabtype + .lede { margin-top: clamp(1.1rem, 2vw, 1.6rem); }

.note {
  font-size: .92rem;
  color: var(--ink-faint);
  max-width: 68ch;
}

.rule { height: 1px; background: var(--scribe); border: 0; margin: 0; }
.rule--firm { background: var(--scribe-firm); }
.rule--heavy { height: 3px; background: var(--ink); }

/* text link, underlined from a rule so nothing needs a container */
.tlink {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--flare), var(--flare));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 100%;
  padding-bottom: .1em;
  transition: background-size .3s var(--out), color .3s var(--out);
}
.tlink:hover { color: var(--flare-deep); background-size: 100% 2px; }

/* the one CTA shape allowed: a rule-bounded slab, no radius, no shadow */
.act {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--f-mono); font-size: .82rem;
  letter-spacing: .09em; text-transform: uppercase; font-weight: 500;
  text-decoration: none;
  padding: 1.05rem 1.6rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: color .35s var(--out), border-color .35s var(--out);
}
.act::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .42s var(--out);
}
.act:hover { color: var(--slab); }
.act:hover::before { transform: scaleY(1); }
.act svg { width: 1em; height: 1em; flex: none; }

.act--flare { border-color: var(--flare); color: var(--flare-deep); }
.act--flare::before { background: var(--flare); }
.act--flare:hover { color: var(--on-flare); border-color: var(--flare); }

/* --- layout scaffold ------------------------------------------------------ */
.deck { min-width: 0; }

@media (min-width: 62rem) {
  .deck { margin-left: var(--railw); }
}

.stage {
  width: 100%;
  max-width: var(--stage);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.stage--wide { max-width: 84rem; }
.stage--tight { max-width: 48rem; }

.band { padding-block: var(--gap-band); position: relative; }
.band--first { padding-top: clamp(4rem, 9vw, 8rem); }
.band--snug { padding-block: clamp(3.5rem, 7vw, 6rem); }

/* inverted blocks: the accent is a ground, never a lone pop */
.band--flare {
  background: var(--flare);
  color: var(--on-flare);
  --ink: var(--on-flare);
  --ink-soft: color-mix(in oklab, var(--on-flare) 78%, var(--flare));
  --ink-faint: color-mix(in oklab, var(--on-flare) 62%, var(--flare));
  --scribe: color-mix(in oklab, var(--on-flare) 32%, var(--flare));
  --scribe-firm: color-mix(in oklab, var(--on-flare) 55%, var(--flare));
  --flare-deep: var(--on-flare);
  --flare-veil: color-mix(in oklab, var(--on-flare) 14%, transparent);
  --slab: var(--flare);
}
.band--ink {
  background: var(--invert-bg);
  color: var(--invert-ink);
  --ink: var(--invert-ink);
  --ink-soft: var(--invert-soft);
  --ink-faint: var(--invert-soft);
  --scribe: var(--invert-line);
  --scribe-firm: var(--invert-soft);
  --slab: var(--invert-bg);
  --flare-deep: var(--flare);
  --flare-veil: color-mix(in oklab, var(--flare) 16%, transparent);
}
.band--sink { background: var(--slab-sink); }

/* --- vertical rail -------------------------------------------------------- */
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--railw); z-index: 90;
  display: none;
  flex-direction: column; align-items: center;
  padding-block: 1.4rem;
  background: var(--slab);
  border-right: 1px solid var(--scribe);
}
@media (min-width: 62rem) { .rail { display: flex; } }

.rail__mark {
  font-family: var(--f-display); font-weight: 600; font-size: 1.32rem;
  letter-spacing: -.05em; text-decoration: none; color: var(--ink);
  line-height: 1;
  display: block;
}
.rail__mark span { color: var(--flare); }

.rail__nav {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2.1rem;
  margin-block: 1.6rem;
}
.rail__link {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--f-mono); font-size: .74rem;
  letter-spacing: .19em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft);
  transition: color .3s var(--out);
  position: relative;
  padding-block: .2rem;
}
.rail__link:hover { color: var(--ink); }
.rail__link[aria-current="page"] { color: var(--flare-deep); }
.rail__link[aria-current="page"]::before {
  content: ""; position: absolute; left: -8px; top: 0; bottom: 0;
  width: 2px; background: var(--flare);
}

.rail__foot { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.rail__tag {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--f-mono); font-size: .6rem; letter-spacing: .17em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* --- theme switch --------------------------------------------------------- */
.swap {
  appearance: none; background: transparent; cursor: pointer;
  border: 1px solid var(--scribe); color: var(--ink-soft);
  width: 38px; height: 38px; padding: 0;
  display: grid; place-items: center;
  transition: border-color .3s var(--out), color .3s var(--out);
}
.swap:hover { border-color: var(--ink); color: var(--ink); }
.swap svg { width: 17px; height: 17px; }
.swap .swap__moon { display: none; }
:root[data-theme="dark"] .swap .swap__sun { display: none; }
:root[data-theme="dark"] .swap .swap__moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .swap .swap__sun { display: none; }
  :root:not([data-theme="light"]) .swap .swap__moon { display: block; }
}

/* --- mobile bar + sheet --------------------------------------------------- */
.bar {
  position: sticky; top: 0; z-index: 95;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-width: 0;
  padding: .85rem var(--gutter);
  background: var(--slab);
  border-bottom: 1px solid var(--scribe);
}
@media (min-width: 62rem) { .bar { display: none; } }

.bar__mark {
  font-family: var(--f-display); font-weight: 600; font-size: 1.16rem;
  letter-spacing: -.045em; text-decoration: none; color: var(--ink);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: block;
}
.bar__mark span { color: var(--flare); }
.bar__side { display: flex; align-items: center; gap: .5rem; flex: none; }

.bar__open {
  appearance: none; background: transparent; cursor: pointer;
  border: 1px solid var(--scribe); color: var(--ink);
  width: 38px; height: 38px; padding: 0; display: grid; place-items: center;
}
.bar__open svg { width: 18px; height: 18px; }

.sheet {
  position: fixed; inset: 0; z-index: 120;
  background: var(--slab);
  padding: 1.4rem var(--gutter) 2.5rem;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.sheet[hidden] { display: none; }
.sheet__top { display: flex; justify-content: flex-end; margin-bottom: 2rem; }
.sheet__close {
  appearance: none; background: transparent; cursor: pointer;
  border: 1px solid var(--scribe); color: var(--ink);
  width: 38px; height: 38px; padding: 0; display: grid; place-items: center;
}
.sheet__close svg { width: 18px; height: 18px; }
.sheet__nav { display: flex; flex-direction: column; }
.sheet__link {
  font-family: var(--f-display); font-size: 1.9rem; font-weight: 500;
  letter-spacing: -.03em; text-decoration: none; color: var(--ink);
  padding-block: .85rem;
  border-top: 1px solid var(--scribe);
}
.sheet__link:last-child { border-bottom: 1px solid var(--scribe); }
.sheet__link[aria-current="page"] { color: var(--flare-deep); }
.sheet__tag { margin-top: 2rem; }

/* --- section head: centred narrow ---------------------------------------- */
.crown {
  max-width: 34rem; margin-inline: auto; text-align: center;
  margin-bottom: var(--gap-block);
}
.crown .stamp { margin-bottom: 1.1rem; }
.crown p { margin-inline: auto; margin-top: 1.2rem; max-width: 42ch; color: var(--ink-soft); }

/* --- 1. problem: opposed columns ----------------------------------------- */
.oppose {
  display: grid; gap: 0;
  border-top: 1px solid var(--scribe);
}
@media (min-width: 48rem) {
  .oppose { grid-template-columns: 1fr 1fr; }
}
.oppose__side {
  padding: clamp(1.75rem, 3.4vw, 3rem) 0;
  border-bottom: 1px solid var(--scribe);
  min-width: 0;
}
@media (min-width: 48rem) {
  .oppose__side + .oppose__side {
    border-left: 1px solid var(--scribe);
    padding-left: clamp(1.75rem, 3.4vw, 3rem);
  }
  .oppose__side:first-child { padding-right: clamp(1.75rem, 3.4vw, 3rem); }
}
.oppose__side h2 { margin-bottom: 1.1rem; }
.oppose__side .stamp { margin-bottom: .9rem; }
.oppose__side--now .stamp { color: var(--flare-deep); }

.tally { list-style: none; margin: 0; padding: 0; }
.tally li {
  display: grid; grid-template-columns: 2.4rem 1fr; gap: .8rem;
  padding-block: .78rem;
  border-top: 1px solid var(--scribe);
  font-size: .97rem;
  align-items: start;
}
.tally li:first-child { border-top: 0; }
.tally b {
  font-family: var(--f-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .08em; color: var(--ink-faint);
  padding-top: .32em;
}
.oppose__side--now .tally b { color: var(--flare-deep); }

/* --- 2. hook: stacked slab ----------------------------------------------- */
.slabtype {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.9rem, .6rem + 9.4vw, 8.6rem);
  line-height: .93;
  letter-spacing: -.045em;
  margin: 0;
  text-wrap: balance;
}
.slabtype em { font-style: normal; color: var(--flare); }
.hook__meta {
  display: flex; flex-wrap: wrap; gap: 1.4rem 2.6rem;
  margin-top: var(--gap-row);
  padding-top: 1.3rem;
  border-top: 1px solid var(--scribe);
}
.hook__meta div { min-width: 0; }
.hook__meta dt { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.hook__meta dd { margin: .35rem 0 0; font-size: .98rem; font-weight: 600; font-family: var(--f-display); letter-spacing: -.01em; }

/* --- live agent console --------------------------------------------------- */
.console {
  margin-top: var(--gap-block);
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--scribe);
  font-family: var(--f-mono);
  font-size: clamp(.76rem, .72rem + .18vw, .85rem);
  line-height: 1.62;
}
.console__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.2rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--scribe);
  color: var(--ink-faint);
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
}
.console__id { color: var(--flare-deep); letter-spacing: .08em; }
.console__body { padding: 1.1rem 0 1.3rem; }

.console__line { display: flex; gap: .8rem; padding-block: .12rem; }
.console__line[data-hidden] .console__txt { visibility: hidden; }
.console__line[data-hidden] .console__gut { opacity: .38; }
.console__gut { color: var(--ink-faint); flex: none; width: 2.4rem; text-align: right; }
.console__txt { min-width: 0; word-break: break-word; }
.console__txt b { color: var(--flare-deep); font-weight: 500; }
.console__caret {
  display: inline-block; width: .55em; height: 1.05em;
  background: var(--flare); vertical-align: -.18em; margin-left: .1em;
}
.console__foot {
  display: flex; flex-wrap: wrap; gap: .5rem;
  padding: .85rem 0; border-top: 1px solid var(--scribe);
}
.chip {
  font-family: var(--f-mono); font-size: .66rem;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .3rem .6rem;
  border: 1px solid var(--scribe);
  color: var(--ink-faint);
  transition: color .4s var(--out), border-color .4s var(--out);
}
.chip[data-state="ready"] { color: var(--state-live); border-color: var(--state-live); }
.chip[data-state="run"] { color: var(--state-hold); border-color: var(--state-hold); }

/* --- framed collage: hairline viewports, no fill -------------------------- */
.frameset {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  margin-top: var(--gap-block);
}
.frame {
  position: relative;
  border: 1px solid var(--scribe);
  padding: 1.15rem 1.25rem 1.3rem;
  background: var(--slab);
  min-width: 0;
}
.frame .stamp { margin-bottom: .7rem; }
.frame h3 { margin-bottom: .45rem; }
.frame p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.frame--a { grid-column: 1 / -1; }
.frame--b { grid-column: 1 / -1; margin-top: -1px; }
.frame--c { grid-column: 1 / -1; margin-top: -1px; }
@media (min-width: 52rem) {
  /* The frames join on shared hairlines rather than overlapping their
     contents — the stagger does the layering, the rule does the framing. */
  .frameset { grid-template-rows: auto auto; }
  .frame--a { grid-column: 1 / 8;  grid-row: 1; z-index: 1; }
  .frame--b { grid-column: 8 / 13; grid-row: 1 / 3; margin: 3.4rem 0 0 -1px;
              align-self: start; z-index: 2; }
  .frame--c { grid-column: 2 / 8;  grid-row: 2; margin-top: -1px;
              align-self: start; z-index: 3; }
}

/* --- 3. explain: zig-zag pairs ------------------------------------------- */
.zig {
  display: grid; gap: var(--gap-row);
  padding-block: clamp(2.25rem, 4.4vw, 3.6rem);
  border-top: 1px solid var(--scribe);
  align-items: start;
}
.zig:last-of-type { border-bottom: 1px solid var(--scribe); }
@media (min-width: 52rem) {
  .zig { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); }
  .zig--flip .zig__say { order: 2; }
  .zig--flip .zig__show { order: 1; }
}
.zig__say { min-width: 0; }
.zig__say .stamp { margin-bottom: .9rem; }
.zig__say h3 { margin-bottom: .9rem; }
.zig__say p { color: var(--ink-soft); }
.zig__show { min-width: 0; }

/* the transcript motif: hairline rows, mono, no box */
.trace { list-style: none; margin: 0; padding: 0; font-family: var(--f-mono); font-size: .82rem; }
.trace li {
  display: grid; grid-template-columns: auto 1fr; gap: .9rem;
  padding-block: .62rem;
  border-top: 1px dashed var(--scribe);
  align-items: baseline;
}
.trace li:first-child { border-top: 1px solid var(--scribe-firm); }
.trace li:last-child { border-bottom: 1px solid var(--scribe-firm); }
.trace i { font-style: normal; color: var(--flare-deep); }
.trace span { color: var(--ink-soft); min-width: 0; word-break: break-word; }

/* --- horizontal pan ------------------------------------------------------- */
.pan {
  overflow: hidden;
  border-top: 1px solid var(--scribe);
  border-bottom: 1px solid var(--scribe);
  padding-block: 1.5rem;
}
.pan__track {
  display: flex; gap: 0; width: max-content;
  will-change: transform;
}
.pan__card {
  flex: none;
  width: clamp(15rem, 26vw, 21rem);
  padding-inline: clamp(1.1rem, 2.2vw, 2rem);
  border-left: 1px solid var(--scribe);
}
.pan__card .stamp { margin-bottom: .55rem; color: var(--flare-deep); }
.pan__card h3 { margin-bottom: .4rem; }
.pan__card p { font-size: .88rem; color: var(--ink-soft); margin: 0; }

/* --- 4. proof: quote wall ------------------------------------------------- */
.quotewall {
  display: grid; gap: 0;
  border-top: 1px solid var(--scribe);
}
@media (min-width: 46rem) { .quotewall { grid-template-columns: 1fr 1fr; } }
@media (min-width: 68rem) { .quotewall { grid-template-columns: repeat(3, 1fr); } }
.quotewall figure {
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.4rem) clamp(1.25rem, 2.4vw, 2rem);
  border-bottom: 1px solid var(--scribe);
  border-right: 1px solid var(--scribe);
  min-width: 0;
}
.quotewall blockquote {
  margin: 0 0 1.1rem;
  font-size: clamp(1rem, .96rem + .24vw, 1.14rem);
  line-height: 1.5;
}
.quotewall figcaption {
  font-family: var(--f-mono); font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
}
.quotewall figcaption b { display: block; color: var(--ink); font-weight: 500; margin-bottom: .2rem; letter-spacing: .08em; }

/* --- 5. objections: FAQ deck --------------------------------------------- */
.faqdeck { border-top: 1px solid var(--scribe-firm); }
.faqdeck details {
  border-bottom: 1px solid var(--scribe);
}
.faqdeck summary {
  cursor: pointer; list-style: none;
  display: grid; grid-template-columns: 1fr auto; gap: 1.2rem;
  align-items: baseline;
  padding-block: clamp(1.1rem, 2vw, 1.6rem);
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.08rem, 1rem + .42vw, 1.4rem);
  letter-spacing: -.018em;
  transition: color .3s var(--out);
}
.faqdeck summary::-webkit-details-marker { display: none; }
.faqdeck summary:hover { color: var(--flare-deep); }
.faqdeck summary span {
  font-family: var(--f-mono); font-size: .95rem; color: var(--flare-deep);
  flex: none; line-height: 1; transition: transform .35s var(--out);
}
.faqdeck details[open] summary span { transform: rotate(45deg); }
.faqdeck .faqdeck__a { padding-bottom: 1.7rem; max-width: 62ch; }
.faqdeck .faqdeck__a p { color: var(--ink-soft); }

/* --- 6. cta: edge-to-edge type, action inline ---------------------------- */
.edgecta { text-align: center; }
.edgecta h2 {
  font-size: clamp(2.2rem, .5rem + 7.4vw, 6.4rem);
  line-height: .96; font-weight: 600; letter-spacing: -.045em;
}
.edgecta__row {
  display: flex; flex-wrap: wrap; gap: 1rem 1.4rem;
  justify-content: center; align-items: center;
  margin-top: var(--gap-row);
}
.edgecta p { margin-inline: auto; }

/* --- page head (inner pages) --------------------------------------------- */
.phead { padding-block: clamp(3rem, 7vw, 6rem) var(--gap-block); }
.phead h1 { max-width: 20ch; }
.phead .lede { margin-top: 1.4rem; }
.phead__rule { margin-top: clamp(2rem, 4vw, 3.2rem); }

.crumbs {
  font-family: var(--f-mono); font-size: .72rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 1.6rem;
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.crumbs li::after { content: "/"; margin-left: .5rem; color: var(--scribe-firm); }
.crumbs li:last-child::after { content: ""; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--flare-deep); }

/* --- prose (lessons, legal) ---------------------------------------------- */
.prose { max-width: 40rem; min-width: 0; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-size: clamp(1.5rem, 1.3rem + .9vw, 2.05rem);
  margin-top: clamp(2.6rem, 5vw, 4rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--scribe);
}
.prose h3 { margin-top: 2.2rem; font-size: clamp(1.1rem, 1.04rem + .4vw, 1.32rem); }
.prose h4 { margin-top: 1.8rem; }
.prose ul, .prose ol { margin: 0; padding-left: 1.35rem; max-width: var(--measure); }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--flare); font-family: var(--f-mono); font-size: .85em; }
.prose blockquote {
  margin: 1.6em 0; padding-left: 1.3rem;
  border-left: 3px solid var(--flare);
  font-style: italic; color: var(--ink-soft);
}
.prose dl { margin: 0; }
.prose dt { font-family: var(--f-display); font-weight: 600; margin-top: 1.1rem; }
.prose dd { margin: .25rem 0 0; color: var(--ink-soft); }
.prose .stamp { margin-top: 2.2rem; }
.prose a:not(.act):not(.tlink) {
  color: var(--flare-deep);
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
}

/* callout: rules only */
.aside {
  border-top: 3px solid var(--flare);
  border-bottom: 1px solid var(--scribe);
  padding-block: 1.1rem 1.3rem;
  margin-block: clamp(1.8rem, 3.4vw, 2.6rem);
  max-width: 40rem;
}
.aside .stamp { color: var(--flare-deep); margin-bottom: .55rem; margin-top: 0; }
.aside p { font-size: .95rem; color: var(--ink-soft); }

/* Preformatted blocks scroll inside their own container so the page body never
   scrolls sideways on a phone. */
.prose pre {
  overflow-x: auto;
  border-top: 1px solid var(--scribe-firm);
  border-bottom: 1px solid var(--scribe);
  padding: 1.05rem 0 1.2rem;
  margin-block: clamp(1.6rem, 3vw, 2.4rem);
  max-width: 40rem;
  min-width: 0;
}
.prose pre code {
  display: block;
  background: transparent;
  padding: 0;
  color: var(--ink-soft);
  font-size: clamp(.76rem, .73rem + .14vw, .84rem);
  line-height: 1.62;
  white-space: pre;
  word-break: normal;
}

/* --- tables --------------------------------------------------------------- */
.scroller { overflow-x: auto; margin-block: 1.6rem; }
table {
  border-collapse: collapse; width: 100%; min-width: 32rem;
  font-size: .92rem;
  font-variant-numeric: tabular-nums;
}
caption {
  text-align: left; font-family: var(--f-mono); font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
  padding-bottom: .7rem;
}
th, td { text-align: left; padding: .68rem .9rem .68rem 0; border-bottom: 1px solid var(--scribe); vertical-align: top; }
thead th {
  font-family: var(--f-mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink-faint);
  border-bottom-color: var(--scribe-firm);
}

/* --- course index --------------------------------------------------------- */
.ladder { border-top: 1px solid var(--scribe-firm); }
.ladder__row {
  display: grid; grid-template-columns: 3.4rem 1fr; gap: 1rem;
  padding-block: clamp(1rem, 1.9vw, 1.5rem);
  border-bottom: 1px solid var(--scribe);
  text-decoration: none; color: inherit;
  align-items: start;
  transition: background-color .3s var(--out), padding-left .3s var(--out);
}
@media (min-width: 46rem) {
  .ladder__row { grid-template-columns: 4.2rem 1fr 8rem; gap: 1.6rem; align-items: baseline; }
}
.ladder__row:hover { background: var(--flare-veil); padding-left: .7rem; }
.ladder__n { font-family: var(--f-mono); font-size: .82rem; color: var(--flare-deep); padding-top: .2em; }
.ladder__t { min-width: 0; }
.ladder__t h3 { font-size: clamp(1.06rem, 1rem + .34vw, 1.28rem); }
.ladder__t p { font-size: .91rem; color: var(--ink-soft); margin: .38rem 0 0; max-width: 58ch; }
.ladder__m {
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint);
  grid-column: 2; margin-top: .5rem;
}
@media (min-width: 46rem) { .ladder__m { grid-column: 3; margin-top: 0; text-align: right; } }

/* module cards, hairline only */
.modset { display: grid; gap: 0; border-top: 1px solid var(--scribe-firm); }
@media (min-width: 54rem) { .modset { grid-template-columns: repeat(3, 1fr); } }
.modset a {
  display: block; text-decoration: none; color: inherit;
  padding: clamp(1.4rem, 2.6vw, 2.2rem) clamp(1.1rem, 2vw, 1.7rem) clamp(1.6rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--scribe);
  min-width: 0;
  transition: background-color .3s var(--out);
}
@media (min-width: 54rem) {
  .modset a + a { border-left: 1px solid var(--scribe); }
}
.modset a:hover { background: var(--flare-veil); }
.modset .stamp { color: var(--flare-deep); margin-bottom: .8rem; }
.modset h3 { margin-bottom: .6rem; }
.modset p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.modset em { font-style: normal; display: block; margin-top: 1rem; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }

/* --- lesson sequence nav -------------------------------------------------- */
.seq {
  display: grid; gap: 0;
  margin-top: var(--gap-block);
  border-top: 1px solid var(--scribe-firm);
}
@media (min-width: 46rem) { .seq { grid-template-columns: 1fr 1fr; } }
.seq a {
  display: block; text-decoration: none; color: inherit;
  padding: 1.3rem 0 1.5rem;
  border-bottom: 1px solid var(--scribe);
  min-width: 0;
  transition: color .3s var(--out);
}
.seq a:hover { color: var(--flare-deep); }
.seq a + a { border-top: 1px solid var(--scribe); }
@media (min-width: 46rem) {
  .seq a + a { border-top: 0; border-left: 1px solid var(--scribe); padding-left: 1.6rem; text-align: right; }
  .seq a:first-child { padding-right: 1.6rem; }
  .seq a:only-child { grid-column: 1 / -1; }
}
.seq .stamp { margin-bottom: .45rem; }
.seq strong { font-family: var(--f-display); font-weight: 500; font-size: 1.12rem; letter-spacing: -.02em; }

/* --- independence notice -------------------------------------------------- */
.disclose {
  border-top: 1px solid var(--scribe);
  border-bottom: 1px solid var(--scribe);
  padding-block: 1.15rem;
  margin-top: var(--gap-block);
}
.disclose p { font-size: .88rem; color: var(--ink-soft); max-width: 74ch; margin: 0; }
.disclose strong { color: var(--ink); font-weight: 600; }

.band--tail { padding-block: clamp(2rem, 4vw, 3.25rem); }
.band--tail .disclose { margin-top: 0; }

/* --- footer: column grid -------------------------------------------------- */
.foot {
  border-top: 3px solid var(--ink);
  padding-block: clamp(3rem, 6vw, 5rem) 2.5rem;
}
.foot__grid { display: grid; gap: var(--gap-row); }
@media (min-width: 44rem) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 66rem) { .foot__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.foot__col { min-width: 0; }
.foot__col h2 {
  font-family: var(--f-mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 1rem; line-height: 1.4; letter-spacing: .16em;
}
.foot__mark {
  font-family: var(--f-display); font-weight: 600; font-size: 1.5rem;
  letter-spacing: -.045em; margin-bottom: .8rem;
}
.foot__mark span { color: var(--flare); }
.foot__col ul { list-style: none; margin: 0; padding: 0; }
.foot__col li { margin-bottom: .55rem; }
.foot__col a { color: var(--ink-soft); text-decoration: none; font-size: .92rem; transition: color .25s var(--out); }
.foot__col a:hover { color: var(--flare-deep); }
.foot__col p { font-size: .9rem; color: var(--ink-soft); max-width: 34ch; }
.foot__base {
  margin-top: clamp(2.2rem, 4vw, 3.2rem);
  padding-top: 1.3rem;
  border-top: 1px solid var(--scribe);
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; justify-content: space-between;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* --- grain: one fixed layer, never on scrolling content ------------------- */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: .05; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .grain { mix-blend-mode: screen; opacity: .05; }
}

/* ==========================================================================
   MOTION — everything below is gated on .js so a script failure, a blocked
   script or a crawler with scripting off still sees a complete page.
   ========================================================================== */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity .78s var(--out), transform .78s var(--out);
  transition-delay: var(--d, 0ms);
}

/* word-mask headings — the signature moment.
   The container is hidden until the split has actually happened, so there is
   no flash of the plain heading; JS adds .is-ready in a finally block, so a
   throw mid-split still reveals the text. */
.js [data-split] { opacity: 0; }
.js [data-split].is-ready { opacity: 1; }
.js [data-split] .w {
  display: inline-block;
  overflow: hidden;
  /* descenders are clipped by the mask without this pair */
  padding-bottom: .14em;
  margin-bottom: -.14em;
  vertical-align: bottom;
}
.js [data-split] .w > i {
  display: inline-block;
  font-style: inherit;
  transform: translate3d(0, 110%, 0);
}
.js [data-split].is-in .w > i {
  transform: none;
  transition: transform .92s var(--out);
  transition-delay: var(--d, 0ms);
}

/* scrubbed lede — words light up as the block crosses the fold */
.js [data-scrub] .s { opacity: .17; transition: opacity .28s linear; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js [data-reveal].is-in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js [data-split] { opacity: 1 !important; }
  .js [data-split] .w > i,
  .js [data-split].is-in .w > i { transform: none !important; transition: none !important; }
  .js [data-scrub] .s { opacity: 1 !important; }
  .console__caret { display: none; }
  .console__line[data-hidden] .console__txt { visibility: visible; }
  .console__line[data-hidden] .console__gut { opacity: 1; }
  .act::before, .act:hover::before { transition: none; }
  .pan__track { transform: none !important; }
  .pan { overflow-x: auto; }
}
