/* ==========================================================================
   ChainwatchCrypto — core design system
   Tokens, type scale, primitives and marketing components.
   Every value here is lifted from the approved design canvas
   (_design-source/ChainwatchCrypto v2.dc.html). Do not re-tune by hand.
   ========================================================================== */

:root {
  /* ---- surfaces ---- */
  --void:        #0b0c10;
  --void-2:      #06070a;
  --panel-1:     #1b1f27;
  --panel-2:     #12141a;
  --panel-3:     #101218;
  --paper:       #f4f4f2;
  --paper-2:     #ececea;
  --ink:         #14161b;

  /* ---- accent ---- */
  --red:         #ec3013;
  --red-bright:  #ff5a3c;
  --red-deep:    #dd2b0f;
  --red-dark:    #c9250d;
  --red-ink:     #a81a04;
  --red-soft:    #ff7a5c;
  /* CTA gradient stops. White on their average reaches 4.68:1, clearing WCAG AA
     for normal text; the original #ff5a3c -> #dd2b0f measured 3.85:1. */
  --cta-from:    #e8492c;
  --cta-to:      #c9250d;
  --red-pale:    #ff9d85;
  --red-wash:    #ffd0c2;

  /* ---- text ---- */
  --t-1:         #f4f4f2;
  --t-2:         #dcdedb;
  --t-3:         #c9ccc8;
  --t-mute:      #9aa1ad;
  --t-dim:       #838b98;
  --t-line:      #3d4450;
  --t-ink-2:     #5a606b;

  /* ---- semantic ---- */
  --ice:         #8fd3d6;
  --ice-ink:     #0e7c74;
  --amber:       #e8930f;
  --amber-soft:  #ffb27a;

  /* ---- geometry ---- */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 32px;
  --r-sect: 36px;
  --r-pill: 99px;

  --shell: 1460px;
  --pad-x: clamp(18px, 4vw, 52px);
  --pad-y: clamp(50px, 6vw, 88px);

  /* ---- motion ---- */
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* ---- type ---- */
  --f-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --f-body:    "Instrument Sans", system-ui, -apple-system, sans-serif;
  --f-serif:   "Instrument Serif", Georgia, serif;
  --f-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ==========================================================================
   RESET
   ========================================================================== */

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  /* Stop iOS Safari inflating body text when the phone is rotated. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Our own press states are enough; the grey flash on tap is not wanted. */
a, button, [role="button"], .choice, .chip, .tab { -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--void);
  color: var(--t-1);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

p { text-wrap: pretty; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; }

a { text-decoration: none; color: var(--red-soft); }
a:hover { color: var(--red-pale); }

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
img, svg, canvas { max-width: 100%; }
img { height: auto; }

::selection { background: rgba(236, 48, 19, .4); color: #fff; }

:focus-visible {
  outline: 2px solid var(--red-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: #2a2f3a; border-radius: var(--r-pill); border: 3px solid var(--void); }
::-webkit-scrollbar-thumb:hover { background: #3d4450; }

/* A [hidden] element must stay hidden even when a class sets display. */
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  /* A visually-hidden control is still a control. Keeping it at 16px means the
     "no form control under 16px" rule stays universal and needs no exception —
     and at 1x1 with the box clipped, the size changes nothing on screen. */
  font-size: 16px;
}

.skip-link {
  position: absolute; top: 8px; left: 8px; z-index: 999;
  transform: translateY(-160%);
  background: var(--red-deep); color: #fff; font-weight: 600; font-size: 14px;
  padding: 12px 18px; border-radius: var(--r-md);
  transition: transform .18s var(--ease);
}
.skip-link:focus { transform: none; color: #fff; }

/* ==========================================================================
   KEYFRAMES  (canonical set from the canvas)
   ========================================================================== */

@keyframes cwPulse   { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.7); } }
@keyframes cwBloom   { 0%, 100% { transform: translate3d(0,0,0) scale(1); opacity: .85; } 50% { transform: translate3d(2%,-2%,0) scale(1.08); opacity: 1; } }
@keyframes cwTick    { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes cwPop     { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cwShimmer { from { background-position: -180% 0; } to { background-position: 180% 0; } }
@keyframes cwDrift   { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes cwSpin    { to { transform: rotate(360deg); } }
@keyframes cwSlideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.shell { max-width: var(--shell); margin: 0 auto; padding-inline: var(--pad-x); }
.shell-narrow { max-width: 900px; margin: 0 auto; padding-inline: var(--pad-x); }

.sect { position: relative; }
.sect-pad { padding-block: var(--pad-y); }
.sect-pad-lg { padding-block: clamp(56px, 7vw, 104px); }
.sect-pad-sm { padding-block: clamp(36px, 4vw, 60px); }

/* Stacked panels: each section lifts over the one above with a rounded lip.
   Dark and light alternate; the -16px pull is what makes the seam read. */
.sect-dark  { background: var(--void); color: var(--t-1); }
.sect-light { background: linear-gradient(180deg, var(--paper), var(--paper-2)); color: var(--ink); }
.sect-light-rev { background: linear-gradient(180deg, var(--paper-2), var(--paper)); color: var(--ink); }
.sect-lip { border-radius: var(--r-sect) var(--r-sect) 0 0; margin-top: -16px; padding-top: 16px; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(272px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.grid-split { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: clamp(32px, 4vw, 56px); }
.grid-wide { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: clamp(36px, 5vw, 72px); }

.stack { display: grid; gap: 8px; }

/* Wide content beside a narrow rail. Collapses to one column before the rail
   would squeeze the main column into an unreadable strip. */
.with-rail {
  display: grid; gap: clamp(20px, 3vw, 40px); align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(min(280px, 100%), 340px);
}
@media (max-width: 940px) {
  .with-rail { grid-template-columns: minmax(0, 1fr); }
}
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-tight { display: flex; align-items: center; gap: 8px; }
.push { margin-left: auto; }
.spacer { flex: 1 1 0; min-width: 0; }

/* atmospheric glows — always behind, never interactive */
.glow {
  position: absolute; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(236,48,19,.22), rgba(236,48,19,.05) 55%, transparent 72%);
}
.glow-ice { background: radial-gradient(closest-side, rgba(143,211,214,.14), transparent 70%); }
.glow-hero-a { top: -160px; right: -6%; width: min(760px, 90vw); height: 640px; animation: cwBloom 16s ease-in-out infinite; }
.glow-hero-b { bottom: -200px; left: -10%; width: min(620px, 80vw); height: 560px; }
.glow-top    { top: 0; left: 20%; width: min(620px, 70vw); height: 420px; }
.glow-left   { top: 40px; left: -8%; width: min(660px, 80vw); height: 520px; }
.glow-foot   { bottom: -240px; left: 50%; transform: translateX(-50%); width: min(900px, 100vw); height: 520px; }
.over { position: relative; z-index: 1; }

/* Editorial image system. Generated artwork follows the same obsidian / coral /
   ice material language as the approved canvas, and always sits inside one
   consistent optical frame rather than behaving like stock photography. */
.editorial-pad { padding-block: clamp(26px, 4vw, 54px) clamp(46px, 6vw, 82px); }
.editorial-media {
  position: relative; isolation: isolate; margin: 0; overflow: hidden;
  border: 1px solid rgba(244,244,242,.12); border-radius: 28px;
  background: var(--panel-2);
  box-shadow: 0 44px 110px -54px rgba(0,0,0,.95), inset 0 1px 0 rgba(244,244,242,.08);
}
.editorial-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(145deg, rgba(244,244,242,.08), transparent 24%, transparent 72%, rgba(236,48,19,.08));
  mix-blend-mode: screen;
}
.editorial-media::after {
  content: ""; position: absolute; inset: 10px; z-index: 2; pointer-events: none;
  border: 1px solid rgba(244,244,242,.08); border-radius: 20px;
}
.editorial-media img {
  display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  filter: saturate(.9) contrast(1.035); transform: scale(1.002);
  transition: transform .9s var(--ease), filter .9s var(--ease);
}
.editorial-media:hover img { transform: scale(1.025); filter: saturate(1) contrast(1.05); }
.editorial-media--panorama img { aspect-ratio: 2.35 / 1; }
.home-hero-stack { display: grid; gap: 14px; min-width: 0; }

@media (max-width: 720px) {
  .editorial-media { border-radius: 22px; }
  .editorial-media::after { inset: 7px; border-radius: 16px; }
  .editorial-media--panorama img { aspect-ratio: 4 / 3; }
}

/* ==========================================================================
   TYPE
   ========================================================================== */

.eyebrow {
  font-size: 11.5px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--red-soft); margin-bottom: 18px;
}
.sect-light .eyebrow, .sect-light-rev .eyebrow, .on-light .eyebrow { color: var(--red-dark); }
.eyebrow-dim { color: var(--t-dim); }

.label {
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--t-dim);
}
.label-sm { font-size: 9.5px; letter-spacing: .14em; }

.h1 {
  margin: 0; font-family: var(--f-display); font-weight: 700;
  font-size: clamp(42px, 5.6vw, 88px); line-height: .94; letter-spacing: -.042em;
  color: var(--t-1);
}
.h2 {
  margin: 0; font-family: var(--f-display); font-weight: 700;
  font-size: clamp(30px, 3.6vw, 52px); line-height: 1.02; letter-spacing: -.038em;
}
.h2-lg { font-size: clamp(32px, 4.2vw, 62px); line-height: .98; letter-spacing: -.045em; }
.h3 {
  margin: 0 0 9px; font-family: var(--f-display); font-weight: 600;
  font-size: 18.5px; letter-spacing: -.024em;
}
.h4 {
  margin: 0 0 8px; font-family: var(--f-display); font-weight: 600;
  font-size: 15.5px; letter-spacing: -.02em;
}
.sect-light .h1, .sect-light .h2, .on-light .h1, .on-light .h2 { color: var(--ink); }

/* The serif italic pull-word is the single strongest brand signal. */
.em {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  letter-spacing: -.02em; color: var(--red-soft);
}
.em-plain { color: inherit; }
.sect-light .em, .on-light .em { color: inherit; }
.sect-light .em-red, .on-light .em-red { color: var(--red-dark); }

.lede { margin: 0; font-size: 17px; line-height: 1.6; color: var(--t-mute); max-width: 52ch; }
.lede-lg { font-size: 18px; line-height: 1.62; }
.sect-light .lede, .on-light .lede { color: var(--t-ink-2); }

.body { margin: 0 0 16px; font-size: 16px; line-height: 1.68; color: var(--t-mute); }
.sect-light .body, .on-light .body { color: var(--t-ink-2); }
.body strong { color: var(--t-1); font-weight: 600; }
.sect-light .body strong, .on-light .body strong { color: var(--ink); }

.mono { font-family: var(--f-mono); }
.small { font-size: 13.5px; line-height: 1.6; }
.dim { color: var(--t-dim); }
.mute { color: var(--t-mute); }
.measure { max-width: 66ch; }
.measure-sm { max-width: 46ch; }

/* Long-form prose (legal, research articles, knowledge base) */
.prose { max-width: 74ch; }
.prose h2 {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(23px, 2.4vw, 31px);
  letter-spacing: -.03em; line-height: 1.14; margin: 52px 0 16px; color: var(--t-1);
}
.prose h3 {
  font-family: var(--f-display); font-weight: 600; font-size: 18.5px;
  letter-spacing: -.02em; margin: 34px 0 12px; color: var(--t-1);
}
.prose p, .prose li { font-size: 16.5px; line-height: 1.72; color: var(--t-mute); }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; }
.prose li { margin-bottom: 9px; }
.prose li::marker { color: var(--red-soft); }
.prose strong { color: var(--t-2); font-weight: 600; }
.prose a { color: var(--red-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose hr { border: 0; height: 1px; background: rgba(244,244,242,.12); margin: 44px 0; }
.prose blockquote {
  margin: 26px 0; padding: 20px 24px; border-radius: var(--r-lg);
  background: linear-gradient(140deg, rgba(236,48,19,.11), rgba(236,48,19,.03));
}
.prose blockquote p { margin: 0; color: var(--t-3); font-size: 16px; }
.prose code {
  font-family: var(--f-mono); font-size: .88em; color: var(--red-pale);
  background: rgba(236,48,19,.1); padding: 2px 6px; border-radius: 6px;
}
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid rgba(244,244,242,.1); }
.prose th { color: var(--t-1); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.prose td { color: var(--t-mute); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  font-size: 15.5px; font-weight: 600; padding: 17px 26px; min-height: 44px;
  border-radius: var(--r-pill); white-space: nowrap; text-align: center;
  max-width: 100%;
  transition: transform .18s var(--ease), box-shadow .18s ease, background .18s ease, color .18s ease;
}
/* On a narrow screen a long label physically cannot fit on one line, and
   nowrap would push it out of its card. Let it wrap rather than overflow. */
@media (max-width: 480px) {
  .btn { white-space: normal; }
}
.btn:active { transform: translateY(-1px) scale(.99); }

.btn-primary {
  background: linear-gradient(180deg, var(--cta-from), var(--cta-to));
  color: #fff;
  box-shadow: 0 16px 40px -14px rgba(236,48,19,.95), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-primary:hover {
  color: #fff; transform: translateY(-3px);
  box-shadow: 0 24px 52px -14px rgba(236,48,19,1), inset 0 1px 0 rgba(255,255,255,.4);
}

.btn-ghost {
  color: var(--t-1);
  background: rgba(244,244,242,.05);
  box-shadow: inset 0 0 0 1px rgba(244,244,242,.13);
}
.btn-ghost:hover {
  color: var(--t-1); transform: translateY(-3px);
  background: rgba(244,244,242,.1);
  box-shadow: inset 0 0 0 1px rgba(244,244,242,.26);
}

.on-light .btn-ghost, .sect-light .btn-ghost {
  color: var(--ink); background: rgba(20,22,27,.04);
  box-shadow: inset 0 0 0 1px rgba(20,22,27,.14);
}
.on-light .btn-ghost:hover, .sect-light .btn-ghost:hover {
  color: var(--ink); background: rgba(20,22,27,.07);
  box-shadow: inset 0 0 0 1px rgba(20,22,27,.26);
}

.btn-sm { font-size: 13.5px; padding: 11px 18px; gap: 8px; }
.btn-xs { font-size: 12.5px; padding: 8px 14px; gap: 7px; min-height: 36px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.btn-quiet {
  color: var(--t-2); font-size: 13.5px; font-weight: 600;
  padding: 9px 15px; border-radius: var(--r-pill);
  transition: background .14s ease, color .14s ease;
}
.btn-quiet:hover { background: rgba(244,244,242,.07); color: var(--t-1); }

.btn-danger {
  background: rgba(236,48,19,.14); color: var(--red-pale);
  box-shadow: inset 0 0 0 1px rgba(236,48,19,.34);
}
.btn-danger:hover { background: rgba(236,48,19,.24); color: #fff; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--red-soft);
}
/* When the arrow IS the link (rather than a label inside a card that is itself
   the target) it has to meet the 24px minimum target size on its own. */
a.link-arrow { min-height: 32px; }

/* A small standalone link still has to meet the minimum target size. */
.link-sm {
  display: inline-flex; align-items: center; min-height: 24px;
  font-size: 13.5px; color: var(--red-soft);
}
.sect-light .link-arrow, .on-light .link-arrow { color: var(--red-dark); }
.link-arrow svg { transition: transform .2s var(--ease); }
a:hover .link-arrow svg, .link-arrow:hover svg { transform: translateX(4px); }

/* ==========================================================================
   PILLS / BADGES
   ========================================================================== */

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--t-mute);
  padding: 7px 14px; border-radius: var(--r-pill);
  background: rgba(244,244,242,.04);
}
.pill-dot::before {
  content: ""; width: 5px; height: 5px; border-radius: var(--r-pill);
  background: var(--red-bright); flex: none;
}
.pill-caps {
  font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 7px 13px;
}
.pill-red   { color: var(--red-pale); background: rgba(236,48,19,.14); }
.pill-ice   { color: var(--ice);      background: rgba(143,211,214,.10); }
.pill-amber { color: var(--amber-soft); background: rgba(255,178,122,.14); }
.pill-live::before {
  content: ""; width: 5px; height: 5px; border-radius: var(--r-pill);
  background: currentColor; flex: none; animation: cwPulse 2s ease-in-out infinite;
}
.sect-light .pill, .on-light .pill { color: var(--t-ink-2); background: rgba(20,22,27,.05); }
.sect-light .pill-red, .on-light .pill-red { color: var(--red-dark); background: rgba(236,48,19,.09); }
.sect-light .pill-ice, .on-light .pill-ice { color: var(--ice-ink); background: rgba(143,211,214,.22); }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--r-pill);
}
.badge-low      { color: var(--ice);        background: rgba(143,211,214,.14); }
.badge-elevated { color: var(--amber-soft); background: rgba(255,178,122,.14); }
.badge-high     { color: var(--red-bright); background: rgba(255,90,60,.16); }
.badge-neutral  { color: var(--t-mute);     background: rgba(244,244,242,.07); }
.badge-ok       { color: var(--ice);        background: rgba(143,211,214,.14); }
.badge-warn     { color: var(--amber-soft); background: rgba(232,147,15,.16); }

/* The illustrative-data marker. It must never be styled away: company/about.html
   and company/transparency.html both state in writing that every synthetic
   figure on this site carries one, so hiding it would make those pages untrue. */
.illus-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red-pale); padding: 7px 13px; border-radius: var(--r-pill);
  background: rgba(236,48,19,.14);
}
.illus-tag::before {
  content: ""; width: 5px; height: 5px; border-radius: var(--r-pill);
  background: var(--red-bright); flex: none;
}
.sect-light .illus-tag, .on-light .illus-tag { color: var(--red-dark); background: rgba(236,48,19,.1); }

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
  padding: 26px 24px 22px; border-radius: var(--r-xl);
  overflow-wrap: break-word; min-width: 0;
  background: linear-gradient(175deg, rgba(244,244,242,.06), rgba(244,244,242,.02));
  box-shadow: inset 0 1px 0 rgba(244,244,242,.07);
  color: var(--t-1);
  transition: transform .22s var(--ease), box-shadow .22s ease, background .22s ease;
}
.card-light {
  background: linear-gradient(180deg, #ffffff, #fafaf8);
  box-shadow: 0 1px 2px rgba(20,22,27,.06), 0 12px 28px -20px rgba(20,22,27,.4);
  color: var(--ink);
}
.card-light .h3 { color: var(--ink); }
.card-light p { color: var(--t-ink-2); }
.card-solid {
  background: linear-gradient(168deg, var(--panel-1), var(--panel-3) 65%);
  box-shadow: 0 44px 96px -40px rgba(0,0,0,1), inset 0 1px 0 rgba(244,244,242,.1);
}
.card-plain { background: rgba(244,244,242,.03); box-shadow: none; border-radius: var(--r-lg); }
.card-flush { background: #fff; box-shadow: 0 1px 2px rgba(20,22,27,.06), 0 30px 60px -34px rgba(20,22,27,.5); color: var(--ink); border-radius: var(--r-xl); }
.card-red { background: linear-gradient(150deg, rgba(236,48,19,.16), rgba(236,48,19,.04)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.card-ice { background: linear-gradient(150deg, rgba(143,211,214,.14), rgba(143,211,214,.03)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }

a.card, .lift { will-change: transform; }
a.card:hover, .lift:hover { transform: translateY(-4px); }
a.card.card-light:hover, .lift.card-light:hover {
  box-shadow: 0 1px 2px rgba(20,22,27,.07), 0 26px 48px -24px rgba(20,22,27,.55);
}
a.card:not(.card-light):hover, .lift:not(.card-light):hover {
  box-shadow: inset 0 1px 0 rgba(244,244,242,.12);
  background: linear-gradient(175deg, rgba(244,244,242,.09), rgba(244,244,242,.03));
}

.card-pad { padding: clamp(24px, 3vw, 36px); }
.card-pad-lg { padding: clamp(30px, 4vw, 60px); }

.icon-tile {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(236,48,19,.12), rgba(236,48,19,.03));
  color: var(--red-soft);
}
.card-light .icon-tile { color: var(--red-deep); }
.icon-tile-sm { width: 30px; height: 30px; border-radius: var(--r-sm); }
.icon-tile-ice { background: rgba(143,211,214,.14); color: var(--ice); }

.card-num { font-family: var(--f-mono); font-size: 11px; color: var(--t-dim); }
.card-light .card-num { color: var(--t-ink-2); }
.stage-num { font-family: var(--f-serif); font-style: italic; font-size: 36px; line-height: 1; color: var(--red-bright); margin-bottom: 18px; }

/* ==========================================================================
   HEADER + NAV
   ========================================================================== */

.notice-bar {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  padding: 10px var(--pad-x);
  background: linear-gradient(90deg, rgba(236,48,19,.13), rgba(236,48,19,.04) 60%, transparent), var(--paper);
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--t-ink-2);
  position: relative; z-index: 30;
}
.notice-bar strong { color: var(--ink); font-weight: 400; }
.notice-dot {
  width: 6px; height: 6px; border-radius: var(--r-pill); flex: none;
  background: var(--red-bright); box-shadow: 0 0 12px 2px rgba(255,90,60,.7);
  animation: cwPulse 2.6s ease-in-out infinite;
}
.notice-status { margin-left: auto; display: flex; align-items: center; gap: 7px; color: #0a5f59; }
.notice-status::before { content: ""; width: 5px; height: 5px; border-radius: var(--r-pill); background: #0a5f59; flex: none; }
.notice-sep { color: rgba(20,22,27,.7); }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(244,244,242,.9);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: inset 0 -1px 0 rgba(20,22,27,.09);
}
.header-row {
  max-width: var(--shell); margin: 0 auto; padding: 0 var(--pad-x);
  display: flex; align-items: center; gap: clamp(10px, 2vw, 28px); height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; min-height: 44px; color: var(--ink); }
.brand img { display: block; width: auto; height: 42px; flex: none; }
.brand:hover { color: var(--ink); }

.nav { display: flex; align-items: center; gap: 2px; flex: 0 1 auto; min-width: 0; }
.nav-item { position: relative; }
.nav-btn {
  color: var(--t-ink-2); font-size: 14px; font-weight: 500;
  padding: 9px 14px; border-radius: var(--r-pill); min-height: 40px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .14s ease, background .14s ease;
}
.nav-btn:hover, .nav-item:hover .nav-btn, .nav-item:focus-within .nav-btn,
.nav-btn[aria-expanded="true"] { color: var(--ink); background: rgba(20,22,27,.06); }
.nav-btn.is-current { color: var(--ink); }

.nav-panel {
  position: absolute; top: calc(100% + 10px); left: -8px;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  background: linear-gradient(180deg, #ffffff, #fafaf8);
  border-radius: var(--r-2xl);
  box-shadow: 0 34px 70px -26px rgba(20,22,27,.35), inset 0 0 0 1px rgba(20,22,27,.08);
  padding: 22px; z-index: 5;
}
.nav-item:hover .nav-panel, .nav-item:focus-within .nav-panel, .nav-panel.is-open {
  opacity: 1; visibility: visible; transform: none;
}
.nav-panel-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 26px; width: 460px; }
.nav-panel-1col { width: 300px; }
.nav-panel-head {
  font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--t-ink-2); padding: 2px 10px 12px;
}
.nav-panel-2col .nav-panel-head { grid-column: 1 / -1; }
.nav-panel a {
  display: block; color: var(--t-ink-2); font-size: 14px; padding: 9px 10px;
  border-radius: var(--r-sm); transition: background .14s ease, color .14s ease;
}
.nav-panel a:hover { background: rgba(20,22,27,.06); color: var(--ink); }
.nav-panel a.accent { color: var(--red-ink); }
.nav-panel a.accent:hover { background: rgba(236,48,19,.1); color: var(--red-dark); }

.header-cta { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }

.cmd-btn {
  display: flex; align-items: center; gap: 9px;
  border-radius: var(--r-pill); background: rgba(20,22,27,.04);
  box-shadow: inset 0 0 0 1px rgba(20,22,27,.14);
  color: #454b55; padding: 9px 15px; min-height: 44px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em;
  transition: color .14s ease, box-shadow .14s ease;
}
.cmd-btn:hover { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(20,22,27,.3); }

.header-link {
  color: var(--ink); font-size: 13.5px; font-weight: 600;
  padding: 11px 17px; min-height: 44px; display: flex; align-items: center;
  border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px rgba(20,22,27,.16);
  transition: box-shadow .16s ease, color .16s ease, transform .16s var(--ease);
}
.header-link:hover { box-shadow: inset 0 0 0 1px rgba(20,22,27,.34); color: var(--ink); transform: translateY(-1px); }

/* Always-visible account entry. On desktop it sits beside the CTA; below the
   nav breakpoint it stays in the header so Sign in is never buried in the menu. */
.header-signin {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); font-size: 13.5px; font-weight: 700;
  padding: 11px 17px; min-height: 44px; border-radius: var(--r-pill); white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(20,22,27,.22);
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s var(--ease);
}
.header-signin:hover { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(20,22,27,.4); transform: translateY(-1px); }

.header-cta-btn {
  display: flex; align-items: center; gap: 9px;
  background: linear-gradient(180deg, var(--cta-from), var(--cta-to));
  color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 12px 19px; min-height: 44px; border-radius: var(--r-pill); white-space: nowrap;
  box-shadow: 0 10px 26px -10px rgba(236,48,19,.9), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .16s var(--ease), box-shadow .16s ease;
}
.header-cta-btn:hover {
  color: #fff; transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(236,48,19,1), inset 0 1px 0 rgba(255,255,255,.36);
}
.header-cta-btn:active { transform: translateY(0) scale(.985); }
.cta-short { display: none; }

.burger {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-md); flex: none;
  background: rgba(20,22,27,.04); box-shadow: inset 0 0 0 1px rgba(20,22,27,.14);
  color: var(--ink); transition: box-shadow .14s ease;
}
.burger:hover { box-shadow: inset 0 0 0 1px rgba(20,22,27,.3); }

/* Open/close, sizing and scrolling for this panel all live in one place, at
   the bottom of this file under "PRODUCTION MOTION". Nothing here sets them.
   There used to be a second, contradictory set of declarations at this point
   — display, max-height, overflow and animation — every one of which the
   later block overrode. Two rule sets disagreeing about the same panel is how
   the mobile menu ended up 1460px wide inside a 390px phone without anyone
   noticing which block was actually in force. */
.mobile-menu-inner {
  max-width: var(--shell); margin: 0 auto;
  padding: 6px var(--pad-x) 26px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 8px 26px;
}
.mobile-menu-head {
  font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--t-ink-2); padding: 18px 0 8px;
}
.mobile-menu a {
  display: block; padding: 13px 14px; margin-bottom: 4px; border-radius: var(--r-md);
  background: rgba(20,22,27,.05); font-size: 15.5px; font-weight: 600; color: var(--ink);
}
.mobile-menu a:hover { background: rgba(20,22,27,.09); color: var(--ink); }
.mobile-menu a.accent { background: rgba(236,48,19,.1); color: var(--red-ink); }

.mobile-menu-actions {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 14px 0 8px;
}
.mobile-menu-actions .btn { justify-content: center; min-height: 48px; font-weight: 700; }

.footer-mail-row { padding-top: 18px; }
.footer-mail {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  max-width: 560px;
}
.footer-mail-label {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--t-dim); width: 100%;
}
.footer-mail .input { flex: 1 1 220px; min-height: 44px; max-width: 320px; }

/* Nav collapses on measurement, but this is the hard floor. */
@media (max-width: 1180px) {
  .nav { display: none !important; }
  .header-link { display: none !important; }
  .burger { display: flex; }
  .header-signin {
    background: var(--ink); color: #f4f4f2;
    box-shadow: 0 8px 22px -12px rgba(20,22,27,.7);
    letter-spacing: .01em;
  }
  .header-signin:hover { color: #fff; background: #1a1c22; }
}

/* ==========================================================================
   HERO / MARKETING BLOCKS
   ========================================================================== */

.hero-badge {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 7px 15px 7px 9px; border-radius: var(--r-pill);
  background: rgba(244,244,242,.05); box-shadow: inset 0 0 0 1px rgba(244,244,242,.1);
  margin-bottom: 30px;
}
.hero-badge-mark {
  width: 22px; height: 22px; border-radius: var(--r-pill); flex: none;
  background: linear-gradient(150deg, var(--red-bright), var(--red-dark));
  display: grid; place-items: center;
}
.hero-badge span:last-child {
  font-size: 11.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--t-3);
}

.page-hero { position: relative; overflow: hidden; }
.page-hero-inner { position: relative; z-index: 1; padding-block: clamp(44px, 6vw, 84px) clamp(30px, 4vw, 52px); }
.page-hero .h1 { font-size: clamp(36px, 4.6vw, 68px); line-height: .98; }

.ticker {
  overflow: hidden; position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track { display: flex; gap: 10px; width: max-content; animation: cwDrift 42s linear infinite; }
.ticker-item {
  display: flex; align-items: center; gap: 11px; flex: none;
  padding: 11px 20px; border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(244,244,242,.07), rgba(244,244,242,.03));
  box-shadow: inset 0 1px 0 rgba(244,244,242,.08);
  font-size: 14px; font-weight: 500; color: var(--t-3); white-space: nowrap;
}
.ticker-item::before {
  content: ""; width: 5px; height: 5px; border-radius: var(--r-pill);
  background: var(--red-bright); flex: none;
}

.panel-head {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  padding: 17px 20px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--t-dim);
}
.panel-head strong { color: var(--t-1); font-weight: 400; }
.panel-head .dotsep { width: 5px; height: 5px; border-radius: var(--r-pill); background: var(--t-line); }
.card-flush .panel-head { color: var(--t-ink-2); }
.card-flush .panel-head strong { color: var(--ink); }

.legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px 20px; }
.legend-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--t-mute); padding: 6px 12px; border-radius: var(--r-pill);
  background: rgba(244,244,242,.04);
}
.legend-swatch { width: 7px; height: 7px; border-radius: 2px; }

/* Rule strips ("WHEN … THEN …") */
.rule-row {
  display: flex; gap: 16px; padding: 17px 20px; border-radius: 16px;
  background: rgba(20,22,27,.04); align-items: baseline;
}
.rule-row span:first-child {
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red-dark); flex: none; width: 44px;
}
.rule-row span:last-child { font-size: 15px; line-height: 1.5; }
.rule-row.is-then { background: linear-gradient(120deg, rgba(236,48,19,.12), rgba(236,48,19,.04)); }
.rule-row.is-then span:last-child { font-weight: 600; }
.sect-dark .rule-row { background: rgba(244,244,242,.04); }
.sect-dark .rule-row span:first-child { color: var(--red-soft); }

/* check / cross lists */
.tick-list { display: grid; }
.tick-row { display: flex; gap: 14px; padding: 12px 0; align-items: flex-start; }
.tick-mark {
  width: 20px; height: 20px; border-radius: var(--r-pill); flex: none; margin-top: 2px;
  display: grid; place-items: center;
}
.tick-yes { background: rgba(143,211,214,.25); color: var(--ice-ink); }
.tick-no  { background: rgba(236,48,19,.16); }
.tick-no::after { content: ""; width: 9px; height: 2px; border-radius: var(--r-pill); background: var(--red-bright); }
.tick-row > span:last-child { font-size: 15.5px; line-height: 1.52; min-width: 0; overflow-wrap: break-word; }

.never-row {
  display: flex; gap: 13px; padding: 11px 14px; margin-bottom: 6px;
  border-radius: var(--r-md); background: rgba(0,0,0,.16); align-items: flex-start;
}
.never-row span { font-size: 15px; line-height: 1.48; }
.never-row svg { flex: none; margin-top: 4px; }

.alert-panel {
  border-radius: var(--r-2xl);
  background: linear-gradient(145deg, #e8330f, var(--red-ink));
  box-shadow: 0 40px 90px -36px rgba(168,26,4,.8), inset 0 1px 0 rgba(255,255,255,.2);
  color: #fff;
}
.alert-panel .eyebrow { color: rgba(255,255,255,.75); }
.alert-panel .h2 { color: #fff; }
.alert-panel p { color: rgba(255,255,255,.86); }
.alert-panel .em { color: #fff; }

.note-box {
  margin-top: 24px; padding: 18px 20px; border-radius: 18px;
  background: linear-gradient(140deg, rgba(236,48,19,.13), rgba(236,48,19,.03));
}
.note-box .label { color: var(--red-pale); font-size: 10px; margin-bottom: 10px; display: block; }
.note-box p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--t-3); }
.note-box-ice { background: linear-gradient(140deg, rgba(143,211,214,.13), rgba(143,211,214,.03)); }
.note-box-ice .label { color: var(--ice); }

.route-link {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 22px; border-radius: 18px;
  background: linear-gradient(175deg, rgba(244,244,242,.06), rgba(244,244,242,.02));
  box-shadow: inset 0 1px 0 rgba(244,244,242,.07);
  color: var(--t-1);
  transition: transform .2s var(--ease), background .2s ease;
}
.route-link:hover { transform: translateY(-4px); color: var(--t-1); background: linear-gradient(175deg, rgba(244,244,242,.1), rgba(244,244,242,.04)); }
.route-link b { display: block; font-family: var(--f-display); font-size: 17.5px; font-weight: 600; letter-spacing: -.024em; }
.route-link small { display: block; font-size: 13.5px; color: var(--t-dim); margin-top: 5px; }
.route-arrow {
  width: 34px; height: 34px; border-radius: var(--r-pill); flex: none;
  background: rgba(236,48,19,.16); display: grid; place-items: center; color: var(--red-soft);
}

/* Metric tiles */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(118px, 100%), 1fr)); gap: 8px; }
.metric {
  padding: 14px 15px; border-radius: var(--r-md);
  background: rgba(244,244,242,.04);
}
.metric dt { font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--t-dim); margin-bottom: 8px; }
.metric dd { margin: 0; font-family: var(--f-mono); font-size: 15px; color: var(--t-1); }
.card-light .metric, .sect-light .metric { background: rgba(20,22,27,.04); }
.card-light .metric dd, .sect-light .metric dd { color: var(--ink); }
.card-light .metric dt, .sect-light .metric dt { color: var(--t-ink-2); }

/* Risk gauge */
.gauge { position: relative; width: 138px; height: 138px; flex: none; }
.gauge svg { display: block; }
.gauge-face { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge-score { font-family: var(--f-display); font-size: 38px; font-weight: 700; letter-spacing: -.05em; line-height: 1; color: var(--t-1); }
.gauge-of { font-family: var(--f-mono); font-size: 10px; color: var(--t-dim); margin-top: 3px; }
.gauge-ring { transition: stroke-dashoffset .6s var(--ease), stroke .3s ease; }

/* Factor bars */
.factor { margin-bottom: 16px; }
.factor-top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.factor-top span:first-child { font-size: 14px; color: var(--t-2); }
.factor-top span:last-child { font-family: var(--f-mono); font-size: 12.5px; color: var(--t-mute); flex: none; }
.factor-track { height: 7px; border-radius: var(--r-pill); background: rgba(244,244,242,.07); overflow: hidden; }
.factor-fill {
  height: 100%; border-radius: var(--r-pill); width: 0;
  background: linear-gradient(90deg, rgba(244,244,242,.45), rgba(244,244,242,.22));
  transition: width .6s var(--ease);
}
.factor-fill.is-major { background: linear-gradient(90deg, var(--red-bright), var(--red-bright)); }

/* Skeletons */
.skel {
  border-radius: var(--r-xs);
  background: linear-gradient(90deg, rgba(244,244,242,.05) 25%, rgba(244,244,242,.13) 50%, rgba(244,244,242,.05) 75%);
  background-size: 200% 100%;
  animation: cwShimmer 1.1s linear infinite;
}
.skel-line { height: 14px; margin-bottom: 10px; }
.skel-title { height: 24px; margin-bottom: 10px; }
.skel-circle { height: 132px; width: 132px; border-radius: var(--r-pill); }

/* Activity feed */
.feed { min-height: 346px; padding: 0 10px 10px; }
.feed-row {
  display: flex; gap: 14px; padding: 13px 14px; border-radius: var(--r-md);
  animation: cwTick .32s var(--ease) both; transition: background .16s ease;
}
.feed-row:hover { background: rgba(20,22,27,.035); }
.sect-dark .feed-row:hover, .card-solid .feed-row:hover { background: rgba(244,244,242,.04); }
.feed-time { font-family: var(--f-mono); font-size: 11.5px; color: var(--t-ink-2); flex: none; }
.sect-dark .feed-time, .card-solid .feed-time { color: var(--t-dim); }
.feed-bar { width: 4px; border-radius: var(--r-pill); flex: none; }
.feed-text { font-size: 14px; font-weight: 600; }
.feed-meta { font-family: var(--f-mono); font-size: 11px; color: var(--t-ink-2); margin-top: 3px; word-break: break-all; }
.sect-dark .feed-meta, .card-solid .feed-meta { color: var(--t-dim); }

/* Tabs */
.tabs { display: flex; align-items: center; gap: 8px; padding: 16px; flex-wrap: wrap; }
.tab {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .02em;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: rgba(244,244,242,.05); box-shadow: inset 0 0 0 1px rgba(244,244,242,.09);
  color: var(--t-mute);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s var(--ease);
}
.tab:hover { transform: translateY(-1px); color: var(--t-2); }
.tab.is-on {
  background: linear-gradient(180deg, rgba(255,90,60,.22), rgba(236,48,19,.1));
  box-shadow: inset 0 0 0 1px rgba(255,90,60,.5);
  color: var(--red-wash);
}

/* Accordion */
.acc-item { border-radius: var(--r-lg); background: rgba(244,244,242,.04); margin-bottom: 8px; overflow: hidden; }
.sect-light .acc-item { background: rgba(20,22,27,.04); }
.acc-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%;
  text-align: left; padding: 20px 22px; font-size: 16.5px; font-weight: 600;
  font-family: var(--f-display); letter-spacing: -.018em; color: inherit;
  transition: background .16s ease;
}
.acc-btn:hover { background: rgba(244,244,242,.03); }
.sect-light .acc-btn:hover { background: rgba(20,22,27,.03); }
.acc-icon { flex: none; transition: transform .22s var(--ease); color: var(--red-soft); }
.acc-btn[aria-expanded="true"] .acc-icon { transform: rotate(45deg); }
.acc-body { display: none; padding: 0 22px 22px; }
.acc-body.is-open { display: block; animation: cwPop .22s var(--ease) both; }
.acc-body p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.65; color: var(--t-mute); }
.sect-light .acc-body p { color: var(--t-ink-2); }
.acc-body p:last-child { margin-bottom: 0; }

/* Definition / glossary */
.def-row { padding: 20px 0; border-bottom: 1px solid rgba(244,244,242,.1); }
.sect-light .def-row { border-color: rgba(20,22,27,.1); }
.def-row dt { font-family: var(--f-display); font-size: 17px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.def-row dd { margin: 0; font-size: 15px; line-height: 1.62; color: var(--t-mute); }
.sect-light .def-row dd { color: var(--t-ink-2); }

/* Article / listing cards */
.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card .h3 { font-size: 20px; margin-bottom: 12px; }
.post-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px;
  font-family: var(--f-mono); letter-spacing: .04em; color: var(--t-dim); margin-top: auto; padding-top: 18px;
}
.card-light .post-meta { color: var(--t-ink-2); }

/* Steps / timeline */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--red-bright), rgba(236,48,19,.06));
  border-radius: var(--r-pill);
}
.timeline-item { position: relative; padding-bottom: 26px; }
.timeline-item::before {
  content: ""; position: absolute; left: -30px; top: 5px; width: 16px; height: 16px;
  border-radius: var(--r-pill); background: var(--void);
  box-shadow: inset 0 0 0 2px var(--red-bright);
}
.timeline-item.is-done::before { background: var(--red-bright); box-shadow: inset 0 0 0 2px var(--red-bright); }
.timeline-item.is-idle::before { box-shadow: inset 0 0 0 2px var(--t-line); }
.timeline-time { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--t-dim); }
.timeline-title { font-family: var(--f-display); font-size: 16px; font-weight: 600; letter-spacing: -.02em; margin: 5px 0 6px; }
.timeline-body { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--t-mute); }

/* Comparison / spec table */
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td { text-align: left; padding: 14px 16px; }
.spec-table thead th {
  font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--t-dim); border-bottom: 1px solid rgba(244,244,242,.12);
}
.spec-table tbody tr { border-bottom: 1px solid rgba(244,244,242,.07); }
.spec-table tbody tr:last-child { border-bottom: 0; }
.spec-table td { color: var(--t-mute); }
.spec-table td:first-child { color: var(--t-1); font-weight: 500; }
.sect-light .spec-table thead th { color: var(--t-ink-2); border-color: rgba(20,22,27,.14); }
.sect-light .spec-table tbody tr { border-color: rgba(20,22,27,.08); }
.sect-light .spec-table td { color: var(--t-ink-2); }
.sect-light .spec-table td:first-child { color: var(--ink); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Code blocks */
.code {
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--panel-3); box-shadow: inset 0 1px 0 rgba(244,244,242,.08);
}
.code-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 18px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--t-dim);
  border-bottom: 1px solid rgba(244,244,242,.07);
}
.code pre {
  margin: 0; padding: 18px; overflow-x: auto;
  font-family: var(--f-mono); font-size: 12.5px; line-height: 1.75; color: var(--t-2);
}
.code .k { color: var(--red-soft); }
.code .s { color: var(--ice); }
.code .c { color: var(--t-dim); }
.code .n { color: var(--amber-soft); }

/* Status list */
.status-row {
  display: flex; align-items: center; gap: 10px 14px; padding: 16px 18px;
  border-radius: var(--r-md); background: rgba(244,244,242,.04); margin-bottom: 8px;
  flex-wrap: wrap;
}
.status-row > div { flex: 1 1 180px; min-width: 0; }
.status-row .name { font-size: 15px; font-weight: 600; }
.status-row .desc { font-size: 13px; color: var(--t-dim); margin-top: 3px; }

/* Pricing */
.price-card { display: flex; flex-direction: column; height: 100%; }
.price-tag { font-family: var(--f-display); font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1; margin: 6px 0 4px; }
.price-note { font-size: 13px; color: var(--t-dim); }
.price-list { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 11px; }
.price-list li { display: flex; gap: 11px; font-size: 14.5px; line-height: 1.5; color: var(--t-mute); }
.price-list li::before { content: "+"; color: var(--red-soft); font-weight: 700; flex: none; }
.card-light .price-list li { color: var(--t-ink-2); }
.card-light .price-list li::before { color: var(--red-dark); }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer { background: var(--void); position: relative; z-index: 1; }
.footer-inner { max-width: var(--shell); margin: 0 auto; padding: clamp(40px,5vw,64px) var(--pad-x) 0; }
.hr-fade { height: 1px; background: linear-gradient(90deg, transparent, rgba(244,244,242,.14) 20%, rgba(244,244,242,.14) 80%, transparent); }
.hr-fade-soft { height: 1px; background: linear-gradient(90deg, transparent, rgba(244,244,242,.1) 20%, rgba(244,244,242,.1) 80%, transparent); }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(172px, 100%), 1fr));
  gap: 34px 26px; padding: clamp(34px,4vw,52px) 0;
}
.footer-brand { min-width: 200px; }
.footer-brand img { display: block; width: 100%; max-width: 212px; height: auto; margin-bottom: 18px; }
.footer-tag {
  margin: 0; font-family: var(--f-serif); font-style: italic;
  font-size: 17px; line-height: 1.5; color: var(--t-mute); max-width: 24ch;
}
.footer-col-head {
  font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--t-dim); margin-bottom: 14px;
}
.footer-col a {
  display: block; font-size: 14px; color: var(--t-mute); padding: 6px 0;
  transition: color .14s ease, transform .14s ease;
}
.footer-col a:hover { color: var(--t-1); transform: translateX(3px); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px; padding: 20px 0; }
.footer-legal a {
  font-size: 12.5px; color: var(--t-dim); padding: 6px 12px; border-radius: var(--r-pill);
  transition: background .14s ease, color .14s ease;
}
.footer-legal a:hover { background: rgba(244,244,242,.06); color: var(--t-1); }
.footer-fine {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px 40px; padding: 8px 0 40px;
}
.footer-fine p { margin: 0; font-size: 12.5px; line-height: 1.62; color: var(--t-mute); max-width: 72ch; }
.footer-fine .illus-note {
  font-family: var(--f-mono); font-size: 10.5px; line-height: 1.8;
  letter-spacing: .08em; text-transform: uppercase; color: var(--red-soft);
}

/* ==========================================================================
   COMMAND PALETTE
   ========================================================================== */

.palette-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,7,10,.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(36px, 10vh, 120px) 18px;
}
.palette-scrim[hidden] { display: none; }
.palette {
  width: 100%; max-width: 640px; border-radius: var(--r-xl); overflow: hidden;
  background: linear-gradient(180deg, var(--panel-1), var(--panel-3));
  box-shadow: 0 60px 130px -40px rgba(0,0,0,1), inset 0 1px 0 rgba(244,244,242,.11);
  animation: cwPop .2s var(--ease) both;
}
.palette-top { display: flex; align-items: center; gap: 13px; padding: 18px 20px; }
.palette-top input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--t-1); font-size: 16px;
}
.palette-top input::placeholder { color: var(--t-dim); }
.kbd {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; color: var(--t-dim);
  padding: 4px 9px; border-radius: var(--r-xs); background: rgba(244,244,242,.06); flex: none;
}
.palette-list { max-height: 52vh; overflow-y: auto; padding: 0 10px 10px; }
.palette-item {
  display: flex; align-items: center; gap: 15px; padding: 14px;
  border-radius: var(--r-md); transition: background .14s ease;
}
.palette-item:hover, .palette-item.is-active { background: rgba(244,244,242,.06); }
.palette-item .grp {
  font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--t-dim); width: 84px; flex: none;
}
.palette-item .lbl { font-family: var(--f-mono); font-size: 13px; color: var(--t-1); min-width: 0; word-break: break-all; }
.palette-item .mta {
  margin-left: auto; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--red-soft); padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(236,48,19,.14); flex: none;
}
.palette-foot {
  padding: 13px 20px; font-family: var(--f-mono); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--t-dim);
}
.empty-state { padding: 40px 14px; text-align: center; }
.empty-state-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: rgba(244,244,242,.05); display: grid; place-items: center;
  margin: 0 auto 16px; color: var(--t-dim);
}
.empty-state h4 { font-family: var(--f-display); font-size: 17px; font-weight: 600; color: var(--t-1); margin: 0 0 7px; }
.empty-state p { margin: 0 auto; font-size: 13.5px; line-height: 1.55; color: var(--t-dim); max-width: 34ch; }

/* ==========================================================================
   FORMS
   ========================================================================== */

.field { margin-bottom: 18px; }
.field > label, .field-label {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--t-dim); margin-bottom: 9px;
}
.input, .select, .textarea {
  display: block; width: 100%; padding: 14px 16px;
  border-radius: var(--r-md); border: 0; outline: none;
  background: rgba(244,244,242,.05);
  box-shadow: inset 0 0 0 1px rgba(244,244,242,.12);
  color: var(--t-1); font-size: 16px; line-height: 1.5;
  transition: box-shadow .16s ease, background .16s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--t-dim); }
.input:focus, .select:focus, .textarea:focus {
  background: rgba(244,244,242,.07);
  box-shadow: inset 0 0 0 1px rgba(255,90,60,.55), 0 0 0 3px rgba(236,48,19,.14);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] {
  box-shadow: inset 0 0 0 1px rgba(255,90,60,.75);
}
.textarea { min-height: 132px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237d8593' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px;
}
.select option { background: var(--panel-1); color: var(--t-1); }
.field-hint { font-size: 12.5px; line-height: 1.5; color: var(--t-dim); margin-top: 8px; }
.field-error { font-size: 12.5px; line-height: 1.5; color: var(--red-pale); margin-top: 8px; display: none; }
.field.has-error .field-error { display: block; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 13px; padding: 16px 18px;
  border-radius: var(--r-md); background: rgba(244,244,242,.04);
  box-shadow: inset 0 0 0 1px rgba(244,244,242,.09);
  font-size: 15px; font-weight: 500; color: var(--t-2); text-align: left;
  transition: background .16s ease, box-shadow .16s ease, transform .16s var(--ease);
  width: 100%;
}
.choice:hover { transform: translateY(-2px); background: rgba(244,244,242,.07); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }

/* Native checkboxes used outside .choice still need a real target. */
input[type="checkbox"]:not(.choice input) {
  /* 24px is the WCAG 2.2 AA minimum target size. */
  width: 24px; height: 24px; flex: none; accent-color: var(--red-bright);
}
.choice-mark {
  width: 20px; height: 20px; border-radius: var(--r-pill); flex: none;
  box-shadow: inset 0 0 0 2px rgba(244,244,242,.24);
  display: grid; place-items: center;
  transition: box-shadow .16s ease, background .16s ease;
}
.choice-mark.is-box { border-radius: 6px; }
/* Two ways a choice reads as chosen, and both must draw the same thing.
   `.is-on` is set by script for the button-based choice groups. `:checked`
   covers a <label class="choice"> wrapping a real checkbox — the consent
   gates on account creation and the case assessment. Those had no `is-on`
   source at all, so the box never ticked however many times it was clicked,
   while the hidden input underneath toggled correctly. */
.choice.is-on,
.choice:has(input:checked) {
  background: linear-gradient(180deg, rgba(255,90,60,.18), rgba(236,48,19,.07));
  box-shadow: inset 0 0 0 1px rgba(255,90,60,.5); color: #fff;
}
.choice.is-on .choice-mark,
.choice:has(input:checked) .choice-mark { background: var(--red-bright); box-shadow: inset 0 0 0 2px var(--red-bright); }
.choice.is-on .choice-mark::after,
.choice:has(input:checked) .choice-mark::after {
  content: ""; width: 8px; height: 8px; border-radius: var(--r-pill); background: #fff;
}
.choice.is-on .choice-mark.is-box::after,
.choice:has(input:checked) .choice-mark.is-box::after {
  width: 10px; height: 6px; border-radius: 0; background: none;
  border-left: 2.4px solid #fff; border-bottom: 2.4px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* The real input is opacity:0, so it can hold focus with nothing to show for
   it. Put the ring on the label a keyboard user can actually see. */
.choice:has(input:focus-visible) {
  outline: 2px solid var(--red-soft); outline-offset: 3px;
}



.switch {
  position: relative; width: 44px; height: 25px; border-radius: var(--r-pill); flex: none;
  background: rgba(244,244,242,.12); transition: background .18s ease;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px;
  border-radius: var(--r-pill); background: var(--t-mute); transition: transform .18s var(--ease), background .18s ease;
}
.switch[aria-checked="true"] { background: rgba(255,90,60,.4); }
.switch[aria-checked="true"]::after { transform: translateX(19px); background: var(--red-bright); }

.dropzone {
  padding: 34px 24px; border-radius: var(--r-lg); text-align: center;
  background: rgba(244,244,242,.03);
  box-shadow: inset 0 0 0 1.5px rgba(244,244,242,.14);
  transition: background .18s ease, box-shadow .18s ease;
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-over { background: rgba(236,48,19,.07); box-shadow: inset 0 0 0 1.5px rgba(255,90,60,.5); }
.dropzone h4 { margin: 12px 0 6px; font-family: var(--f-display); font-size: 16px; font-weight: 600; }
.dropzone p { margin: 0; font-size: 13px; color: var(--t-dim); }

.file-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--r-md); background: rgba(244,244,242,.04); margin-top: 8px;
}
.file-row .fname { font-size: 14px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fsize { font-family: var(--f-mono); font-size: 11px; color: var(--t-dim); flex: none; }

/* Wizard */
.wizard-rail { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 30px; }
.wizard-pip {
  height: 4px; flex: 1 1 46px; min-width: 22px; border-radius: var(--r-pill);
  background: rgba(244,244,242,.1); transition: background .3s ease;
}
.wizard-pip.is-done { background: var(--red-bright); }
.wizard-pip.is-now  { background: linear-gradient(90deg, var(--red-bright), rgba(255,90,60,.25)); }
.wizard-step-num {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--red-soft); margin-bottom: 12px;
}
.wizard-panel { animation: cwPop .26s var(--ease) both; }
.wizard-nav { display: flex; gap: 10px; align-items: center; margin-top: 30px; flex-wrap: wrap; }

/* ==========================================================================
   TOASTS + MODALS
   ========================================================================== */

.toast-stack {
  position: fixed; right: 20px; bottom: 20px; z-index: 300;
  display: grid; gap: 10px; width: min(360px, calc(100vw - 40px));
}
.toast {
  display: flex; gap: 13px; padding: 15px 17px; border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--panel-1), var(--panel-3));
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.9), inset 0 1px 0 rgba(244,244,242,.1);
  animation: cwSlideIn .26s var(--ease) both;
}
.toast .t-title { font-size: 14.5px; font-weight: 600; color: var(--t-1); }
.toast .t-body { font-size: 13px; line-height: 1.5; color: var(--t-mute); margin-top: 3px; }
.toast .t-mark { width: 4px; border-radius: var(--r-pill); background: var(--red-bright); flex: none; }
.toast.is-ok .t-mark { background: var(--ice); }
.toast.is-warn .t-mark { background: var(--amber); }

.modal-scrim {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(6,7,10,.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-scrim[hidden] { display: none; }
.modal {
  width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto;
  border-radius: var(--r-xl); padding: clamp(24px, 3vw, 34px);
  background: linear-gradient(180deg, var(--panel-1), var(--panel-3));
  box-shadow: 0 60px 130px -40px rgba(0,0,0,1), inset 0 1px 0 rgba(244,244,242,.11);
  animation: cwPop .2s var(--ease) both;
}
.modal-wide { max-width: 860px; }
.modal h3 { font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: -.03em; margin: 0 0 10px; }
.modal-close {
  width: 36px; height: 36px; border-radius: var(--r-pill); flex: none;
  display: grid; place-items: center; color: var(--t-dim);
  background: rgba(244,244,242,.05); transition: color .14s ease, background .14s ease;
}
.modal-close:hover { color: var(--t-1); background: rgba(244,244,242,.1); }

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.mt-0  { margin-top: 0 !important; }
.mt-2  { margin-top: 8px; }
.mt-3  { margin-top: 14px; }
.mt-4  { margin-top: 22px; }
.mt-5  { margin-top: 30px; }
.mt-6  { margin-top: 42px; }
.mb-0  { margin-bottom: 0 !important; }
.mb-2  { margin-bottom: 8px; }
.mb-3  { margin-bottom: 14px; }
.mb-4  { margin-bottom: 22px; }
.mb-5  { margin-bottom: 30px; }
.mb-6  { margin-bottom: 42px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 14px; }
.gap-4 { gap: 22px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.break-all { word-break: break-all; }
.hp-field {
  position: absolute !important; left: -10000px !important;
  width: 1px !important; height: 1px !important;
  overflow: hidden !important; opacity: 0 !important;
}
.flex-none { flex: none; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.relative { position: relative; }

/* Below this the brand, search, CTA and burger no longer fit on one row, so the
   search shortcut goes (it is a keyboard affordance) and the CTA label shortens. */
@media (max-width: 620px) {
  .cmd-btn { display: none; }
  .cta-full { display: none; }
  .cta-short { display: inline; }
  .header-signin { padding: 10px 14px; font-size: 13px; min-height: 42px; }
  .header-row { gap: 8px; height: 66px; }
  /* Nothing in this row may push past the viewport: the brand caps its width,
     and the CTA is allowed to shrink and ellipsize before the burger is lost. */
  .brand { min-width: 0; }
  .brand img { height: 30px; max-width: 44vw; object-fit: contain; }
  .header-cta { min-width: 0; flex: 0 1 auto; }
  .header-cta-btn {
    font-size: 12.5px; padding: 10px 14px; min-width: 0;
    overflow: hidden; text-overflow: ellipsis;
  }
  .spacer { flex: 1 1 0; min-width: 0; }
  .notice-bar { font-size: 9.5px; letter-spacing: .08em; gap: 8px; }
  .notice-status { margin-left: 0; }
}

@media (max-width: 420px) {
  .header-cta-btn { display: none; }
  .header-signin {
    padding: 10px 16px; font-size: 13.5px; min-height: 44px;
    background: var(--ink); color: #f4f4f2;
  }
}

@media (max-width: 640px) {
  :root { --pad-x: 18px; }
  .h1 { font-size: clamp(34px, 10vw, 46px); }
  .btn { width: 100%; }
  .btn-sm, .btn-xs, .btn-auto { width: auto; }
  .gauge { width: 118px; height: 118px; }
}

/* ==========================================================================
   SURFACE SYSTEM
   --------------------------------------------------------------------------
   Most components are drawn for a dark surface. Placed on a light surface — a
   `.sect-light` section, or the account area, which sets `.on-light` on the
   body — their text and hairlines have to invert, or they render white on
   white. The reverse also happens: an explicitly dark panel inside a light
   section inherits that section's ink colour and goes dark on dark.
   `.on-dark` puts such a panel back on the dark palette.

   Rule of thumb when adding markup:
     * a light section                -> nothing to do, these rules apply
     * an explicitly dark card inside it -> add `on-dark` to that card
     * a dark canvas, graph or rail    -> add `on-dark`
   ========================================================================== */

:is(.sect-light, .sect-light-rev, .on-light) {
  color: var(--ink);
}

/* ---- cards: the translucent-white card is invisible on a light surface ---- */
:is(.sect-light, .sect-light-rev, .on-light)
  .card:not(.card-light):not(.card-flush):not(.card-red):not(.card-ice):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: linear-gradient(180deg, #ffffff, #fafaf8);
  box-shadow: 0 1px 2px rgba(20,22,27,.06), 0 12px 28px -20px rgba(20,22,27,.4);
  color: var(--ink);
}
:is(.sect-light, .sect-light-rev, .on-light)
  a.card:not(.card-light):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *):hover {
  background: linear-gradient(180deg, #ffffff, #fafaf8);
  box-shadow: 0 1px 2px rgba(20,22,27,.07), 0 26px 48px -24px rgba(20,22,27,.55);
}
:is(.sect-light, .sect-light-rev, .on-light) .card-plain:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: rgba(20,22,27,.04);
}

/* ---- headings, body copy, muted text ---- */
:is(.sect-light, .sect-light-rev, .on-light) :is(.h3, .h4):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--ink); }
:is(.sect-light, .sect-light-rev, .on-light) .card:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) p { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) :is(.mute, .dim):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .label:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .mono:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--ink); }

/* ---- the callout box: its body copy is a pale grey by default ---- */
:is(.sect-light, .sect-light-rev, .on-light) .note-box:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: linear-gradient(140deg, rgba(236,48,19,.09), rgba(236,48,19,.02));
}
:is(.sect-light, .sect-light-rev, .on-light) .note-box:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) .label { color: var(--red-ink); }
:is(.sect-light, .sect-light-rev, .on-light) .note-box:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) p { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .note-box-ice:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: linear-gradient(140deg, rgba(14,124,116,.11), rgba(14,124,116,.02));
}
:is(.sect-light, .sect-light-rev, .on-light) .note-box-ice:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) .label { color: #0a5f59; }

/* ---- badges: tuned for dark, far too pale on light ---- */
:is(.sect-light, .sect-light-rev, .on-light) .badge:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); background: rgba(20,22,27,.07); }
:is(.sect-light, .sect-light-rev, .on-light) :is(.badge-low, .badge-ok):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: #08514c; background: rgba(143,211,214,.3); }
:is(.sect-light, .sect-light-rev, .on-light) :is(.badge-elevated, .badge-warn):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: #6d4100; background: rgba(232,147,15,.2); }
:is(.sect-light, .sect-light-rev, .on-light) .badge-high:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: #971a06; background: rgba(236,48,19,.13); }
:is(.sect-light, .sect-light-rev, .on-light) .badge-neutral:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: #3a4049; background: rgba(20,22,27,.07); }
:is(.sect-light, .sect-light-rev, .on-light) .illus-tag:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--red-ink); background: rgba(236,48,19,.1); }
:is(.sect-light, .sect-light-rev, .on-light) .illus-tag:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *)::before { background: var(--red-dark); }

/* ---- lists, definition pairs, timelines ---- */
:is(.sect-light, .sect-light-rev, .on-light) .tick-row > span:last-child:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--ink); }
:is(.sect-light, .sect-light-rev, .on-light) .kv:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) dt { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .kv:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) dd { color: var(--ink); }
:is(.sect-light, .sect-light-rev, .on-light) .timeline:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *)::before {
  background: linear-gradient(180deg, var(--red-dark), rgba(236,48,19,.08));
}
:is(.sect-light, .sect-light-rev, .on-light) .timeline-item:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *)::before {
  background: var(--paper); box-shadow: inset 0 0 0 2px var(--red-dark);
}
:is(.sect-light, .sect-light-rev, .on-light) .timeline-item.is-done:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *)::before { background: var(--red-dark); }
:is(.sect-light, .sect-light-rev, .on-light) .timeline-item.is-idle:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *)::before { box-shadow: inset 0 0 0 2px rgba(20,22,27,.24); }
:is(.sect-light, .sect-light-rev, .on-light) .timeline-time:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .timeline-title:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--ink); }
:is(.sect-light, .sect-light-rev, .on-light) .timeline-body:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }

/* ---- numerals and gauges ---- */
:is(.sect-light, .sect-light-rev, .on-light) .card-num:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .stage-num:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--red-dark); }
:is(.sect-light, .sect-light-rev, .on-light) .gauge-score:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--ink); }
:is(.sect-light, .sect-light-rev, .on-light) .gauge-of:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .factor-top span:first-child:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--ink); }
:is(.sect-light, .sect-light-rev, .on-light) .factor-top span:last-child:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .factor-track:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { background: rgba(20,22,27,.1); }
:is(.sect-light, .sect-light-rev, .on-light) .factor-fill:not(.is-major):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: linear-gradient(90deg, rgba(20,22,27,.4), rgba(20,22,27,.2));
}

/* ---- rows, tiles, chrome ---- */
:is(.sect-light, .sect-light-rev, .on-light) :is(.doc-row, .status-row, .asset-row, .file-row):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: rgba(20,22,27,.045);
}
:is(.sect-light, .sect-light-rev, .on-light) :is(.doc-row, .status-row, .asset-row):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *):hover {
  background: rgba(20,22,27,.075);
}
:is(.sect-light, .sect-light-rev, .on-light) :is(.dname, .aname, .fname):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--ink); }
:is(.sect-light, .sect-light-rev, .on-light) .status-row .name:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--ink); }
:is(.sect-light, .sect-light-rev, .on-light) :is(.dmeta, .doc-hash, .anet, .afiat, .fsize):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .status-row .desc:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .legend-item:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); background: rgba(20,22,27,.05); }
:is(.sect-light, .sect-light-rev, .on-light) .icon-tile:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--red-deep); }
:is(.sect-light, .sect-light-rev, .on-light) .route-link:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: linear-gradient(175deg, #ffffff, #fafaf8);
  box-shadow: 0 1px 2px rgba(20,22,27,.06), 0 12px 28px -20px rgba(20,22,27,.4);
  color: var(--ink);
}
:is(.sect-light, .sect-light-rev, .on-light) .route-link:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) small { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .route-arrow:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { background: rgba(236,48,19,.1); color: var(--red-deep); }
:is(.sect-light, .sect-light-rev, .on-light) .hr-fade,
:is(.sect-light, .sect-light-rev, .on-light) .hr-fade-soft {
  background: linear-gradient(90deg, transparent, rgba(20,22,27,.14) 20%, rgba(20,22,27,.14) 80%, transparent);
}
:is(.sect-light, .sect-light-rev, .on-light) .empty-state-icon:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { background: rgba(20,22,27,.06); color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .empty-state h4:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--ink); }
:is(.sect-light, .sect-light-rev, .on-light) .empty-state p:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }

/* ---- forms on a light surface ---- */
:is(.sect-light, .sect-light-rev, .on-light) :is(.input, .select, .textarea):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: #fff; box-shadow: inset 0 0 0 1px rgba(20,22,27,.16); color: var(--ink);
}
:is(.sect-light, .sect-light-rev, .on-light) :is(.input, .textarea):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *)::placeholder { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) :is(.input, .select, .textarea):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *):focus {
  background: #fff; box-shadow: inset 0 0 0 1px var(--red-deep), 0 0 0 3px rgba(236,48,19,.14);
}
:is(.sect-light, .sect-light-rev, .on-light) .field > label:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .field-label:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .field-hint:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .choice:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: #fff; box-shadow: inset 0 0 0 1px rgba(20,22,27,.14); color: var(--ink);
}
:is(.sect-light, .sect-light-rev, .on-light) .choice:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *):hover { background: #fbfbf9; }
:is(.sect-light, .sect-light-rev, .on-light) .choice-mark:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { box-shadow: inset 0 0 0 2px rgba(20,22,27,.26); }
:is(.sect-light, .sect-light-rev, .on-light) .choice.is-on:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *),
:is(.sect-light, .sect-light-rev, .on-light) .choice:has(input:checked):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: rgba(236,48,19,.08); box-shadow: inset 0 0 0 1px var(--red-deep); color: var(--ink);
}
:is(.sect-light, .sect-light-rev, .on-light) .choice:has(input:checked):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) .choice-mark {
  background: var(--red-deep); box-shadow: inset 0 0 0 2px var(--red-deep);
}
:is(.sect-light, .sect-light-rev, .on-light) .dropzone:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: rgba(20,22,27,.03); box-shadow: inset 0 0 0 1.5px rgba(20,22,27,.16);
}
:is(.sect-light, .sect-light-rev, .on-light) .dropzone:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) p { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .switch:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { background: rgba(20,22,27,.16); }
:is(.sect-light, .sect-light-rev, .on-light) .switch:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *)::after { background: #fff; }

/* ==========================================================================
   .on-dark — put an explicitly dark panel back on the dark palette.
   Declared last so it wins the specificity tie with the rules above.
   ========================================================================== */

:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) { color: var(--t-1); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) :is(.h1, .h2, .h3, .h4) { color: var(--t-1); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) p, .on-dark li, .on-dark dd { color: var(--t-mute); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .mute, :is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .dim, :is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .small.dim { color: var(--t-dim); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .label, :is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .kv dt { color: var(--t-dim); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .kv dd, :is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .metric dd, :is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .mono { color: var(--t-1); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .metric { background: rgba(244,244,242,.04); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .metric dt { color: var(--t-mute); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .tick-row > span:last-child { color: var(--t-3); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .badge { color: var(--t-mute); background: rgba(244,244,242,.07); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) :is(.badge-low, .badge-ok) { color: var(--ice); background: rgba(143,211,214,.14); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) :is(.badge-elevated, .badge-warn) { color: var(--amber-soft); background: rgba(232,147,15,.16); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .badge-high { color: var(--red-bright); background: rgba(255,90,60,.16); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .illus-tag { color: var(--red-pale); background: rgba(236,48,19,.14); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .illus-tag::before { background: var(--red-bright); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .btn-ghost {
  color: var(--t-1); background: rgba(244,244,242,.05);
  box-shadow: inset 0 0 0 1px rgba(244,244,242,.13);
}
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .btn-ghost:hover {
  color: var(--t-1); background: rgba(244,244,242,.1);
  box-shadow: inset 0 0 0 1px rgba(244,244,242,.26);
}
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .pill { color: var(--t-mute); background: rgba(244,244,242,.04); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .link-arrow { color: var(--red-soft); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .icon-tile { color: var(--red-soft); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) :is(.doc-row, .status-row, .asset-row, .file-row) { background: rgba(244,244,242,.04); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) :is(.dname, .aname, .fname) { color: var(--t-1); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .status-row .name { color: var(--t-1); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) :is(.dmeta, .doc-hash, .anet, .afiat, .fsize) { color: var(--t-dim); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .status-row .desc { color: var(--t-dim); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .note-box .label { color: var(--red-pale); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .note-box p { color: var(--t-3); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .note-box-ice .label { color: var(--ice); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .timeline-title { color: var(--t-1); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .timeline-body { color: var(--t-mute); }
:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) .timeline-time { color: var(--t-dim); }

/* Translucent accent cards keep their wash but need ink text on a light page. */
:is(.sect-light, .sect-light-rev, .on-light) :is(.card-red, .card-ice):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--ink); }
:is(.sect-light, .sect-light-rev, .on-light) :is(.card-red, .card-ice):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) p { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) :is(.card-red, .card-ice):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard)):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) strong { color: var(--ink); }

/* ---- remaining light-surface corrections ---- */
:is(.sect-light, .sect-light-rev, .on-light) a:not(.btn):not(.card):not(.route-link):not(.skip-link):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  color: var(--red-ink);
}
:is(.sect-light, .sect-light-rev, .on-light) a:not(.btn):not(.card):not(.route-link):not(.skip-link):not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *):hover {
  color: var(--red-dark);
}
:is(.sect-light, .sect-light-rev, .on-light) .price-note:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .rule-row.is-then span:first-child:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--red-ink); }
:is(.sect-light, .sect-light-rev, .on-light) .note-box:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) p strong { color: var(--ink); }
.note-box p strong { color: var(--t-1); font-weight: 600; }

/* The alert panel is white-on-red; keep every layer above 4.5:1. */
.alert-panel .eyebrow { color: rgba(255,255,255,.92); }
.alert-panel .label { color: rgba(255,255,255,.92); }
.alert-panel p { color: rgba(255,255,255,.92); }
.alert-panel .never-row span { color: #fff; }

/* An accent-coloured inline value, re-coloured per surface. */
.accent { color: var(--red-soft); }
:is(.sect-light, .sect-light-rev, .on-light) .accent:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--red-ink); }

/* Metric labels sit on a doubly-tinted panel; --t-dim lands just under AA there. */
.metric dt { color: var(--t-mute); }
:is(.sect-light, .sect-light-rev, .on-light) .metric:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) dt { color: var(--t-ink-2); }

/* A quiet button is near-white text by default; on a light surface it needs ink. */
:is(.sect-light, .sect-light-rev, .on-light) .btn-quiet:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: var(--t-ink-2); }
:is(.sect-light, .sect-light-rev, .on-light) .btn-quiet:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *):hover {
  color: var(--ink); background: rgba(20,22,27,.07);
}
/* An accent value that should read as the positive/ice tone per surface. */
.accent-ice { color: var(--ice); }
:is(.sect-light, .sect-light-rev, .on-light) .accent-ice:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) { color: #08514c; }

:is(.sect-light, .sect-light-rev, .on-light) .btn-danger:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *) {
  background: rgba(236,48,19,.1); color: #971a06;
  box-shadow: inset 0 0 0 1px rgba(236,48,19,.34);
}
:is(.sect-light, .sect-light-rev, .on-light) .btn-danger:not(:is(.on-dark, .card-solid, .panel-solid, .graph-stage, .rail, .code, .vcard) *):hover {
  background: rgba(236,48,19,.18); color: #7a1405;
}

/* ==========================================================================
   PRODUCTION MOTION + LIVE SURFACE
   Premium, GPU-friendly. Durations are already zeroed by prefers-reduced-motion.
   ========================================================================== */

.header-row.is-narrow .nav,
.header-row.is-narrow .header-link { display: none !important; }
.header-row.is-narrow .burger { display: flex; }
.header-row.is-narrow .header-signin {
  display: inline-flex;
  background: var(--ink); color: #f4f4f2;
  box-shadow: 0 8px 22px -12px rgba(20,22,27,.7);
}
.header-row.is-narrow .header-signin:hover { color: #fff; background: #1a1c22; }

.site-header.is-compact .header-row { height: 62px; }
.site-header.is-compact .brand img { height: 36px; }
.site-header.is-scrolled {
  box-shadow: inset 0 -1px 0 rgba(20,22,27,.16), 0 10px 30px -18px rgba(20,22,27,.35);
}

.page-enter { animation: cwPageIn .38s var(--ease) both; }
@keyframes cwPageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* The open/close animation runs on grid-template-rows, 0fr -> 1fr, which is
   the one way to transition to an auto height. It replaces the max-height
   rule further up this file. */
.mobile-menu {
  display: grid;
  /* An explicit single track. Without it the implicit column is `auto`, which
     is sized from the item's max-content — and the item below is an auto-fit
     grid whose max-content is enormous. */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 0fr;
  max-height: none;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  animation: none;
  transition: grid-template-rows .32s var(--ease), opacity .24s ease, visibility .32s;
}
.mobile-menu.is-open {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
}

.mobile-menu-inner {
  min-height: 0;
  /* `margin: 0 auto` (set further up, for centring on a wide viewport) makes
     this a grid item that has opted OUT of stretch alignment, so it is sized
     to max-content rather than to the track. With the auto-fit column list
     that resolved to 1460px inside a 390px phone: six columns side by side,
     fifteen of the twenty-one links off-screen, and `overflow: hidden` above
     turning the excess into content nobody could scroll to.
     An explicit width keeps the item in its track; max-width still caps it
     when the viewport is wider than the shell. */
  width: 100%;
  overflow: hidden;
  transition: padding-block .32s var(--ease);
}

/* `min-height: 0` lets the item's CONTENT collapse to nothing, but its padding
   is not content — 6px top and 26px bottom survived the collapse and left a
   32px invisible gap under the header on every page. Zero the block padding
   while closed, and transition it so it grows back with the panel. */
.mobile-menu:not(.is-open) .mobile-menu-inner { padding-block: 0; }

/* A tall menu has to be reachable. The outer stays clipped so the collapse
   animation is clean; the scrolling lives on the inner, and only while the
   menu is open so the closed state still measures zero and animates from it.
   `overscroll-behavior: contain` stops the page behind scrolling once the
   menu has been scrolled to its end. */
.mobile-menu.is-open .mobile-menu-inner {
  max-height: min(74vh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.btn.is-busy { pointer-events: none; opacity: .72; }
.btn.is-copied { color: var(--ice-ink); }

.skel {
  display: block; height: 14px; border-radius: 7px;
  background: linear-gradient(90deg, rgba(244,244,242,.06) 20%, rgba(244,244,242,.14) 50%, rgba(244,244,242,.06) 80%);
  background-size: 180% 100%;
  animation: cwShimmer 1.4s ease-in-out infinite;
}
.skel-lg { height: 28px; }
.skel-block { height: 88px; border-radius: var(--r-md); }
.on-light .skel, .sect-light .skel {
  background: linear-gradient(90deg, rgba(20,22,27,.05) 20%, rgba(20,22,27,.1) 50%, rgba(20,22,27,.05) 80%);
  background-size: 180% 100%;
}

.net-banner {
  position: sticky; top: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 18px; font-size: 13.5px; font-weight: 600;
  background: #2a1200; color: #ffd8b0;
}
.net-banner[hidden] { display: none !important; }
.net-banner.is-ok { background: #0a3d38; color: #c8f0ec; }

.route-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 2px;
  background: transparent; pointer-events: none;
}
.route-progress i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--cta-from), var(--red-pale));
  box-shadow: 0 0 12px rgba(236,48,19,.7);
  transition: width .4s var(--ease);
}
.route-progress.is-on i { width: 72%; }
.route-progress.is-done i { width: 100%; opacity: 0; transition: width .2s ease, opacity .3s .15s ease; }

.notify-panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: min(380px, calc(100vw - 32px));
  background: linear-gradient(180deg, #ffffff, #fafaf8);
  border-radius: var(--r-xl);
  box-shadow: 0 34px 70px -26px rgba(20,22,27,.35), inset 0 0 0 1px rgba(20,22,27,.08);
  overflow: hidden; z-index: 20;
  transform-origin: top right;
  animation: cwPop .2s var(--ease) both;
}
.notify-panel[hidden] { display: none; }
.notify-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; font-size: 13px; font-weight: 600; color: var(--ink);
  box-shadow: inset 0 -1px 0 rgba(20,22,27,.08);
}
.notify-list { max-height: 360px; overflow-y: auto; }
.notify-item {
  display: grid; gap: 2px; padding: 12px 16px;
  color: var(--ink); text-align: left; width: 100%;
  box-shadow: inset 0 -1px 0 rgba(20,22,27,.06);
  transition: background .14s ease;
}
.notify-item:hover { background: rgba(20,22,27,.04); }
.notify-item.is-unread { background: rgba(236,48,19,.05); }
.notify-item b { font-size: 13.5px; font-weight: 600; }
.notify-item small { font-size: 12.5px; color: var(--t-ink-2); line-height: 1.45; }
.notify-item .when { font-family: var(--f-mono); font-size: 10.5px; color: var(--t-ink-2); letter-spacing: .04em; }
.icon-btn { position: relative; }
.icon-btn .dot[hidden] { display: none; }

.field.has-ok .input { box-shadow: inset 0 0 0 1px rgba(14,124,116,.45); }

.copy-hit.is-copied .addr-box {
  box-shadow: inset 0 0 0 1px rgba(14,124,116,.45), 0 0 0 3px rgba(14,124,116,.12);
}

.chart svg rect { transform-box: fill-box; transform-origin: bottom; animation: cwBarIn .7s var(--ease) both; }
@keyframes cwBarIn { from { transform: scaleY(0); opacity: .4; } to { transform: none; opacity: 1; } }
.chart svg circle { animation: cwDonut .9s var(--ease) both; }

.stat .v { font-variant-numeric: tabular-nums; }
.feed-row { animation: cwTick .32s var(--ease) both; }

@media (max-width: 720px) {
  .toast-stack { right: 12px; left: 12px; bottom: 88px; width: auto; }
}

/* ==========================================================================
   REFUSED CONSENT
   Declared last, after the surface system. The light-surface `.choice` rule
   further up carries equal specificity and would otherwise win, leaving a
   consent that blocked submission looking identical to one that was given.
   ========================================================================== */

.field.has-error .choice,
:is(.sect-light, .sect-light-rev, .on-light) .field.has-error .choice {
  box-shadow: inset 0 0 0 2px var(--red-deep);
}
.field.has-error .choice .choice-mark,
:is(.sect-light, .sect-light-rev, .on-light) .field.has-error .choice .choice-mark {
  box-shadow: inset 0 0 0 2px var(--red-deep);
}

/* --- related links (SEO hub-and-spoke blocks) --- */
.related-links{list-style:none;margin:18px 0 0;padding:0;display:grid;gap:2px;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr))}
.related-links li{margin:0}
.related-links a{display:block;padding:13px 16px;border-radius:12px;
  color:inherit;text-decoration:none;font-size:14.5px;line-height:1.45;
  border:1px solid rgba(255,255,255,.10);transition:background .18s,border-color .18s}
.related-links a:hover,.related-links a:focus-visible{
  background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.22)}
.sect-light .related-links a{border-color:rgba(0,0,0,.12)}
.sect-light .related-links a:hover,.sect-light .related-links a:focus-visible{
  background:rgba(0,0,0,.035);border-color:rgba(0,0,0,.25)}

/* --- AEO answer blocks (self-contained 40-60 word answers) --- */
.answer-sect{padding:clamp(30px,4vw,46px) 0}
.answer-block{max-width:74ch;border-left:3px solid var(--red-soft,#e0503a);padding:4px 0 4px 22px}
.answer-q{font-size:clamp(17px,2.1vw,21px);line-height:1.3;margin:0 0 10px;font-weight:600;
  letter-spacing:-.01em}
.answer-a{margin:0;font-size:clamp(15.5px,1.8vw,17.5px);line-height:1.62;color:var(--t-mute)}
.sect-light .answer-a{color:var(--t-ink-2)}

/* --- public address checker --- */
.ac-head{font-weight:650;font-size:15.5px;letter-spacing:-.01em;margin-bottom:10px}
.ac-head.is-ok{color:var(--green,#57c98a)}
.ac-head.is-bad{color:var(--red-soft,#ff7a5c)}
.ac-addr{font-family:var(--font-mono,monospace);font-size:13.5px;word-break:break-all;
  padding:11px 13px;border-radius:10px;background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);margin-bottom:14px}
.ac-note{margin:0 0 12px;font-size:14px;line-height:1.58;color:var(--t-mute)}
.ac-note-warn{color:var(--red-soft,#ff7a5c)}
.ac-grid{display:grid;gap:2px;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));
  margin:14px 0 4px}
.ac-row{display:flex;flex-direction:column;gap:3px;padding:11px 13px;border-radius:10px;
  border:1px solid rgba(255,255,255,.10)}
.ac-k{font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--t-mute)}
.ac-v{font-family:var(--font-mono,monospace);font-size:14.5px;word-break:break-all}
.ac-src{margin:10px 0 0;font-size:12.5px;line-height:1.5;color:var(--t-mute)}
.ac-limits{margin-top:20px;padding:14px 16px;border-radius:12px;
  border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.03)}
.ac-limits ul{margin:9px 0 0;padding-left:18px}
.ac-limits li{font-size:13.5px;line-height:1.55;color:var(--t-mute);margin-bottom:5px}
.sect-light .ac-addr,.sect-light .ac-row,.sect-light .ac-limits{border-color:rgba(0,0,0,.14)}
.sect-light .ac-note,.sect-light .ac-k,.sect-light .ac-src,.sect-light .ac-limits li{color:var(--t-ink-2)}

/* --- page visualisations (js/viz.js) --- */
.viz-sect{padding:clamp(18px,2.4vw,30px) 0}
.viz-card{border-radius:26px;overflow:hidden;
  box-shadow:0 44px 96px -44px rgba(0,0,0,.95),inset 0 1px 0 rgba(244,244,242,.08)}
.viz-card canvas{cursor:default}
.sect-light .viz-card{background:#0b0c10}
@media (prefers-reduced-motion:reduce){.viz-card canvas{opacity:.92}}
