/* Diveable web. Tokens mirror lib/theme.ts: the same surfaces, ink, hairline,
   accent, radii and type scale as the app, so the site reads like the product. */

:root {
  --bg: #f1f4f6;
  --card: #ffffff;
  --card-pressed: #f5f7f9;
  --ink: #0c1a26;
  --ink-2: #43596b;
  --ink-3: #7d8fa0;
  --hairline: rgba(12, 26, 38, 0.08);
  --track: rgba(12, 26, 38, 0.08);
  --accent: #0e7490;
  --accent-ink: #ffffff;
  --accent-soft: rgba(14, 116, 144, 0.10);
  --water-top: #1e9fae;
  --water-mid: #0e6e88;
  --water-low: #083f57;
  --water-bottom: #04202f;
  --shadow: 0 1px 2px rgba(12, 26, 38, 0.04), 0 12px 32px -12px rgba(12, 26, 38, 0.18);

  --great: #0f766e; --great-deep: #0b4f4a; --great-soft: rgba(15,118,110,0.12);
  --good: #15803d;  --good-deep: #0e5429;  --good-soft: rgba(21,128,61,0.12);
  --fair: #b45309;  --fair-deep: #7c3a06;  --fair-soft: rgba(180,83,9,0.12);
  --poor: #c2410c;  --poor-deep: #7c2d12;  --poor-soft: rgba(194,65,12,0.12);
  --dont: #b91c1c;  --dont-deep: #7f1414;  --dont-soft: rgba(185,28,28,0.12);

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --gutter: 20px;
  --max: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", system-ui, Inter, Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1119;
    --card: #131d29;
    --card-pressed: #182534;
    --ink: #eef4f8;
    --ink-2: #a9bac8;
    --ink-3: #66788a;
    --hairline: rgba(255, 255, 255, 0.09);
    --track: rgba(255, 255, 255, 0.10);
    --accent: #4cc4e0;
    --accent-ink: #04222b;
    --accent-soft: rgba(76, 196, 224, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);

    --great: #2cc7b2; --great-deep: #0f766e; --great-soft: rgba(44,199,178,0.16);
    --good: #4ade80;  --good-deep: #15803d;  --good-soft: rgba(74,222,128,0.16);
    --fair: #f5a623;  --fair-deep: #b45309;  --fair-soft: rgba(245,166,35,0.16);
    --poor: #f4762e;  --poor-deep: #c2410c;  --poor-soft: rgba(244,118,46,0.16);
    --dont: #f25555;  --dont-deep: #b91c1c;  --dont-soft: rgba(242,85,85,0.16);
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.tabular { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Type --------------------------------------------------------------- */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.5vw, 4.25rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); letter-spacing: -0.03em; }
h3 { font-size: 1.25rem; letter-spacing: -0.015em; font-weight: 600; }
p { text-wrap: pretty; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); line-height: 1.5; max-width: 34em; }
.eyebrow {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); line-height: 1.4;
}
.eyebrow.accent { color: var(--accent); }
.muted { color: var(--ink-2); }

/* ---- Header --------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--hairline); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 4px 22px; font-size: 0.9375rem; font-weight: 500; }
.site-nav a { color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a.btn { margin-left: 6px; color: var(--accent-ink); }
@media (max-width: 560px) { .site-nav a:not(.btn) { display: none; } }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap;
  background: var(--accent); color: var(--accent-ink);
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }
.btn.small { height: 36px; padding: 0 14px; font-size: 0.9rem; }
.btn.secondary { background: var(--accent-soft); color: var(--accent); }
.btn svg { width: 18px; height: 18px; }

/* ---- Hero ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero-copy .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; margin-top: 6px; }
.hero-note { font-size: 0.9375rem; color: var(--ink-3); }
.hero-glow {
  position: absolute; inset: auto -20% -40% -20%; height: 70%; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 60% at 70% 50%, var(--accent-soft), transparent 70%);
}
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
}

/* Phone frame with a verdict card, built in CSS after VerdictHero. */
.phone {
  width: min(360px, 100%); margin: 0 auto;
  background: var(--card); border-radius: 40px; padding: 14px;
  box-shadow: var(--shadow), inset 0 0 0 1px var(--hairline);
}
.screen {
  background: var(--bg); border-radius: 28px; padding: 18px 16px 20px;
  display: flex; flex-direction: column; gap: 14px; min-height: 520px;
}
.screen-top { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 0; }
.screen-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.screen-sub { font-size: 0.85rem; color: var(--ink-3); margin-top: 2px; }
.verdict {
  border-radius: var(--r-lg); padding: 18px 18px 16px; color: #fff;
  background: linear-gradient(135deg, var(--great), var(--great-deep));
  display: flex; flex-direction: column; gap: 14px;
}
@media (prefers-color-scheme: dark) { .verdict { background: linear-gradient(135deg, var(--great-deep), var(--bg) 140%); } }
.verdict .eyebrow { color: rgba(255,255,255,0.8); }
.verdict-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.verdict-band { display: flex; align-items: center; gap: 8px; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.verdict-band svg { width: 26px; height: 26px; }
.verdict-score { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.verdict-score small { font-size: 0.95rem; font-weight: 500; opacity: 0.75; letter-spacing: 0; margin-left: 2px; }
.verdict-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r-pill); font-size: 0.8125rem; font-weight: 600; background: rgba(255,255,255,0.16); color: #fff; }
.factors { display: flex; flex-direction: column; gap: 8px; }
.factor {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px;
  background: var(--card); border-radius: var(--r-md); padding: 10px 12px;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.factor .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.factor .ic svg { width: 18px; height: 18px; }
.factor b { display: block; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; }
.factor span { display: block; font-size: 0.8rem; color: var(--ink-3); }
.pill { font-size: 0.75rem; font-weight: 700; padding: 4px 9px; border-radius: var(--r-pill); }
.pill.great { background: var(--great-soft); color: var(--great); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.fair { background: var(--fair-soft); color: var(--fair); }

/* ---- Sections ------------------------------------------------------------- */
.section { padding: clamp(48px, 7vw, 96px) 0; scroll-margin-top: 64px; }
.section + .section { border-top: 1px solid var(--hairline); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 40em; margin-bottom: clamp(28px, 4vw, 44px); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--card); border-radius: var(--r-lg); padding: 24px;
  box-shadow: inset 0 0 0 1px var(--hairline);
  display: flex; flex-direction: column; gap: 10px;
}
.card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.card .ic svg { width: 22px; height: 22px; }
.card p { color: var(--ink-2); font-size: 0.9875rem; }
.card h3 { margin-top: 2px; }

/* Rating scale */
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.scale > div { border-radius: var(--r-md); padding: 16px 14px 14px; color: #fff; display: flex; flex-direction: column; gap: 4px; min-height: 104px; }
.scale b { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.scale b svg { width: 16px; height: 16px; }
.scale span { font-size: 0.8rem; opacity: 0.85; font-variant-numeric: tabular-nums; }
.scale .s-great { background: linear-gradient(160deg, var(--great), var(--great-deep)); }
.scale .s-good { background: linear-gradient(160deg, var(--good), var(--good-deep)); }
.scale .s-fair { background: linear-gradient(160deg, var(--fair), var(--fair-deep)); }
.scale .s-poor { background: linear-gradient(160deg, var(--poor), var(--poor-deep)); }
.scale .s-dont { background: linear-gradient(160deg, var(--dont), var(--dont-deep)); }
@media (max-width: 700px) { .scale { grid-template-columns: repeat(2, 1fr); } .scale > div:last-child { grid-column: span 2; } }

/* Two-up feature rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.split + .split { margin-top: clamp(40px, 6vw, 72px); }
.split.flip > :first-child { order: 2; }
.split .copy { display: flex; flex-direction: column; gap: 14px; }
.split .copy p { color: var(--ink-2); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }

.panel { background: var(--card); border-radius: var(--r-xl); padding: 24px; box-shadow: inset 0 0 0 1px var(--hairline); }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--hairline); font-size: 0.95rem; }
.row:first-child { border-top: 0; padding-top: 0; }
.row:last-child { padding-bottom: 0; }
.row b { font-weight: 600; }
.row .v { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stops span { padding: 6px 12px; border-radius: var(--r-pill); background: var(--dont-soft); color: var(--dont); font-weight: 600; font-size: 0.85rem; }

/* Best windows strip mock */
.windows { display: flex; gap: 8px; overflow: hidden; }
.win { flex: 1 0 96px; border-radius: var(--r-md); padding: 12px; background: var(--card-pressed); box-shadow: inset 0 0 0 1px var(--hairline); display: flex; flex-direction: column; gap: 2px; }
.win small { font-size: 0.75rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.win b { font-size: 1rem; letter-spacing: -0.01em; }
.win span { font-size: 0.8rem; color: var(--ink-2); }
.win i { display: block; height: 4px; border-radius: 2px; margin-top: 8px; }

/* Trust band */
.trust { background: linear-gradient(135deg, var(--water-top), var(--water-mid) 40%, var(--water-low) 75%, var(--water-bottom)); color: #fff; border-radius: var(--r-xl); padding: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; position: relative; overflow: hidden; }
.trust::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 90% at 25% 0%, rgba(255,255,255,0.22), transparent 60%); pointer-events: none; }
.trust > * { position: relative; }
.trust h2 { color: #fff; }
.trust p { color: rgba(255,255,255,0.82); margin-top: 12px; max-width: 30em; }
.trust .mark { width: clamp(140px, 22vw, 220px); height: auto; color: #fff; margin: 0 auto; filter: drop-shadow(0 12px 30px rgba(0,0,0,0.25)); }
.trust ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.trust li { padding: 7px 13px; border-radius: var(--r-pill); background: rgba(255,255,255,0.14); font-weight: 600; font-size: 0.9rem; backdrop-filter: blur(8px); }
@media (max-width: 760px) { .trust { grid-template-columns: 1fr; } .trust .mark { order: -1; } }

/* Note (Disclaimer) */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--ink-2); font-size: 0.95rem; }
.note svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 2px; }

/* ---- Privacy policy ------------------------------------------------------ */
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 20; transform: translateY(-160%); background: var(--card); padding: 12px 16px; border-radius: var(--r-sm); }
.skip-link:focus { transform: translateY(0); }
.privacy-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 64px; row-gap: 40px; padding-top: 64px; padding-bottom: 80px; }
.privacy-intro { grid-column: 2; display: grid; gap: 16px; }
.privacy-intro h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
.privacy-intro .updated { color: var(--ink-2); font-size: 0.875rem; }
.privacy-intro .lede { margin-top: 8px; font-size: 1.125rem; line-height: 1.7; }
.privacy-sidebar { grid-column: 1; grid-row: 2; align-self: start; position: sticky; top: 100px; }
.privacy-nav-title { font-size: 0.8125rem; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.privacy-sidebar nav { border-left: 1px solid var(--hairline); padding-left: 20px; }
.privacy-sidebar a { display: flex; align-items: center; min-height: 44px; color: var(--ink-2); font-size: 0.875rem; line-height: 1.4; }
.privacy-sidebar a:hover { color: var(--accent); }
.privacy-article { min-width: 0; color: var(--ink-2); line-height: 1.75; }
.privacy-article > section + section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--hairline); }
.privacy-article h2 { font-size: 1.375rem; color: var(--ink); line-height: 1.3; margin-bottom: 20px; scroll-margin-top: 96px; }
.privacy-article p + p, .privacy-article ul + p { margin-top: 20px; }
.privacy-article strong { font-weight: 600; color: var(--ink); }
.privacy-article ul { padding-left: 1.2em; }
.privacy-article li + li { margin-top: 16px; }
.privacy-article li::marker { color: var(--accent); }
.privacy-article a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.privacy-summary { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 28px; }
.privacy-summary h2 { font-size: 1rem; margin-bottom: 24px; }
.privacy-summary dl { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; }
.privacy-summary dt { font-weight: 600; font-size: 0.9375rem; color: var(--ink); margin-bottom: 4px; }
.privacy-summary dd { font-size: 0.875rem; line-height: 1.6; }
.privacy-page .site-nav [aria-current="page"] { color: var(--accent); }
@media (max-width: 800px) {
  .privacy-layout { grid-template-columns: minmax(0, 1fr); max-width: 720px; padding-top: 40px; padding-bottom: 56px; gap: 32px; }
  .privacy-intro, .privacy-sidebar { grid-column: 1; }
  .privacy-sidebar { position: static; }
  .privacy-sidebar nav { border-left: 0; padding: 20px 0; border-block: 1px solid var(--hairline); display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .privacy-nav-title { grid-column: 1 / -1; margin-bottom: 8px; }
  .privacy-page .site-nav a:not(.btn) { display: none; }
}
@media (max-width: 480px) {
  .privacy-summary { padding: 24px; }
  .privacy-summary dl { grid-template-columns: 1fr; gap: 20px; }
}
@media print {
  .privacy-page .site-header, .privacy-page .site-footer, .privacy-sidebar, .skip-link { display: none; }
  .privacy-layout { display: block; max-width: none; padding: 0; }
  .privacy-intro { margin-bottom: 24px; }
  .privacy-page { background: white; --ink: #0c1a26; --ink-2: #43596b; --card: white; --accent: #0e7490; }
  .privacy-article h2 { break-after: avoid; }
  .privacy-summary { break-inside: avoid; }
}

/* ---- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--hairline); padding: 32px 0 44px; font-size: 0.9rem; color: var(--ink-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--ink-2); }
.site-footer .brand { font-size: 1rem; }
.site-footer .brand .mark { width: 22px; height: 22px; }

/* ---- Not found ------------------------------------------------------------ */
.center { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); }
.center .mark { width: 96px; height: 96px; color: var(--accent); margin: 0 auto 24px; }

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