/* noolog — White-Flame theme. Tokens mirror the app (crates/noolog-ui/ui/theme.slint) so the
   landing and product read as one system: teal consensus, orange contest, purple novelty, white
   flame; dark "negative-film" moon-sky as the signature look, light as the day fallback. */

:root {
  /* semantic accents — identical to the app */
  --consensus: #009E97;   /* teal — convergence */
  --orange: #FF9500;      /* contest / fork */
  --novel: #AF52DE;       /* novelty */
  --agency: #FFC83D;      /* gold — the conversion CTA */
  --flame: #FFFFFF;       /* the white flame */

  /* type */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* spacing scale (app sp-*) */
  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 16px; --sp-lg: 24px; --sp-xl: 32px;

  /* light (day) — app light palette */
  --bg: #FFFFFF;
  --panel: #F5F5F5;
  --border: #E5E5EA;
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --flame-glow: #C8C8CE;
  --starfield: transparent;
}

/* Follow the OS: white/light-grey ("Apple for Sovereignty") by day, the app's signature
   negative-film navy by night. Either can be forced via the [data-theme] toggle below. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060A18;
    --panel: #0C1226;
    --border: #1E2C48;
    --text-primary: #EAF2FF;
    --text-secondary: #93A6C4;
    --flame-glow: #BFE9FF;
    --starfield: radial-gradient(1px 1px at 20% 30%, rgba(147,166,196,.5), transparent),
                 radial-gradient(1px 1px at 70% 20%, rgba(0,158,151,.35), transparent),
                 radial-gradient(1px 1px at 45% 70%, rgba(191,233,255,.35), transparent),
                 radial-gradient(1px 1px at 85% 60%, rgba(147,166,196,.4), transparent);
  }
}
:root[data-theme="light"] {
  --bg: #FFFFFF; --panel: #F5F5F5; --border: #E5E5EA;
  --text-primary: #1D1D1F; --text-secondary: #6E6E73; --flame-glow: #C8C8CE; --starfield: transparent;
}
:root[data-theme="dark"] {
  --bg: #060A18; --panel: #0C1226; --border: #1E2C48;
  --text-primary: #EAF2FF; --text-secondary: #93A6C4; --flame-glow: #BFE9FF;
  --starfield: radial-gradient(1px 1px at 20% 30%, rgba(147,166,196,.5), transparent),
               radial-gradient(1px 1px at 70% 20%, rgba(0,158,151,.35), transparent),
               radial-gradient(1px 1px at 45% 70%, rgba(191,233,255,.35), transparent),
               radial-gradient(1px 1px at 85% 60%, rgba(147,166,196,.4), transparent);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  background-image: var(--starfield);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1040px; margin: 0 auto; padding: var(--sp-xl) var(--sp-lg); }

/* ---- wordmark / hero ---- */
.brand { display: flex; align-items: center; justify-content: center; gap: 14px; }
/* Real app logotype (assets/sun_logo.svg) painted via CSS mask so it takes the theme colour,
   exactly like the app's Image { colorize: text-primary }. */
.brand .mark {
  width: 44px; height: 44px; display: inline-block;
  background: var(--text-primary);
  -webkit-mask: url("../assets/sun_logo.svg") center / contain no-repeat;
  mask: url("../assets/sun_logo.svg") center / contain no-repeat;
}
.brand h1 { font-size: 44px; font-weight: 700; letter-spacing: -0.5px; }

header.hero { text-align: center; padding: 72px 0 56px; border-bottom: 1px solid var(--border); }
.subtitle {
  font-size: 19px; color: var(--text-secondary);
  max-width: 640px; margin: var(--sp-md) auto 0;
}
.kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--consensus); margin-bottom: 10px;
}
.cta-row { display: flex; gap: var(--sp-sm); justify-content: center; margin-top: var(--sp-lg); flex-wrap: wrap; }

/* ---- kinetic flying-hero (pretext-measured word flyby, Gear-5 spring from motion.css) ---- */
.fly { min-height: 1.8em; margin: 10px 0 2px; font-family: var(--font-mono); font-size: 22px; color: var(--consensus); letter-spacing: .2px; }
.fly-wrap { display: inline-block; }
.fly-word {
  display: inline-block; opacity: 0;
  transform: translateY(16px) scale(.96);
  transition: opacity 500ms var(--spring), transform 620ms var(--spring);
}
.fly-word.in { opacity: 1; transform: none; }

/* ---- sovereignty trust cue (matches the app's "keys never leave device" badge) ---- */
.trust {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(0,158,151,.4); background: rgba(0,158,151,.08);
  border-radius: 8px; padding: 5px 11px; margin-top: var(--sp-md);
  font-family: var(--font-mono); font-size: 12px; color: var(--consensus);
}
.trust .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--consensus); }

section { margin: 72px 0; }
section h2 { font-size: 28px; font-weight: 600; margin-bottom: var(--sp-lg); }
.section-kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: 6px;
}

/* ---- audit-trace hero panel ---- */
.trace-demo {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 28px; overflow: hidden;
}
.trace-demo svg { width: 100%; height: auto; display: block; }
.trace-caption { display: flex; gap: 18px; flex-wrap: wrap; margin-top: var(--sp-md); font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.trace-caption span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; }

/* ---- features ---- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-lg); }
.feature {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 26px;
}
.feature h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; color: var(--consensus); }
.feature p { font-size: 14px; color: var(--text-secondary); }
.feature .tagline { margin-top: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--consensus); opacity: .85; }

/* ---- waitlist ---- */
.waitlist { text-align: center; padding: 44px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; }
.waitlist form { display: flex; gap: var(--sp-sm); justify-content: center; flex-wrap: wrap; margin-top: var(--sp-md); }
.waitlist input {
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px;
  min-width: 280px; background: var(--bg); color: var(--text-primary); font-family: var(--font-ui);
}
.waitlist input:focus { outline: none; border-color: var(--flame-glow); }

.btn {
  padding: 12px 22px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: var(--font-ui); text-decoration: none; display: inline-block;
}
.btn-primary { background: var(--consensus); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
/* The single conversion CTA — gold (agency), per the landing spec. */
.btn-gold { background: var(--agency); color: #1D1D1F; font-size: 15px; padding: 13px 26px; box-shadow: 0 6px 20px rgba(255,200,61,.25); }

/* lede paragraph under a section heading */
.lede { font-size: 16px; color: var(--text-secondary); max-width: 720px; margin-bottom: var(--sp-lg); }
.lede strong { color: var(--text-primary); font-weight: 600; }
.why .features { margin-top: var(--sp-lg); }

footer {
  margin-top: 88px; padding-top: var(--sp-lg); border-top: 1px solid var(--border);
  text-align: center; color: var(--text-secondary); font-size: 12px; font-family: var(--font-mono);
}
footer a { color: var(--consensus); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ============================ PORTAL ============================ */
.portal {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px;
  background: #060A18; background-image: var(--starfield);
  transition: opacity 900ms ease, visibility 900ms ease;
  perspective: 900px;
}
.portal.gone { opacity: 0; visibility: hidden; pointer-events: none; }
/* Hold the sun + "tap to enter" hidden until the logo image has loaded (html.logo-ready,
   set from <head>). Keeps the spin — it just starts once the logo is on screen, so the
   inline tap-hand can never paint before the (mask-fetched) logo. */
html:not(.logo-ready) .portal-sun,
html:not(.logo-ready) .portal-disc,
html:not(.logo-ready) .portal-tap { animation: none !important; opacity: 0 !important; }
/* sun sits dead-centre (the only in-flow child); wrapper does the dramatic spin-in on load,
   the inner disc keeps rotating forever so the logo never freezes. */
.portal-sun {
  position: relative; z-index: 2; width: 232px; height: 232px;
  animation: sun-enter 2.4s ease-in-out forwards, sun-breathe 6s ease-in-out 2.4s infinite;
  filter: drop-shadow(0 0 34px rgba(191,233,255,.55));
  pointer-events: none;
}
.portal-disc {
  display: block; width: 100%; height: 100%; background: var(--flame);
  -webkit-mask: url("../assets/sun_logo.svg") center / contain no-repeat;
  mask: url("../assets/sun_logo.svg") center / contain no-repeat;
  animation: sun-rotate 18s linear infinite;
}
@keyframes sun-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* wrapper spins in fast and scales up from nothing, then holds */
@keyframes sun-enter {
  0%   { transform: rotate(0deg) scale(.5); opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: rotate(720deg) scale(1); opacity: 1; }
}
@keyframes sun-breathe {
  0%,100% { filter: drop-shadow(0 0 34px rgba(191,233,255,.5)); }
  50%     { filter: drop-shadow(0 0 52px rgba(191,233,255,.85)); }
}
/* on Enter: the sun warps forward and dissolves into the page (disc keeps spinning) */
.portal.entering .portal-sun { animation: sun-warp 2.4s cubic-bezier(.5,0,.2,1) forwards; }
@keyframes sun-warp {
  0%   { transform: rotate(0deg) scale(1); opacity: 1; }
  100% { transform: rotate(420deg) scale(3.4); opacity: 0; }
}
/* floating finger tap-hint — appears after the sun settles, invites a tap anywhere */
.portal-tap {
  position: absolute; left: 50%; bottom: 15vh; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: #fff; opacity: 0; pointer-events: none;
  transform: translateX(-50%);
  animation: tap-appear 1s ease 2.2s forwards;
}
.tap-hand { width: 56px; height: 56px; animation: tap-bob 2.4s ease-in-out infinite; filter: drop-shadow(0 3px 12px rgba(0,0,0,.45)); }
@keyframes tap-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.tap-hint { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
/* concentric ripples at the fingertip */
.tap-ring {
  position: absolute; left: 50%; top: 4px; width: 16px; height: 16px; margin-left: -8px;
  border: 2px solid rgba(255,255,255,.85); border-radius: 50%;
  animation: tap-ping 2.4s ease-out infinite;
}
.tap-ring.d { animation-delay: 1.2s; }
@keyframes tap-ping { 0% { transform: scale(.4); opacity: .9; } 80%,100% { transform: scale(3.4); opacity: 0; } }
@keyframes tap-appear { from { opacity: 0; transform: translateX(-50%) translateY(14px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.portal.entering .portal-tap { animation: none; opacity: 0; transition: opacity .3s ease; }
.portal-welcomes { position: absolute; inset: 0; transform-style: preserve-3d; overflow: hidden; pointer-events: none; z-index: 1; perspective: 1100px; }
.welcome {
  position: absolute; font-family: var(--font-mono); font-size: 30px; font-weight: 600;
  color: rgba(255,255,255,.94); white-space: nowrap; opacity: 0;
  transform-style: preserve-3d; will-change: transform, opacity;
  text-shadow: 0 0 20px rgba(191,233,255,.55);
}
.welcome .wchar { position: absolute; top: 0; will-change: transform; }
.welcome.go { animation: beam-in 4.5s cubic-bezier(.22,.68,.28,1) forwards; }
/* each word rises like a light ray through ocean water, sweeping past the reader */
@keyframes beam-in {
  0%   { opacity: 0; transform: translateY(90px) translateZ(-1300px) scale(.5); }
  20%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-180px) translateZ(560px) scale(1.35); }
}

/* ============================ HERO (big) ============================ */
.hero.big { padding: 96px 0 64px; border-bottom: none; }
.brand .wordmark { font-size: 44px; font-weight: 800; letter-spacing: -.5px; }
.myth { font-size: clamp(38px, 8vw, 76px); font-weight: 800; line-height: 1.02; letter-spacing: -1.5px; margin: 28px 0 18px; }
/* solid teal — one clean accent, no gradient */
.grad { color: var(--consensus); }
.hero .subtitle { font-size: 20px; }

/* ============================ REVEAL on scroll ============================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms ease, transform 700ms var(--spring); }
.reveal.in { opacity: 1; transform: none; }

/* ============================ NOOSPHERE ============================ */
.noosphere .lede + .lede { margin-top: 14px; }
.noos-figure figcaption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ============================ HOW — economy loop + graph ============================ */
.graph-viz { width: 100%; height: 220px; margin: 8px auto 28px; max-width: 420px; }
.graph-viz canvas { width: 100%; height: 100%; display: block; }
.loop { list-style: none; display: grid; gap: 16px; margin: 8px 0 24px; }
.loop li { display: flex; gap: 16px; align-items: flex-start; }
.loop .n { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--consensus); color: #fff; font-family: var(--font-mono); font-size: 13px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.loop b { color: var(--text-primary); }
.loop div { font-size: 15px; color: var(--text-secondary); }
.loop .why { display: block; margin-top: 6px; color: var(--consensus); }

/* How-it-works, centered. A glowing "edge spine": numbered nodes strung on a teal→gold
   gradient line, each node a different brand accent (bold + on-brand + non-standard). */
.how { text-align: center; }
.how-h2 { font-size: clamp(30px, 5.2vw, 46px); line-height: 1.06; letter-spacing: -0.02em; margin: 0 auto var(--sp-sm); max-width: 15ch; }
.loop-spine { list-style: none; position: relative; max-width: 560px; margin: var(--sp-lg) auto var(--sp-sm); padding: 0; text-align: left; }
.loop-spine::before {
  content: ""; position: absolute; left: 22px; top: 24px; bottom: 68px; width: 2px; border-radius: 2px;
  background: var(--consensus); opacity: .35;
}
/* Even vertical rhythm: each step reserves the same height, so the top-aligned nodes sit an
   equal distance apart no matter how much text each step carries. Number aligns with its title. */
.loop-spine li { position: relative; padding-left: 66px; min-height: 92px; margin-bottom: 12px; }
.loop-spine li:last-child { min-height: 0; margin-bottom: 0; }
.loop-spine .n {
  position: absolute; left: 0; top: 1px; width: 46px; height: 46px; border-radius: 50%; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: #fff;
  background: var(--consensus); box-shadow: 0 0 0 5px color-mix(in srgb, var(--consensus) 14%, transparent);
}
.loop-spine div > b { display: block; color: var(--text-primary); font-size: 16px; margin-bottom: 2px; }
.loop-spine div { font-size: 15px; color: var(--text-secondary); line-height: 1.5; }
.loop-spine .why { display: block; margin-top: 8px; color: var(--consensus); font-weight: 600; }

.cta-row.left { justify-content: flex-start; align-items: center; }
/* centered button with a note stacked beneath it */
.cta-stack { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: var(--sp-lg); text-align: center; }
.soon { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.fineprint { margin-top: 18px; font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); }
.fineprint a, .lede a, .article a:not(.btn), .uc-lede a:not(.btn), .why b { color: var(--consensus); }
.article a:not(.btn), .uc-lede a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }

/* ============================ CUBE (CSS-3D collective intellect) ============================ */
.cube-wrap { perspective: 1200px; display: flex; justify-content: center; padding: 56px 0 20px; min-height: 340px; align-items: center; }
.cube { position: relative; width: 260px; height: 260px; transform-style: preserve-3d; animation: cube-tour 15s ease-in-out infinite; }
/* Dice-tumble tour: quick pull-back to reveal all planes, a slower steady roll to the next
   face, then a real bounce on landing (scale .94 pop -> .80 dip -> .88 rebound -> .82 rest)
   plus a small rotation overshoot. Landing angles are 360-offsets so faces land dead-on;
   +1080deg per loop = seamless restart. */
@keyframes cube-tour {
  0%, 4%    { transform: scale(.62) rotateX(336deg)  rotateY(328deg); }    /* establish — all planes */
  16%       { transform: scale(.94) rotateX(732deg)  rotateY(732deg); }    /* PROVIDERS arrive + pop */
  19%       { transform: scale(.80) rotateX(720deg)  rotateY(720deg); }    /* dip */
  22%       { transform: scale(.88) rotateX(724deg)  rotateY(724deg); }    /* rebound */
  25%, 31%  { transform: scale(.82) rotateX(720deg)  rotateY(720deg); }    /* settle + hold */
  34%       { transform: scale(.62) rotateX(784deg)  rotateY(760deg); }    /* fast pull-back */
  46%       { transform: scale(.94) rotateX(1092deg) rotateY(1002deg); }   /* DATA arrive + pop */
  49%       { transform: scale(.80) rotateX(1080deg) rotateY(990deg); }    /* dip */
  52%       { transform: scale(.88) rotateX(1084deg) rotateY(994deg); }    /* rebound */
  55%, 61%  { transform: scale(.82) rotateX(1080deg) rotateY(990deg); }    /* settle + hold */
  64%       { transform: scale(.62) rotateX(1140deg) rotateY(1050deg); }   /* fast pull-back */
  76%       { transform: scale(.94) rotateX(1362deg) rotateY(1092deg); }   /* OPERATORS arrive + pop */
  79%       { transform: scale(.80) rotateX(1350deg) rotateY(1080deg); }   /* dip */
  82%       { transform: scale(.88) rotateX(1354deg) rotateY(1084deg); }   /* rebound */
  85%, 91%  { transform: scale(.82) rotateX(1350deg) rotateY(1080deg); }   /* settle + hold */
  96%, 100% { transform: scale(.62) rotateX(1416deg) rotateY(1408deg); }   /* quick return — loop */
}
.cube .face {
  position: absolute; inset: 0; border: 1.5px solid var(--border);
  background: var(--panel); border-radius: 12px; padding: 22px;
  display: flex; flex-direction: column; gap: 8px; backface-visibility: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.14);
}
.cube .face span { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--text-secondary); text-transform: uppercase; }
.cube .face i { font-style: normal; font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.35; }
.cube .f-providers { transform: translateZ(130px); border-color: rgba(0,158,151,.6); }
.cube .f-providers i { color: var(--consensus); }
.cube .f-data { transform: rotateY(90deg) translateZ(130px); border-color: rgba(255,149,0,.5); }
.cube .f-data i { color: var(--orange); }
.cube .f-ops { transform: rotateX(90deg) translateZ(130px); border-color: rgba(175,82,222,.6); }
.cube .f-ops i { color: var(--novel); }
/* opposite sides — same content mirrored to the far end of each plane, so all 6 sides are filled */
.cube .f-providers-b { transform: rotateY(180deg) translateZ(130px); border-color: rgba(0,158,151,.6); }
.cube .f-providers-b i { color: var(--consensus); }
.cube .f-data-b { transform: rotateY(-90deg) translateZ(130px); border-color: rgba(255,149,0,.5); }
.cube .f-data-b i { color: var(--orange); }
.cube .f-ops-b { transform: rotateX(-90deg) translateZ(130px); border-color: rgba(175,82,222,.6); }
.cube .f-ops-b i { color: var(--novel); }
/* static, always-readable legend under the cube */
.cube-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; margin: 44px 0 0; padding: 0; list-style: none; }
.cube-legend li { display: flex; align-items: baseline; gap: 8px; font-size: 14px; color: var(--text-secondary); }
.cube-legend b { color: var(--text-primary); font-weight: 700; }
.cube-legend .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; align-self: center; }
.cube-legend .d-prov { background: var(--consensus); } .cube-legend .d-data { background: var(--orange); } .cube-legend .d-ops { background: var(--novel); }

/* ============================ TEE ============================ */
.badge-soon, .yes { font-family: var(--font-mono); font-weight: 500; }
.badge-soon { font-size: 13px; color: var(--agency); border: 1px solid var(--agency); border-radius: 6px; padding: 2px 8px; vertical-align: middle; }
.yes { color: var(--consensus); }

/* ============================ REGTECH ============================ */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.col-bad, .col-good { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.col-good { border-color: rgba(0,158,151,.4); }
.col-bad h4, .col-good h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 12px; }
.col-bad h4 { color: var(--orange); } .col-good h4 { color: var(--consensus); }
.col-bad ul, .col-good ul { list-style: none; display: grid; gap: 8px; }
.col-bad li, .col-good li { font-size: 14px; color: var(--text-secondary); padding-left: 18px; position: relative; }
.col-bad li::before { content: "✗"; position: absolute; left: 0; color: var(--orange); }
.col-good li::before { content: "✓"; position: absolute; left: 0; color: var(--consensus); }
.mini { font-size: 16px; font-weight: 600; margin: 34px 0 14px; }
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.timeline > div { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--consensus); border-radius: 8px; padding: 12px 14px; }
.timeline b { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--consensus); }
.timeline span { font-size: 13px; color: var(--text-secondary); }
.table-scroll { overflow-x: auto; }
.reg-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.reg-table th { text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-secondary); padding: 10px; border-bottom: 1px solid var(--border); }
.reg-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: top; }
.reg-table td:first-child { color: var(--text-primary); font-weight: 600; }
/* The "how" column holds full sentences — it must WRAP, not force the table to ~1600px (which
   overflowed even the desktop column). Cap its width so the table stays within its container. */
.reg-table td:last-child { font-family: var(--font-mono); color: var(--consensus); }
.reg-table th:last-child, .reg-table td:last-child { max-width: 420px; }
.jur-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.jur { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.jur .flag { font-size: 26px; } .jur b { display: block; margin: 6px 0; }
.jur .tags { font-family: var(--font-mono); font-size: 11px; color: var(--consensus); margin-bottom: 10px; }
.jur p { font-size: 13px; color: var(--text-secondary); }
.artifacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.art { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.art-id { font-family: var(--font-mono); font-size: 11px; color: var(--novel); letter-spacing: .5px; }
.art b { display: block; margin: 8px 0 6px; } .art p { font-size: 13px; color: var(--text-secondary); }

/* ============================ HARDWARE / MOVEMENT ============================ */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: var(--sp-lg) 0; }
.tier { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 24px; text-decoration: none; color: inherit; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.tier:hover { transform: translateY(-4px); border-color: var(--consensus); box-shadow: 0 14px 40px rgba(0,0,0,.12); }
.tier-img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; margin-bottom: 12px; }
.tier b { font-size: 17px; } .tier span { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--consensus); margin: 4px 0 12px; }
.tier p { font-size: 14px; color: var(--text-secondary); }
.tier-link { display: inline-block; margin-top: 14px; font-family: var(--font-mono); font-size: 12px; font-style: normal; color: var(--agency); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ============================ MOBILE ============================ */
@media (max-width: 640px) {
  html { overflow-x: hidden; }
  .container { padding: var(--sp-lg) var(--sp-md); }
  .two-col { grid-template-columns: 1fr; }
  .hero.big { padding: 52px 0 32px; }
  .brand { gap: 10px; } .brand .wordmark { font-size: 30px; }
  .myth { font-size: clamp(30px, 9vw, 46px); margin: 20px 0 14px; letter-spacing: -1px; }
  .hero .subtitle, .subtitle { font-size: 16px; }
  .lede { font-size: 15px; }
  .section-kicker { font-size: 11px; }
  /* stacked, full-width CTAs so nothing gets cramped */
  .cta-row { gap: 10px; }
  .cta-row .btn { width: 100%; text-align: center; }
  .waitlist { padding: 26px 18px; }
  .waitlist form { flex-direction: column; }
  .waitlist input, .waitlist form .btn { width: 100%; }
  /* Data tables fit the phone: drop the 640px floor and tighten so all columns wrap in-viewport
     (no horizontal scroll), rather than overflowing off-screen. */
  .reg-table, .stk { min-width: 0; font-size: 12px; }
  .reg-table th, .reg-table td, .stk th, .stk td { padding: 8px 7px; }
  .reg-table td:last-child { max-width: none; }
  /* portal fits small screens */
  .portal-sun { width: 168px; height: 168px; }
  .portal-tap { bottom: 12vh; }
  .portal-enter { font-size: 16px; }
  /* dense grids collapse cleanly */
  .timeline { grid-template-columns: 1fr 1fr; }
  .loop .n { width: 24px; height: 24px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .cube { animation: none; transform: scale(.72) rotateX(-24deg) rotateY(-32deg); }
  .reveal { opacity: 1; transform: none; }
}
