:root {
  --bg: #07090c;
  --bg-2: #0b1015;
  --surface: #11161d;
  --surface-2: #1a212b;
  --line: #263040;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --dim: #64748b;
  --accent: #2dd4bf;
  --accent-2: #5eead4;
  --accent-deep: #0f766e;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --b0: #ffe066; --b1: #ffa94d; --b2: #f03e3e; --b3: #a61e4d; --b4: #5f3dc4; --bn: #adb5bd;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.022em; margin: 0; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #042f2e; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .8em 1.3em; border-radius: 999px; background: var(--accent); color: #042f2e; font-weight: 650; text-decoration: none; transition: background .2s, transform .2s; }
.btn:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(7, 9, 12, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: .02em; text-decoration: none; }
.brand em { font-style: normal; color: var(--accent); }
.brand-sm { font-size: .95rem; }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* Hero */
.hero { position: relative; padding: clamp(56px, 9vw, 110px) 0 40px; overflow: hidden; }
.glow { position: absolute; inset: -30% -10% auto auto; width: 720px; height: 720px; background: radial-gradient(closest-side, rgba(45, 212, 191, .18), transparent); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-2); font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); font-weight: 750; }
.grad { background: linear-gradient(90deg, var(--accent-2), #a7f3d0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 22px; font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ticks { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 28px 0 0; color: var(--muted); font-size: .92rem; }
.ticks li::before { content: "✓"; color: var(--accent); margin-right: 8px; font-weight: 700; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.stat-v { font-family: var(--mono); font-size: 1.9rem; color: var(--accent-2); }
.stat-l { color: var(--muted); font-size: .9rem; }
.hero-note { grid-column: 1 / -1; color: var(--dim); font-size: .9rem; text-align: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }

.disclaimer { border: 1px solid rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .07); color: #fde68a; border-radius: 14px; padding: 14px 18px; font-size: .95rem; }

/* Sections */
.section { padding: clamp(64px, 9vw, 104px) 0; }
.section.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.kicker { color: var(--accent); font-weight: 650; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.sub { color: var(--muted); font-size: 1.05rem; margin-top: 16px; }
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }

/* Demo */
.demo { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 960px) { .demo { grid-template-columns: 1fr; } }
.viewer { display: flex; flex-direction: column; gap: 16px; }
.screen { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 4 / 3; }
.screen canvas { width: 100%; height: 100%; cursor: crosshair; touch-action: manipulation; }
.hud { position: absolute; display: flex; gap: 8px; pointer-events: none; }
.hud-top { top: 12px; left: 12px; right: 12px; justify-content: space-between; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(11, 15, 20, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: .78rem; color: var(--text); }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.hud-dist { left: 50%; top: 50%; transform: translate(-50%, 46px); }
.dist { font-family: var(--mono); font-size: .85rem; padding: 3px 10px; border-radius: 999px; background: rgba(11, 15, 20, .62); }
.dist.ok { color: var(--accent-2); }
.dist.warn { color: var(--warn); }
.shutter { position: absolute; right: 16px; bottom: 16px; width: 58px; height: 58px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .9); background: rgba(45, 212, 191, .85); cursor: pointer; transition: transform .15s; }
.shutter:hover { transform: scale(1.06); }
.shutter:active { transform: scale(.94); }
.controls { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.field { display: grid; gap: 8px; font-size: .9rem; color: var(--muted); }
.field output { color: var(--text); font-family: var(--mono); margin-left: 6px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-wide { margin-top: 28px; }
.seg-b { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: .88rem; cursor: pointer; }
.seg-b:hover { color: var(--text); }
.seg-b.is-on { background: rgba(45, 212, 191, .14); border-color: var(--accent-deep); color: var(--accent-2); }

.results { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 18px; }
.results-head { display: flex; align-items: center; justify-content: space-between; }
.badge { font-family: var(--mono); font-size: .82rem; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: rgba(52, 211, 153, .15); color: var(--ok); }
.badge.mid { background: rgba(251, 191, 36, .14); color: var(--warn); }
.badge.bad { background: rgba(248, 113, 113, .14); color: var(--bad); }
.diag { color: var(--muted); font-size: .95rem; min-height: 3em; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card { background: var(--surface-2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.card-l { font-size: .8rem; color: var(--muted); }
.card-v { font-family: var(--mono); font-size: 1.45rem; }
.card-v.dim { color: var(--dim); }
.bands-t { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.bar span { height: 100%; transition: width .4s; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; padding: 0; margin: 10px 0 0; font-size: .78rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.b0 { background: var(--b0); } .b1 { background: var(--b1); } .b2 { background: var(--b2); } .b3 { background: var(--b3); } .b4 { background: var(--b4); } .bn { background: var(--bn); }
.quality { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.quality div { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; border-top: 1px solid var(--line); padding-top: 10px; }
.quality dt { color: var(--muted); }
.quality dd { margin: 0; font-family: var(--mono); }
.fine { font-size: .8rem; color: var(--dim); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; }
.step-n { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(45, 212, 191, .14); color: var(--accent-2); font-weight: 700; }
.step p { color: var(--muted); font-size: .95rem; }
.pipeline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 28px; font-family: var(--mono); font-size: .82rem; color: var(--muted); }
.pipeline span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pipeline b { color: var(--accent); font-weight: 400; }

/* Trend */
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.chart figcaption { color: var(--dim); font-size: .82rem; margin-top: 8px; }
.chart svg { width: 100%; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--dim); font: 12px var(--font); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart .area { fill: rgba(45, 212, 191, .09); }
.chart .pt { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .pt.low { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart .ref { stroke: var(--warn); stroke-dasharray: 5 5; stroke-width: 1.5; }
.chart .ref-t { fill: var(--warn); font: 12px var(--font); }
.chart .wk4 { stroke: var(--muted); stroke-dasharray: 2 4; }
.par { display: flex; align-items: baseline; gap: 12px; margin-top: 24px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.par-v { font-family: var(--mono); font-size: 2rem; }
.par-l { color: var(--muted); }
.par.ok .par-v { color: var(--ok); }
.par.warn .par-v { color: var(--warn); }

/* Features */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid3 { grid-template-columns: 1fr; } }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; }
.feat p { color: var(--muted); font-size: .95rem; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list li { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; padding: 14px 18px; color: var(--muted); }
.list strong { color: var(--text); }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 640px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
td:last-child { color: var(--muted); }
.tag { display: inline-block; white-space: nowrap; font-size: .78rem; font-weight: 650; padding: 3px 9px; border-radius: 999px; }
.tag.ok { background: rgba(52, 211, 153, .14); color: var(--ok); }
.tag.mid { background: rgba(251, 191, 36, .14); color: var(--warn); }
.tag.bad { background: rgba(248, 113, 113, .14); color: var(--bad); }

.tech p:last-child { color: var(--muted); font-size: 1.05rem; }

/* Footer */
.footer { padding: 36px 0 48px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.footer p { color: var(--dim); font-size: .85rem; max-width: 72ch; }
