/* ==========================================================================
   Speedxcheck — global styles
   ========================================================================== */

:root {
  --bg: #060914;
  --bg-2: #0a1024;
  --bg-3: #0f1731;
  --surface: rgba(148, 163, 255, .045);
  --surface-2: rgba(148, 163, 255, .08);
  --line: rgba(148, 163, 255, .14);
  --line-2: rgba(148, 163, 255, .26);
  --ink: #eef2ff;
  --ink-2: #cdd5f3;
  --muted: #9aa6c9;
  --dim: #6d789c;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --indigo: #6366f1;
  --violet: #a855f7;
  --pink: #ec4899;
  --lime: #a3e635;
  --green: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;
  --grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
  --grad-up: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 40px 90px -40px rgba(0, 0, 0, .8);
  --container: 1200px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #67e8f9; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(99, 102, 241, .45); color: #fff; }

.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; padding: 10px 16px; background: var(--cyan); color: #04131a; font-weight: 700; border-radius: 0 0 10px 0; }
.skip-link:focus { left: 0; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .98rem/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -12px rgba(99, 102, 241, .8); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(99, 102, 241, .95); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { color: #fff; border-color: rgba(34, 211, 238, .6); background: rgba(34, 211, 238, .08); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 9, 20, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font: 700 1.32rem/1 var(--font-head); letter-spacing: -.03em; }
.brand:hover { color: #fff; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 6px 20px -6px rgba(99, 102, 241, .9); }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { padding: 9px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: .95rem; transition: color .15s, background .15s; }
.nav a:not(.btn):hover { color: #fff; background: var(--surface-2); }
.nav a[aria-current="page"]:not(.btn) { color: #fff; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.nav .btn { margin-left: 10px; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); cursor: pointer; position: relative; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after { position: absolute; left: 12px; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, top .2s, opacity .2s; content: ""; }
.nav-burger span { top: 20px; }
.nav-burger span::before { left: 0; top: -6px; }
.nav-burger span::after { left: 0; top: 6px; }
.nav-toggle:checked + .nav-burger span { background: transparent; }
.nav-toggle:checked + .nav-burger span::before { top: 0; transform: rotate(45deg); }
.nav-toggle:checked + .nav-burger span::after { top: 0; transform: rotate(-45deg); }
.nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--cyan); outline-offset: 3px; }

@media (max-width: 920px) {
  .nav-burger { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 20px 22px; background: rgba(8, 12, 28, .97); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav a:not(.btn) { padding: 13px 14px; }
  .nav .btn { margin: 10px 0 0; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
.lead { color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.15rem); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  color: var(--cyan); font: 600 .78rem/1 var(--font); letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); }
.center .eyebrow::after { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); }

.card {
  position: relative; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(148, 163, 255, .07), rgba(148, 163, 255, .025));
  border: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
a.card { color: var(--ink); display: block; }
a.card:hover { color: var(--ink); transform: translateY(-4px); border-color: rgba(99, 102, 241, .5); box-shadow: 0 24px 50px -30px rgba(99, 102, 241, .8); }
.card h3 { font-size: 1.2rem; margin-bottom: .45em; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.icon-tile {
  display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 20px;
  border-radius: 14px; background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .25); color: var(--cyan);
}
.icon-tile svg { width: 24px; height: 24px; }
.icon-tile.violet { background: rgba(168, 85, 247, .1); border-color: rgba(168, 85, 247, .3); color: #c084fc; }
.icon-tile.lime { background: rgba(163, 230, 53, .08); border-color: rgba(163, 230, 53, .28); color: var(--lime); }
.icon-tile.amber { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .28); color: var(--amber); }
.icon-tile.rose { background: rgba(251, 113, 133, .08); border-color: rgba(251, 113, 133, .28); color: var(--rose); }
.icon-tile.indigo { background: rgba(99, 102, 241, .12); border-color: rgba(99, 102, 241, .35); color: #a5b4fc; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1020px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; color: var(--cyan); font-weight: 600; font-size: .92rem; }
.card-link svg { width: 16px; height: 16px; transition: transform .2s; }
a.card:hover .card-link svg { transform: translateX(4px); }

/* ---------- Hero / speed test ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 84px) 0 clamp(64px, 8vw, 100px); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(rgba(148, 163, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 255, .06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}
.glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px); opacity: .55; pointer-events: none; }
.glow-a { width: 520px; height: 520px; left: -160px; top: -120px; background: rgba(34, 211, 238, .35); }
.glow-b { width: 600px; height: 600px; right: -200px; top: 120px; background: rgba(168, 85, 247, .32); }
.hero-copy { max-width: 820px; margin: 0 auto 44px; text-align: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); margin-bottom: 20px; }
.hero .lead { max-width: 640px; margin-inline: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; padding: 7px 16px 7px 8px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: .88rem; font-weight: 500;
}
.pill .dot { display: inline-grid; place-items: center; padding: 3px 10px; border-radius: 999px; background: rgba(163, 230, 53, .14); color: var(--lime); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.test-console {
  position: relative; max-width: 1100px; margin: 0 auto;
  border-radius: var(--radius-lg); padding: 1px;
  background: linear-gradient(135deg, rgba(34, 211, 238, .55), rgba(99, 102, 241, .25) 40%, rgba(168, 85, 247, .5));
  box-shadow: var(--shadow), 0 0 120px -40px rgba(99, 102, 241, .6);
}
.test-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; border-radius: calc(var(--radius-lg) - 1px); background: linear-gradient(180deg, #0b1228, #080d1e); overflow: hidden; }
.test-progress { position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--grad); transition: width .25s linear; z-index: 2; }
.gauge-col { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 32px 34px; border-right: 1px solid var(--line); }
.gauge { position: relative; width: min(100%, 380px); aspect-ratio: 1 / 1; }
.gauge-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.g-track { fill: none; stroke: rgba(148, 163, 255, .12); stroke-width: 16; stroke-linecap: round; }
.g-fill { fill: none; stroke: url(#gaugeDown); stroke-width: 16; stroke-linecap: round; filter: drop-shadow(0 0 10px rgba(34, 211, 238, .55)); transition: stroke .3s; }
.gauge.is-upload .g-fill { stroke: url(#gaugeUp); filter: drop-shadow(0 0 10px rgba(236, 72, 153, .5)); }
.g-tick { stroke: rgba(148, 163, 255, .35); stroke-width: 2; stroke-linecap: round; }
.g-label { fill: var(--dim); font: 600 12px/1 var(--font); }
.g-label.on { fill: var(--ink-2); }
.g-marker { fill: #fff; filter: drop-shadow(0 0 8px rgba(255, 255, 255, .9)); opacity: 0; transition: opacity .3s; }
.gauge.is-running .g-marker { opacity: 1; }
.gauge-center { position: absolute; inset: 0; display: grid; place-items: center; }
.go-btn {
  position: relative; width: 46%; aspect-ratio: 1 / 1; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 30% 25%, #2b3a7a, #10183a 70%); color: #fff;
  font: 700 clamp(2rem, 5vw, 2.8rem)/1 var(--font-head); letter-spacing: .04em;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08), 0 0 0 10px rgba(99, 102, 241, .08), 0 20px 50px -10px rgba(34, 211, 238, .45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.go-btn::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; padding: 3px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.go-btn::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(34, 211, 238, .45); animation: pulse 2.2s ease-out infinite; }
.go-btn:hover { transform: scale(1.04); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .1), 0 0 0 12px rgba(99, 102, 241, .12), 0 24px 60px -10px rgba(34, 211, 238, .6); }
.go-btn small { display: block; margin-top: 8px; font: 600 .7rem/1 var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
@keyframes pulse { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
.gauge-readout { display: flex; flex-direction: column; align-items: center; text-align: center; transform: translateY(6%); }
.gauge-readout[hidden] { display: none; }
.gauge-phase { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.gauge-phase svg { width: 15px; height: 15px; color: var(--cyan); }
.gauge.is-upload .gauge-phase svg { color: var(--pink); }
.gauge-value { font: 700 clamp(2.8rem, 7vw, 4.1rem)/1 var(--font-head); letter-spacing: -.04em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.gauge-unit { color: var(--muted); font-weight: 600; font-size: .95rem; }
.gauge-status { min-height: 24px; margin: 14px 0 0; color: var(--muted); font-size: .95rem; text-align: center; }
.gauge-status strong { color: var(--ink); }
.gauge-status.error { color: var(--rose); }
.restart-btn { margin-top: 14px; }
.restart-btn[hidden] { display: none; }

.panel-col { display: flex; flex-direction: column; gap: 18px; padding: 32px; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.metric { position: relative; padding: 18px 18px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: border-color .3s, background .3s; }
.metric.is-active { border-color: rgba(34, 211, 238, .5); background: rgba(34, 211, 238, .06); }
.metric[data-metric="upload"].is-active { border-color: rgba(236, 72, 153, .5); background: rgba(236, 72, 153, .06); }
.metric-head { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.metric-head svg { width: 16px; height: 16px; }
.metric[data-metric="download"] .metric-head svg { color: var(--cyan); }
.metric[data-metric="upload"] .metric-head svg { color: var(--pink); }
.metric[data-metric="ping"] .metric-head svg { color: var(--lime); }
.metric[data-metric="jitter"] .metric-head svg { color: var(--amber); }
.metric-unit { margin-left: auto; color: var(--dim); font-size: .74rem; }
.metric-value { margin-top: 8px; font: 700 2rem/1.1 var(--font-head); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric-value.muted { color: var(--dim); }
.metric-note { color: var(--dim); font-size: .78rem; margin-top: 2px; }
.spark { display: block; width: 100%; height: 30px; margin-top: 6px; }
.spark polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark .area { stroke: none; }
.metric[data-metric="download"] .spark polyline:not(.area) { stroke: var(--cyan); }
.metric[data-metric="download"] .spark .area { fill: rgba(34, 211, 238, .12); }
.metric[data-metric="upload"] .spark polyline:not(.area) { stroke: var(--pink); }
.metric[data-metric="upload"] .spark .area { fill: rgba(236, 72, 153, .12); }

.conn { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; }
.conn div { padding: 13px 16px; border-bottom: 1px solid var(--line); min-width: 0; }
.conn div:nth-child(odd) { border-right: 1px solid var(--line); }
.conn div:nth-last-child(-n+2) { border-bottom: 0; }
.conn dt { color: var(--dim); font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.conn dd { margin: 3px 0 0; color: var(--ink); font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--dim); font-size: .82rem; line-height: 1.5; }
.privacy-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--green); }

@media (max-width: 900px) {
  .test-inner { grid-template-columns: 1fr; }
  .gauge-col { border-right: 0; border-bottom: 1px solid var(--line); padding: 30px 20px 26px; }
  .panel-col { padding: 22px 18px; }
}
@media (max-width: 420px) {
  .metric { padding: 14px 13px 10px; }
  .metric-value { font-size: 1.6rem; }
  .metric-unit { display: none; }
  .conn { grid-template-columns: 1fr; }
  .conn div:nth-child(odd) { border-right: 0; }
  .conn div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

.hero-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 34px auto 0; color: var(--muted); font-size: .92rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { width: 18px; height: 18px; color: var(--cyan); }

/* ---------- Results ---------- */
.results { max-width: 1100px; margin: 28px auto 0; scroll-margin-top: 96px; }
.results[hidden] { display: none; }
.results-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; }
.result-card { padding: 30px; border-radius: var(--radius); background: linear-gradient(180deg, #0c1430, #080d1f); border: 1px solid var(--line); }
.result-card h3 { font-size: 1.15rem; margin-bottom: 16px; }
.grade-row { display: flex; gap: 22px; align-items: center; margin-bottom: 18px; }
.grade {
  flex-shrink: 0; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 26px;
  background: var(--grad); color: #fff; font: 700 2.6rem/1 var(--font-head); letter-spacing: -.04em;
  box-shadow: 0 18px 40px -16px rgba(99, 102, 241, .9);
}
.grade[data-tone="mid"] { background: linear-gradient(135deg, #fbbf24, #f97316); box-shadow: 0 18px 40px -16px rgba(249, 115, 22, .8); }
.grade[data-tone="low"] { background: linear-gradient(135deg, #fb7185, #e11d48); box-shadow: 0 18px 40px -16px rgba(225, 29, 72, .8); }
.grade-row h3 { font-size: 1.6rem; margin: 0 0 6px; }
.grade-row p { margin: 0; color: var(--muted); }
.result-summary { color: var(--ink-2); margin-bottom: 22px; }
.plan-compare { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.plan-compare label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 10px; }
.plan-input { display: flex; gap: 10px; align-items: center; }
.plan-input input {
  width: 140px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: #070c1d; color: var(--ink); font: 600 1rem var(--font);
}
.plan-input input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, .15); }
.plan-input span { color: var(--muted); font-size: .9rem; }
.plan-bar { height: 10px; margin-top: 14px; border-radius: 999px; background: rgba(148, 163, 255, .12); overflow: hidden; }
.plan-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--grad); transition: width .6s ease; }
.plan-msg { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.plan-msg strong { color: var(--ink); }

.capabilities { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.capabilities li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .95rem; }
.capabilities .cap-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; }
.capabilities .ok .cap-ico { background: rgba(52, 211, 153, .15); color: var(--green); }
.capabilities .meh .cap-ico { background: rgba(251, 191, 36, .14); color: var(--amber); }
.capabilities .no .cap-ico { background: rgba(251, 113, 133, .14); color: var(--rose); }
.capabilities .cap-ico svg { width: 14px; height: 14px; }
.capabilities .cap-note { margin-left: auto; color: var(--dim); font-size: .82rem; text-align: right; }

.tips-plan { margin-top: 22px; }
.tips-plan-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tips-plan-head h3 { margin: 0; font-size: 1.35rem; }
.tip-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tip-card { display: flex; flex-direction: column; padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); transition: border-color .2s, transform .2s; }
.tip-card:hover { color: var(--ink); border-color: rgba(99, 102, 241, .5); transform: translateY(-3px); }
.tip-tag { align-self: flex-start; margin-bottom: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(99, 102, 241, .16); color: #c7d2fe; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tip-card h4 { font-size: 1.08rem; margin-bottom: 8px; }
.tip-card p { color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
.tip-card .card-link { margin-top: auto; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
@media (max-width: 900px) { .results-grid { grid-template-columns: 1fr; } .tip-cards { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .result-card { padding: 22px 18px; } .grade { width: 76px; height: 76px; font-size: 2.1rem; border-radius: 20px; } .grade-row { gap: 16px; } .grade-row h3 { font-size: 1.3rem; } }

/* ---------- History ---------- */
.history { max-width: 1100px; margin: 22px auto 0; }
.history[hidden] { display: none; }
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.history-head h3 { margin: 0; font-size: 1.1rem; }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--muted); font: 500 .88rem var(--font); cursor: pointer; }
.link-btn:hover { color: var(--rose); }
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: rgba(10, 16, 36, .6); }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { color: var(--dim); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: rgba(148, 163, 255, .04); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.badge { display: inline-block; min-width: 34px; padding: 3px 9px; border-radius: 8px; text-align: center; font-weight: 700; font-size: .82rem; background: rgba(99, 102, 241, .18); color: #c7d2fe; }

/* ---------- Factors / features ---------- */
.factor-card .icon-tile { margin-bottom: 18px; }
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.stat { padding: 30px 26px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font: 700 clamp(2rem, 3.6vw, 2.8rem)/1 var(--font-head); letter-spacing: -.04em; margin-bottom: 8px; }
.stat span { color: var(--muted); font-size: .94rem; }
@media (max-width: 860px) { .stats-band { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 420px) { .stats-band { grid-template-columns: 1fr; } .stat { border-right: 0; border-bottom: 1px solid var(--line); } .stat:last-child { border-bottom: 0; } }

.playbook-card .meta { display: flex; gap: 8px; margin-top: 16px; color: var(--dim); font-size: .84rem; }

/* ---------- Quick wins checklist ---------- */
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }
.progress-card { margin-top: 28px; padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.progress-card .row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-weight: 600; }
.progress-card .row span:last-child { color: var(--muted); font-weight: 500; font-size: .92rem; }
.progress-track { height: 10px; border-radius: 999px; background: rgba(148, 163, 255, .12); overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lime), var(--green)); border-radius: 999px; transition: width .4s ease; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: win; }
.checklist li { counter-increment: win; }
.checklist label {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; padding: 18px 20px; cursor: pointer;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, background .2s;
}
.checklist label:hover { border-color: var(--line-2); }
.checklist input { position: absolute; opacity: 0; pointer-events: none; }
.check-box { display: grid; place-items: center; width: 28px; height: 28px; margin-top: 1px; border-radius: 9px; border: 2px solid var(--line-2); color: transparent; transition: all .2s; }
.check-box svg { width: 15px; height: 15px; }
.checklist strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.checklist strong::before { content: counter(win, decimal-leading-zero) "  "; color: var(--dim); font-family: var(--mono); font-size: .8rem; font-weight: 500; }
.checklist span.desc { color: var(--muted); font-size: .92rem; }
.checklist input:checked + label { border-color: rgba(163, 230, 53, .4); background: rgba(163, 230, 53, .05); }
.checklist input:checked + label .check-box { background: var(--lime); border-color: var(--lime); color: #142004; }
.checklist input:checked + label strong { color: var(--ink-2); text-decoration: line-through; text-decoration-color: rgba(163, 230, 53, .6); }
.checklist input:focus-visible + label { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.step::before { counter-increment: step; content: "0" counter(step); display: block; margin-bottom: 18px; font: 700 .9rem/1 var(--mono); color: var(--cyan); }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 1020px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Speed spectrum ---------- */
.spectrum { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.tier { padding: 26px 22px 24px; border-right: 1px solid var(--line); background: var(--surface); position: relative; }
.tier:last-child { border-right: 0; }
.tier::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c, var(--cyan)); }
.tier .range { font: 700 1.35rem/1.1 var(--font-head); letter-spacing: -.02em; }
.tier .range small { font-size: .8rem; color: var(--muted); font-weight: 600; }
.tier .label { display: inline-block; margin: 8px 0 12px; color: var(--c, var(--cyan)); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.tier p { margin: 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 1020px) { .spectrum { grid-template-columns: 1fr; } .tier { border-right: 0; border-bottom: 1px solid var(--line); } .tier:last-child { border-bottom: 0; } .tier::before { width: 4px; height: auto; bottom: 0; right: auto; } }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border-radius: 16px; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, background .2s; }
.faq details[open] { border-color: rgba(99, 102, 241, .45); background: rgba(99, 102, 241, .06); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; cursor: pointer; font: 600 1.05rem/1.4 var(--font-head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--cyan); font: 500 1.2rem/1 var(--font); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 22px 20px; color: var(--muted); }
.faq .answer p:last-child { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.4fr auto; gap: 28px; align-items: center;
  padding: clamp(32px, 5vw, 56px); border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(34, 211, 238, .16), rgba(99, 102, 241, .2) 50%, rgba(168, 85, 247, .22)); border: 1px solid var(--line-2);
}
.cta-band::after { content: ""; position: absolute; z-index: -1; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: rgba(168, 85, 247, .35); filter: blur(80px); }
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 10px; }
.cta-band p { color: var(--ink-2); margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 820px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 60% 80% at 15% 0%, rgba(34, 211, 238, .16), transparent 60%), radial-gradient(ellipse 50% 70% at 90% 20%, rgba(168, 85, 247, .16), transparent 60%); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 860px; }
.page-hero .lead { max-width: 720px; margin: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; color: var(--dim); font-size: .88rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }

/* ---------- Guides ---------- */
.guide-layout { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
.guide-toc { position: sticky; top: 96px; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.guide-toc h2 { font: 700 .76rem/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 0 0 12px; }
.guide-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.guide-toc a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-size: .93rem; font-weight: 500; }
.guide-toc a:hover { background: var(--surface-2); color: #fff; }
.guide-toc a.active { background: rgba(99, 102, 241, .16); color: #fff; box-shadow: inset 2px 0 0 var(--cyan); }
.guide-toc a span { color: var(--dim); font-size: .78rem; font-family: var(--mono); }
.guide-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 36px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.search { position: relative; flex: 1 1 260px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--dim); }
.search input { width: 100%; min-height: 46px; padding: 0 14px 0 42px; border-radius: 12px; border: 1px solid var(--line-2); background: #070c1d; color: var(--ink); font: 500 .98rem var(--font); }
.search input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, .14); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font: 600 .86rem var(--font); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--cyan); color: #fff; }
.chip[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #fff; }
.guide-count { color: var(--dim); font-size: .86rem; margin-left: auto; }
.guide-section { scroll-margin-top: 96px; padding-bottom: 56px; margin-bottom: 56px; border-bottom: 1px solid var(--line); }
.guide-section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.guide-section[hidden] { display: none; }
.guide-section-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 24px; }
.guide-section-head .icon-tile { margin: 4px 0 0; flex-shrink: 0; }
.guide-section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 8px; }
.guide-section-head p { color: var(--muted); margin: 0; max-width: 680px; }
.tips { display: grid; gap: 14px; }
.tip { border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(148, 163, 255, .06), rgba(148, 163, 255, .02)); }
.tip[hidden] { display: none; }
.tip > summary { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 20px 22px; cursor: pointer; }
.tip > summary::-webkit-details-marker { display: none; }
.tip > summary h3 { margin: 0; font-size: 1.12rem; }
.tip > summary::after { content: ""; grid-row: 1 / span 2; grid-column: 2; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 6px; }
.tip[open] > summary::after { transform: rotate(-135deg); }
.tip[open] { border-color: rgba(99, 102, 241, .42); }
.tip-meta { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.tag.high { background: rgba(163, 230, 53, .1); color: var(--lime); border-color: rgba(163, 230, 53, .3); }
.tag.medium { background: rgba(34, 211, 238, .1); color: var(--cyan); border-color: rgba(34, 211, 238, .3); }
.tag.low { background: rgba(148, 163, 255, .08); color: var(--muted); }
.tip-body { padding: 0 22px 22px; color: var(--ink-2); }
.tip-body p { color: var(--muted); }
.tip-body ul, .tip-body ol { margin: 0 0 1em; padding-left: 1.25em; color: var(--muted); }
.tip-body li { margin-bottom: 6px; }
.tip-body li strong, .tip-body p strong { color: var(--ink); }
.tip-body > :last-child { margin-bottom: 0; }
.callout { display: flex; gap: 12px; padding: 14px 16px; margin: 0 0 1em; border-radius: 12px; background: rgba(251, 191, 36, .07); border: 1px solid rgba(251, 191, 36, .25); color: var(--ink-2); font-size: .92rem; }
.callout svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--amber); }
.callout.info { background: rgba(34, 211, 238, .06); border-color: rgba(34, 211, 238, .25); }
.callout.info svg { color: var(--cyan); }
pre.cmd { position: relative; margin: 0 0 1em; padding: 14px 16px; border-radius: 12px; background: #050816; border: 1px solid var(--line); color: #c7f9ff; font: 500 .86rem/1.7 var(--mono); overflow-x: auto; white-space: pre; }
pre.cmd .c { color: var(--dim); }
.os-tabs { margin: 0 0 1em; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.os-tablist { display: flex; gap: 0; border-bottom: 1px solid var(--line); background: rgba(148, 163, 255, .04); }
.os-tablist button { flex: 1; min-height: 42px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); font: 600 .88rem var(--font); cursor: pointer; border-bottom: 2px solid transparent; }
.os-tablist button[aria-selected="true"] { color: #fff; border-bottom-color: var(--cyan); background: rgba(34, 211, 238, .06); }
.os-panel { padding: 16px 18px; }
.os-panel[hidden] { display: none; }
.os-panel ol, .os-panel ul { margin-bottom: 0; }
.os-panel > :last-child { margin-bottom: 0; }
.no-results { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 18px; }
.no-results[hidden] { display: none; }
@media (max-width: 980px) {
  .guide-layout { grid-template-columns: 1fr; gap: 28px; }
  .guide-toc { position: static; }
  .guide-toc ol { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .guide-toc ol { grid-template-columns: 1fr; } .tip > summary { padding: 18px; } .tip-body { padding: 0 18px 18px; } .guide-count { margin-left: 0; } }

/* ---------- Speed guide calculator ---------- */
.calc { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.calc-list { display: grid; gap: 10px; }
.calc-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.calc-row { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.calc-row .icon-tile { width: 42px; height: 42px; margin: 0; border-radius: 12px; }
.calc-row .icon-tile svg { width: 20px; height: 20px; }
.calc-row strong { display: block; font-size: .98rem; }
.calc-row span { color: var(--dim); font-size: .84rem; }
.stepper { display: inline-flex; align-items: center; border-radius: 12px; border: 1px solid var(--line-2); overflow: hidden; }
.stepper button { width: 38px; height: 38px; border: 0; background: transparent; color: var(--ink); font: 600 1.2rem/1 var(--font); cursor: pointer; }
.stepper button:hover { background: var(--surface-2); color: var(--cyan); }
.stepper output { min-width: 34px; text-align: center; font: 700 1.05rem var(--font-head); font-variant-numeric: tabular-nums; }
.calc-result { position: sticky; top: 96px; padding: 30px; border-radius: var(--radius); border: 1px solid rgba(99, 102, 241, .45); background: linear-gradient(180deg, rgba(99, 102, 241, .14), rgba(10, 16, 36, .9)); }
.calc-result .eyebrow { margin-bottom: 10px; }
.calc-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 14px 0 20px; }
.calc-fig { padding: 18px; border-radius: 16px; background: rgba(5, 8, 22, .6); border: 1px solid var(--line); }
.calc-fig small { display: block; color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.calc-fig strong { display: block; font: 700 2.3rem/1.1 var(--font-head); letter-spacing: -.04em; margin-top: 6px; }
.calc-fig strong em { font-style: normal; font-size: .9rem; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.calc-plan { padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; }
.calc-plan strong { color: var(--ink); }
.calc-plan p { margin: 0; color: var(--muted); font-size: .94rem; }
.calc-compare { font-size: .92rem; color: var(--muted); margin: 0 0 18px; }
.calc-compare strong { color: var(--ink); }
@media (max-width: 960px) { .calc { grid-template-columns: 1fr; } .calc-result { position: static; } }
@media (max-width: 420px) { .calc-row { grid-template-columns: 1fr auto; } .calc-row .icon-tile { display: none; } .calc-fig strong { font-size: 1.8rem; } }

.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.type-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.type-card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 16px 0 14px; font-size: .92rem; }
.type-card dt { color: var(--dim); }
.type-card dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 1020px) { .types { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .types { grid-template-columns: 1fr; } }
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; margin: 0; }
.glossary div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.glossary dt { font: 700 1.05rem var(--font-head); margin-bottom: 4px; }
.glossary dd { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .glossary { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 920px) { .about-grid { grid-template-columns: 1fr; } }
.prose p { color: var(--muted); font-size: 1.04rem; }
.prose h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.method { display: grid; gap: 14px; }
.method-item { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.method-item .icon-tile { margin: 0; }
.method-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.method-item p { margin: 0; color: var(--muted); font-size: .93rem; }
.company-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.company-card > div { padding: 28px; border-right: 1px solid var(--line); }
.company-card > div:last-child { border-right: 0; }
.company-card small { display: block; color: var(--dim); font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.company-card p { margin: 0; font-weight: 600; }
@media (max-width: 760px) { .company-card { grid-template-columns: 1fr; } .company-card > div { border-right: 0; border-bottom: 1px solid var(--line); } .company-card > div:last-child { border-bottom: 0; } }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; align-items: start; }
@media (max-width: 920px) { .contact-layout { grid-template-columns: 1fr; } .optin-wrap { order: -1; } }
.contact-aside { display: grid; gap: 14px; }
.contact-card { padding: 22px 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.contact-card .eyebrow { margin-bottom: 10px; }
.contact-card h2 { font-size: 1.3rem; margin-bottom: 6px; }
.contact-card p { margin: 0; color: var(--ink-2); }
.contact-card .big { font: 700 1.5rem var(--font-head); letter-spacing: -.02em; }
.optin-wrap { scroll-margin-top: 96px; padding: clamp(22px, 4vw, 34px); border-radius: var(--radius); border: 1px solid rgba(99, 102, 241, .4); background: linear-gradient(180deg, #0c1430, #080d1f); box-shadow: var(--shadow); }
.optin-wrap > h2 { font-size: 1.5rem; margin-bottom: 6px; }
.optin-wrap > p { color: var(--muted); margin-bottom: 22px; font-size: .95rem; }

/* Opt-in widget (shared markup with js/optin-widget.js) */
#disclaimer-form-widget { color: var(--ink); font-size: 14px; position: relative; }
#disclaimer-form-widget * { box-sizing: border-box; }
#disclaimer-form-widget .contact-info-title,
#disclaimer-form-widget .consent-title { margin-bottom: 12px; color: var(--cyan); font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
#disclaimer-form-widget .input-group { margin-bottom: 14px; }
#disclaimer-form-widget .input-group label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--ink); }
#disclaimer-form-widget .input-group input { width: 100%; padding: 13px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #070c1d; color: var(--ink); font: inherit; font-size: 1rem; }
#disclaimer-form-widget .input-group input::placeholder { color: var(--dim); }
#disclaimer-form-widget .input-group input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, .15); }
#disclaimer-form-widget .input-group input.error { border-color: var(--rose); background: rgba(251, 113, 133, .06); }
#disclaimer-form-widget .input-group input.valid { border-color: var(--green); }
#disclaimer-form-widget .error-message { display: none; margin-top: 5px; color: var(--rose); font-size: 12.5px; }
#disclaimer-form-widget .consent-section,
#disclaimer-form-widget .required-checkbox { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
#disclaimer-form-widget .required-checkbox .error-message { margin: 8px 0 0 29px; }
#disclaimer-form-widget .checkbox-item { display: flex; align-items: flex-start; font-size: 12.5px; }
#disclaimer-form-widget .checkbox-item input[type="checkbox"] { flex-shrink: 0; width: 17px; height: 17px; margin: 2px 12px 0 0; accent-color: var(--indigo); }
#disclaimer-form-widget .checkbox-item label { flex: 1; line-height: 1.6; color: var(--ink-2); }
#disclaimer-form-widget .required-checkbox { background: rgba(99, 102, 241, .1); border-color: rgba(99, 102, 241, .4); }
#disclaimer-form-widget .required-checkbox-links a, #disclaimer-form-widget .disclaimer-links a { font-weight: 700; }
#disclaimer-form-widget .submit-button,
#success-modal .close-button { font: inherit; font-weight: 700; cursor: pointer; }
#disclaimer-form-widget .submit-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 52px; margin-top: 4px; border: 0; border-radius: 999px; background: var(--grad); color: #fff; letter-spacing: .06em; transition: transform .15s, box-shadow .2s, opacity .2s; box-shadow: 0 14px 30px -14px rgba(99, 102, 241, .9); }
#disclaimer-form-widget .submit-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 18px 36px -14px rgba(99, 102, 241, 1); }
#disclaimer-form-widget .submit-button:disabled { cursor: progress; opacity: .85; letter-spacing: .02em; }
#disclaimer-form-widget .submit-button.is-loading::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#disclaimer-form-widget .form-note { min-height: 1.2em; margin: 12px 0 0; color: var(--muted); font-size: .88rem; text-align: center; }
#disclaimer-form-widget .hidden-field { position: absolute; left: -9999px; opacity: 0; }

.account-panel { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .07); }
.account-panel[hidden] { display: none; }
.account-avatar { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; font: 700 1rem var(--font-head); }
.account-info { min-width: 0; flex: 1; }
.account-info strong { display: block; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-info span { display: block; color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#success-modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; padding: 20px; background: rgba(3, 5, 14, .78); backdrop-filter: blur(6px); }
#success-modal.show { display: flex; }
#success-modal .modal-content { width: min(460px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 36px 28px 28px; background: #0c1430; border: 1px solid var(--line-2); color: var(--ink); text-align: center; border-radius: 24px; box-shadow: var(--shadow); animation: pop .35s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
#success-modal .success-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: rgba(52, 211, 153, .15); color: var(--green); font-size: 2rem; }
#success-modal .modal-title { margin: 0 0 8px; font-size: 1.5rem; }
#success-modal .modal-message { margin: 0 0 18px; color: var(--muted); }
#success-modal .account-summary { display: grid; gap: 0; margin: 0 0 22px; border-radius: 14px; border: 1px solid var(--line); text-align: left; overflow: hidden; }
#success-modal .account-summary div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .92rem; }
#success-modal .account-summary div:last-child { border-bottom: 0; }
#success-modal .account-summary dt { color: var(--muted); }
#success-modal .account-summary dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
#success-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
#success-modal .modal-actions .btn { flex: 1 1 200px; }
#success-modal .close-button { flex: 0 1 auto; min-height: 48px; padding: 0 24px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink); }
#success-modal .close-button:hover { border-color: var(--cyan); }

/* ---------- Legal docs ---------- */
.doc { max-width: 860px; }
.doc h2 { font-size: 1.45rem; margin: 2em 0 .6em; padding-bottom: .5em; border-bottom: 1px solid var(--line); }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: 8px; }
.doc strong { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { position: relative; padding: 72px 0 34px; border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg), #04060f); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.footer-brand p { color: var(--muted); max-width: 340px; margin: 16px 0 18px; font-size: .95rem; }
.company { font-style: normal; color: var(--ink-2); font-size: .92rem; line-height: 1.7; }
.company strong { color: var(--ink); }
.site-footer h3 { font: 700 .76rem/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 6px 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer ul a { color: var(--ink-2); font-size: .95rem; }
.site-footer ul a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; margin-top: 54px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--dim); font-size: .86rem; }
.footer-bottom a { color: var(--muted); }
.footer-bottom .disclaimer { max-width: 620px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

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