/* CiteLantern site layer. Theme tokens + page-local classes only.
   The engine (scrollcraft.css / .js) is untouched. */

@font-face { font-family: "PT Sans"; src: url(fonts/ptsans-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "PT Sans"; src: url(fonts/ptsans-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "PT Serif"; src: url(fonts/ptserif-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "PT Serif"; src: url(fonts/ptserif-400i.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "PT Serif"; src: url(fonts/ptserif-700.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* brand palette, branding/palette.md */
  --sc-canvas:     #F2F6F7;
  --sc-surface:    #FFFFFF;
  --sc-ink:        #203450;
  --sc-ink-soft:   #556875;
  --sc-accent:     #12778A;
  --sc-accent-ink: #FFFFFF;
  --sc-font-display: "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --sc-font-text:    "PT Serif", Georgia, "Times New Roman", serif;
  --sc-font-mono:    "PT Sans", "Helvetica Neue", Arial, sans-serif;

  /* light canvas: edge light goes white, shadows halve and tint navy */
  --sc-edge: inset 0 1px 0 rgba(255,255,255,0.9);
  --sc-shadow-color: 215 45% 22%;
  --sc-e1: 0 1px 2px hsl(var(--sc-shadow-color) / 0.10), 0 1px 1px hsl(var(--sc-shadow-color) / 0.06);
  --sc-e2: 0 2px 4px hsl(var(--sc-shadow-color) / 0.08), 0 8px 18px -4px hsl(var(--sc-shadow-color) / 0.12);
  --sc-e3: 0 4px 8px hsl(var(--sc-shadow-color) / 0.08), 0 24px 48px -12px hsl(var(--sc-shadow-color) / 0.22);

  --cl-navy: #203450;
  --cl-deep: #111E2D;
  --cl-rule: #D8E2E6;
  --cl-neg: #A6384A;  --cl-neg-bg: #FCEAED;
  --cl-pos: #14614F;  --cl-pos-bg: #E6F4EF;
  --cl-teal-hi: #6AD2DF;
  --folio-h: 3.25rem;
}

html { scroll-padding-top: var(--folio-h); }
body { background: var(--sc-canvas); color: var(--sc-ink); font-family: var(--sc-font-text); }
.sc-display { font-family: var(--sc-font-display); font-weight: 700; color: var(--sc-ink); }
.sc-body { color: var(--sc-ink-soft); }
a { color: var(--sc-accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: #CDE6EA; color: var(--cl-navy); }

.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--sc-surface); padding: var(--sc-3) var(--sc-4); }
.skip:focus { left: var(--sc-4); top: var(--sc-4); }

/* small caps label used sparingly (folio, captions, rate card) */
.lbl { font-family: var(--sc-font-display); font-size: var(--sc-t-xs); letter-spacing: var(--sc-track-wide); text-transform: uppercase; color: var(--sc-ink-soft); font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-base);
  background: var(--cl-navy); color: #fff; text-decoration: none;
  padding: 0.95em 1.4em; border-radius: var(--sc-r-sm); border: 0; cursor: pointer;
  box-shadow: var(--sc-e2); white-space: nowrap;
  transition: background-color 160ms var(--sc-ease-out), transform 120ms var(--sc-ease-out);
}
.btn:hover { background: #2B4568; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #8A9AA6; cursor: not-allowed; box-shadow: none; }
.btn svg { width: 1em; height: 1em; }

/* ---------- folio (fixed margin chrome) ---------- */
.folio {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome);
  height: var(--folio-h); display: flex; align-items: center; justify-content: space-between; gap: var(--sc-4);
  padding-inline: var(--sc-gutter);
  font-family: var(--sc-font-display); font-size: var(--sc-t-sm); color: var(--sc-ink);
  background: color-mix(in oklab, var(--sc-canvas) 92%, transparent);
  border-bottom: 1px solid var(--cl-rule);
  transform: translateY(-100%); transition: transform 240ms var(--sc-ease-out), background-color 240ms var(--sc-ease-out), color 240ms var(--sc-ease-out);
}
.folio.is-on { transform: none; }
.folio__mark { display: inline-flex; align-items: center; gap: 0.6rem; color: inherit; text-decoration: none; font-weight: 700; }
.folio__mark svg { width: 1.6rem; height: 1.6rem; }
.folio__chap { position: relative; }
.folio__btn {
  font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0.4rem 0.2rem;
  display: inline-flex; gap: 0.5em; align-items: baseline;
}
.folio__num { font-weight: 700; color: var(--sc-accent); min-width: 1.6em; }
.folio__btn::after { content: ""; width: 0.45em; height: 0.45em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-0.2em) rotate(45deg); margin-left: 0.2em; }
.folio__index {
  position: absolute; top: calc(100% + 0.5rem); left: 50%; translate: -50% 0; min-width: 16rem;
  list-style: none; margin: 0; padding: var(--sc-3); background: var(--sc-surface); color: var(--cl-navy);
  border: 1px solid var(--cl-rule); border-radius: var(--sc-r-md); box-shadow: var(--sc-e3);
}
.folio__index[hidden] { display: none; }
.folio__index a { display: flex; gap: 0.8em; padding: 0.5rem 0.6rem; color: inherit; text-decoration: none; border-radius: var(--sc-r-sm); }
.folio__index a:hover, .folio__index a[aria-current="true"] { background: var(--sc-canvas); }
.folio__index a span:first-child { color: var(--sc-accent); font-weight: 700; min-width: 1.8em; }
.folio__cta { color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: var(--sc-accent); text-decoration-thickness: 2px; white-space: nowrap; }
.folio.is-dark { background: color-mix(in oklab, var(--cl-navy) 94%, transparent); color: #F4F8FA; border-color: #344954; }
.folio.is-dark .folio__num { color: var(--cl-teal-hi); }
.folio.is-dark .folio__cta { text-decoration-color: var(--cl-teal-hi); }

/* ---------- title page ---------- */
.title {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: clip;
  display: grid; grid-template-rows: auto 1fr; isolation: isolate;
  --t: 0; --mx: 0; --my: 0;
}
.title__top { display: flex; justify-content: space-between; align-items: center; gap: var(--sc-4); padding: clamp(1.25rem, 3vw, 2.25rem) var(--sc-gutter) 0; position: relative; z-index: 3; }
.title__logo { width: clamp(9.5rem, 16vw, 13rem); height: auto; display: block; }
.title__for { font-family: var(--sc-font-display); font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.title__body { position: relative; z-index: 2; align-self: center; padding: var(--sc-8) var(--sc-gutter) var(--sc-9); max-width: var(--sc-maxw); width: 100%; margin-inline: auto; }
.title__plane { transform: translate3d(calc(var(--mx) * 4px), calc(var(--t) * -18px + var(--my) * 3px), 0); }
.title h1 { font-family: var(--sc-font-display); font-weight: 700; font-size: clamp(2.9rem, 1.6rem + 5.6vw, 6.4rem); line-height: 0.98; letter-spacing: var(--sc-track-tight); max-width: 11ch; margin: 0; text-wrap: balance; }
.title h1 em { font-style: normal; color: var(--sc-accent); }
.title__sub { font-size: var(--sc-t-lg); line-height: 1.5; max-width: 34ch; margin: var(--sc-5) 0 var(--sc-6); color: var(--sc-ink-soft); text-wrap: pretty; }
/* answer slips: three planes. Further back = smaller, softer, lower contrast, slower.
   Each plane sets its own rotation, scale and travel; the transform is shared. */
.slips { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.slip {
  --rot: -1.5deg; --sc: 1; --ry: -150px; --px: 14px; --py: 10px;
  position: absolute; z-index: 3; right: clamp(1.25rem, 7vw, 8rem); bottom: clamp(3rem, 14vh, 9rem);
  width: min(23rem, 38vw); background: var(--sc-surface); border-radius: var(--sc-r-md);
  box-shadow: var(--sc-e3), var(--sc-edge); padding: var(--sc-5); font-family: var(--sc-font-display);
  transform: translate3d(calc(var(--mx) * var(--px)), calc(var(--t) * var(--ry) + var(--my) * var(--py)), 0) rotate(var(--rot)) scale(var(--sc));
}
.slip__q { font-family: var(--sc-font-text); font-style: italic; font-size: var(--sc-t-lg); line-height: 1.35; margin: var(--sc-2) 0 var(--sc-4); color: var(--cl-navy); }
.slip__lines { display: grid; gap: 0.55rem; margin-bottom: var(--sc-4); }
.slip__lines i { display: block; height: 6px; border-radius: 3px; background: #C9D5DB; }
.slip__lines i:nth-child(1) { width: 92%; } .slip__lines i:nth-child(2) { width: 70%; } .slip__lines i:nth-child(3) { width: 82%; }
.slip__src { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); margin: 0 0 var(--sc-4); line-height: 1.5; }
.slip__miss { display: inline-block; font-size: var(--sc-t-sm); font-weight: 700; color: var(--cl-neg); background: var(--cl-neg-bg); padding: 0.35em 0.7em; border-radius: var(--sc-r-sm); }

.slip--far {
  --rot: -5deg; --sc: 0.8; --ry: -40px; --px: 4px; --py: 3px;
  z-index: 1; right: calc(clamp(1.25rem, 7vw, 8rem) + 9rem); bottom: calc(clamp(3rem, 14vh, 9rem) + 15rem);
  opacity: 0.5; filter: blur(1.4px); box-shadow: var(--sc-e1);
}
.slip--mid {
  --rot: 3deg; --sc: 0.9; --ry: -90px; --px: 8px; --py: 6px;
  z-index: 2; right: calc(clamp(1.25rem, 7vw, 8rem) - 2.5rem); bottom: calc(clamp(3rem, 14vh, 9rem) + 8.5rem);
  opacity: 0.78; filter: blur(0.5px); box-shadow: var(--sc-e2);
}

/* ---------- chapters ---------- */
.chap { position: relative; padding-block: var(--sc-section); }
.chap__head { display: grid; gap: var(--sc-3); margin-bottom: var(--sc-7); }
.chap__no { font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-sm); letter-spacing: var(--sc-track-wide); text-transform: uppercase; color: var(--sc-accent); }
.chap h2 { margin: 0; max-width: 18ch; text-wrap: balance; }
.prose p { font-size: var(--sc-t-base); line-height: var(--sc-leading-body); max-width: var(--sc-measure); margin: 0; color: var(--sc-ink); }
.prose p + p { margin-top: var(--sc-4); }
.prose .soft { color: var(--sc-ink-soft); }

/* I: text left, media column right */
.spread { display: grid; gap: clamp(2rem, 6vw, 6rem); grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: start; }
.plate { margin: 0; }
.plate__img { position: relative; overflow: hidden; border-radius: var(--sc-r-sm); box-shadow: var(--sc-e2); background: #DDE5E9; }
.plate__img img { display: block; width: 100%; height: auto; }
.plate figcaption { font-family: var(--sc-font-display); font-size: var(--sc-t-xs); color: var(--sc-ink-soft); margin-top: var(--sc-3); }
.chap--one .plate { margin-top: calc(var(--sc-9) * -0.5); }

/* II: quiet, dense definitions */
.defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sc-7) clamp(2rem, 5vw, 5rem); margin: 0; max-width: 64rem; }
.defs div { border-top: 1px solid var(--cl-rule); padding-top: var(--sc-4); }
.defs dt { font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-lg); margin-bottom: var(--sc-2); }
.defs dd { margin: 0; line-height: var(--sc-leading-body); color: var(--sc-ink-soft); }
.chap--two .coda { font-style: italic; font-size: var(--sc-t-xl); line-height: 1.35; margin-top: var(--sc-8); max-width: 30ch; }

/* III: the rewrite (peak) */
.rw-act { padding-block: var(--sc-section); }
.rw__stage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 4vw, 4.5rem); align-items: center; padding: 0 var(--sc-gutter); max-width: var(--sc-maxw); margin-inline: auto; box-sizing: border-box; }
.rw__head h2 { font-size: var(--sc-t-2xl); margin: var(--sc-2) 0 var(--sc-2); }
.rw__note { font-family: var(--sc-font-display); font-size: var(--sc-t-xs); color: var(--sc-ink-soft); margin: 0 0 var(--sc-5); }
.card { background: var(--sc-surface); border-radius: var(--sc-r-md); box-shadow: var(--sc-e3), var(--sc-edge); padding: clamp(1.25rem, 2.4vw, 2rem); }
.card__q { font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-base); display: flex; gap: 0.6em; align-items: baseline; margin: 0 0 var(--sc-4); padding-bottom: var(--sc-4); border-bottom: 1px solid var(--cl-rule); }
.card__q span { color: var(--sc-ink-soft); font-weight: 400; }
.rw__ans { display: grid; font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.3rem); line-height: 1.55; min-height: 6.4em; }
.rw__ans > p { grid-area: 1 / 1; margin: 0; }
.rw__ans .w { opacity: var(--o, 1); transition: opacity 120ms linear; }
.rw__ans b { font-family: var(--sc-font-display); }
.rw__ans sup { color: var(--sc-accent); font-family: var(--sc-font-display); font-weight: 700; font-size: 0.68em; }
.chip { font-family: var(--sc-font-display); font-weight: 700; color: var(--cl-pos); background: var(--cl-pos-bg); padding: 0.05em 0.35em; border-radius: 4px; }
.rw__srcs { display: grid; margin-top: var(--sc-5); padding-top: var(--sc-4); border-top: 1px solid var(--cl-rule); font-family: var(--sc-font-display); font-size: var(--sc-t-sm); }
.rw__srcs > ol { grid-area: 1 / 1; list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; transition: opacity 200ms linear; }
.rw__srcs li { display: flex; align-items: center; gap: 0.7em; color: var(--sc-ink-soft); }
.rw__srcs li b { color: var(--sc-accent); min-width: 1.4em; }
.rw__srcs li.is-client { color: var(--cl-navy); font-weight: 700; }
.ansline { display: inline-flex; align-items: center; width: 2.6rem; flex: none; }
.ansline i { height: 5px; flex: 1; border-radius: 3px; background: var(--sc-accent); }
.ansline u { width: 9px; height: 9px; border-radius: 50%; background: var(--cl-navy); margin-left: 3px; text-decoration: none; }
.rw__side { display: grid; gap: var(--sc-5); align-content: center; }
.rw__fig { position: relative; margin: 0; aspect-ratio: 3 / 4; max-height: 62vh; border-radius: var(--sc-r-sm); overflow: hidden; box-shadow: var(--sc-e2); background: #C9D3D8; justify-self: center; width: auto; height: 62vh; }
.rw__fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* lit copy wipes up over the shaded one; --lit is set by site.js (no JS: fully lit) */
.rw__lit { position: absolute; inset: 0; clip-path: inset(calc((1 - var(--lit, 1)) * 100%) 0 0 0); }
.rw__replay { display: inline-flex; align-items: center; gap: 0.5em; margin-top: var(--sc-4); min-height: 44px; padding: 0 var(--sc-4); border: 1px solid var(--cl-rule); border-radius: 999px; background: var(--sc-surface); color: var(--cl-navy); font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-sm); cursor: pointer; }
.rw__replay svg { width: 1em; height: 1em; }
.rw__replay:hover:not(:disabled) { border-color: var(--sc-accent); color: var(--sc-accent); }
.rw__replay:disabled { opacity: 0.45; cursor: default; }
.rw__replay[hidden] { display: none; }

/* IV: ledger of deliverables + media column */
.resell { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.resell .plate { position: sticky; top: calc(var(--folio-h) + 2rem); }
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: var(--sc-5); padding: var(--sc-6) 0; border-top: 1px solid var(--cl-rule); }
.items li:last-child { border-bottom: 1px solid var(--cl-rule); }
.items h3 { font-family: var(--sc-font-display); font-size: var(--sc-t-xl); margin: 0; line-height: 1.1; }
.items p { margin: 0; line-height: var(--sc-leading-body); }
.items .how { font-family: var(--sc-font-display); font-size: var(--sc-t-sm); color: var(--sc-ink-soft); margin-top: var(--sc-3); }

/* V: navy intertitle, hard cut */
.chap--five { background: var(--cl-navy); --sc-ink: #F4F8FA; --sc-ink-soft: #C9D6DE; --sc-accent: var(--cl-teal-hi); color: var(--sc-ink); }
.chap--five .sc-display { color: var(--sc-ink); }
.chap--five h2 { font-size: clamp(2.6rem, 1.4rem + 5vw, 5.6rem); max-width: 14ch; line-height: 1; }
.chap--five .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sc-6) clamp(2rem, 5vw, 5rem); margin-top: var(--sc-8); max-width: 64rem; }
.chap--five .cols p { margin: 0; line-height: var(--sc-leading-body); color: var(--sc-ink); }

/* VI: rate card */
.rate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.ratecard { background: var(--sc-surface); border-radius: var(--sc-r-md); box-shadow: var(--sc-e2), var(--sc-edge); padding: clamp(1.25rem, 3vw, 2.5rem); }
.ratecard table { width: 100%; border-collapse: collapse; font-family: var(--sc-font-display); }
.ratecard caption { text-align: left; margin-bottom: var(--sc-4); }
.ratecard th, .ratecard td { text-align: left; padding: var(--sc-5) 0; border-top: 1px solid var(--cl-rule); vertical-align: top; }
.ratecard th { font-size: var(--sc-t-lg); padding-right: var(--sc-4); }
.ratecard th small { display: block; font-weight: 400; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); margin-top: 0.3em; font-family: var(--sc-font-text); }
.ratecard td { text-align: right; white-space: nowrap; }
.price { font-size: var(--sc-t-xl); font-weight: 700; font-variant-numeric: tabular-nums; display: block; }
.per { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.ratecard .fine { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); line-height: 1.55; margin: var(--sc-4) 0 0; }
.qa { margin: 0; }
.qa details { border-top: 1px solid var(--cl-rule); }
.qa details:last-child { border-bottom: 1px solid var(--cl-rule); }
.qa summary { cursor: pointer; list-style: none; font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-lg); padding: var(--sc-5) 2rem var(--sc-5) 0; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 0.2rem; top: 50%; translate: 0 -50%; color: var(--sc-accent); font-size: 1.4em; font-weight: 400; }
.qa details[open] summary::after { content: "\2212"; }
.qa details p { margin: 0 0 var(--sc-5); line-height: var(--sc-leading-body); color: var(--sc-ink-soft); max-width: 56ch; }

/* colophon: the quiet close */
.colophon { padding: var(--sc-10) var(--sc-gutter) var(--sc-7); border-top: 1px solid var(--cl-rule); }
.colophon__in { max-width: 44rem; }
.colophon__mark { width: 2.5rem; height: 2.5rem; color: var(--cl-navy); margin-bottom: var(--sc-6); }
.colophon__line { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem); line-height: 1.45; margin: 0; text-wrap: pretty; }
.colophon__line a { font-family: var(--sc-font-display); font-weight: 700; text-decoration-thickness: 2px; }

/* ---------- inner pages (free check, legal) ---------- */
.page { max-width: 46rem; margin-inline: auto; padding: calc(var(--folio-h) + var(--sc-8)) var(--sc-gutter) var(--sc-9); }
.page h1 { font-size: var(--sc-t-3xl); line-height: 1.02; letter-spacing: var(--sc-track-snug); margin: var(--sc-3) 0 var(--sc-5); text-wrap: balance; }
.page .lead { font-size: var(--sc-t-lg); line-height: 1.5; color: var(--sc-ink-soft); margin: 0 0 var(--sc-7); }
.legal h2 { font-family: var(--sc-font-display); font-size: var(--sc-t-xl); margin: var(--sc-8) 0 var(--sc-3); }
.legal p, .legal li { line-height: var(--sc-leading-body); }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: var(--sc-2); }
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--folio-h); display: flex; align-items: center; justify-content: space-between; padding-inline: var(--sc-gutter); background: color-mix(in oklab, var(--sc-canvas) 94%, transparent); border-bottom: 1px solid var(--cl-rule); z-index: 50; font-family: var(--sc-font-display); font-size: var(--sc-t-sm); }
.topbar img { height: 1.6rem; width: auto; display: block; }
.form { display: grid; gap: var(--sc-5); }
.field { display: grid; gap: var(--sc-2); }
.field label { font-family: var(--sc-font-display); font-weight: 700; }
.field small { font-family: var(--sc-font-display); color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.field input, .field textarea {
  font: inherit; font-size: var(--sc-t-base); color: var(--cl-navy); background: var(--sc-surface);
  border: 1px solid #A9B8C0; border-radius: var(--sc-r-sm); padding: 0.75em 0.9em; width: 100%; box-sizing: border-box;
  transition: border-color 160ms var(--sc-ease-out), box-shadow 160ms var(--sc-ease-out);
}
.field textarea { min-height: 7.5em; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--sc-accent); box-shadow: 0 0 0 3px #CDE6EA; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-5); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note { font-family: var(--sc-font-display); font-size: var(--sc-t-sm); color: var(--sc-ink-soft); line-height: 1.55; margin: 0; }
.status { font-family: var(--sc-font-display); padding: var(--sc-4) var(--sc-5); border-radius: var(--sc-r-sm); margin: 0; }
.status--ok { background: var(--cl-pos-bg); color: var(--cl-pos); }
.status--err { background: var(--cl-neg-bg); color: var(--cl-neg); }
.steps { list-style: none; padding: 0; margin: var(--sc-8) 0 0; display: grid; gap: var(--sc-4); counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; line-height: 1.55; }
.steps li::before { content: counter(s); font-family: var(--sc-font-display); font-weight: 700; color: var(--sc-accent); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .spread, .resell, .rate { grid-template-columns: minmax(0, 1fr); }
  .chap--one .plate { margin-top: 0; }
  .resell .plate { position: static; }
  .defs, .chap--five .cols { grid-template-columns: minmax(0, 1fr); }
  .rw__stage { grid-template-columns: minmax(0, 1fr); align-content: center; gap: var(--sc-4); padding-block: var(--sc-4); }
  .rw__side { order: -1; }
  .rw__fig { height: 22vh; max-height: none; }
  .rw__head h2 { font-size: var(--sc-t-xl); }
  .rw__note { margin-bottom: var(--sc-3); }
  .folio__label { display: none; }
}
@media (max-width: 700px) {
  .title h1 { font-size: clamp(2.5rem, 1.6rem + 6vw, 3.4rem); }
  .title__for { display: none; }
  .items li { grid-template-columns: minmax(0, 1fr); gap: var(--sc-2); }
  .two { grid-template-columns: minmax(0, 1fr); }
  .folio__cta { font-size: var(--sc-t-xs); }
  .ratecard th, .ratecard td { display: block; text-align: left; }
  .ratecard td { border-top: 0; padding-top: 0; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .rw__fig { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .title__plane { transform: none !important; }
  .slips > .slip { animation: none !important; }
  .folio { transition: none; }
}

/* rewrite: initial and no-JS states */
.js .rw__after, .js [data-rw-src="after"] { opacity: 0; }
.js .rw-ready .rw__after { opacity: 1; }
html:not(.js) .rw__before, html:not(.js) [data-rw-src="before"] { display: none; }

/* audit beat: who gets named instead */
.rw__before b { border-radius: 3px; padding: 0 0.15em; transition: background-color 200ms var(--sc-ease-out), color 200ms var(--sc-ease-out); }
.card.is-audit .rw__before b { background: var(--cl-neg-bg); color: var(--cl-neg); }

/* phone: folio title stays on one line */
.folio__title { white-space: nowrap; }
@media (max-width: 700px) {
  .folio { gap: var(--sc-3); }
  .folio__title { display: inline-block; max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
}

/* phones: the stack joins the flow under the CTA as a fanned deck.
   Back slips peek above the front one; on scroll the front rises fastest. */
@media (max-width: 700px) {
  .title { grid-template-rows: auto auto auto; }
  .title__body { padding-bottom: var(--sc-6); align-self: start; }
  .slips { position: relative; inset: auto; height: 21rem; margin: 0 var(--sc-gutter) var(--sc-6); }
  .slip { --ry: -80px; left: 0; right: 0.75rem; bottom: 0; top: auto; width: auto; padding: var(--sc-4); }
  .slip__q { font-size: var(--sc-t-base); margin-bottom: var(--sc-3); }
  .slip__lines { display: none; }
  .slip--far { --rot: 4deg; --sc: 0.88; --ry: -12px; left: 1.75rem; right: -0.75rem; top: 0; bottom: auto; opacity: 0.55; filter: blur(0.8px); }
  .slip--mid { --rot: -3.5deg; --sc: 0.94; --ry: -40px; left: -0.5rem; right: 1.5rem; top: 3.4rem; bottom: auto; opacity: 0.85; filter: blur(0.3px); }
  .slip--far .slip__miss, .slip--mid .slip__miss { display: none; }
  /* one-time deal on load: the back slips fan out from behind the front one */
  .slips > .slip { animation: deal 700ms var(--sc-ease-out) both; }
  .slips > .slip--far { animation-delay: 260ms; }
  .slips > .slip--mid { animation-delay: 140ms; }
}
@keyframes deal { from { translate: 0 2.5rem; opacity: 0; } }
/* short phones: the rewrite stage packs from the top */
@media (max-width: 900px) and (max-height: 760px) {
  .rw__stage { align-content: start; padding-top: var(--sc-3); gap: var(--sc-3); }
  .rw__fig { display: none; }
  .rw__head h2 { margin: 0 0 var(--sc-1); }
  .card { padding: var(--sc-4); }
  .card__q { margin-bottom: var(--sc-3); padding-bottom: var(--sc-3); }
  .rw__ans { font-size: 0.98rem; min-height: 0; }
  .rw__srcs { margin-top: var(--sc-3); padding-top: var(--sc-3); }
  .rw__srcs > ol { gap: 0.3rem; }
}

/* spacing: chapters sit close; one modest gap between them */
:root { --sc-section: clamp(2rem, 3.5vw, 3.5rem); }
.chap__head { margin-bottom: var(--sc-6); }
.colophon { padding-top: var(--sc-8); }
.foot { margin-top: var(--sc-7); }
/* phones: tighter rhythm between chapters */
@media (max-width: 700px) {
  :root { --sc-section: 1.75rem; }
  .title { min-height: 0; }
  .title__body { padding-top: var(--sc-7); }
  .chap__head { margin-bottom: var(--sc-5); }
  .chap--two .coda { margin-top: var(--sc-6); }
  .chap--five .cols { margin-top: var(--sc-6); }
  .plate { margin-top: var(--sc-2); }
  .colophon { padding-top: var(--sc-6); }
  .foot { margin-top: var(--sc-6); }
}
@media (max-width: 700px) {
  .items li { padding: var(--sc-5) 0; }
  .defs { gap: var(--sc-5); }
  .qa summary { padding-block: var(--sc-4); }
}

/* III: the rewrite made legible.
   A step track that fills with scroll, a state label, struck-out old words,
   new words typed in behind a caret. */
.track { position: relative; list-style: none; margin: 0 0 var(--sc-5); padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); font-family: var(--sc-font-display); font-size: var(--sc-t-sm); --fill: 0; }
.track::before, .track__fill { content: ""; position: absolute; left: 0.45em; right: 0.45em; top: 0.45em; height: 2px; border-radius: 1px; background: var(--cl-rule); }
.track__fill { background: var(--sc-accent); transform-origin: left center; transform: scaleX(var(--fill)); }
.track li { position: relative; z-index: 1; display: grid; gap: 0.45rem; justify-items: start; color: #6B7C87; transition: color 160ms var(--sc-ease-out); }
.track li:nth-child(2) { justify-items: center; }
.track li:nth-child(3) { justify-items: end; }
.track li::before { content: ""; width: 0.9em; height: 0.9em; border-radius: 50%; box-sizing: border-box; border: 2px solid #A9B8C0; background: var(--sc-canvas); transition: background-color 160ms var(--sc-ease-out), border-color 160ms var(--sc-ease-out), transform 160ms var(--sc-ease-out); }
.track li.is-on { color: var(--cl-navy); font-weight: 700; }
.track li.is-on::before { background: var(--sc-accent); border-color: var(--sc-accent); transform: scale(1.15); }

.rw__state { display: grid; margin: 0 0 var(--sc-3); font-family: var(--sc-font-display); font-size: var(--sc-t-sm); font-weight: 700; }
.state { grid-area: 1 / 1; justify-self: start; padding: 0.3em 0.65em; border-radius: var(--sc-r-sm); transition: opacity 200ms var(--sc-ease-out); }
.state--before { color: var(--cl-neg); background: var(--cl-neg-bg); }
.state--after { color: var(--cl-pos); background: var(--cl-pos-bg); opacity: 0; }
.card.is-after .state--before { opacity: 0; }
.card.is-after .state--after { opacity: 1; }

.rw__before .w.is-struck { color: var(--cl-neg); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--cl-neg); }
.rw__after .w.is-new { background: #D7EEF1; border-radius: 3px; }
.rw__ans .w { transition: opacity 140ms var(--sc-ease-out), background-color 300ms var(--sc-ease-out); }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -0.18em; background: var(--sc-accent); animation: caret 900ms steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
@media (max-width: 900px) and (max-height: 760px) { .track { margin-bottom: var(--sc-3); } }

/* footer: three columns under the colophon line */
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--sc-7) var(--sc-6); margin-top: var(--sc-9); padding-top: var(--sc-7); border-top: 1px solid var(--cl-rule); font-family: var(--sc-font-display); font-size: var(--sc-t-sm); max-width: var(--sc-maxw); }
.foot__brand img { height: 1.75rem; width: auto; display: block; }
.foot__brand p { color: var(--sc-ink-soft); max-width: 26ch; margin: var(--sc-3) 0 0; line-height: 1.55; }
.foot__h { margin: 0 0 var(--sc-3); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sc-2); }
.foot a { color: var(--sc-ink); text-decoration: none; }
.foot a:hover { color: var(--sc-accent); text-decoration: underline; }
.foot address { font-style: normal; color: var(--sc-ink-soft); line-height: 1.6; margin-top: var(--sc-3); }
.foot__base { max-width: var(--sc-maxw); margin-top: var(--sc-7); padding-top: var(--sc-5); border-top: 1px solid var(--cl-rule); display: grid; gap: var(--sc-1); font-family: var(--sc-font-display); font-size: var(--sc-t-xs); color: var(--sc-ink-soft); line-height: 1.6; }
.foot__base p { margin: 0; }
.colophon--page { padding-top: 0; border-top: 0; }
.colophon--page .foot { margin-top: 0; }
@media (max-width: 900px) {
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .foot { font-size: 1rem; gap: var(--sc-6) var(--sc-5); margin-top: var(--sc-8); }
  .foot ul { gap: 0; }
  .foot ul a { display: inline-block; padding: 0.6rem 0; }
  .foot address { font-size: 0.9375rem; }
  .foot__base { font-size: 0.8125rem; }
  .foot__col--company { grid-column: 1 / -1; }
}
@media (max-width: 380px) { .foot { grid-template-columns: minmax(0, 1fr); } }

/* closing CTA: a teal band above the footer, the page's question plus one field */
.colophon:has(.close) { border-top: 0; }
.close, .foot, .foot__base { max-width: calc(var(--sc-maxw) - 2 * var(--sc-gutter)); margin-inline: auto; }
.close { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(2rem, 5vw, 4.5rem); border-radius: var(--sc-r-md); background: var(--sc-accent); color: #fff; box-shadow: var(--sc-e3); }
.close__kicker { font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-sm); letter-spacing: var(--sc-track-wide); text-transform: uppercase; color: #D2F1F5; }
.close__h { font-family: var(--sc-font-display); font-weight: 700; font-size: clamp(2.1rem, 1.3rem + 3vw, 3.8rem); line-height: 1.02; letter-spacing: var(--sc-track-tight); margin: var(--sc-3) 0 var(--sc-4); max-width: 13ch; text-wrap: balance; color: #fff; }
.close__copy p { margin: 0; max-width: 40ch; font-size: var(--sc-t-base); line-height: var(--sc-leading-body); color: #EAF7F9; }
.close__ticks { list-style: none; margin: var(--sc-5) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sc-2) var(--sc-5); font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-sm); }
.close__ticks li { display: inline-flex; align-items: center; gap: 0.5em; }
.close__ticks li::before { content: ""; width: 0.55em; height: 0.3em; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translateY(-0.1em); }
.close__form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sc-3); min-width: 0; background: var(--sc-surface); color: var(--cl-navy); border-radius: var(--sc-r-md); padding: clamp(1.25rem, 2.5vw, 2rem); box-shadow: var(--sc-e3); }
.close__form label { font-family: var(--sc-font-display); font-weight: 700; font-size: var(--sc-t-lg); }
.close__row { display: flex; flex-wrap: wrap; gap: var(--sc-2); }
.close__row input { flex: 1 1 15rem; min-width: 0; font: inherit; font-size: var(--sc-t-base); color: var(--cl-navy); background: #fff; border: 1px solid #A9B8C0; border-radius: var(--sc-r-sm); padding: 0.8em 0.9em; transition: border-color 160ms var(--sc-ease-out), box-shadow 160ms var(--sc-ease-out); }
.close__row input:focus-visible { outline: none; border-color: var(--sc-accent); box-shadow: 0 0 0 3px #CDE6EA; }
.close__row .btn { flex: 1 0 auto; justify-content: center; min-height: 48px; }
.close__fine { margin: 0; font-family: var(--sc-font-display); font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
@media (max-width: 900px) {
  .close { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .close { padding: var(--sc-6) var(--sc-5); margin-inline: calc(var(--sc-gutter) * -0.5); }
  .close__row { flex-direction: column; }
  .close__row .btn { justify-content: center; min-height: 48px; }
  .close__ticks { flex-direction: column; }
}
