/*
 * One stylesheet for the whole site.
 *
 * Same system as the app — same elevation ramp, same hairline borders, same
 * accent, same motion curve — because the download page and the thing you
 * download should read as one product. The differences are the ones a page
 * that is read at arm's length actually needs: larger type, more air, and a
 * hero that has somewhere to put light.
 */
:root {
  --bg: #090b0f;
  --bg-far: #06070a;
  --surface: #101319;
  --surface-high: #171b23;
  --surface-hover: #1c212b;

  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.055);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #eef1f6;
  --text-dim: #b6bece;
  --subtext: #7f8a9c;

  --accent: #5b9dff;
  --accent-bright: #7db2ff;
  --accent-wash: rgba(91, 157, 255, 0.12);
  --good: #3ddc97;
  --good-wash: rgba(61, 220, 151, 0.12);
  --warn: #f5b544;
  --bad: #ff6b66;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.65);
  --ring: 0 0 0 3px rgba(91, 157, 255, 0.28);

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --fast: 140ms var(--ease);

  --font: "Segoe UI Variable Display", "Segoe UI", Inter, -apple-system,
    BlinkMacSystemFont, Roboto, Ubuntu, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo,
    Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--fast); }
a:hover { color: var(--accent-bright); text-decoration: underline; }

::selection { background: rgba(91, 157, 255, 0.32); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border: 3px solid transparent; background-clip: content-box; border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); background-clip: content-box; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }

/* ----------------------------------------------------------------- header */

header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(9, 11, 15, 0.78);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border-soft);
}
/* min-height, not height: a header that cannot grow is a header that clips. */
header.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 660; font-size: 16px; letter-spacing: -0.01em; color: var(--text);
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo svg { width: 21px; height: 21px; color: var(--accent); }
/*
 * The nav scrolls sideways rather than wrapping. On a phone these four links
 * are wider than the screen, and a link allowed to wrap turns "How it works"
 * into three stacked words and pushes "Download" off the edge entirely.
 */
header.top nav {
  margin-left: auto; display: flex; gap: 4px; font-size: 14.5px;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  max-width: 100%;
}
header.top nav::-webkit-scrollbar { display: none; }
header.top nav a {
  color: var(--subtext); padding: 6px 11px; border-radius: var(--radius-sm);
  white-space: nowrap; flex: none;
  transition: background var(--fast), color var(--fast);
}
header.top nav a.nav-cta { color: var(--accent); font-weight: 560; }
header.top nav a.nav-cta:hover { color: #041022; background: var(--accent); }
header.top nav a:hover, header.top nav a.here {
  color: var(--text); text-decoration: none; background: var(--surface-high);
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 92px 24px 64px;
}
/* One soft light behind the headline, clipped to the page. Everything else on
   the site is flat on purpose; this is the one place with a horizon. */
.hero::before {
  content: ""; position: absolute; inset: -140px 0 auto; height: 520px;
  background: radial-gradient(46% 60% at 22% 34%, rgba(91, 157, 255, 0.16), transparent 70%);
  pointer-events: none; z-index: -1;
}
.hero h1 {
  font-size: clamp(34px, 5.2vw, 52px); line-height: 1.1;
  margin: 0 0 20px; letter-spacing: -0.03em; font-weight: 660;
}
.hero p.lead { font-size: 19px; color: var(--text-dim); margin: 0 0 32px; max-width: 640px; }

.idbox {
  display: inline-flex; align-items: center; gap: 20px;
  background: linear-gradient(180deg, rgba(91, 157, 255, 0.06), transparent 70%), var(--surface);
  border: 1px solid rgba(91, 157, 255, 0.26);
  border-radius: var(--radius-lg); padding: 18px 24px; margin-bottom: 32px;
  box-shadow: var(--shadow);
}
.idbox .digits {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: clamp(19px, 2.6vw, 27px); letter-spacing: 0.06em;
  font-weight: 600; color: #fff; white-space: nowrap;
}
.idbox .caption { font-size: 13.5px; color: var(--subtext); max-width: 190px; line-height: 1.45; }

/* --------------------------------------------------------------- controls */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #041022; font-weight: 640;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, var(--shadow-sm);
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}
.btn:hover { background: linear-gradient(180deg, #93c1ff, var(--accent-bright)); text-decoration: none; color: #041022; }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: var(--surface-high); color: var(--text);
  border-color: var(--border); box-shadow: none;
}
.btn.ghost:hover { background: var(--surface-hover); border-color: var(--border-strong); color: var(--text); }
.btn svg { width: 17px; height: 17px; flex: none; opacity: 0.9; }
.btn small { display: block; font-weight: 450; font-size: 11.5px; opacity: 0.72; }
.btn .label { display: block; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* -------------------------------------------------------------- sections */

section { padding: 62px 0; border-top: 1px solid var(--border-soft); }
section h2 { font-size: 29px; margin: 0 0 10px; letter-spacing: -0.025em; font-weight: 650; }
section > .wrap > p.sub { color: var(--text-dim); margin: 0 0 32px; max-width: 660px; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--fast), transform var(--fast), background var(--fast);
}
.card::before {
  content: ""; position: absolute; inset: 0 12px auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); background: var(--surface-high); }
.card h3 { margin: 0 0 7px; font-size: 16px; font-weight: 620; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--subtext); font-size: 14.5px; line-height: 1.58; }
.card .pill {
  display: inline-block; margin-bottom: 6px;
  font-size: 11.5px; font-weight: 560; color: var(--good);
  background: var(--good-wash); padding: 2px 9px; border-radius: 999px;
}

ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
ol.steps li { counter-increment: s; display: flex; gap: 17px; }
ol.steps li::before {
  content: counter(s);
  flex: 0 0 32px; height: 32px; border-radius: 50%;
  background: var(--accent-wash); border: 1px solid rgba(91, 157, 255, 0.24);
  display: flex; align-items: center; justify-content: center;
  font-weight: 680; font-size: 14px; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
ol.steps b { display: block; font-weight: 620; }
ol.steps span { color: var(--subtext); font-size: 15px; }

table.compare { width: 100%; border-collapse: collapse; font-size: 15px; }
table.compare th, table.compare td {
  text-align: left; padding: 13px 12px;
  border-bottom: 1px solid var(--border-soft); vertical-align: top;
}
table.compare tr:last-child td { border-bottom: none; }
table.compare th {
  color: var(--subtext); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
table.compare td { color: var(--text-dim); }
table.compare td b { color: var(--text); }
table.compare td.y { color: var(--good); }
table.compare td.n { color: var(--subtext); font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13.5px; }
table.compare .col-complaint { width: 34%; }
table.compare a { color: var(--text); }

.note {
  border: 1px solid var(--border-soft); border-left: 3px solid var(--warn);
  background: var(--surface);
  padding: 17px 19px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0;
}
.note.bad { border-left-color: var(--bad); }
.note.good { border-left-color: var(--good); }
.note p { color: var(--text-dim); }
.note p:last-child { margin-bottom: 0; }

details {
  border-bottom: 1px solid var(--border-soft); padding: 15px 0;
}
details summary {
  cursor: pointer; font-weight: 600; list-style: none;
  display: flex; align-items: baseline; gap: 10px;
  transition: color var(--fast);
}
details summary:hover { color: var(--accent-bright); }
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: "+"; color: var(--accent); font-family: var(--mono);
  font-weight: 400; width: 12px; flex: none;
}
details[open] summary::before { content: "–"; }
details p { color: var(--subtext); margin: 10px 0 0 22px; }

code, .mono {
  font-family: var(--mono); font-size: 0.9em;
  background: var(--surface-high); border: 1px solid var(--border-soft);
  padding: 1.5px 6px; border-radius: 5px;
}
pre {
  background: var(--bg-far); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 17px; overflow-x: auto; font-size: 13.5px;
}
pre code { background: none; padding: 0; border: none; }

ul, ol { color: var(--text-dim); }
li { margin-bottom: 7px; }

footer {
  border-top: 1px solid var(--border-soft); padding: 36px 0 64px;
  color: var(--subtext); font-size: 14px;
}
footer .row { justify-content: space-between; }
footer a { color: var(--subtext); }
footer a:hover { color: var(--text); }

h1.page { font-size: clamp(30px, 4.4vw, 38px); margin: 52px 0 12px; letter-spacing: -0.028em; font-weight: 660; }
p.lead-sub { font-size: 18px; color: var(--text-dim); margin: 0 0 8px; }
h3.sub { font-size: 18px; margin: 38px 0 8px; font-weight: 620; letter-spacing: -0.012em; }
p.small { font-size: 14px; color: var(--subtext); }
.sign-off { margin: 36px 0 64px; }

@media (max-width: 640px) {
  .hero { padding: 52px 20px 44px; }
  .wrap { padding: 0 20px; }
  header.top .wrap { gap: 10px; }
  /* Two links fit a phone. The other two are sections of this same page,
     reached by scrolling — which is what somebody on a phone does anyway. */
  header.top nav { gap: 4px; font-size: 13.5px; }
  header.top nav a { padding: 6px 9px; }
  header.top nav a.wide-only { display: none; }
  .logo { font-size: 15px; flex: none; }
  .logo svg { width: 19px; height: 19px; }
  section { padding: 46px 0; }
  section h2 { font-size: 24px; }
  .hero p.lead { font-size: 17px; }
  .download-head { text-align: left; }
  .idbox { flex-direction: column; align-items: flex-start; gap: 10px; }
  .idbox .caption { max-width: none; }
  table.compare .col-complaint { width: auto; }
}

/* ------------------------------------------------------------- download */

.download-head { text-align: center; margin-bottom: 34px; }
.download-head h2 { margin-bottom: 8px; }
.download-head p.sub { margin: 0 auto; }

.dl-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* One card per platform: mark, name, a sentence, one button. Everything a
   person needs to decide, and nothing they need to decide between. */
.dl-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 26px 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--fast), background var(--fast);
}
.dl-card::before {
  content: ""; position: absolute; inset: 0 14px auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
}
.dl-card:hover { border-color: var(--border-strong); background: var(--surface-high); }
.dl-mark {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 13px; margin-bottom: 14px;
  background: var(--accent-wash); color: var(--accent);
}
.dl-mark svg { width: 26px; height: 26px; }
.dl-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 640; letter-spacing: -0.014em; }
.dl-card p { color: var(--subtext); font-size: 13.5px; line-height: 1.55; margin: 0 0 20px; max-width: 260px; }

.dl-btn {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  width: 100%; padding: 12px 18px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #041022; border-radius: var(--radius); border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.24) inset, 0 8px 22px -12px rgba(91, 157, 255, 0.9);
  transition: background var(--fast), transform var(--fast);
}
.dl-btn:hover {
  background: linear-gradient(180deg, #93c1ff, var(--accent-bright));
  color: #041022; text-decoration: none; transform: translateY(-1px);
}
.dl-btn:active { transform: translateY(1px); }
.dl-btn-main { font-size: 15px; font-weight: 660; letter-spacing: -0.01em; }
.dl-btn-meta { font-size: 12px; font-weight: 520; opacity: 0.74; font-variant-numeric: tabular-nums; }
.dl-btn.off {
  background: var(--surface-high); color: var(--subtext); border-color: var(--border);
  box-shadow: none; font-size: 13.5px; cursor: default;
}
.dl-btn.off:hover { transform: none; background: var(--surface-high); color: var(--subtext); }

.dl-history { border-bottom: none; padding: 12px 0 0; width: 100%; }
.dl-history summary {
  font-size: 12.5px; font-weight: 520; color: var(--subtext);
  justify-content: center;
}
.dl-history summary::before { content: "B8"; font-size: 10px; width: auto; }
.dl-history[open] summary::before { content: "BE"; }
.dl-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; text-align: left; }
.dl-row { display: flex; flex-direction: column; font-size: 12.5px; }
.dl-row a { color: var(--text-dim); }
.dl-row a:hover { color: var(--accent-bright); }
.dl-row-meta {
  color: var(--subtext); font-family: var(--mono);
  font-variant-numeric: tabular-nums; font-size: 11px;
}
.hidden { display: none !important; }

/* -------------------------------------------------------------- callout */

.callout {
  display: flex; gap: 16px; margin: 30px 0 0;
  background: linear-gradient(180deg, rgba(245, 181, 68, 0.07), transparent 60%), var(--surface);
  border: 1px solid rgba(245, 181, 68, 0.3);
  border-radius: var(--radius-lg); padding: 20px 22px;
}
.callout-mark {
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(245, 181, 68, 0.14); color: var(--warn);
}
.callout-mark svg { width: 20px; height: 20px; }
.callout h3 { margin: 2px 0 8px; font-size: 16.5px; font-weight: 620; letter-spacing: -0.012em; }
.callout p { color: var(--text-dim); }
.callout p:last-child { margin-bottom: 0; }
.callout-do {
  background: var(--bg-far); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text) !important;
}
.grow { flex: 1; min-width: 0; }

@media (max-width: 640px) {
  .callout { flex-direction: column; gap: 12px; }
}
