:root {
  --navy: #0f1b2d;
  --slate: #475569;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --green: #16a34a;
  --green-dark: #15803d;
  --green-soft: #dcfce7;
  --r-clear: #22c55e;
  --r-pass: #10b981;
  --r-fault: #eab308;
  --r-refusal: #f97316;
  --r-refusal-text: #450a0a;
  --r-fall: #ef4444;
  --r-pending: #d1d5db;
  --error: #b91c1c;
  --radius: 10px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.section-intro { max-width: 640px; color: var(--slate); margin-bottom: 40px; }
.accent { color: var(--green); }
.pill { display: inline-block; font-size: 0.8rem; font-weight: 700; color: var(--green-dark); background: var(--green-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }

.btn { display: inline-block; font: inherit; font-weight: 700; text-decoration: none; border: 0; border-radius: 8px; padding: 12px 20px; cursor: pointer; }
.btn-dark { background: var(--navy); color: #fff; padding: 8px 14px; font-size: 0.9rem; }
.btn-green { background: var(--green-dark); color: #fff; }
.btn-green:hover { background: #166534; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.link-arrow { font-weight: 600; text-decoration: none; margin-left: 18px; }

.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--r-clear); }
.site-header .brand { font-size: 1.4rem; font-weight: 900; letter-spacing: -0.03em; gap: 10px; }
.site-header .brand-dot { width: 16px; height: 16px; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 0.95rem; }
.nav-links a:not(.btn) { color: var(--slate); text-decoration: none; }

.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; }
.trail-path { fill: none; stroke: var(--navy); stroke-width: 2; stroke-dasharray: 7 7; opacity: 0.14; }
.trail-fence circle { fill: #e2e4e9; }
.trail-fence text { fill: var(--navy); opacity: 0.35; font: 700 13px Inter, sans-serif; text-anchor: middle; }
.trail-fence.is-live circle { fill: var(--r-clear); opacity: 1; }
.trail-fence.is-live .halo { opacity: 0.25; }
.trail-fence.is-live text { fill: #fff; opacity: 1; }
.flag-red { fill: var(--r-fall); opacity: 0.6; }
.flag-white { fill: var(--navy); opacity: 0.25; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.hero-copy { max-width: 540px; }
.hero-sub { font-size: 1.1rem; color: var(--slate); margin-bottom: 28px; }

.phone { position: relative; width: 250px; height: 510px; border-radius: 46px; background: #1c1f24; padding: 10px; box-shadow: inset 0 0 0 2px #8a8f98, 0 28px 56px -18px rgba(15, 27, 45, 0.45); }
.phone-btn { position: absolute; width: 3px; background: #5c6068; }
.phone-btn-action { left: -3px; top: 100px; height: 28px; border-radius: 2px 0 0 2px; }
.phone-btn-vol-up { left: -3px; top: 142px; height: 46px; border-radius: 2px 0 0 2px; }
.phone-btn-vol-down { left: -3px; top: 196px; height: 46px; border-radius: 2px 0 0 2px; }
.phone-btn-power { right: -3px; top: 158px; height: 68px; border-radius: 0 2px 2px 0; }
.phone-screen { position: relative; height: 100%; border-radius: 37px; background: var(--bg-soft); overflow: hidden; }
.island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 80px; height: 23px; border-radius: 999px; background: #000; }
.status-bar { display: flex; justify-content: space-between; align-items: center; padding: 13px 24px 0; font-size: 0.72rem; font-weight: 700; }
.status-icons { display: flex; gap: 5px; align-items: center; }
.signal { display: flex; gap: 1px; align-items: flex-end; height: 10px; }
.signal i { display: block; width: 3px; background: var(--navy); border-radius: 1px; }
.signal i:nth-child(1) { height: 4px; }
.signal i:nth-child(2) { height: 6px; }
.signal i:nth-child(3) { height: 8px; }
.signal i:nth-child(4) { height: 10px; }
.battery { width: 20px; height: 10px; border: 1.5px solid var(--navy); border-radius: 3px; padding: 1px; }
.battery::after { content: ""; display: block; height: 100%; width: 75%; background: var(--navy); border-radius: 1px; }
.judge { padding: 24px 15px 0; }
.judge-meta { font-size: 0.68rem; font-weight: 600; color: var(--slate); margin: 0; }
.judge-fence { font-size: 0.8rem; color: var(--slate); margin: 0 0 2px; }
.judge-rider { font-size: 1.45rem; font-weight: 800; margin: 0 0 14px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.res { display: block; text-align: center; color: var(--navy); font-weight: 700; font-size: 0.85rem; padding: 14px 0; border-radius: 9px; }
.res-clear { background: var(--r-clear); }
.res-pass { background: var(--r-pass); }
.res-fault { background: var(--r-fault); }
.res-refusal { background: var(--r-refusal); }
.res-refusal-late { color: var(--r-refusal-text); }
.res-fall { background: var(--r-fall); }
.is-selected { outline: 3px solid var(--navy); outline-offset: 2px; }
.judge-saved { margin: 14px 0 0; text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--green-dark); }
.home-indicator { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 96px; height: 4px; border-radius: 999px; background: var(--navy); }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare-col { border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); background: #fff; }
.compare-col ul { margin: 0; padding-left: 1.2em; }
.compare-col li { margin-bottom: 0.6em; }
.compare-paper h3 { color: var(--slate); }
.compare-paper li::marker { color: var(--r-fall); }
.compare-live { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.compare-live li::marker { color: var(--green); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { counter-increment: step; padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.step::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 16px; }
.step p { color: var(--slate); margin: 0; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.matrix { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.9rem; }
.matrix th, .matrix td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.matrix thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate); background: var(--bg-soft); }
.matrix th[scope="row"] { text-align: left; font-weight: 600; white-space: nowrap; }
.matrix tbody tr:last-child th, .matrix tbody tr:last-child td { border-bottom: 0; }
.cell { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; color: var(--navy); font-weight: 700; font-size: 0.8rem; }
.cell-clear { background: var(--r-clear); }
.cell-pass { background: var(--r-pass); }
.cell-fault { background: var(--r-fault); }
.cell-refusal { background: var(--r-refusal); }
.cell-fall { background: var(--r-fall); }
.cell-pending { background: var(--r-pending); color: var(--slate); }
.cell.is-live { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--r-clear); }
.total { font-weight: 800; }
.total-el { color: var(--error); }
.matrix-caption { font-size: 0.85rem; color: var(--slate); margin-top: 12px; }

.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.benefit { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); border-top: 4px solid var(--benefit-accent, var(--green)); background: #fff; }
.benefit p { color: var(--slate); margin: 0; }
.benefit:nth-child(1) { --benefit-accent: var(--r-clear); }
.benefit:nth-child(2) { --benefit-accent: var(--r-pass); }
.benefit:nth-child(3) { --benefit-accent: var(--r-fault); }
.benefit:nth-child(4) { --benefit-accent: var(--r-refusal); }
.benefit:nth-child(5) { --benefit-accent: var(--navy); }
.benefit:nth-child(6) { --benefit-accent: var(--green); }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--slate); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--slate); margin: 12px 0 0; }

.pilot { background: var(--navy); color: #fff; }
.pilot .pill { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.pilot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.pilot-offer h3 { margin-top: 1.4em; }
.pilot-offer ul { padding-left: 1.2em; color: #cbd5e1; }
.pilot-form, .form-success { background: #fff; color: var(--navy); border-radius: 14px; padding: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--slate); }
.field input, .field textarea { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--navy); }
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 0.85rem; margin: 6px 0 0; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-size: 0.95rem; }
.form-status:empty { display: none; }
.form-status a { color: var(--green-dark); font-weight: 700; }
.form-success h3 { margin: 0; }

.site-footer { padding: 40px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; }
.footer-grid p { margin: 0; }
.fine { color: var(--slate); font-size: 0.85rem; }

@media (max-width: 860px) {
  .section { padding: 64px 0; }
  .hero-grid { grid-template-columns: 1fr; justify-items: center; gap: 48px; }
  .hero-copy { max-width: none; }
  .compare, .steps, .benefits, .pilot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .nav-links a:not(.btn) { display: none; }
  .site-header .brand { font-size: 1.3rem; gap: 8px; }
  .site-header .brand-dot { width: 13px; height: 13px; }
  .hero { padding: 48px 0 64px; }
  .link-arrow { display: block; margin: 16px 0 0; }
  .pilot-form, .form-success { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
