/* NexaTel — design system.
 *
 * Dark enterprise palette, Space Grotesk for display, Inter for UI.
 * Gradients are reserved for: the primary button, the headline accent,
 * the logo, and the risk gauge. Everything else is flat surface + hairline.
 * Radius scale: 8 (controls) / 12 (cards) / 16 (panels). Nothing else.
 */
:root {
  --bg: #080d18;
  --bg-2: #0d1422;
  --bg-3: #121c2d;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);

  --cyan: #35d5f2;
  --blue: #477bff;
  --violet: #9475ff;

  --text: #f5f7fb;
  --text-2: #a5b0c2;
  --muted: #718096;

  --lo: #3ddc97;
  --me: #ffb547;
  --hi: #ff6b6b;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;

  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --nav-h: 68px;
  --shell: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
/* Author display rules (e.g. .empty { display: grid }) would otherwise beat
 * the browser's [hidden] and leave "hidden" panels on screen. */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: rgba(71, 123, 255, 0.4); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px;
  background: var(--cyan); color: #06101c; border-radius: var(--r-s); font-weight: 600;
}
.skip:focus { top: 12px; }

.shell { width: min(var(--shell), 100% - 48px); margin-inline: auto; }
main, .footer { position: relative; z-index: 1; }

/* ------------------------------------------------------------------ */
/* 3D canvas                                                           */
/* ------------------------------------------------------------------ */
#scene {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0;
  pointer-events: none; opacity: 0; transition: opacity 0.5s ease;
}

/* ------------------------------------------------------------------ */
/* type                                                                */
/* ------------------------------------------------------------------ */
.display {
  font: 700 clamp(2.4rem, 4.7vw, 4.1rem)/1.05 var(--display);
  letter-spacing: -0.035em;
}
.display-md { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.h2 { font: 600 clamp(1.8rem, 3.6vw, 2.8rem)/1.12 var(--display); letter-spacing: -0.025em; }
.grad {
  background: linear-gradient(95deg, var(--cyan), var(--blue) 55%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--text-2); font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.65; max-width: 56ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px;
  font: 500 0.78rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan);
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(53, 213, 242, 0.15); }
.mini-label { font: 500 0.72rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.fine { color: var(--muted); font-size: 0.85rem; margin-top: 14px; }
.note { color: var(--muted); font-size: 0.85rem; margin-top: 18px; max-width: 44ch; }

/* ------------------------------------------------------------------ */
/* buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-s); border: 1px solid transparent;
  font: 600 0.92rem/1 var(--sans); cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s var(--ease); }
.btn-sm { padding: 9px 14px; font-size: 0.85rem; }
.btn-lg { padding: 15px 24px; font-size: 1rem; }
.btn-primary {
  color: #06101c; background: linear-gradient(100deg, var(--cyan), #5a8bff);
  box-shadow: 0 6px 24px -8px rgba(53, 213, 242, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(53, 213, 242, 0.7); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; transform: none; }
.btn-ghost { background: rgba(255, 255, 255, 0.02); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.28); }

/* ------------------------------------------------------------------ */
/* nav                                                                 */
/* ------------------------------------------------------------------ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck, .nav.menu-open {
  background: rgba(8, 13, 24, 0.78); backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom-color: var(--line);
}
.nav-inner {
  width: min(var(--shell), 100% - 48px); height: var(--nav-h); margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; justify-self: start; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.wordmark { font: 700 1.08rem/1 var(--display); letter-spacing: 0.2em; }
.nav-links { position: relative; display: flex; gap: 4px; }
.nav-links a {
  position: relative; padding: 9px 14px; border-radius: var(--r-s);
  font-size: 0.9rem; font-weight: 500; color: var(--text-2); transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }
.nav-ind {
  position: absolute; left: 0; bottom: 2px; height: 2px; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue)); opacity: 0;
  transition: transform 0.4s var(--ease), width 0.4s var(--ease), opacity 0.25s;
}
.nav-cta { display: flex; gap: 10px; justify-self: end; }
.menu-btn { display: none; }
.mobile-menu[hidden] { display: none; }

@media (max-width: 960px) {
  .nav-inner { grid-template-columns: 1fr auto; }
  .nav-links, .nav-cta { display: none; }
  .menu-btn {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px;
    background: none; border: 1px solid var(--line-2); border-radius: var(--r-s); cursor: pointer;
  }
  .menu-btn span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease); }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .mobile-menu { display: grid; gap: 4px; padding: 8px 24px 22px; background: rgba(8, 13, 24, 0.96); border-bottom: 1px solid var(--line); }
  .mobile-menu a:not(.btn) { padding: 14px 4px; font-weight: 500; color: var(--text-2); border-bottom: 1px solid var(--line); }
  .mobile-menu .btn { margin-top: 14px; }
}

/* ------------------------------------------------------------------ */
/* reveal-on-scroll (only armed once site.js confirms it is running)   */
/* ------------------------------------------------------------------ */
.mo [data-in] { opacity: 0; transform: translateY(20px); }
.mo [data-in].in {
  opacity: 1; transform: none;
  transition: opacity 0.8s var(--ease) var(--d, 0ms), transform 0.8s var(--ease) var(--d, 0ms);
}

/* ------------------------------------------------------------------ */
/* hero                                                                */
/* ------------------------------------------------------------------ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 40px) 0 80px; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 13, 24, 0.82) 0%, rgba(8, 13, 24, 0.5) 38%, transparent 62%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 32px; align-items: center; }
/* the specified headline is exactly two lines; it may run a little past its column */
@media (min-width: 961px) { .hero .display { white-space: nowrap; } }
.hero-copy .lede { margin-top: 26px; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.proof { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 40px; color: var(--muted); font-size: 0.86rem; }
.proof li { display: inline-flex; align-items: center; gap: 7px; }
.proof li + li::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); margin-right: 8px; }
.proof strong { color: var(--text-2); font-weight: 600; }

.hero-visual { position: relative; min-height: 560px; }
.static-net { display: none; position: absolute; inset: 8% 6%; width: 88%; opacity: 0.9; }
.no3d .static-net { display: block; }

.fcard {
  position: absolute; padding: 15px 16px; border-radius: var(--r-m);
  background: rgba(18, 28, 45, 0.82); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  translate: var(--mx, 0px) calc(var(--my, 0px) + var(--sy, 0px));
  /* enter once, then bob forever; each card sets --ed / --bd / --bo */
  animation-name: enter, bob;
  animation-duration: 1s, var(--bd, 7s);
  animation-timing-function: var(--ease), ease-in-out;
  animation-iteration-count: 1, infinite;
  animation-fill-mode: both, none;
  animation-delay: var(--ed, 300ms), calc(var(--ed, 300ms) + 1s + var(--bo, 0s));
}
@keyframes enter { from { opacity: 0; transform: translateY(26px) scale(0.97); } }
.fcard header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font: 500 0.7rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fcard small { display: block; margin-top: 10px; color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.fc-prob { top: 4%; right: 0; width: 232px; }
.fc-prob { --ed: 350ms; --bd: 7s; }
.fc-level { top: 38%; left: 0; width: 196px; --ed: 550ms; --bd: 8.5s; --bo: -2s; }
.fc-factors { bottom: 4%; left: 0; width: 256px; --ed: 750ms; --bd: 9s; --bo: -4s; }
.fc-opp { bottom: 14%; right: 0; width: 240px; --ed: 950ms; --bd: 7.5s; --bo: -1s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.chip {
  display: inline-block; padding: 4px 9px; border-radius: 999px; font: 600 0.68rem/1 var(--sans);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2);
}
.chip.high { color: var(--hi); background: rgba(255, 107, 107, 0.12); border-color: rgba(255, 107, 107, 0.35); }
.chip.medium { color: var(--me); background: rgba(255, 181, 71, 0.12); border-color: rgba(255, 181, 71, 0.35); }
.chip.low { color: var(--lo); background: rgba(61, 220, 151, 0.12); border-color: rgba(61, 220, 151, 0.35); }

.fc-big { font: 600 3rem/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fc-big i { font-style: normal; font-size: 1.4rem; color: var(--text-2); margin-left: 2px; }
.fc-big small { display: inline; margin-left: 10px; font: 400 0.8rem var(--sans); letter-spacing: 0; }
.meter { position: relative; height: 6px; margin-top: 14px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); }
.meter span { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--lo), var(--me), var(--hi)); background-size: 232px 100%; transition: width 1.1s var(--ease); }
.meter em { position: absolute; top: -4px; width: 2px; height: 14px; background: var(--text); border-radius: 2px; left: 0; opacity: 0; }

.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.levels li { padding: 8px 0; text-align: center; font-size: 0.78rem; font-weight: 500; color: var(--muted); border-radius: var(--r-s); border: 1px solid var(--line); transition: all 0.4s var(--ease); }
.levels li.on[data-l="Low"] { color: var(--lo); background: rgba(61, 220, 151, 0.12); border-color: rgba(61, 220, 151, 0.4); }
.levels li.on[data-l="Medium"] { color: var(--me); background: rgba(255, 181, 71, 0.12); border-color: rgba(255, 181, 71, 0.4); }
.levels li.on[data-l="High"] { color: var(--hi); background: rgba(255, 107, 107, 0.12); border-color: rgba(255, 107, 107, 0.4); }

.mini-factors { display: grid; gap: 9px; }
.mini-factors li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 0.8rem; color: var(--text-2); }
.mini-factors .mf-v { font-family: var(--mono); font-size: 0.74rem; color: var(--hi); }
.mini-factors .mf-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.mini-factors .mf-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--hi); border-radius: 4px; transform-origin: left; animation: grow 1s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.mini-factors .unavailable { color: var(--muted); font-size: 0.78rem; display: block; }

.fc-money { font: 600 1.7rem/1 var(--display); letter-spacing: -0.02em; }
.fc-money small { display: block; margin-top: 6px; font: 400 0.72rem var(--sans); letter-spacing: 0; }
.fc-action { margin-top: 10px; font-size: 0.78rem; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; width: 22px; height: 36px; border: 1.5px solid var(--line-2); border-radius: 12px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cyan); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ------------------------------------------------------------------ */
/* pinned story                                                        */
/* ------------------------------------------------------------------ */
.story { position: relative; }
.story-stage { position: relative; padding: 40px 0 20px; }
.scene-panel { width: min(var(--shell), 100% - 48px); margin: 0 auto 28px; padding: 28px; border-radius: var(--r-l); background: var(--bg-2); border: 1px solid var(--line); }
.scene-panel .h2 { margin-bottom: 18px; }
.rail { display: none; }

.flow { display: grid; gap: 8px; margin-top: 26px; counter-reset: f; }
.flow li { counter-increment: f; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: rgba(18, 28, 45, 0.7); font-size: 0.9rem; font-weight: 500; }
.flow li::before { content: counter(f, decimal-leading-zero); font: 500 0.72rem var(--mono); color: var(--cyan); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; font-size: 0.9rem; color: var(--text-2); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.legend .lo { background: var(--lo); } .legend .me { background: var(--me); } .legend .hi { background: var(--hi); }

.scene-wide { display: grid; gap: 28px; }
.demo { padding: 18px; border-radius: var(--r-m); background: rgba(18, 28, 45, 0.9); border: 1px solid var(--line); max-width: 460px; }
.demo header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font: 500 0.7rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.demo .fc-big { margin-bottom: 16px; }
.demo-action { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.86rem; line-height: 1.5; color: var(--text-2); }
.demo-src { display: block; margin-top: 12px; color: var(--muted); font-size: 0.74rem; }

/* Desktop pinned mode — site.js adds .pinned only when it can drive it. */
.pinned .story-stage { height: 100vh; padding: 0; }
.pinned .scene-panel {
  position: absolute; left: max(24px, calc((100vw - var(--shell)) / 2)); top: 50%; width: min(460px, 38vw);
  margin: 0; padding: 0; background: none; border: 0; opacity: 0; pointer-events: none; will-change: opacity, transform;
  transform: translateY(-50%);
}
.pinned .scene-panel.on { pointer-events: auto; }
.pinned .scene-panel::before { content: ""; position: absolute; inset: -60px -80px -60px -200px; z-index: -1; background: radial-gradient(closest-side, rgba(8, 13, 24, 0.82), transparent); pointer-events: none; }
.pinned .scene-wide { width: min(780px, 60vw); grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.pinned .rail { position: absolute; right: 28px; top: 50%; translate: 0 -50%; display: grid; gap: 22px; z-index: 2; }
.rail li { display: flex; align-items: center; justify-content: flex-end; gap: 12px; font: 500 0.72rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); transition: color 0.3s; }
.rail li i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--muted); transition: all 0.3s; }
.rail li.on { color: var(--text); }
.rail li.on i { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(53, 213, 242, 0.18); }
.rail li span { order: -1; max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap; transition: max-width 0.4s var(--ease), opacity 0.3s; }
.rail li.on span { max-width: 120px; opacity: 1; }

/* ------------------------------------------------------------------ */
/* sections                                                            */
/* ------------------------------------------------------------------ */
.section { position: relative; padding: clamp(72px, 10vw, 128px) 0; background: var(--bg); }
.section-alt { background: var(--bg-2); }
.section-head { margin-bottom: clamp(36px, 5vw, 60px); max-width: 760px; }
.section-head .lede { margin-top: 18px; }

.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 26px 22px 28px; border-radius: var(--r-m); background: var(--bg-2); border: 1px solid var(--line); transition: transform 0.4s var(--ease), border-color 0.3s, background 0.3s; }
.feature:hover { transform: translateY(-4px); border-color: rgba(53, 213, 242, 0.35); background: var(--bg-3); }
.ficon { width: 44px; height: 44px; margin-bottom: 22px; fill: none; stroke: var(--cyan); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ficon .fill { fill: var(--cyan); stroke: none; }
.ficon .faint { stroke: var(--blue); stroke-opacity: 0.55; stroke-width: 1.6; }
.feature h3 { font: 600 1.15rem/1.25 var(--display); margin-bottom: 10px; }
.feature p { color: var(--text-2); font-size: 0.93rem; line-height: 1.6; }

/* ------------------------------------------------------------------ */
/* analyze: form + result                                              */
/* ------------------------------------------------------------------ */
.analyze-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 20px; align-items: start; }
.panel { border-radius: var(--r-l); background: var(--bg-3); border: 1px solid var(--line); padding: clamp(20px, 3vw, 32px); }
.result-panel { position: sticky; top: calc(var(--nav-h) + 20px); }

.samples-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.sample-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sample-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: 0.82rem; color: var(--text-2); cursor: pointer; transition: all 0.2s; }
.sample-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); }
.swatch { width: 8px; height: 8px; border-radius: 50%; }

/* margin, not padding: a <legend> sits on the fieldset's top edge and ignores padding-top */
fieldset { border: 0; padding: 0; margin: 28px 0 0; min-width: 0; }
legend { display: flex; align-items: center; gap: 10px; padding: 0; margin-bottom: 14px; font: 600 0.95rem/1 var(--display); }
legend b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(53, 213, 242, 0.12); color: var(--cyan); font: 600 0.72rem var(--sans); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; align-content: start; }
.field-wide { grid-column: 1 / -1; }
.lab { display: inline-flex; align-items: center; gap: 7px; font-size: 0.82rem; font-weight: 500; color: var(--text-2); }

input[type="number"], select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-s);
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s; -webkit-appearance: none; appearance: none;
}
select {
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23A5B0C2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
select option { background: #121c2d; color: var(--text); }
input:hover, select:hover { border-color: rgba(255, 255, 255, 0.28); }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(53, 213, 242, 0.2); }
input::placeholder { color: var(--muted); }
select:disabled, input:disabled { opacity: 0.5; cursor: not-allowed; }
.prefixed { position: relative; display: block; }
.prefixed i { position: absolute; left: 12px; top: 50%; translate: 0 -50%; font-style: normal; color: var(--muted); pointer-events: none; }
.prefixed input { padding-left: 26px; }
.field-err { color: var(--hi); font-size: 0.76rem; line-height: 1.3; }
.field.invalid input { border-color: var(--hi); }
.field.invalid input:focus-visible { box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2); }

.tip { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-2); font: 600 0.62rem var(--sans); color: var(--muted); cursor: help; }
.tip::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 4px;
  width: max-content; max-width: 220px; padding: 9px 11px; border-radius: var(--r-s);
  background: #1a2740; border: 1px solid var(--line-2); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7);
  font: 400 0.76rem/1.4 var(--sans); color: var(--text); text-align: left; letter-spacing: 0; text-transform: none;
  opacity: 0; pointer-events: none; transition: opacity 0.18s, translate 0.18s; z-index: 5;
}
.tip:hover::after, .tip:focus-visible::after { opacity: 1; translate: -50% 0; }

.addons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.addon { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--bg-2); font-size: 0.86rem; color: var(--text-2); cursor: pointer; transition: all 0.2s; }
.addon:hover { border-color: rgba(255, 255, 255, 0.3); }
.addon input { width: 16px; height: 16px; accent-color: var(--cyan); margin: 0; flex: none; }
.addon.on { color: var(--text); border-color: rgba(53, 213, 242, 0.55); background: rgba(53, 213, 242, 0.08); }
.addon.disabled { opacity: 0.4; cursor: not-allowed; }
.addon:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.actions .btn-primary { flex: 1 1 220px; }
.err { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-s); background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.35); color: #ffb3b3; font-size: 0.88rem; }

/* result */
.empty { display: grid; justify-items: center; gap: 8px; padding: 56px 12px; text-align: center; color: var(--muted); }
.empty svg { width: 120px; margin-bottom: 14px; opacity: 0.6; }
.empty p { color: var(--text-2); font-weight: 500; }
.empty span { font-size: 0.88rem; }

.gauge-wrap { display: grid; justify-items: center; gap: 12px; margin: 18px auto 6px; max-width: 300px; }
.gauge-box { position: relative; width: 100%; }
.gauge { width: 100%; overflow: visible; }
.arc-track, .arc-value { fill: none; stroke-width: 12; stroke-linecap: round; }
.arc-track { stroke: rgba(255, 255, 255, 0.08); }
.arc-value { stroke: url(#arcGrad); stroke-dasharray: 283; stroke-dashoffset: 283; transition: stroke-dashoffset 1.2s var(--ease); }
.arc-tick { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; }
.gauge-read { position: absolute; inset: auto 0 6px 0; display: flex; justify-content: center; align-items: baseline; }
.score { font: 700 3.4rem/1 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.pct { font: 600 1.3rem var(--display); color: var(--text-2); margin-left: 2px; }
.tick-note { text-align: center; font-size: 0.76rem; color: var(--muted); }
.verdict { text-align: center; margin: 14px 0 6px; font-size: 0.95rem; color: var(--text-2); }
.verdict strong { color: var(--text); }
.block { margin-top: 24px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font: 500 0.72rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.factors { display: grid; gap: 12px; }
.f-top { display: flex; justify-content: space-between; gap: 12px; font-size: 0.88rem; }
.f-label { color: var(--text-2); }
.f-impact { font: 500 0.78rem var(--mono); color: var(--hi); }
.protective .f-impact { color: var(--lo); }
.f-bar { height: 5px; margin-top: 7px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.f-fill { height: 100%; width: 0; border-radius: 5px; background: var(--hi); transition: width 0.9s var(--ease); }
.protective .f-fill { background: var(--lo); }
.action-card { margin-top: 26px; padding: 16px; border-radius: var(--r-m); background: rgba(53, 213, 242, 0.06); border: 1px solid rgba(53, 213, 242, 0.25); }
.action-card .block-head { color: var(--cyan); }
.action-card p { font-size: 0.92rem; line-height: 1.55; }
.revenue { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 0.85rem !important; }
.revenue span { color: var(--text); font: 600 1.05rem var(--display); }
.model-note { margin-top: 16px; text-align: center; }
.unavailable { color: var(--muted); font-size: 0.86rem; }

/* ------------------------------------------------------------------ */
/* analytics                                                           */
/* ------------------------------------------------------------------ */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; min-height: 108px; }
.kpi { display: grid; gap: 8px; padding: 18px 16px; border-radius: var(--r-m); background: var(--bg-2); border: 1px solid var(--line); }
.kpi .v { order: 1; font: 600 1.7rem/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .k { order: 2; font-size: 0.76rem; line-height: 1.35; color: var(--muted); }
.kpi.accent .v { color: var(--cyan); }
.skel { border-radius: var(--r-m); min-height: 86px; background: linear-gradient(100deg, var(--bg-2) 30%, var(--bg-3) 50%, var(--bg-2) 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart-card { padding: 22px; border-radius: var(--r-m); background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.chart-wide { grid-column: 1 / -1; }
.chart-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.chart-card figcaption .block-head { margin: 0; }
.chart-card figcaption small { color: var(--muted); font-size: 0.74rem; }
.select-sm select { min-height: 34px; padding: 6px 30px 6px 10px; font-size: 0.8rem; width: auto; max-width: 190px; }
.chart { position: relative; }
/* Reserve each chart's height before its data arrives. Analytics loads
 * lazily, and an empty section that later grows ~1000px shoves everything
 * below it (including in-page anchor targets) out from under the reader. */
#chart-category { min-height: 200px; }
#chart-shap { min-height: 312px; }
#chart-models { min-height: 330px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.ch-grid line { stroke: var(--line); }
.ch-axis text, .ch-lab { fill: var(--text-2); font: 400 11.5px var(--sans); }
.ch-val { fill: var(--text); font: 500 11.5px var(--mono); }
.ch-bar { transform-origin: left center; transform-box: fill-box; animation: bar-in 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); cursor: pointer; transition: opacity 0.2s; }
.ch-col { transform-origin: center bottom; transform-box: fill-box; animation: col-in 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); cursor: pointer; transition: opacity 0.2s; }
.chart svg:hover .ch-bar:not(:hover), .chart svg:hover .ch-col:not(:hover) { opacity: 0.55; }
@keyframes bar-in { from { transform: scaleX(0); } }
@keyframes col-in { from { transform: scaleY(0); } }
.ch-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 0.8rem; color: var(--text-2); }
.ch-legend li { display: inline-flex; align-items: center; gap: 7px; }
.ch-legend i { width: 10px; height: 10px; border-radius: 3px; }
.ch-tip { position: absolute; z-index: 4; padding: 8px 10px; border-radius: var(--r-s); background: #1a2740; border: 1px solid var(--line-2); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7); font-size: 0.78rem; line-height: 1.4; pointer-events: none; opacity: 0; transition: opacity 0.12s; white-space: nowrap; }
.ch-tip b { display: block; font-weight: 600; }
.ch-tip span { color: var(--text-2); }

details summary { cursor: pointer; font-size: 0.86rem; color: var(--text-2); list-style: none; display: inline-flex; align-items: center; gap: 8px; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--line-2); font-size: 0.8rem; line-height: 1; }
details[open] summary::before { content: "−"; }
.data-table { margin-top: 14px; }
.table-scroll { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font: 500 0.7rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
td { font-variant-numeric: tabular-nums; color: var(--text-2); }
tr.best td { color: var(--text); }
tr.best td:first-child { box-shadow: inset 2px 0 var(--cyan); }
.figures-wrap { margin-top: 22px; }
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.fig { padding: 12px; border-radius: var(--r-m); background: #f4f6fa; }
.fig img { width: 100%; height: auto; border-radius: 6px; }
.fig p { margin-top: 10px; font-size: 0.82rem; color: #3a4558; }

/* ------------------------------------------------------------------ */
/* how it works                                                        */
/* ------------------------------------------------------------------ */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 34px; }
.steps-line { position: absolute; top: 10px; left: 0; right: 0; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.steps-line i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet)); }
.no-scrub .steps-line i { transform: scaleX(1); }
.step { position: relative; }
.step::before { content: ""; position: absolute; top: -29px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--cyan); }
.step-n { display: block; margin-bottom: 14px; font: 600 2.4rem/1 var(--display); letter-spacing: -0.03em; color: rgba(255, 255, 255, 0.16); }
.step h3 { font: 600 1.15rem/1.25 var(--display); margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 0.93rem; }

/* ------------------------------------------------------------------ */
/* trust                                                               */
/* ------------------------------------------------------------------ */
.trust-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.trust-grid .lede { margin-top: 20px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.badges li { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.82rem; color: var(--text-2); }
.badges strong { color: var(--text); font-weight: 600; }
.trust-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trust-metrics > div { padding: 22px 20px; border-radius: var(--r-m); background: var(--bg-2); border: 1px solid var(--line); }
.trust-metrics dt { font-size: 0.78rem; color: var(--muted); margin-bottom: 10px; }
.trust-metrics dd { font: 600 2.1rem/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.trust-metrics .fine { grid-column: 1 / -1; margin-top: 4px; }

/* ------------------------------------------------------------------ */
/* final CTA + footer                                                  */
/* ------------------------------------------------------------------ */
.cta { position: relative; min-height: 78vh; display: grid; align-items: center; text-align: center; padding: 100px 0; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(closest-side at 50% 50%, rgba(8, 13, 24, 0.8), rgba(8, 13, 24, 0.35) 70%, transparent); pointer-events: none; }
.cta-inner { position: relative; display: grid; justify-items: center; gap: 24px; }
.cta-inner .lede { margin-inline: auto; }
.cta-inner .btn { margin-top: 8px; }

.footer { background: var(--bg); border-top: 1px solid var(--line); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand p { margin-top: 18px; max-width: 40ch; color: var(--text-2); font-size: 0.9rem; }
.footer-brand .status { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.footer h3 { margin-bottom: 16px; font: 500 0.72rem/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.footer nav { display: grid; align-content: start; gap: 11px; }
.footer nav a { width: fit-content; font-size: 0.9rem; color: var(--text-2); transition: color 0.2s; }
.footer nav a:hover { color: var(--text); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--lo); box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.16); }
.dot.bad { background: var(--hi); box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.16); }

/* ------------------------------------------------------------------ */
/* responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fc-factors { display: none; }
}
@media (max-width: 960px) {
  .hero { min-height: auto; padding-bottom: 56px; }
  .hero::before { background: linear-gradient(180deg, rgba(8, 13, 24, 0.4), rgba(8, 13, 24, 0.12) 55%, transparent); }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-visual { min-height: 400px; order: 2; }
  .fc-prob { top: 4%; right: 4%; }
  .fc-level { top: auto; bottom: 8%; left: 2%; }
  .fc-opp { display: none; }
  .scroll-cue { display: none; }
  .analyze-grid, .trust-grid { grid-template-columns: 1fr; }
  .result-panel { position: static; }
  .chart-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .steps-line { display: none; }
  .step::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .shell, .nav-inner { width: calc(100% - 32px); }
  .scene-panel { width: calc(100% - 32px); padding: 22px; }
  .fields, .figures, .trust-metrics { grid-template-columns: 1fr; }
  .addons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions .btn { flex: 1 1 100%; }
  .eyebrow { font-size: 0.7rem; letter-spacing: 0.1em; }
  .hero-visual { min-height: 330px; }
  .fc-prob { width: 200px; }
  .fc-big { font-size: 2.6rem; }
  .actions .btn { flex: 1 1 100%; }
  .chart-card { padding: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .tip::after { left: 0; translate: 0 4px; }
  .tip:hover::after, .tip:focus-visible::after { translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .fcard { animation: none; }
  .scroll-cue span { animation: none; }
}
