/* LabVision — design system.
   Dark, one typeface, thin large headlines, glass panels, one accent.
   Tokens first; everything below consumes them. */

:root {
  /* brand */
  --black:  #000000;
  --white:  #ffffff;
  --teal:   #53917e;          /* the one accent: the measured value */
  --teal-hi:#6fb39c;          /* teal lifted for text on black */
  --copper: #cd9e54;          /* warm: caveats, the honest card */
  --copper-mid: #956c2f;

  /* alpha */
  --w5:  rgba(255,255,255,.05);
  --w10: rgba(255,255,255,.10);
  --w25: rgba(255,255,255,.25);
  --w55: rgba(255,255,255,.55);
  --w80: rgba(255,255,255,.80);
  --b20: rgba(0,0,0,.20);
  --b80: rgba(0,0,0,.80);
  --grey80: #151515cc;

  /* semantic */
  --bg:        var(--black);
  --surface:   var(--w5);
  --surface-2: var(--w10);
  --nav:       var(--grey80);
  --fg:        var(--white);
  --fg-2:      var(--w80);
  --fg-3:      var(--w55);
  --accent:    var(--teal);
  --accent-fg: var(--white);
  --line:      var(--w10);
  --line-accent: var(--teal);
  --focus:     #4d65ff;
  --danger:    #e06a5e;

  /* overlay marks, as drawn on the picture */
  --mark-outline: #f2e75a;
  --mark-fill:    #e64bd0;
  --mark-sep:     #4ade80;
  --mark-valve:   #f0a050;

  /* type */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --fw-regular: 400; --fw-medium: 500;
  --fs-display: 6rem; --fs-h1: 4.75rem; --fs-h2: 4rem; --fs-h3: 3.5rem; --fs-h4: 3rem;
  --fs-h5: 2.25rem; --fs-h6: 1.5rem;
  --fs-xl: 2rem; --fs-lg: 1.5rem; --fs-md: 1.25rem; --fs: 1rem; --fs-sm: .875rem; --fs-xs: .75rem;
  --lh-sm: 1.1; --lh-md: 1.15; --lh-lg: 1.2; --lh-xl: 1.4; --lh-base: 1.5;

  /* spacing */
  --sp-4: .25rem; --sp-8: .5rem; --sp-12: .75rem; --sp-16: 1rem; --sp-20: 1.25rem;
  --sp-24: 1.5rem; --sp-32: 2rem; --sp-40: 2.5rem; --sp-48: 3rem; --sp-64: 4rem;
  --sp-90: 5.625rem; --sp-96: 6rem; --sp-120: 7.5rem; --sp-160: 10rem; --sp-180: 11.25rem;
  --section-gap: var(--sp-180);
  --block-gap: var(--sp-96);

  /* layout */
  --container-lg: 82rem; --container-md: 64rem; --container-sm: 48rem;
  --gutter: 5%;

  /* radii, blur, motion */
  --r-xs: .25rem; --r-sm: .5rem; --r-md: .75rem; --r-lg: 1.25rem; --r-xl: 2rem;
  --blur-xxs: 20px; --blur-xs: 40px; --blur-s: 80px; --blur-m: 100px; --blur-l: 200px;
  --ease-out: cubic-bezier(.25,.46,.45,.94);
  --dur-fast: .2s; --dur-base: .3s; --dur-slow: .6s; --dur-fade: 2s;
}

/* fluid root: 13→16px across 991→1440, flat 16 above, per the reference scale */
:root { --font-from: 16; --font-to: 16; --vw-from: 19.2; --vw-to: 24; }
@media (max-width: 1920px) { :root { --vw-from: 14.4; --vw-to: 19.2; } }
@media (max-width: 1440px) { :root { --font-from: 13; --font-to: 16; --vw-from: 9.91; --vw-to: 14.4; } }
@media (max-width: 991px)  { :root { --font-from: 14; --font-to: 16; --vw-from: 4.79; --vw-to: 9.91; } }
@media (max-width: 479px)  { :root { --font-from: 13; --font-to: 16; --vw-from: .01; --vw-to: 4.79; } }
html {
  --coef: calc((var(--font-to) - var(--font-from)) / (var(--vw-to) - var(--vw-from)));
  --base: calc((var(--font-from) - var(--vw-from) * var(--coef)) / 16);
  font-size: calc(var(--base) * 1rem + var(--coef) * 1vw);
}
@media (max-width: 767px) {
  :root {
    --fs-display: 3rem; --fs-h1: 3rem; --fs-h2: 3rem; --fs-h3: 2.25rem; --fs-h4: 2.25rem;
    --fs-h5: 1.5rem; --fs-h6: 1.25rem; --fs-lg: 1.125rem; --fs-md: 1rem; --lh-sm: 1.15;
    --sp-90: 3.375rem; --sp-120: 6rem; --sp-160: 6.5rem; --sp-180: 6.75rem; --r-lg: .75rem;
  }
}
@media (max-width: 479px) { :root { --fs-h1: 2.5rem; --gutter: 1rem; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { scroll-behavior: smooth; }
html, body { overscroll-behavior: none; }
body {
  margin: 0; background: var(--bg); color: var(--fg-2);
  font-family: var(--font); font-size: var(--fs); line-height: var(--lh-base);
  font-weight: var(--fw-regular);
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { color: var(--fg); font-weight: var(--fw-regular); margin: 0; letter-spacing: 0; }
.h-display { font-size: var(--fs-display); line-height: var(--lh-sm); }
.h1 { font-size: var(--fs-h1); line-height: var(--lh-sm); }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-md); }
.h3 { font-size: var(--fs-h3); line-height: var(--lh-md); }
.h4 { font-size: var(--fs-h4); line-height: var(--lh-md); }
.h5 { font-size: var(--fs-h5); line-height: var(--lh-lg); }
.h6 { font-size: var(--fs-h6); line-height: var(--lh-lg); }
p { margin: 0; }
.t-xl { font-size: var(--fs-xl); line-height: var(--lh-xl); }
.t-lg { font-size: var(--fs-lg); line-height: var(--lh-xl); }
.t-md { font-size: var(--fs-md); line-height: var(--lh-xl); }
.t-sm { font-size: var(--fs-sm); line-height: var(--lh-xl); }
.t-xs { font-size: var(--fs-xs); line-height: var(--lh-xl); }
.c-accent { color: var(--teal-hi); }
.c-white { color: var(--fg); }
.c-muted { color: var(--fg-3); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
strong { font-weight: var(--fw-medium); color: var(--fg); }
::selection { background: var(--teal); color: var(--white); }
:focus-visible { outline: .125rem solid var(--focus); outline-offset: .125rem; }
.main { max-width: 100%; overflow: clip; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- layout ---------- */
.pad { padding-left: var(--gutter); padding-right: var(--gutter); }
.container { max-width: var(--container-lg); margin: 0 auto; width: 100%; }
.container-md { max-width: var(--container-md); margin: 0 auto; width: 100%; }
.container-sm { max-width: var(--container-sm); margin: 0 auto; width: 100%; }
.maxw-xl { max-width: 64rem; } .maxw-lg { max-width: 48rem; } .maxw-md { max-width: 35rem; } .maxw-sm { max-width: 30rem; }
.ml-auto { margin-left: auto; }
.gap-section { padding-top: var(--section-gap); }
.gap-block { padding-top: var(--block-gap); }
.gap-64 { padding-top: var(--sp-64); } .gap-48 { padding-top: var(--sp-48); } .gap-32 { padding-top: var(--sp-32); }
.gap-24 { padding-top: var(--sp-24); } .gap-16 { padding-top: var(--sp-16); } .gap-12 { padding-top: var(--sp-12); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-64); align-items: start; }
.grid-2.tight { gap: var(--sp-32); }
.grid-2.wide-left { grid-template-columns: 1.1fr 1fr; }
.grid-2.end { align-items: end; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-32); }
@media (max-width: 991px) {
  .grid-2, .grid-2.wide-left { grid-template-columns: 1fr; gap: var(--sp-40); }
  .grid-3 { grid-template-columns: 1fr; gap: var(--sp-24); }
}

/* ---------- eyebrow ---------- */
.eyebrow {
  display: flex; align-items: center; gap: var(--sp-12);
  font-size: var(--fs-sm); text-transform: uppercase; color: var(--fg); margin-bottom: var(--sp-24);
}
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 100%; background: var(--teal); flex: none; }
.eyebrow.copper::before { background: var(--copper); }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--fs-xs); line-height: var(--lh-xl); padding: .375rem .5rem;
  border-radius: var(--r-xs); background: var(--w10); color: var(--fg);
}
.chip.dark { background: var(--black); }
.chip.teal { background: var(--teal); color: var(--white); }
.chip.copper { background: var(--copper); color: var(--black); }
.chip.ghost { background: transparent; border: 1px solid var(--line); color: var(--fg-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .625rem;
  padding: .875rem 1.25rem; border-radius: var(--r-md); border: 0;
  background: var(--white); color: var(--black);
  font: inherit; font-size: var(--fs); line-height: var(--lh-sm); font-weight: var(--fw-medium);
  cursor: pointer; transition: background var(--dur-base) linear, color var(--dur-base) linear, opacity var(--dur-base);
  text-decoration: none; white-space: nowrap;
}
.btn .arrow { width: 16px; height: 16px; flex: none; color: var(--teal); transition: transform var(--dur-base) var(--ease-out), color var(--dur-base) linear; }
.btn:hover { background: var(--teal); color: var(--white); }
.btn:hover .arrow { transform: translateX(-4px); color: var(--white); }
.btn.dark { background: var(--black); color: var(--white); }
.btn.dark .arrow { color: var(--teal-hi); }
.btn.dark:hover { background: var(--teal); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--teal); border-color: var(--teal); }
.btn.text { background: transparent; color: var(--fg); padding: 0; border-radius: 0; }
.btn.text:hover { background: transparent; color: var(--fg); }
.btn.text:hover .arrow { color: var(--teal-hi); }
.btn.sm { padding: .5rem .75rem; font-size: var(--fs-sm); border-radius: var(--r-xs); }
.btn.down .arrow { transform: rotate(90deg); }
.btn.down:hover .arrow { transform: rotate(90deg) translateX(-4px); }
.btn.ext .arrow { transform: rotate(-45deg); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; justify-content: center; }
.link { text-decoration: underline; text-underline-offset: .2em; color: var(--fg); transition: color var(--dur-base) linear; }
.link:hover { color: var(--teal-hi); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 999; margin-top: var(--sp-12); padding: 0 var(--gutter); font-size: var(--fs-sm); pointer-events: none; }
.nav-in {
  pointer-events: auto;
  max-width: var(--container-lg); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-16);
  padding: .75rem .75rem .75rem 2rem; border-radius: var(--r-xs);
  background: var(--nav); backdrop-filter: blur(var(--blur-l)); -webkit-backdrop-filter: blur(var(--blur-l));
}
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--fg); font-weight: var(--fw-medium); font-size: 1rem; letter-spacing: 0; }
.brand svg { width: 22px; height: 22px; }
/* the mark: a camera's corners around a liquid eye — two soft curves meeting like
   a lid, and a teal drop for the pupil. On load the drop settles into place;
   hovering the brand replays it. */
.js .brand .lv-drop { transform-origin: 12px 12px; animation: lv-fall 1.2s cubic-bezier(.25,.46,.45,.94) .35s both; }
@keyframes lv-fall { 0% { transform: translateY(-2.6px) scale(.6); opacity: 0; } 40% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.brand:hover .lv-drop { animation: lv-fall .9s cubic-bezier(.25,.46,.45,.94) both; }
@media (prefers-reduced-motion: reduce) { .brand .lv-drop { animation: none !important; } }
.nav-links { display: flex; align-items: center; margin: 0 auto; }
.nav-links a { padding: .375rem .75rem; line-height: var(--lh-sm); color: var(--fg); transition: color var(--dur-base) linear; }
.nav-links a:hover { color: var(--teal-hi); }
.nav-links a[aria-current] { color: var(--fg-2); }
.nav-cta {
  background: var(--white); color: var(--black); font-size: var(--fs-xs); font-weight: var(--fw-medium);
  padding: .5rem .75rem; border-radius: var(--r-xs); line-height: var(--lh-sm);
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.nav-cta:hover { background: var(--teal); color: var(--white); }
.nav-burger { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--fg); }
.nav-burger span { display: block; width: 22px; height: 1.5px; background: currentColor; margin: 5px 0; transition: transform var(--dur-base), opacity var(--dur-base); }
@media (max-width: 991px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .nav.open .nav-in { flex-wrap: wrap; }
  .nav.open .nav-links { display: flex; flex-direction: column; align-items: stretch; width: 100%; order: 3; padding-top: var(--sp-12); }
  .nav.open .nav-links a { text-align: center; font-size: var(--fs-md); padding: .875rem 0; border-bottom: 1px solid var(--line); }
  .nav.open .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav.open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.open .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ---------- hero ---------- */
.hero { position: relative; width: 100%; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.35)), linear-gradient(to top, #000 0%, rgba(0,0,0,.85) 22%, transparent 48%); pointer-events: none; }
@media (max-width: 767px) { .hero::after { background: linear-gradient(rgba(0,0,0,.3), rgba(0,0,0,.3)), linear-gradient(to top, #000 0%, #000 30%, transparent 58%); } }
.hero-in { position: relative; z-index: 2; width: 100%; padding: 0 var(--gutter) var(--sp-64); }
.hero-grid { max-width: var(--container-lg); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: var(--sp-32); }
.hero h1 { font-size: var(--fs-h3); line-height: var(--lh-md); max-width: 15ch; }
.hero .lede { color: var(--fg-2); max-width: 36rem; margin-top: var(--sp-24); }
.hero-readout { position: absolute; z-index: 2; right: var(--gutter); top: 6rem; display: grid; gap: .25rem; font-family: var(--mono); font-size: var(--fs-xs); color: var(--fg-3); text-align: right; pointer-events: none; }
.hero-readout b { color: var(--fg); font-weight: 500; }
.hero-readout .state { color: var(--mark-sep); }
.hero-readout .state.refused { color: var(--copper); }
@media (max-width: 767px) { .hero-grid { grid-template-columns: 1fr; } .hero-readout { display: none; } .hero h1 { max-width: none; } }

/* ---------- section basics ---------- */
section { position: relative; }
.glass {
  background: var(--surface); border-radius: var(--r-lg);
  backdrop-filter: blur(var(--blur-m)); -webkit-backdrop-filter: blur(var(--blur-m));
  padding: var(--sp-40);
}
.glass.blur-s { backdrop-filter: blur(var(--blur-s)); -webkit-backdrop-filter: blur(var(--blur-s)); }
.glass.tight { padding: var(--sp-20); }
.glow { position: absolute; pointer-events: none; z-index: -1; border-radius: 50%; filter: blur(80px); opacity: .55; }
.glow.teal { background: radial-gradient(closest-side, rgba(83,145,126,.55), transparent); }
.glow.copper { background: radial-gradient(closest-side, rgba(205,158,84,.35), transparent); }
.sep { height: 1px; background: var(--line); position: relative; overflow: hidden; }
.sep::after { content: ''; position: absolute; inset: 0; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform 350ms ease-out; }
.hover-sep:hover .sep::after, .sep.on::after { transform: scaleX(1); }

/* ---------- intro (three statements) ---------- */
.intro { max-width: 68rem; margin-left: auto; }
.intro .h4 + .h4 { margin-top: 3.5rem; }
.intro .h4 { max-width: 57.4rem; }

/* ---------- stats row ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-32); }
.stat { border-left: 1px solid var(--line); padding-left: var(--sp-32); max-width: 22rem; }
.stat .n { font-size: 5rem; line-height: 1; font-weight: var(--fw-medium); color: var(--fg); display: block; }
.stat .n small { font-size: .35em; color: var(--fg-3); font-weight: 400; margin-left: .15em; }
.stat .k { display: block; margin-top: var(--sp-16); color: var(--fg-2); font-size: var(--fs); line-height: var(--lh-xl); }
@media (max-width: 991px) { .stats { grid-template-columns: 1fr 1fr; } .stat .n { font-size: 3.5rem; } }
@media (max-width: 479px) { .stats { grid-template-columns: 1fr; } }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-24);
  backdrop-filter: blur(var(--blur-s)); -webkit-backdrop-filter: blur(var(--blur-s));
  display: flex; flex-direction: column; gap: var(--sp-16);
}
.card .glyph { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--teal-hi); }
.card h3 { font-size: var(--fs-md); line-height: var(--lh-lg); }
.card p { color: var(--fg-2); font-size: var(--fs); }
.card.copper-edge { border-top: 1px solid var(--copper); }

/* ---------- procedures carousel ---------- */
.rail-wrap { position: relative; }
.rail {
  display: flex; gap: var(--sp-32); overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 4px; cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.proc {
  flex: 0 0 29%; min-width: 19rem; height: 32.5rem; scroll-snap-align: start;
  position: relative; border-radius: var(--r-lg); overflow: hidden; background: #0b0d0c;
  display: flex; flex-direction: column;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.proc .art { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; }
.proc .art svg { position: absolute; inset: 0; margin: auto; height: min(62%, 11.5rem); width: auto; max-width: 80%; overflow: visible; transition: transform 300ms ease; transform-origin: center; }
.proc:hover .art svg { transform: scale(1.12); }
.proc .art .st { fill: none; stroke: rgba(255,255,255,.5); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.proc .art .st2 { fill: none; stroke: var(--teal-hi); stroke-width: 1.6; stroke-linecap: round; }
.proc .art .st3 { fill: none; stroke: var(--mark-fill); stroke-width: 1.6; stroke-dasharray: 5 5; }
.proc .art .fill { fill: rgba(83,145,126,.22); }
.proc .art .fill2 { fill: rgba(205,158,84,.25); }
.proc .art .glass { fill: rgba(255,255,255,.04); }
.proc-text {
  flex: none; position: relative; padding: var(--sp-24);
  background: linear-gradient(90deg, rgba(0,0,0,.2), rgba(0,0,0,.8));
  backdrop-filter: blur(var(--blur-xs)); -webkit-backdrop-filter: blur(var(--blur-xs));
  display: flex; flex-direction: column; gap: var(--sp-12);
}
.proc-text .row { display: flex; align-items: center; gap: var(--sp-12); }
.proc-text h3 { font-size: var(--fs-h6); line-height: var(--lh-lg); }
.proc-text p { color: var(--fg-2); font-size: var(--fs-sm); }
.proc.built { outline: 1px solid rgba(83,145,126,.5); outline-offset: -1px; }
.rail-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-16); margin-top: var(--sp-32); }
.rail-arrows { display: flex; gap: var(--sp-12); }
.box-arrow {
  width: 3rem; height: 3rem; display: grid; place-items: center; border: 0; cursor: pointer;
  border-radius: var(--r-xs); background: var(--w5); color: var(--fg);
  backdrop-filter: blur(var(--blur-xxs)); transition: background var(--dur-base) linear;
}
.box-arrow:hover { background: var(--teal); }
.box-arrow svg { width: 16px; height: 16px; }
.box-arrow.prev svg { transform: rotate(180deg); }
@media (max-width: 991px) { .proc { flex-basis: 46%; } }
@media (max-width: 767px) { .proc { flex-basis: 84%; height: auto; min-height: 26rem; } .proc .art { min-height: 13rem; } }

/* ---------- tables ---------- */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 560px; }
th, td { text-align: left; padding: .875rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--fg-2); }
th { font-size: var(--fs-xs); text-transform: uppercase; color: var(--fg-3); font-weight: var(--fw-medium); }
td.num, td.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--fg); }
tr:last-child td { border-bottom: 0; }
.pass { color: var(--teal-hi); font-family: var(--mono); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }

/* ---------- chart ---------- */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--fg-3); font-family: var(--mono); font-size: 11px; }
.chart .axis .lbl { fill: var(--fg-3); font-family: var(--font); font-size: 11px; }
.chart .series path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .rule line { stroke: var(--fg-3); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .rule text { fill: var(--fg-2); font-family: var(--mono); font-size: 11px; }
.chart .endlabel { fill: var(--fg); font-family: var(--font); font-size: 12px; }
.chart .crosshair line { stroke: var(--fg-3); stroke-width: 1; }
.chart .crosshair circle { stroke: var(--bg); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .legend { display: flex; flex-wrap: wrap; gap: var(--sp-16) var(--sp-24); margin-top: var(--sp-16); font-size: var(--fs-sm); color: var(--fg-2); }
.chart .legend span { display: inline-flex; align-items: center; gap: .5rem; }
.chart .legend i { width: 18px; height: 2px; border-radius: 1px; display: inline-block; }
.tip {
  position: absolute; pointer-events: none; z-index: 5; display: none;
  background: var(--grey80); backdrop-filter: blur(var(--blur-xs)); border-radius: var(--r-sm);
  padding: .5rem .75rem; font-size: var(--fs-xs); line-height: 1.5; color: var(--fg); min-width: 12rem;
}
.tip.show { display: block; }
.tip b { font-weight: 500; }
.tip .r { display: flex; justify-content: space-between; gap: 1rem; }
.tip .r i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: .4rem; }
.tbl-toggle { display: inline-flex; gap: .25rem; padding: .25rem; background: var(--w5); border-radius: var(--r-xs); }
.tbl-toggle button { background: transparent; border: 0; color: var(--fg-2); font: inherit; font-size: var(--fs-xs); padding: .375rem .625rem; border-radius: var(--r-xs); cursor: pointer; }
.tbl-toggle button[aria-pressed="true"] { background: var(--w10); color: var(--fg); }
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-16); }
.split .bar { height: 6px; border-radius: 3px; background: var(--w10); overflow: hidden; }
.split .bar i { display: block; height: 100%; background: var(--teal); border-radius: 3px; }
.split .v { font-family: var(--mono); font-size: var(--fs-lg); color: var(--fg); }
.split .k { font-size: var(--fs-sm); color: var(--fg-3); }
@media (max-width: 767px) { .split { grid-template-columns: 1fr; } }

/* ---------- evidence cards ---------- */
.evidence { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-16); }
.ev { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-20); display: flex; flex-direction: column; gap: var(--sp-8); }
.ev .n { font-size: var(--fs-h5); line-height: 1; color: var(--fg); font-weight: var(--fw-medium); }
.ev .lead { color: var(--fg-2); font-size: var(--fs-sm); line-height: var(--lh-xl); }
.ev .src { color: var(--fg-3); font-size: var(--fs-xs); margin-top: auto; padding-top: var(--sp-8); }
.ev .src a { text-decoration: underline; text-underline-offset: .15em; }
.ev .src a:hover { color: var(--teal-hi); }
@media (max-width: 991px) { .evidence { grid-template-columns: 1fr 1fr; } }
@media (max-width: 479px) { .evidence { grid-template-columns: 1fr; } }
.fig { margin: 0; }
.fig-btn { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; background: #fff; cursor: zoom-in; }
.fig-btn img { width: 100%; height: auto; display: block; }
.fig figcaption { color: var(--fg-3); font-size: var(--fs-xs); line-height: var(--lh-xl); margin-top: var(--sp-12); }
.fig figcaption a { text-decoration: underline; text-underline-offset: .15em; }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--r-sm); background: #fff; }
.lightbox-close { position: absolute; top: 1rem; right: 1.25rem; font-size: 2rem; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-24); padding: var(--sp-24) 0; font-size: var(--fs-md); color: var(--fg); transition: color var(--dur-base) linear; }
.faq summary:hover { color: var(--teal-hi); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 16px; height: 16px; flex: none; color: var(--teal-hi); transition: transform var(--dur-base) var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq .a { color: var(--fg-2); font-size: var(--fs); max-width: 48rem; padding: 0 0 var(--sp-24); }
.faq .a p + p { margin-top: var(--sp-12); }
.faq .a a { text-decoration: underline; text-underline-offset: .15em; }

/* ---------- CTA (light) ---------- */
.cta { border-radius: var(--r-lg); padding: var(--sp-40); overflow: hidden; position: relative;
  background: linear-gradient(135deg, #e8efe9 0%, #cfe0d6 45%, #b9cfc5 100%); color: var(--b80); }
.cta h2 { color: var(--black); }
.cta p { color: var(--b80); }
.cta .btn { background: var(--black); color: var(--white); }
.cta .btn .arrow { color: var(--teal-hi); }
.cta .btn:hover { background: var(--teal); }
.cta canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.cta-in { position: relative; z-index: 1; }

/* ---------- forms ---------- */
.field { margin-bottom: var(--sp-16); }
label { display: block; font-size: var(--fs-sm); color: var(--fg); margin-bottom: .4rem; }
label .opt { color: var(--fg-3); }
input, textarea, select {
  width: 100%; padding: .75rem .875rem; font: inherit; font-size: var(--fs); color: var(--fg);
  background: var(--w5); border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color var(--dur-base) linear;
}
input::placeholder, textarea::placeholder { color: var(--fg-3); }
input:hover, textarea:hover, select:hover { border-color: var(--w25); }
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--teal); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23ffffff' stroke-opacity='.6' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .875rem center; padding-right: 2.25rem; }
select option { background: #151515; color: #fff; }
textarea { min-height: 7rem; resize: vertical; }
.form-note { font-size: var(--fs-xs); color: var(--fg-3); margin-top: var(--sp-12); }
.msg { display: none; padding: .75rem 1rem; border-radius: var(--r-sm); font-size: var(--fs-sm); margin-bottom: var(--sp-16); }
.msg.show { display: block; }
.msg.ok { background: rgba(83,145,126,.18); color: var(--teal-hi); }
.msg.err { background: rgba(224,106,94,.15); color: var(--danger); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-16); }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }
.expander > summary { list-style: none; width: fit-content; }
.expander > summary::-webkit-details-marker { display: none; }
.expander[open] > summary { display: none; }
.strip { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr auto; gap: var(--sp-12); align-items: end; }
.strip .field { margin: 0; }
.strip .btn { height: 3.1rem; }
@media (max-width: 767px) { .strip { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { padding: var(--sp-96) 0 var(--sp-40); }
.footer-in {
  background: var(--surface); border-radius: var(--r-lg); backdrop-filter: blur(var(--blur-m));
  padding: var(--sp-120) var(--sp-90) var(--sp-40); position: relative; overflow: hidden; font-size: var(--fs-sm); color: var(--fg);
}
.footer-top { display: grid; grid-template-columns: .5fr 1fr .5fr; align-items: center; gap: var(--sp-32); }
.footer-links { display: flex; flex-direction: column; gap: var(--sp-12); max-width: 15rem; }
.footer-links a, .footer-bottom a { line-height: 1.7; transition: color var(--dur-base) linear; }
.footer-links a:hover, .footer-bottom a:hover { color: var(--teal-hi); }
.footer-mark { display: grid; place-items: center; }
.footer-mark svg { width: 64px; height: 64px; }
.footer-right { display: flex; flex-direction: column; gap: var(--sp-12); align-items: flex-end; text-align: right; color: var(--fg-2); }
.footer-bottom { display: flex; justify-content: space-between; gap: var(--sp-24); flex-wrap: wrap; margin-top: var(--sp-96); padding-top: var(--sp-24); border-top: 1px solid var(--line); color: var(--fg-2); }
.footer-bottom nav { display: flex; gap: var(--sp-24); }
@media (max-width: 767px) {
  .footer-in { padding: var(--sp-64) var(--sp-24) var(--sp-24); }
  .footer-top { grid-template-columns: 1fr; }
  .footer-right { align-items: flex-start; text-align: left; }
  .footer-bottom { margin-top: var(--sp-48); }
}

/* ---------- demo player + gate ---------- */
.gate { max-width: 30rem; margin: 0 auto; }
.player { background: #000; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1920 / 816; }
.player iframe, .player video { width: 100%; height: 100%; border: 0; display: block; }
.views-left { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--mono); font-size: var(--fs-xs); color: var(--fg-2); border: 1px solid var(--line); padding: .375rem .75rem; border-radius: 999px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-hi); flex: none; }
.dot.spent { background: var(--fg-3); opacity: .4; }
.rec-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--sp-12); }
.rec-card {
  appearance: none; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid transparent; border-radius: var(--r-md); padding: .875rem 1rem;
  display: flex; flex-direction: column; gap: .25rem; transition: border-color var(--dur-base) linear, background var(--dur-base) linear;
}
.rec-card:hover { border-color: var(--teal); }
.rec-card[aria-pressed="true"] { border-color: var(--teal); background: rgba(83,145,126,.15); }
.rec-card .rc-t { font-size: var(--fs); color: var(--fg); }
.rec-card .rc-s { font-family: var(--mono); font-size: var(--fs-xs); color: var(--fg-3); }
.key { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--sp-16); }
.key .kn { display: block; font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--teal-hi); margin-bottom: .25rem; }
.key .kd { font-size: var(--fs-sm); color: var(--fg-2); }

/* ---------- admin ---------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: var(--sp-32); flex-wrap: wrap; }
.tabs button { padding: .75rem 1rem; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--fg-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--teal); }
.link-out { font-family: var(--mono); font-size: var(--fs-xs); word-break: break-all; color: var(--teal-hi); }
.badge { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 4px; background: var(--w5); color: var(--fg-2); border: 1px solid var(--line); }
.badge.live { color: var(--teal-hi); border-color: var(--teal); }
.badge.dead { color: var(--fg-3); }
.empty { color: var(--fg-3); font-size: var(--fs-sm); padding: var(--sp-32) 0; text-align: center; }

/* ---------- reveal animations ----------
   Words rise out of a mask (headlines), or a slow 2 s fade (copy).
   Nothing is hidden without JS: the html.js class gates all of it. */
.js [data-reveal="words"] .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.js [data-reveal="words"] .w > span { display: inline-block; transform: translateY(105%); opacity: 0; transition: transform .6s var(--ease-out), opacity .6s var(--ease-out); }
.js [data-reveal="words"].in .w > span { transform: none; opacity: 1; }
.js [data-reveal="fade"] { opacity: 0; transition: opacity var(--dur-fade) ease; }
.js [data-reveal="fade"].in { opacity: 1; }
.js [data-reveal="up"] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js [data-reveal="up"].in { opacity: 1; transform: none; }
.js [data-reveal="stagger"] > * { opacity: .4; transform: translateY(40px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.js [data-reveal="stagger"].in > * { opacity: 1; transform: none; }
.js .btn:not(.in-static) { opacity: .2; transition: opacity var(--dur-base), background var(--dur-base) linear, color var(--dur-base) linear; }
.js .btn.in, .js .in .btn, .js .nav .btn, .js .nav-cta { opacity: 1; }
.js .nav { opacity: 0; transform: translateY(-100%); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js .nav.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] .w > span, .js [data-reveal], .js [data-reveal="stagger"] > *, .js .btn, .js .nav { opacity: 1 !important; transform: none !important; }
}
