/* ═══════════════════════════════════════════════════════════
   WallUPI · design system
   ───────────────────────────────────────────────────────────
   Light only. Every component reads semantic tokens, so colour
   and contrast are fixed in one place.

   Surface rule : flat paper and hairlines. No translucent or
                  gradient-tinted boxes anywhere. Labels and
                  indicators are set as text under or beside
                  the thing they describe, not as glassy chips.
   Colour rule  : one brand blue for interaction, one deep navy
                  for the "WallUPI" block and inverse bands. The
                  risk ramp (safe/caution/warn/danger) is state
                  only, never decoration.
   ═══════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────── */
:root {
  /* paper */
  --bg:         #F7F6F2;
  --bg-2:       #EFEDE6;
  --surface:    #FFFFFF;
  --surface-2:  #F4F3EE;
  --line:       #E2DFD6;
  --line-2:     #CCC8BD;

  /* ink */
  --ink:        #0E1726;
  --ink-2:      #3B4556;
  --ink-3:      #5E6676;

  /* brand blue, from the logo */
  --accent:      #2A4DB0;
  --accent-2:    #1D3A8C;
  --accent-ink:  #FFFFFF;
  --accent-soft: #E7ECF8;
  --accent-text: #2A4DB0;

  /* deep navy: the WallUPI block, inverse bands */
  --key:        #14233D;
  --key-2:      #1C2F50;
  --key-ink:    #F3F5F9;
  --key-ink-2:  #B0BBCF;
  --key-line:   #2D3F60;
  --key-accent: #95B2FF;
  --band:       #13213A;

  /* risk ramp */
  --safe:       #1D7350;
  --caution:    #8A5D05;
  --warn:       #AE4F19;
  --danger:     #B42318;
  --safe-bg:    #E3F0E9;
  --caution-bg: #F5ECD8;
  --warn-bg:    #F6E6DB;
  --danger-bg:  #F7E1DE;

  /* hero signal field, read by script.js */
  --field-rgb:  30, 56, 120;
  --field-dot:  .55;
  --field-line: .24;

  --shadow-sm:    0 1px 2px rgba(20, 30, 50, .06);
  --shadow:       0 1px 2px rgba(20, 30, 50, .05), 0 14px 34px -18px rgba(20, 30, 50, .28);
  --shadow-phone: 0 2px 4px rgba(14, 23, 38, .08), 0 34px 60px -30px rgba(14, 23, 38, .5);

  --r-sm:   4px;
  --r:      8px;
  --r-lg:   14px;
  --r-pill: 999px;

  --maxw:      1360px;
  --gutter:    clamp(1.25rem, 4vw, 3.5rem);
  --nav-h:     68px;
  --section-y: clamp(3.75rem, 7.5vw, 6.5rem);

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

  --font-display: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  color-scheme: light;
}

/* ── Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
  interpolate-size: allow-keywords;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

.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;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  z-index: 200;
  background: var(--ink); color: var(--bg);
  padding: .7rem 1.1rem; border-radius: var(--r);
  font-weight: 600; font-size: .9rem;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ── Typography ──────────────────────────────────────── */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.03em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); letter-spacing: -.042em; line-height: 1.02; }
h2 { font-size: clamp(1.95rem, 3.7vw, 3.15rem); letter-spacing: -.038em; }
h3 { font-size: clamp(1.15rem, 1.55vw, 1.35rem); letter-spacing: -.02em; line-height: 1.25; }
h4 { font-size: 1rem; letter-spacing: -.01em; line-height: 1.3; }

p { margin: 0; color: var(--ink-2); text-wrap: pretty; }
strong, b { color: var(--ink); font-weight: 600; }

.lead {
  font-size: clamp(1.08rem, 1.45vw, 1.26rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 58ch;
}

/* small uppercase label set above a heading */
.eyebrow {
  display: block;
  margin-bottom: 1.1rem;
  font-family: var(--font-mono);
  font-size: .74rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-text);
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num  { font-variant-numeric: tabular-nums; }

/* ── Layout ──────────────────────────────────────────── */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-2); }
.section--line { border-top: 1px solid var(--line); }

.head { margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem); max-width: 62ch; }
.head p { margin-top: 1rem; }
.head--center { margin-inline: auto; text-align: center; }
.head--center p { margin-inline: auto; }

/* heading left, paragraph right, sharing a baseline */
@media (min-width: 960px) {
  .head--split {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 2rem 5rem;
    align-items: end;
  }
  .head--split p { margin-top: 0; }
}

/* sticky heading on the left, long content on the right */
.aside-split { display: grid; gap: clamp(2rem, 4vw, 3rem); }
@media (min-width: 960px) {
  .aside-split { grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: 5rem; align-items: start; }
  .aside-split > :first-child { position: sticky; top: calc(var(--nav-h) + 2rem); }
}
.aside-split .head { margin-bottom: 0; }

.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--media-left > :first-child { order: 2; }
}

/* inverse navy band */
.band {
  background: var(--band);
  color: var(--key-ink);
}
.band h2, .band h3, .band strong { color: var(--key-ink); }
.band p, .band .lead { color: var(--key-ink-2); }
.band .eyebrow { color: var(--key-accent); }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }

.nav-inner {
  height: var(--nav-h);
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 1.5rem;
}

.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.12rem; letter-spacing: -.035em;
  color: var(--ink);
  flex-shrink: 0;
}
/* the W mark: same geometry as favicon/favicon.svg */
.brand-mark { width: 34px; height: auto; }
.brand-mark .mk-k { fill: var(--ink); }
.brand-mark .mk-b { fill: #3756A5; }
.brand-mark .mk-s { fill: #2E4787; }
.brand-upi { color: #3756A5; }

.nav-drawer {
  display: flex; align-items: center; gap: .25rem;
  margin-left: auto;
}
.nav-drawer a {
  position: relative;
  padding: .5rem .75rem;
  font-size: .92rem; font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.nav-drawer a:hover { color: var(--ink); }
.nav-drawer a[aria-current="page"] { color: var(--ink); }
.nav-drawer a[aria-current="page"]::after {
  content: ''; position: absolute;
  left: .75rem; right: .75rem; bottom: .1rem; height: 2px;
  background: var(--accent);
}

.nav-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.nav-cta-mobile { display: none; }

.burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line-2); background: transparent;
  border-radius: var(--r);
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute; left: 50%; top: 50%;
  width: 16px; height: 1.8px; margin-left: -8px;
  background: var(--ink); border-radius: 2px;
  transition: transform .3s var(--ease-out), opacity .15s linear;
}
.burger span:nth-child(1) { transform: translateY(-5px); }
.burger span:nth-child(3) { transform: translateY(5px); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); }

@media (max-width: 1020px) {
  .burger { display: block; }
  .nav-actions { margin-left: auto; }
  .nav-cta-desktop { display: none; }
  .nav-drawer {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.4rem;
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-drawer.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .nav-drawer a {
    padding: 1rem .1rem; font-size: 1.08rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-drawer a[aria-current="page"]::after { left: auto; right: .1rem; top: 50%; bottom: auto; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; }
  .nav-drawer .nav-cta-mobile {
    display: block;
    margin-top: 1.1rem; border-bottom: 0;
    background: var(--accent); color: var(--accent-ink);
    border-radius: var(--r); text-align: center; font-weight: 600;
  }
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .78rem 1.35rem;
  font-family: var(--font-body);
  font-size: .96rem; font-weight: 600; letter-spacing: -.01em;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform .14s var(--ease), background .18s var(--ease),
              border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.02rem; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-2); }

.btn-dark { background: var(--ink); color: var(--bg); box-shadow: 0 10px 22px -12px rgba(14, 23, 38, .55); }
.btn-dark:hover { background: var(--key-2); color: var(--key-ink); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }

.band .btn-ghost { color: var(--key-ink); border-color: var(--key-line); }
.band .btn-ghost:hover { border-color: var(--key-ink); }
.band .btn-primary { background: var(--key-ink); color: var(--key); }
.band .btn-primary:hover { background: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* text link with chevron + line hover */
.arrow-link {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; font-size: .96rem;
  color: var(--accent-text);
}
.arrow-link .arrow-ico { position: relative; width: 16px; height: 16px; display: grid; place-items: center; }
.arrow-link .arrow-ico svg { width: 15px; height: 15px; transition: transform .4s var(--ease-out); }
.arrow-link .arrow-ico::after {
  content: ''; position: absolute;
  right: 4px; top: 50%; margin-top: -.9px;
  width: 9px; height: 1.8px; border-radius: 1px;
  background: currentColor;
  transform-origin: right; transform: scaleX(0);
  transition: transform .3s var(--ease-out), right .3s var(--ease-out);
}
.arrow-link:hover .arrow-ico svg { transform: translateX(2px); }
.arrow-link:hover .arrow-ico::after { transform: scaleX(1); right: 2px; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding-top: clamp(4.5rem, 11vw, 8.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
/* a faint survey grid under the field, so the hero has texture
   even before the canvas paints */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 20%, transparent 80%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 40%, #000 20%, transparent 80%);
  pointer-events: none;
}
/* the drifting signal field, drawn by script.js. It is dimmed
   behind the headline and full strength at the edges. */
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 46% 42% at 50% 40%, rgba(0,0,0,.18), #000 92%);
          mask-image: radial-gradient(ellipse 46% 42% at 50% 40%, rgba(0,0,0,.18), #000 92%);
}
.hero > .shell { position: relative; z-index: 1; }

.hero .eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  margin-bottom: 1.6rem;
  color: var(--ink-2);
}
.hero .eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--safe);
  box-shadow: 0 0 0 4px var(--safe-bg);
}
.hero h1 {
  font-size: clamp(2.85rem, 8vw, 6.6rem);
  letter-spacing: -.05em;
  line-height: .98;
  max-width: 14ch;
  margin-inline: auto;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero .lead {
  margin: 1.6rem auto 0;
  max-width: 50ch;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
}
.hero .btn-row { justify-content: center; margin-top: 2.25rem; }

/* facts under the hero: value on top, label as bottom text */
.hero-facts {
  list-style: none;
  margin-top: clamp(3.5rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
  text-align: left;
}
.hero-facts li {
  padding: 1.35rem 1.25rem 0 0;
}
.hero-facts li + li { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.hero-facts b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 600;
  letter-spacing: -.035em; line-height: 1.1;
}
.hero-facts span { display: block; margin-top: .35rem; font-size: .9rem; color: var(--ink-3); max-width: 24ch; }
@media (max-width: 760px) {
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero-facts li:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 1.25rem; }
}

/* ── Page head (interior pages) ──────────────────────── */
.page-head {
  position: relative;
  border-bottom: 1px solid var(--line);
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.page-head h1 { max-width: 17ch; }
.page-head .lead { margin-top: 1.4rem; }
@media (min-width: 960px) {
  .page-head .shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2rem 5rem;
    align-items: end;
  }
  .page-head .lead { margin-top: 0; }
}

/* in-page index under the page head */
.page-index {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: .25rem 1.75rem;
  margin-top: 2.25rem;
  grid-column: 1 / -1;
  font-size: .9rem;
}
.page-index a {
  display: inline-flex; gap: .55rem; align-items: baseline;
  padding-block: .35rem;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.page-index a span { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-3); }
.page-index a:hover { color: var(--ink); border-color: var(--ink); }

/* ── Showcase: diagram on one side, spec on the other ── */
.showcase {
  display: grid;
  border: 1px solid var(--line-2);
  background: var(--surface);
}
@media (min-width: 1040px) {
  .showcase { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}
.showcase-fig {
  background: var(--surface-2);
  padding: clamp(1.5rem, 3.6vw, 3.25rem);
  display: flex; flex-direction: column; justify-content: center;
  gap: 1.75rem;
  border-bottom: 1px solid var(--line-2);
  min-width: 0;
}
@media (min-width: 1040px) {
  .showcase-fig { border-bottom: 0; border-right: 1px solid var(--line-2); }
}
.showcase-copy { padding: clamp(1.5rem, 3.6vw, 3.25rem); align-self: center; }
.showcase-copy h2 { font-size: clamp(1.8rem, 3.1vw, 2.65rem); }
.showcase-copy .lead { margin-top: 1.15rem; font-size: clamp(1.02rem, 1.3vw, 1.14rem); }

.fig-label {
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
}
.fig-sub { margin-top: .4rem; font-size: 1rem; color: var(--accent-text); }

.legend {
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
  font-size: .82rem; color: var(--ink-3);
}
.legend span { display: inline-flex; align-items: center; gap: .5rem; }
.legend i { width: 11px; height: 11px; flex-shrink: 0; border: 1px solid var(--line-2); background: var(--surface); }
.legend i.k { background: var(--key); border-color: var(--key); }
.legend i.z { border: 1px dashed var(--accent); background: transparent; }
.legend i.d { border: 0; border-top: 1.5px dotted var(--ink-3); height: 0; width: 16px; background: transparent; }

/* spec: label / value rows with hairlines */
.spec { margin: 1.9rem 0 0; border-top: 1px solid var(--line-2); }
.spec > div {
  display: grid;
  grid-template-columns: minmax(8rem, .8fr) minmax(0, 1.4fr);
  gap: 1rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .97rem;
}
.spec dt { color: var(--ink-3); }
.spec dd { margin: 0; color: var(--ink); }
.spec-note { margin-top: 1.25rem; font-size: .88rem; color: var(--ink-3); }
@media (max-width: 520px) {
  .spec > div { grid-template-columns: 1fr; gap: .15rem; }
}

/* ── Flow diagram ────────────────────────────────────── */
.flow { display: flex; align-items: stretch; min-width: 0; }

.flow-node {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: .25rem;
  background: var(--surface);
  border: 1px solid var(--line-2);
  padding: .95rem 1rem;
  min-height: 6rem;
}
.flow-node strong { font-size: .97rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.flow-node span { font-size: .84rem; color: var(--ink-3); line-height: 1.35; }
.flow-node--key { background: var(--key); border-color: var(--key); }
.flow-node--key strong { color: var(--key-ink); }
.flow-node--key span { color: var(--key-ink-2); }
.flow-node--end { border-color: var(--ink); }

.flow-link {
  flex: 0 0 clamp(3.4rem, 5vw, 4.6rem);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .4rem;
  padding-inline: .25rem;
  font-family: var(--font-mono);
  font-size: .66rem; line-height: 1.25;
  color: var(--ink-3);
  text-align: center;
}
.flow-wire {
  position: relative;
  display: block;
  width: 100%; height: 1px;
  background: var(--ink-3);
}
.flow-wire::before {
  content: ''; position: absolute; right: -1px; top: -3.5px;
  width: 7px; height: 7px;
  border-right: 1px solid var(--ink-3); border-top: 1px solid var(--ink-3);
  transform: rotate(45deg);
}
/* the packet travelling down the wire */
.flow-wire::after {
  content: ''; position: absolute; top: -3px; left: 0;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: wire-x 2.6s var(--ease) infinite;
  animation-delay: var(--d, 0s);
}
@keyframes wire-x {
  0%   { left: 0; opacity: 0; }
  12%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}

/* dashed boundary around part of a flow, labelled at the top */
.flow-zone {
  flex: 2.6 1 0; min-width: 0;
  position: relative;
  display: flex; align-items: stretch;
  border: 1px dashed var(--accent);
  padding: 2.6rem .8rem .8rem;
}
.flow-zone-label {
  position: absolute; top: .8rem; left: .95rem;
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .8rem; font-weight: 500;
  color: var(--accent-text);
}
.flow-zone-label svg { width: 14px; height: 14px; }

/* the rare branch hanging below a zone */
.flow-branch {
  position: relative;
  margin-top: 2.5rem;
  margin-inline: auto;
  max-width: 21rem;
  display: flex; flex-direction: column; gap: .25rem;
  border: 1px dotted var(--ink-3);
  padding: .9rem 1rem;
  background: transparent;
}
.flow-branch::before {
  content: ''; position: absolute;
  left: 50%; bottom: 100%;
  height: 2.5rem; border-left: 1.5px dotted var(--ink-3);
}
.flow-branch strong { font-size: .95rem; }
.flow-branch span { font-size: .82rem; color: var(--ink-3); line-height: 1.4; }
.flow-branch em {
  position: absolute; left: calc(50% + .65rem); bottom: calc(100% + .7rem);
  font-style: normal; font-family: var(--font-mono); font-size: .66rem; color: var(--ink-3);
  white-space: nowrap;
}

/* vertical flow under 900px */
@media (max-width: 900px) {
  .flow, .flow-zone { flex-direction: column; }
  .flow-zone { padding-top: 2.5rem; }
  .flow-node { min-height: 0; flex: 0 0 auto; }
  .flow-link {
    flex: 0 0 auto;
    flex-direction: row; justify-content: flex-start;
    gap: .9rem;
    min-height: 3.4rem;
    padding-left: 1.6rem;
    text-align: left;
  }
  .flow-link br { display: none; }
  .flow-wire { order: -1; width: 1px; height: 3.4rem; align-self: stretch; height: auto; }
  .flow-wire::before { right: auto; left: -3px; top: auto; bottom: 0; transform: rotate(135deg); }
  .flow-wire::after { left: -3px; top: 0; animation-name: wire-y; }
  @keyframes wire-y {
    0%   { top: 0; opacity: 0; }
    12%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { top: calc(100% - 8px); opacity: 0; }
  }
  .flow-branch { margin-top: 2rem; }
  .flow-branch::before { height: 2rem; left: 1.6rem; }
  .flow-branch em { left: 2.25rem; bottom: calc(100% + .55rem); }
}

/* standalone diagram panel */
.diagram {
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  padding: clamp(1.5rem, 3.6vw, 3rem);
  display: flex; flex-direction: column; gap: 1.75rem;
}

/* spec laid out in columns under a diagram */
@media (min-width: 900px) {
  .spec--wide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; border-top: 0; }
  .spec--wide > div { grid-template-columns: 1fr; align-content: start; gap: .3rem; border-top: 1px solid var(--line-2); border-bottom: 0; }
}

/* readings: a coloured value with a line under it, then the text */
.reads { list-style: none; margin-top: 2rem; border-top: 1px solid var(--line-2); }
.reads li {
  display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: 1rem;
  align-items: baseline;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.reads b {
  justify-self: start;
  font-family: var(--font-mono); font-size: .9rem; font-weight: 500;
  color: var(--tone);
  border-bottom: 2px solid var(--tone);
  padding-bottom: 1px;
}

/* ── Live check (home) ───────────────────────────────── */
.check-demo { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (min-width: 1000px) {
  .check-demo { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

.steps-list { list-style: none; margin-top: 2rem; border-top: 1px solid var(--line-2); counter-reset: s; }
.steps-list li {
  position: relative;
  display: grid; grid-template-columns: 3rem 1fr; gap: .25rem 0;
  padding: 1.15rem 0 1.15rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  transition: color .35s var(--ease);
}
.steps-list li::before {
  counter-increment: s;
  content: '0' counter(s);
  font-family: var(--font-mono); font-size: .8rem;
  padding-top: .2rem;
  color: var(--ink-3);
  transition: color .35s var(--ease);
}
.steps-list li::after {
  content: ''; position: absolute; left: 0; bottom: -1px;
  height: 2px; width: 100%;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
}
.steps-list strong { display: block; font-size: 1.08rem; color: inherit; font-weight: 600; }
.steps-list p { grid-column: 2; font-size: .95rem; color: inherit; }
.steps-list li.is-active { color: var(--ink); }
.steps-list li.is-active p { color: var(--ink-2); }
.steps-list li.is-active::before { color: var(--accent-text); }
.steps-list li.is-active::after { transform: scaleX(1); transition: transform var(--step-ms, 2.4s) linear; }
.steps-list.is-static li { color: var(--ink); }
.steps-list.is-static li p { color: var(--ink-2); }

.check-replay {
  margin-top: 1.5rem;
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 0; padding: 0;
  font-size: .92rem; font-weight: 600; color: var(--accent-text);
  cursor: pointer;
}
.check-replay svg { width: 15px; height: 15px; }

.check {
  --tone: var(--ink-3);
  width: 100%; max-width: 560px;
  justify-self: center;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.check[data-level="1"] { --tone: var(--safe); }
.check[data-level="2"] { --tone: var(--caution); }
.check[data-level="3"] { --tone: var(--warn); }
.check[data-level="4"] { --tone: var(--danger); }

.check-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: .85rem 1.3rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3);
}
.check-live { display: inline-flex; align-items: center; gap: .5rem; }
.check-live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger);
  animation: blink 1.6s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.check-pay {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
  padding: 1.3rem 1.3rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.check-pay small { display: block; font-size: .8rem; color: var(--ink-3); margin-bottom: .15rem; }
.check-pay b { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -.02em; }
.check-pay .check-amt { font-size: 1.75rem; text-align: right; }

.check-sigs { list-style: none; padding: .35rem 1.3rem; }
.check-sig {
  display: grid; grid-template-columns: 1.1rem minmax(0, 1fr) 4.5rem; gap: .8rem;
  align-items: center;
  padding: .78rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .94rem;
  color: var(--ink-3);
  transition: color .3s var(--ease);
}
.check-sig:last-child { border-bottom: 0; }
.check-sig i {
  width: .82rem; height: .82rem; border-radius: 50%;
  border: 1.5px solid var(--line-2);
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.check-sig small { display: block; font-size: .78rem; color: var(--ink-3); }
.check-sig .w { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.check-sig .w::after {
  content: ''; display: block; height: 100%;
  width: var(--w); background: var(--danger);
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease-out);
}
.check-sig.is-on { color: var(--ink); }
.check-sig.is-on i { background: var(--danger); border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.check-sig.is-on .w::after { transform: scaleX(1); }

.check-score {
  padding: 1.15rem 1.3rem 1.3rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.check-score-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: .75rem; }
.check-score-row small { display: block; font-size: .8rem; color: var(--ink-3); }
.check-num {
  font-family: var(--font-display);
  font-size: 2.5rem; font-weight: 600; letter-spacing: -.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--tone);
  transition: color .3s var(--ease);
}
.check-verdict {
  font-weight: 600; font-size: 1rem;
  color: var(--tone);
  padding-bottom: .2rem;
  border-bottom: 2px solid currentColor;
  transition: color .3s var(--ease);
}
.check-meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.check-meter span {
  display: block; height: 100%;
  width: var(--score, 0%);
  background: var(--tone);
  transition: width .7s var(--ease-out), background .3s var(--ease);
}

/* ── Scam anatomy (home, inverse band) ───────────────── */
.anatomy {
  list-style: none;
  display: grid;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 960px) {
  .anatomy { grid-template-columns: repeat(3, minmax(0, 1fr)) 8.5rem minmax(0, 1fr); }
}
.an-step {
  position: relative;
  padding: 2.1rem 1.75rem 0 0;
}
/* rail segment: draws in when the list is revealed */
.an-step::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 1px; background: var(--key-ink-2);
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease-out);
  transition-delay: calc(var(--i) * .35s);
}
.an-step::after {
  content: ''; position: absolute; top: -5px; left: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--band); border: 1.5px solid var(--key-ink-2);
  transition: background .4s var(--ease);
  transition-delay: calc(var(--i) * .35s + .2s);
}
.an-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--key-ink-2);
  margin-bottom: .7rem;
}
.an-step p { font-size: 1.12rem; line-height: 1.5; color: var(--key-ink); max-width: 26ch; }
.anatomy.is-in .an-step::before { transform: scaleX(1); }
.anatomy.is-in .an-step::after { background: var(--key-ink); }

/* the interruption */
.an-wall {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 0;
  text-align: center;
}
.an-wall::before {
  content: ''; display: block;
  width: 6px; height: 4.25rem;
  margin-top: -2.1rem;
  background: var(--key-accent);
  border-radius: 1px;
  transform: scaleY(0);
  transition: transform .5s var(--ease-out) 1.2s;
}
.an-wall span {
  margin-top: .9rem;
  font-family: var(--font-mono);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1.5;
  color: var(--key-accent);
  opacity: 0;
  transition: opacity .5s var(--ease) 1.5s;
}
.anatomy.is-in .an-wall::before { transform: scaleY(1); }
.anatomy.is-in .an-wall span { opacity: 1; }

/* the step that no longer happens */
.an-step--loss::before { background: none; border-top: 1px dashed var(--key-line); transform: none; }
.an-step--loss::after { border-color: var(--key-line); }
.anatomy.is-in .an-step--loss::after { background: var(--band); }
.an-step--loss .an-tag { color: #FF8B83; }
.an-step--loss p { color: var(--key-ink-2); text-decoration: line-through; text-decoration-color: rgba(255, 139, 131, .7); text-decoration-thickness: 1.5px; }

@media (max-width: 959px) {
  .an-step { padding: 0 0 2rem 2rem; }
  .an-step::before { top: 0; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; transform: scaleY(0); transform-origin: top; }
  .anatomy.is-in .an-step::before { transform: scaleY(1); }
  .an-step::after { top: .15rem; left: 0; }
  .an-step--loss::before { border-top: 0; border-left: 1px dashed var(--key-line); transform: none; }
  .an-wall { flex-direction: row; gap: .9rem; padding: 0 0 2rem 0; text-align: left; }
  .an-wall::before { width: 3.25rem; height: 6px; margin: 0 0 0 -1.3rem; transform: scaleX(0); transform-origin: left; }
  .anatomy.is-in .an-wall::before { transform: scaleX(1); }
  .an-wall span { margin-top: 0; }
}

.verdict-line {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--key-line);
  display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between; align-items: baseline;
}
.verdict-line p { font-size: 1.08rem; max-width: 62ch; }

/* ── Index of pages (home) ───────────────────────────── */
.index-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 2rem;
}
.index-grid a {
  display: flex; flex-direction: column; height: 100%;
  padding: 1.4rem 0 .5rem;
  border-top: 2px solid var(--ink);
  transition: border-color .25s var(--ease);
}
.index-grid .idx {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em;
  color: var(--ink-3);
}
.index-grid svg.glyph { width: 40px; height: 40px; margin: 1.4rem 0 1.2rem; color: var(--accent); }
.index-grid h3 { margin-bottom: .5rem; }
.index-grid p { font-size: .96rem; flex: 1; }
.index-grid .arrow-link { margin-top: 1.25rem; }
.index-grid a:hover { border-color: var(--accent); }
.index-grid a:hover .arrow-ico svg { transform: translateX(2px); }
.index-grid a:hover .arrow-ico::after { transform: scaleX(1); right: 2px; }
@media (max-width: 1000px) { .index-grid { grid-template-columns: 1fr 1fr; gap: 2.25rem 2rem; } }
@media (max-width: 560px)  { .index-grid { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ── Closing call to action ──────────────────────────── */
.cta {
  display: grid; gap: 2rem;
  align-items: end;
}
@media (min-width: 960px) {
  .cta { grid-template-columns: minmax(0, 1.3fr) auto; gap: 4rem; }
}
.cta h2 { max-width: 18ch; }
.cta .lead { margin-top: 1rem; }
.cta-fine { margin-top: .9rem; font-size: .86rem; color: var(--ink-3); }
.band .cta-fine { color: var(--key-ink-2); }

/* ── Phone frame ─────────────────────────────────────── */
.phone {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 9 / 18.6;
  border-radius: 34px;
  padding: 7px;
  background: #0E1117;
  box-shadow: var(--shadow-phone), inset 0 0 0 1px #2A303B;
  flex-shrink: 0;
}
.phone::after {
  content: ''; position: absolute;
  top: 15px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 5px; border-radius: 3px;
  background: #000;
  z-index: 2;
}
.phone img {
  width: 100%; height: 100%;
  border-radius: 27px;
  object-fit: cover;
  object-position: 50% var(--pos, 12%);
  background: #0B0E13;
}
/* cropped frame: shows only the band of the screenshot that
   carries the point */
.phone--crop { aspect-ratio: 9 / 13.5; }
.phone--crop img { border-radius: 26px; }

.figure { display: grid; justify-items: center; gap: 1rem; }
.figure figcaption {
  font-size: .86rem; color: var(--ink-3);
  text-align: center; max-width: 34ch;
}

/* ── Checkpoints (how it works) ──────────────────────── */
.checkpoints {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}
.cp { display: flex; flex-direction: column; }
.cp .phone { max-width: 260px; margin-inline: auto; }
.cp-meta {
  display: flex; align-items: center; gap: .8rem;
  margin-top: 2rem; padding-bottom: .9rem;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-text);
}
.cp-meta b { color: var(--ink); font-weight: 500; }
.cp h3 { margin-top: 1.1rem; }
.cp p { margin-top: .5rem; font-size: .98rem; }
@media (max-width: 900px) {
  .checkpoints { grid-template-columns: 1fr; gap: 2.25rem; }
  .cp {
    display: grid;
    grid-template-columns: minmax(0, 132px) minmax(0, 1fr);
    gap: 0 1.35rem;
    align-items: start;
  }
  .cp .phone { grid-row: 1 / span 3; max-width: 100%; border-radius: 22px; padding: 5px; }
  .cp .phone img { border-radius: 18px; }
  .cp .phone::after { top: 10px; width: 32px; height: 4px; }
  .cp-meta { margin-top: 0; }
}

/* ── Engine (how it works) ───────────────────────────── */
.engine { display: grid; align-items: stretch; }
@media (min-width: 1001px) {
  .engine {
    grid-template-columns: minmax(0, 1fr) clamp(4rem, 7vw, 7rem) minmax(13rem, 16rem) clamp(4rem, 7vw, 7rem) minmax(0, 1fr);
    grid-template-areas:
      "li .  .  .  lo"
      "in wi co wo out";
  }
  .engine [data-area="li"]  { grid-area: li; }
  .engine [data-area="in"]  { grid-area: in; }
  .engine [data-area="wi"]  { grid-area: wi; }
  .engine [data-area="co"]  { grid-area: co; }
  .engine [data-area="wo"]  { grid-area: wo; }
  .engine [data-area="lo"]  { grid-area: lo; }
  .engine [data-area="out"] { grid-area: out; }
}
.engine-col-label {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: .9rem;
}
.engine-in, .engine-out {
  list-style: none;
  display: grid;
  border-top: 1px solid var(--line-2);
}
.engine-in  { grid-template-rows: repeat(5, 1fr); }
.engine-out { grid-template-rows: repeat(4, 1fr); }
.engine-in li, .engine-out li {
  display: flex; align-items: center; gap: .85rem;
  border-bottom: 1px solid var(--line-2);
  padding: .85rem 0;
  min-height: 4.1rem;
}
.engine-in svg { width: 20px; height: 20px; color: var(--ink-2); flex-shrink: 0; }
.engine-in span { font-weight: 500; color: var(--ink); line-height: 1.3; }
.engine-in em {
  margin-left: auto; font-style: normal;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
}
.engine-out li { flex-direction: column; align-items: flex-start; justify-content: center; gap: .1rem; padding-left: 1rem; position: relative; }
.engine-out li::before {
  content: ''; position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 3px; background: var(--tone);
}
.engine-out strong { font-size: 1rem; color: var(--tone); }
.engine-out span { font-size: .86rem; color: var(--ink-3); }

.tone-safe    { --tone: var(--safe); }
.tone-caution { --tone: var(--caution); }
.tone-warn    { --tone: var(--warn); }
.tone-danger  { --tone: var(--danger); }

.engine-wires { width: 100%; height: 100%; overflow: visible; }
.engine-wires path {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}
.engine-wires path.pulse {
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-dasharray: 6 94;
  animation: pulse-run 2.8s linear infinite;
  animation-delay: var(--d, 0s);
}
@keyframes pulse-run { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

.engine-core {
  align-self: center;
  background: var(--key);
  color: var(--key-ink);
  padding: 1.6rem 1.4rem;
  text-align: center;
  display: grid; justify-items: center; gap: .55rem;
  box-shadow: var(--shadow);
}
.engine-core .eyebrow { margin: 0; color: var(--key-accent); }
.engine-core strong { color: var(--key-ink); font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -.02em; }
.engine-core p { color: var(--key-ink-2); font-size: .88rem; }
.engine-dial {
  width: 96px; height: 96px; margin: .4rem 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: .95rem;
  color: var(--key-ink);
  background:
    radial-gradient(circle, var(--key) 60%, transparent 61%),
    conic-gradient(from 225deg, var(--safe) 0 22%, var(--caution) 0 40%, var(--warn) 0 57%, var(--danger) 0 75%, var(--key-line) 0);
}
.engine-down { display: none; }

@media (max-width: 1000px) {
  .engine { grid-template-columns: 1fr; }
  .engine-wires { display: none; }
  .engine-core { justify-self: center; width: 100%; max-width: 360px; }
  .engine-down {
    display: grid; place-items: center;
    height: 3.25rem;
    color: var(--ink-3);
  }
  .engine-down svg { width: 20px; height: 20px; }
  .engine-in, .engine-out { grid-template-rows: none; }
  .engine-in li, .engine-out li { min-height: 0; }
}

/* ── Levels (how it works) ───────────────────────────── */
.levels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto auto auto auto;
  column-gap: 4px;
  padding-top: 1.75rem;
}
.level {
  grid-row: span 5;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 0;
}
.level-bar { height: 10px; background: var(--tone); }
.level-head { padding: 1.25rem 1.25rem 1rem 0; border-bottom: 1px solid var(--line-2); }
.level-head .mono { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tone); }
.level-head h3 { margin-top: .4rem; }
.level-row { padding: 1rem 1.25rem 1rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--ink-2); }
.level-row small {
  display: block; margin-bottom: .3rem;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
}
.level + .level .level-head,
.level + .level .level-row { padding-left: 1.1rem; }

/* the reading marker sweeps the scale once on reveal */
.levels-marker {
  position: absolute; top: 0; left: 0;
  width: 0; height: 0;
  border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-top: 10px solid var(--ink);
  transform: translateX(-7px);
  transition: left 2.6s cubic-bezier(.45, .05, .25, 1) .3s;
}
.levels.is-in .levels-marker { left: 96%; }

.levels-axis {
  display: flex; justify-content: space-between;
  margin-bottom: .6rem;
  font-family: var(--font-mono); font-size: .72rem; color: var(--ink-3);
}
@media (max-width: 900px) { .levels-axis { display: none; } }

@media (max-width: 900px) {
  .levels { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 2rem; padding-top: 0; }
  .level { grid-row: auto; grid-template-rows: none; display: block; }
  .level + .level .level-head,
  .level + .level .level-row { padding-left: 0; }
  .level-bar { height: 6px; }
  .levels-marker { display: none; }
}

/* ── Numbered reasoning list ─────────────────────────── */
.num-list { list-style: none; margin-top: 2rem; border-top: 1px solid var(--line-2); counter-reset: n; }
.num-list li {
  display: grid; grid-template-columns: 3rem 1fr;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem; color: var(--ink-2);
}
.num-list li::before {
  counter-increment: n; content: '0' counter(n);
  font-family: var(--font-mono); font-size: .8rem; color: var(--accent-text);
  padding-top: .2rem;
}
.num-list .t { display: block; color: var(--ink); margin-bottom: .15rem; font-size: 1.04rem; }

/* ── Rows: index / title / text ──────────────────────── */
.rows { list-style: none; border-top: 1px solid var(--line-2); }
.rows > li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, .9fr) minmax(0, 1.3fr);
  gap: .5rem 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line-2);
  align-items: baseline;
}
.rows .idx { font-family: var(--font-mono); font-size: .8rem; color: var(--accent-text); }
.rows h3 { font-size: clamp(1.2rem, 1.7vw, 1.45rem); }
.rows p { font-size: 1rem; }
.rows .row-tag {
  display: block; margin-top: .55rem;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
}
@media (max-width: 760px) {
  .rows > li { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .rows > li > p, .rows > li > div:last-child { grid-column: 2; }
}

/* ── Use cases (features) ────────────────────────────── */
.cases {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line-2);
  background: var(--surface);
}
@media (min-width: 820px) {
  .cases { grid-template-columns: 15rem minmax(0, 1fr); }
}
@media (min-width: 1180px) {
  .cases { grid-template-columns: 17.5rem minmax(0, 1fr); }
  .cases-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

.cases-nav {
  min-width: 0;
  padding: 1.75rem 1rem;
  border-right: 1px solid var(--line-2);
}
.cases-nav .fig-label { padding: 0 .75rem; margin-bottom: 1.1rem; }
.cases-tabs { display: grid; gap: .3rem; }
.case-tab {
  display: flex; align-items: center; gap: .85rem;
  width: 100%;
  padding: .85rem .75rem;
  border: 1px solid transparent;
  background: none;
  text-align: left;
  font-size: .98rem; font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.case-tab svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--ink-3); }
.case-tab .go { width: 13px; height: 13px; margin-left: auto; opacity: .6; }
.case-tab:hover { color: var(--ink); background: var(--surface-2); }
.case-tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.case-tab[aria-selected="true"] svg { color: var(--accent-text); }

.cases-panel { min-width: 0; }
.cases-panel[hidden] { display: none !important; }

.case-body { padding: clamp(1.5rem, 3vw, 2.5rem); min-width: 0; animation: case-in .45s var(--ease-out); }
.case-who {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .9rem; color: var(--accent-text);
}
.case-who svg { width: 16px; height: 16px; }
.case-body h3 { margin-top: 1.25rem; font-size: clamp(1.75rem, 2.8vw, 2.4rem); letter-spacing: -.035em; line-height: 1.08; }
.case-body > p { margin-top: 1.1rem; font-size: 1.03rem; }
.case-steps { list-style: none; margin-top: 1.6rem; display: grid; gap: .8rem; counter-reset: c; }
.case-steps li { display: grid; grid-template-columns: 2.4rem 1fr; font-size: .98rem; color: var(--ink); }
.case-steps li::before { counter-increment: c; content: '0' counter(c); font-family: var(--font-mono); font-size: .8rem; color: var(--accent-text); padding-top: .15rem; }
.case-checks {
  margin-top: 1.9rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line-2);
}
.case-checks .fig-label { margin-bottom: 1rem; }
.case-checks ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.case-checks li { display: flex; gap: .75rem; align-items: flex-start; }
.case-checks li > svg {
  width: 34px; height: 34px; padding: 8px; flex-shrink: 0;
  background: var(--key); color: var(--key-ink);
}
.case-checks strong { display: block; font-size: .95rem; line-height: 1.3; }
.case-checks span { display: block; font-size: .82rem; color: var(--accent-text); }

.case-example {
  margin: clamp(1rem, 2vw, 1.75rem);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  display: flex; flex-direction: column;
  min-width: 0;
  animation: case-in .45s var(--ease-out);
}
@keyframes case-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.case-example-top {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface);
}
.variant-toggle { display: inline-flex; border: 1px solid var(--line-2); padding: 2px; background: var(--surface-2); }
.variant-toggle button {
  border: 0; background: none; cursor: pointer;
  padding: .4rem .85rem;
  font-size: .86rem; font-weight: 500; color: var(--ink-3);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.variant-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.case-example-body { padding: 1.25rem 1.1rem 1.35rem; display: grid; gap: 1.1rem; }
.case-example [data-variant] { display: none; }
.case-example[data-show="genuine"] [data-variant="genuine"],
.case-example[data-show="scam"] [data-variant="scam"] { display: grid; gap: 1.1rem; animation: case-in .35s var(--ease-out); }

/* message mock */
.sms {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.05rem;
}
.sms-from { display: flex; justify-content: space-between; gap: 1rem; font-size: .84rem; margin-bottom: .55rem; }
.sms-from b { font-weight: 600; }
.sms-from span { color: var(--ink-3); font-family: var(--font-mono); font-size: .76rem; }
.sms p { font-size: .93rem; color: var(--ink); line-height: 1.55; }
.sms-link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }

.reads-as .fig-label { margin-bottom: .55rem; font-size: .66rem; }
.verdict {
  display: flex; align-items: center; gap: .9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: .85rem 1rem;
}
.verdict > svg { width: 20px; height: 20px; flex-shrink: 0; }
.verdict strong { display: block; font-size: .95rem; }
.verdict span { display: block; font-family: var(--font-mono); font-size: .76rem; color: var(--ink-3); }
.verdict .mark { margin-left: auto; width: 20px; height: 20px; }
.verdict--safe .mark   { color: var(--safe); }
.verdict--danger .mark { color: var(--danger); }
.verdict--safe > svg:first-child   { color: var(--safe); }
.verdict--danger > svg:first-child { color: var(--danger); }

.signal-tags { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .84rem; color: var(--danger); }
.signal-tags span { border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.example-note { font-size: .78rem; color: var(--ink-3); padding: 0 1.1rem 1rem; margin-top: auto; }

@media (max-width: 819px) {
  .cases-nav { border-right: 0; border-bottom: 1px solid var(--line-2); padding: 1.1rem 0 0; }
  .cases-nav .fig-label { padding: 0 1.1rem; margin-bottom: .6rem; }
  .cases-tabs {
    display: flex; gap: 0;
    overflow-x: auto; scrollbar-width: none;
    padding: 0 .5rem;
  }
  .cases-tabs::-webkit-scrollbar { display: none; }
  .case-tab {
    flex: 0 0 auto; width: auto;
    padding: .8rem .65rem;
    border: 0; border-bottom: 2px solid transparent;
    font-size: .92rem;
  }
  .case-tab .go { display: none; }
  .case-tab[aria-selected="true"] { background: none; border-bottom-color: var(--accent); }
  .case-checks ul { grid-template-columns: 1fr; }
  .case-example { margin: 0 1rem 1rem; }
}

/* ── Ledger: two columns of plain rows ───────────────── */
.ledger { display: grid; gap: 2.5rem clamp(2rem, 5vw, 5rem); }
@media (min-width: 860px) { .ledger { grid-template-columns: 1fr 1fr; } }
.ledger h3 {
  display: flex; align-items: center; gap: .65rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--tone);
}
.ledger h3 svg { width: 20px; height: 20px; color: var(--tone); }
.ledger ul { list-style: none; }
.ledger li {
  display: flex; gap: .85rem; align-items: baseline;
  padding: .95rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem; color: var(--ink);
}
.ledger li::before {
  content: ''; flex-shrink: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tone);
  transform: translateY(-2px);
}

/* ── Redaction example (privacy) ─────────────────────── */
.redact { width: 100%; max-width: 600px; border: 1px solid var(--line-2); background: var(--surface); }
.redact-row { padding: 1.15rem 1.3rem; }
.redact-row + .redact-row { border-top: 1px dashed var(--line-2); background: var(--surface-2); }
.redact-row p {
  margin-top: .55rem;
  font-family: var(--font-mono); font-size: .84rem; line-height: 1.85;
  color: var(--ink);
}
.redact mark { background: var(--caution-bg); color: var(--ink); padding: .1em .25em; }
.redact s {
  text-decoration: none;
  background: var(--ink); color: var(--bg);
  padding: .1em .45em;
  font-size: .72rem; letter-spacing: .04em;
}

/* ── Permissions table ───────────────────────────────── */
.perm { width: 100%; border-collapse: collapse; font-size: .98rem; }
.perm th {
  text-align: left; font-weight: 500;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 1.5rem .9rem 0;
  border-bottom: 1px solid var(--ink);
}
.perm td { padding: 1.3rem 1.5rem 1.3rem 0; border-bottom: 1px solid var(--line-2); vertical-align: top; color: var(--ink-2); }
.perm td:first-child { width: 22%; }
.perm td:first-child strong { display: flex; align-items: center; gap: .65rem; font-size: 1.05rem; }
.perm td:first-child svg { width: 19px; height: 19px; color: var(--accent-text); }
.perm td:last-child { width: 30%; }
.perm tr.perm-none td { color: var(--ink-3); }
@media (max-width: 760px) {
  .perm thead { display: none; }
  .perm, .perm tbody, .perm tr, .perm td { display: block; width: 100% !important; }
  .perm tr { padding: 1.2rem 0; border-bottom: 1px solid var(--line-2); }
  .perm td { border: 0; padding: .2rem 0; }
  .perm td:first-child { margin-bottom: .35rem; }
  .perm td[data-label]::before {
    content: attr(data-label);
    display: block; margin-top: .6rem; margin-bottom: .1rem;
    font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink-3);
  }
}

/* ── Note with a left rule ───────────────────────────── */
.note {
  border-left: 3px solid var(--tone, var(--accent));
  padding: .3rem 0 .3rem 1.4rem;
  max-width: 72ch;
}
.note h3 { font-size: 1.1rem; margin-bottom: .45rem; }
.note p { font-size: 1rem; }
.band .note p { color: var(--key-ink-2); }

/* ── Rules (safety) ──────────────────────────────────── */
.rules {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 3vw, 3rem);
  counter-reset: r;
}
.rules li {
  padding: 1.6rem 0 2.4rem;
  border-top: 1px solid var(--line-2);
}
.rules li::before {
  counter-increment: r; content: '0' counter(r);
  display: block;
  font-family: var(--font-display); font-weight: 500;
  font-size: 2.6rem; letter-spacing: -.04em; line-height: 1;
  color: var(--line-2);
  margin-bottom: 1.4rem;
  transition: color .3s var(--ease);
}
.rules li:hover::before { color: var(--accent); }
.rules h3 { margin-bottom: .6rem; }
.rules p { font-size: .98rem; }
@media (max-width: 960px) { .rules { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .rules { grid-template-columns: 1fr; }
  .rules li { display: grid; grid-template-columns: 3.5rem 1fr; padding: 1.4rem 0; }
  .rules li::before { font-size: 1.6rem; margin: 0; grid-row: span 2; }
}

/* ── Limits list ─────────────────────────────────────── */
.limits { list-style: none; border-top: 1px solid var(--line-2); }
.limits li {
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr);
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line-2);
}
.limits svg { width: 18px; height: 18px; color: var(--danger); margin-top: .3rem; }
.limits strong { display: block; font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -.02em; margin-bottom: .3rem; }
.limits p { font-size: 1rem; }

/* ── Emergency (safety, inverse band) ────────────────── */
.emergency { display: grid; gap: clamp(2.5rem, 5vw, 5rem); }
@media (min-width: 1000px) { .emergency { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.helpline {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(5rem, 13vw, 10rem); font-weight: 600;
  letter-spacing: -.06em; line-height: .9;
  color: var(--key-ink);
  margin-top: 1.5rem;
}
.helpline-label { margin-top: 1rem; font-size: 1.05rem; color: var(--key-ink-2); }
.helpline-label strong { color: var(--key-ink); }

.em-steps { list-style: none; border-top: 1px solid var(--key-line); }
.em-steps li {
  display: grid; grid-template-columns: 2.75rem minmax(0, 1fr);
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--key-line);
}
.em-steps .n { font-family: var(--font-mono); font-size: .8rem; color: var(--key-accent); padding-top: .25rem; }
.em-steps p { color: var(--key-ink); font-size: 1.05rem; }
.em-steps p strong { color: #fff; }
.em-steps small {
  display: block; margin-top: .45rem;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--key-ink-2);
}
.em-warn { margin-top: 2.5rem; --tone: #FF8B83; }
.em-foot { margin-top: 1.5rem; font-size: .84rem; color: var(--key-ink-2); max-width: 70ch; }

/* ── FAQ ─────────────────────────────────────────────── */
.faq-layout { display: grid; gap: clamp(2.5rem, 5vw, 3rem); }
@media (min-width: 1000px) {
  .faq-layout { grid-template-columns: minmax(0, .78fr) minmax(0, 1.45fr); gap: 6rem; align-items: start; }
  .faq-aside { position: sticky; top: calc(var(--nav-h) + 2.5rem); }
}
.faq-aside h1 { font-size: clamp(2.4rem, 4.6vw, 4rem); max-width: 12ch; }
.faq-aside .lead { margin-top: 1.4rem; font-size: 1.08rem; max-width: 36ch; color: var(--ink-3); }
.faq-aside .btn { margin-top: 2.25rem; }
.faq-mail { margin-top: 1rem; font-size: .9rem; color: var(--ink-3); }
.faq-mail a { color: var(--accent-text); border-bottom: 1px solid currentColor; word-break: break-all; }

.faq-filters {
  display: flex; flex-wrap: wrap; gap: .25rem 1.6rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-2);
}
.faq-filter {
  padding: .7rem 0;
  margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent;
  background: none;
  font-size: .95rem; font-weight: 500;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.faq-filter:hover { color: var(--ink); }
.faq-filter.is-active { color: var(--ink); border-bottom-color: var(--accent); }

.faq-group + .faq-group { margin-top: 2.75rem; }
.faq-group > h2 {
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .4rem;
}

.faq-item { border-bottom: 1px solid var(--line-2); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.5rem 1.1rem 1.5rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.5vw, 1.32rem); font-weight: 500;
  letter-spacing: -.015em; line-height: 1.3;
  color: var(--ink);
  transition: color .18s var(--ease), padding .3s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent-text); }
/* the plus that becomes a minus */
.faq-item summary i {
  position: relative; flex-shrink: 0;
  width: 18px; height: 18px;
}
.faq-item summary i::before, .faq-item summary i::after {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 100%; height: 1.5px; margin-top: -.75px;
  background: currentColor;
  transition: transform .3s var(--ease-out);
}
.faq-item summary i::after { transform: rotate(90deg); }
.faq-item[open] summary i::after { transform: rotate(0deg); }
.faq-item[open] { background: var(--surface); }
.faq-item[open] summary { padding-left: 1.1rem; }
.faq-body { padding: 0 1.1rem 1.6rem; max-width: 70ch; }
.faq-body p { font-size: 1.02rem; color: var(--ink-2); }
.faq-body p + p { margin-top: .8rem; }
.faq-body a { color: var(--accent-text); font-weight: 500; border-bottom: 1px solid currentColor; }

.faq-item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size .35s var(--ease-out), content-visibility .35s allow-discrete;
}
.faq-item[open]::details-content { block-size: auto; }

/* ── Standalone pages (download, coming soon) ────────── */
.dl { display: grid; gap: clamp(2.5rem, 5vw, 5rem); }
@media (min-width: 1000px) { .dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.dl h1 { font-size: clamp(2.6rem, 5.5vw, 4.8rem); }
.dl .lead { margin-top: 1.4rem; }
.dl .btn-row { margin-top: 2.25rem; }
.dl-meta { margin-top: 1rem; font-size: .88rem; color: var(--ink-3); }
.dl-block + .dl-block { margin-top: 2.75rem; }
.dl-block .fig-label { margin-bottom: .2rem; }

.soon { min-height: calc(100dvh - var(--nav-h) - 120px); display: grid; align-items: center; }
.soon h1 { max-width: 16ch; }
.soon .lead { margin-top: 1.4rem; }
.soon .btn-row { margin-top: 2.25rem; }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 3rem; } }
.footer-grid > :first-child { grid-column: 1 / -1; }
@media (min-width: 860px) { .footer-grid > :first-child { grid-column: auto; } }
.footer-tag { font-size: .95rem; color: var(--ink-3); margin-top: .9rem; max-width: 34ch; }
.footer-mail {
  display: inline-block; margin-top: 1.25rem;
  font-size: .95rem; font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.footer-mail:hover { color: var(--accent-text); border-color: currentColor; }
.fcol h4 {
  font-family: var(--font-mono);
  font-size: .7rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 1rem;
}
.fcol a {
  display: block;
  font-size: .95rem; color: var(--ink-2);
  padding: .32rem 0;
  transition: color .18s var(--ease);
}
.fcol a:hover { color: var(--accent-text); }

.footer-bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
  padding-block: 1.3rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem;
  justify-content: space-between; align-items: center;
  font-size: .84rem; color: var(--ink-3);
}
.upi-chip { font-weight: 700; font-style: italic; letter-spacing: -.02em; color: var(--ink-2); }

/* ── Letter roll on nav labels ───────────────────────── */
.roll { display: inline-flex; overflow: hidden; vertical-align: bottom; line-height: 1.25; }
.roll-ch {
  position: relative; display: inline-block; white-space: pre;
  transition: transform .34s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 18ms);
}
.roll-ch::after { content: attr(data-ch); position: absolute; left: 0; top: 100%; white-space: pre; }
a:hover .roll-ch, a:focus-visible .roll-ch { transform: translateY(-100%); }

/* ── Reveal on scroll ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .07s; }
.reveal:nth-child(3) { transition-delay: .14s; }
.reveal:nth-child(4) { transition-delay: .21s; }
/* lists that animate their own children appear at once */
.anatomy.reveal, .levels.reveal { transform: none; transition: opacity .4s var(--ease); }

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .flow-wire::after, .engine-wires path.pulse { display: none; }
  .roll-ch { transition: none; }
  a:hover .roll-ch, a:focus-visible .roll-ch { transform: none; }
}

/* ── Print ───────────────────────────────────────────── */
@media print {
  .nav, .footer, .hero-canvas { display: none; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}
