/* Rekkefly website. Colours follow the app icon: ink #122329, wing #1f5c66,
   coral #ff7059, tile #f4f8f5 → #d3e3de. Light and dark themes; the dark one
   follows the system unless a theme was chosen with the toggle. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/inter-800.woff2") format("woff2"); }

:root {
  --bg: #f6f9f7;
  --bg-tint: #edf4f1;
  --surface: #ffffff;
  --surface-2: #f3f7f5;
  --ink: #122329;
  --text: #22343a;
  --muted: #5b6e73;
  --line: #dbe6e2;
  --line-strong: #c4d4cf;
  --wing: #1f5c66;
  --wing-soft: #d3e3de;
  --coral: #ff7059;
  --coral-strong: #e85a43;
  --on-coral: #2a0e09;
  --left: #e5484d;
  --right: #2f9e44;
  --stage-a: #f4f8f5;
  --stage-b: #d3e3de;
  --code-bg: #10222a;
  --code-fg: #d9e6e3;
  --glow-a: rgba(31, 92, 102, 0.20);
  --glow-b: rgba(255, 112, 89, 0.16);
  --shadow-sm: 0 1px 2px rgba(18, 35, 41, 0.06), 0 2px 8px rgba(18, 35, 41, 0.05);
  --shadow: 0 1px 2px rgba(18, 35, 41, 0.05), 0 12px 32px rgba(18, 35, 41, 0.09);
  --shadow-lg: 0 2px 4px rgba(18, 35, 41, 0.05), 0 30px 70px rgba(18, 35, 41, 0.16);
  --radius: 16px;
  --radius-lg: 24px;
  --nav-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1519; --bg-tint: #0d1c21; --surface: #10222a; --surface-2: #0d1d23;
    --ink: #eef5f2; --text: #d3dfdb; --muted: #93a8a4; --line: #1d343b; --line-strong: #2a464e;
    --wing: #7cc8d2; --wing-soft: #17343b; --coral: #ff7a64; --coral-strong: #ff8e7b; --on-coral: #2a0e09;
    --left: #ff6b6f; --right: #54c46b; --stage-a: #11262d; --stage-b: #0a1a1f;
    --code-bg: #071216; --code-fg: #d9e6e3;
    --glow-a: rgba(124, 200, 210, 0.13); --glow-b: rgba(255, 122, 100, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow: 0 12px 34px rgba(0, 0, 0, 0.35); --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1519; --bg-tint: #0d1c21; --surface: #10222a; --surface-2: #0d1d23;
  --ink: #eef5f2; --text: #d3dfdb; --muted: #93a8a4; --line: #1d343b; --line-strong: #2a464e;
  --wing: #7cc8d2; --wing-soft: #17343b; --coral: #ff7a64; --coral-strong: #ff8e7b; --on-coral: #2a0e09;
  --left: #ff6b6f; --right: #54c46b; --stage-a: #11262d; --stage-b: #0a1a1f;
  --code-bg: #071216; --code-fg: #d9e6e3;
  --glow-a: rgba(124, 200, 210, 0.13); --glow-b: rgba(255, 122, 100, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow: 0 12px 34px rgba(0, 0, 0, 0.35); --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: var(--wing); text-decoration: none; }
a:hover { color: var(--coral-strong); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0.06em 0.36em; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.1; font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2.5px solid var(--coral); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--coral); color: var(--on-coral); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 12px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 16px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; font-weight: 700; letter-spacing: -0.005em; border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease; white-space: nowrap; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-large { height: 54px; padding: 0 26px; font-size: 1.02rem; }
.btn-small { height: 38px; padding: 0 16px; font-size: 0.92rem; }
.btn-coral { background: var(--coral); color: var(--on-coral); box-shadow: 0 6px 20px rgba(255, 112, 89, 0.32); }
.btn-coral:hover { color: var(--on-coral); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(255, 112, 89, 0.42); background: var(--coral-strong); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--ink); border-color: var(--wing); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color 0.2s; }
.icon-btn:hover { border-color: var(--wing); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.icon-btn .moon { fill: currentColor; stroke: none; }

/* Navigation */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); transition: background 0.25s, box-shadow 0.25s, border-color 0.25s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-bottom-color: var(--line); }
.nav-inner { height: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 4px; margin-right: auto; }
.nav-links a { color: var(--muted); font-weight: 550; font-size: 0.95rem; padding: 8px 12px; border-radius: 8px; transition: color 0.15s, background 0.15s; }
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.menu-btn { display: none; }
.mobile-menu { display: none; }
/* The toggle shows the theme it switches to: a moon in light, a sun in dark. */
.sun { display: none; }
:root[data-theme="dark"] .sun { display: block; }
:root[data-theme="dark"] .moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sun { display: block; } :root:not([data-theme="light"]) .moon { display: none; } }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-grid; }
  .mobile-menu:not([hidden]) { display: flex; flex-direction: column; padding: 8px 16px 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .mobile-menu a { padding: 12px 8px; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line); }
  .mobile-menu a:last-child { border-bottom: 0; }
  .nav-inner { padding: 0 16px; }
}
@media (max-width: 420px) { .nav-actions .btn-small { display: none; } }

/* Hero */
.hero { position: relative; padding: calc(var(--nav-h) + 56px) 0 64px; overflow: hidden; }
.hero-glow { position: absolute; inset: -10% -10% auto; height: 900px; pointer-events: none; background:
  radial-gradient(40% 50% at 78% 30%, var(--glow-a), transparent 70%),
  radial-gradient(35% 40% at 18% 20%, var(--glow-b), transparent 70%); animation: drift 18s ease-in-out infinite alternate; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 75%); opacity: 0.55; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-3%, 2%, 0) scale(1.06); } }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: 0.88rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.pill:hover { color: var(--ink); border-color: var(--coral); }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 25%, transparent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--coral) 8%, transparent); } }
.hero h1 { margin: 22px 0 20px; font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.02; font-weight: 800; letter-spacing: -0.042em; }
.accent { background: linear-gradient(100deg, var(--coral) 10%, #ff9b6a 55%, var(--coral-strong) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 1.17rem; color: var(--muted); max-width: 33em; }
.lede strong { color: var(--ink); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 18px; }
.meta { color: var(--muted); font-size: 0.9rem; }
.hero-visual { margin: 0; }
.footage { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #0b1316; border: 1px solid var(--line); box-shadow: var(--shadow-lg); aspect-ratio: 640 / 480; }
.footage-wide { aspect-ratio: 1288 / 480; border-radius: var(--radius); }
.footage video { width: 100%; height: 100%; object-fit: cover; }
.footage .play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--coral) 92%, transparent); color: var(--on-coral); cursor: pointer; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); transition: transform 0.2s, opacity 0.3s; }
.footage .play:hover { transform: scale(1.06); }
.footage .play svg { width: 30px; height: 30px; fill: currentColor; margin-left: 4px; }
.footage.playing .play { opacity: 0; pointer-events: none; }
.readout { position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.readout span { display: inline-flex; align-items: center; gap: 6px; background: rgba(8, 16, 19, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 4px 10px; color: #b9c9c5; }
.readout b { color: #fff; font-weight: 650; min-width: 4.4em; text-align: right; }
.sw { width: 9px; height: 9px; border-radius: 50%; }
.sw-l { background: #f75d63; } .sw-r { background: #57d873; } .sw-d { background: #fff; }
.trace { position: relative; margin-top: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; }
.trace canvas { width: 100%; height: auto; aspect-ratio: 600 / 96; }
.trace span { position: absolute; left: 12px; top: 8px; font-size: 0.72rem; font-weight: 650; color: var(--muted); letter-spacing: 0.02em; }
.hero-visual figcaption { margin-top: 14px; color: var(--muted); font-size: 0.86rem; text-align: center; }
@media (max-width: 960px) {
  .hero { padding-top: calc(var(--nav-h) + 32px); }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { text-align: left; }
}

/* Stats */
.stats { padding: 8px 0 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: 2rem; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 0.5em; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.stat > span { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 6px; line-height: 1.4; }
@media (max-width: 860px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* Sections */
.section { padding: 96px 0; position: relative; }
.section-tint { background: var(--bg-tint); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.eyebrow { color: var(--coral-strong); font-weight: 750; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; }
.section-lede { color: var(--muted); font-size: 1.1rem; margin-top: 16px; }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.split-rev { grid-template-columns: 1.15fr 1fr; }
.split-copy h2 { margin-bottom: 18px; }
.split-copy p { color: var(--muted); }
.link-arrow { font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow span { transition: transform 0.2s; }
.link-arrow:hover span { transform: translateX(4px); }
@media (max-width: 960px) { .split, .split-rev { grid-template-columns: 1fr; gap: 36px; } .split-rev .chart { order: 2; } .section { padding: 72px 0; } }


/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; color: var(--text); transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease; position: relative; overflow: hidden; }
.card::after { content: "→"; position: absolute; right: 22px; top: 24px; color: var(--muted); opacity: 0; transform: translateX(-6px); transition: opacity 0.2s, transform 0.2s; }
.card:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--coral) 55%, var(--line)); }
.card:hover::after { opacity: 1; transform: none; color: var(--coral-strong); }
.card h3 { margin: 16px 0 8px; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(150deg, var(--stage-a), var(--wing-soft)); border: 1px solid var(--line); color: var(--wing); }
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

/* Real footage: classic vs Rekkefly */
.compare-video { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px; }
.compare-labels, .tally { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare-labels { margin-bottom: 10px; font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.compare-labels span { display: flex; align-items: center; gap: 8px; }
.compare-labels span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }
.lab-classic::before { background: #e8a33b; }
.lab-rekkefly::before { background: var(--coral); }
.compare-video .footage { box-shadow: none; }
.tally { margin-top: 12px; }
.tally-cell { border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface-2); }
.tally-cell > span { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.tally-cell b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.tally-cell b small { font-size: 0.55em; color: var(--muted); font-weight: 650; letter-spacing: 0; }
.tally-classic { border-left: 4px solid #e8a33b; }
.tally-rekkefly { border-left: 4px solid var(--coral); }
.compare-video figcaption { margin-top: 12px; color: var(--muted); font-size: 0.88rem; }
@media (max-width: 620px) { .compare-video { padding: 10px; } .tally-cell b { font-size: 1.25rem; } .tally-cell > span { font-size: 0.72rem; } }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 0.8rem; font-weight: 800; margin-bottom: 10px; }
.steps b { display: block; color: var(--ink); }
.steps span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Charts and tables */
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); }
.chart img { width: 100%; height: auto; border-radius: 12px; }
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: block !important; } :root:not([data-theme="light"]) .only-light { display: none !important; } }
.compare { margin-top: 28px; }
.compare table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 0.95rem; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-top: 1px solid var(--line); }
.compare thead th { border-top: 0; background: var(--surface-2); color: var(--ink); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.compare td b { color: var(--coral-strong); }
.compare .note { margin-top: 12px; }
@media (max-width: 620px) { .compare th, .compare td { padding: 10px 10px; font-size: 0.86rem; } .compare thead th { font-size: 0.72rem; } }
.ticks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--text); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--coral) 18%, transparent); box-shadow: inset 0 0 0 1.5px var(--coral); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: calc(0.3em + 5px); width: 6px; height: 3.5px; border-left: 2px solid var(--coral-strong); border-bottom: 2px solid var(--coral-strong); transform: rotate(-45deg); }

/* Lineage */
.timeline { list-style: none; padding: 0; margin: 0 0 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6%; right: 6%; top: 30px; height: 2px; background: linear-gradient(90deg, var(--line-strong), var(--coral)); z-index: 0; }
.timeline li { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.timeline h3 { margin: 14px 0 6px; }
.timeline p { color: var(--muted); font-size: 0.94rem; }
.timeline a { font-weight: 650; font-size: 0.9rem; }
.tl-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: 0.82rem; color: var(--ink); }
.tl-now { border-color: color-mix(in srgb, var(--coral) 60%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 12%, transparent); }
.tl-now .tl-tag { background: var(--coral); color: var(--on-coral); border-color: transparent; }
@media (max-width: 860px) { .timeline { grid-template-columns: 1fr; } .timeline::before { left: 30px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; } }

/* Code */
.code-card, .tabs { background: var(--code-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid color-mix(in srgb, var(--code-bg) 70%, var(--line)); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; color: #93a8a4; font-size: 0.84rem; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
pre { margin: 0; padding: 20px 22px; overflow-x: auto; color: var(--code-fg); font: 0.9rem/1.65 var(--mono); }
pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
pre .c { color: #6f8b88; } pre .s { color: #ffb4a6; } pre .k { color: #7cc8d2; }
.copy { background: rgba(255, 255, 255, 0.07); color: #d9e6e3; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; padding: 5px 11px; font: 600 0.78rem var(--font); cursor: pointer; transition: background 0.2s; }
.copy:hover { background: rgba(255, 255, 255, 0.14); }
.copy.done { background: var(--coral); color: var(--on-coral); border-color: transparent; }
.tab-list { display: flex; gap: 4px; padding: 10px 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); overflow-x: auto; }
.tab-list button { background: none; border: 0; color: #93a8a4; font: 650 0.88rem var(--font); padding: 10px 14px; border-radius: 10px 10px 0 0; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab-list button[aria-selected="true"] { color: #fff; border-bottom-color: var(--coral); background: rgba(255, 255, 255, 0.04); }
.tab-panel { position: relative; }
.tab-panel .copy { position: absolute; right: 14px; top: 14px; }
.tab-panel pre { min-height: 260px; padding-right: 80px; }

/* Downloads */
.downloads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dl { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: transform 0.2s, box-shadow 0.25s, border-color 0.25s; }
.dl:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--wing); }
.dl-os { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 650; font-size: 0.9rem; }
.dl-os svg { width: 24px; height: 24px; fill: currentColor; color: var(--ink); }
.dl b { font-size: 1.2rem; color: var(--ink); }
.dl-file { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); overflow-wrap: anywhere; }
.dl-size { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.dl-size:empty { display: none; }
.dl-badge { display: none; position: absolute; top: -11px; right: 16px; background: var(--coral); color: var(--on-coral); font-size: 0.74rem; font-weight: 750; padding: 3px 10px; border-radius: 999px; }
.dl.mine { border-color: var(--coral); box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 14%, transparent), var(--shadow); }
.dl.mine .dl-badge { display: block; }
.dl-more { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; font-weight: 650; font-size: 0.95rem; }
.install-note { margin-top: 22px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line-strong); color: var(--muted); font-size: 0.92rem; }
.install-note code { white-space: nowrap; }
@media (max-width: 960px) { .downloads { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .downloads { grid-template-columns: 1fr; } }

/* Closing band */
.cta-band { padding: 0 0 96px; }
.cta-inner { text-align: center; background: radial-gradient(80% 120% at 50% 0%, color-mix(in srgb, var(--coral) 16%, var(--surface)), var(--surface)); border: 1px solid var(--line); border-radius: 28px; padding: 64px 28px; box-shadow: var(--shadow); }
.cta-inner p { color: var(--muted); max-width: 560px; margin: 14px auto 0; font-size: 1.08rem; }
.cta-inner .cta { justify-content: center; margin-bottom: 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--bg-tint); padding: 56px 0 28px; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand p { color: var(--muted); margin-top: 14px; max-width: 26em; }
.footer nav { display: flex; flex-direction: column; gap: 8px; }
.footer h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.footer nav a { color: var(--text); }
.footer nav a:hover { color: var(--coral-strong); }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
/* If the script never runs, show everything anyway. */
.js:not(.js-ready) .reveal { animation: reveal-anyway 0.4s ease 1.5s forwards; }
@keyframes reveal-anyway { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-glow, .pill-dot { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.notfound h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.04em; margin: 22px 0 10px; }
.notfound p { color: var(--muted); font-size: 1.1rem; }
.notfound .cta { justify-content: center; }
