/* ondaire — marketing site styles. Self-hosted fonts, dark "engineered hi-fi"
   theme, single sync-green accent. Paths are relative to this file (assets/). */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("fonts/plex-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("fonts/plex-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #0a0c10;
  --bg-2: #0e131a;
  --panel: #11161f;
  --ink: #e9eef4;
  --muted: #8b95a6;
  --faint: #5d6675;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --accent: #35e3b3;
  --accent-2: #5ad1ff;
  --accent-ink: #03130d;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, monospace;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

/* atmospheric base: a soft accent aurora top-left + cool depth bottom-right */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 40rem at 12% -8%, rgba(53, 227, 179, 0.13), transparent 60%),
    radial-gradient(50rem 40rem at 100% 8%, rgba(90, 209, 255, 0.08), transparent 55%),
    radial-gradient(70rem 50rem at 80% 110%, rgba(53, 227, 179, 0.06), transparent 60%);
}
/* fine grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

/* ── tiny equalizer motif ───────────────────────────────────────────── */
.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 0.78em;
  margin-right: 0.55em;
  vertical-align: -0.05em;
}
.eq i {
  width: 2px;
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  transform-origin: bottom;
  animation: bar 1.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.18s);
}
@keyframes bar {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* ── eyebrows / kickers / tags ──────────────────────────────────────── */
.eyebrow, .kicker {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
  padding: 2px 9px;
}

/* ── buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-solid:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.btn-ghost {
  border-color: var(--line-2);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ── nav ────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand-mark { display: block; width: 26px; height: 26px; }
.brand-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 5px;
  box-shadow: 0 0 12px var(--accent);
}
.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14.5px;
  color: var(--muted);
}
.nav-links a { position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-cta { padding: 8px 16px; font-size: 14px; }
.nav-gh { display: inline-flex; align-items: center; gap: 6px; }
.nav-gh .gh-mark { display: block; }

/* ── layout helpers ─────────────────────────────────────────────────── */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: clamp(72px, 12vw, 140px) 0; }
.sec-head { max-width: 40rem; margin-bottom: 56px; }
.sec-head h2 {
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
}

/* ── hero ───────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding-top: clamp(48px, 8vw, 96px);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(44px, 8.5vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 18px 0 24px;
}
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--accent); }
.lede {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 32rem;
  margin: 0 0 32px;
}
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.snippet {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.snippet code {
  font-family: var(--mono);
  font-size: 15px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--ink);
}
.snippet code .prompt { color: var(--accent); margin-right: 8px; }
.snippet-cap { color: var(--faint); font-size: 14px; }

.hero-shot { margin: 0; justify-self: center; }
.frame {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 22px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.8), 0 0 80px -30px color-mix(in srgb, var(--accent) 30%, transparent);
}
.frame img {
  display: block;
  width: 100%;
  max-width: 300px;
  border-radius: 14px;
}

/* ── why / feature grid ─────────────────────────────────────────────── */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.feat {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.feat:hover { transform: translateY(-4px); border-color: var(--line-2); }
.feat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.feat-n {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
}
.feat h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: 25px;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.feat p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ── screens ────────────────────────────────────────────────────────── */
.screen-list { display: flex; flex-direction: column; gap: clamp(56px, 9vw, 110px); }
.screen {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}
.screen.flip .screen-shot { order: 2; }
.screen-shot { margin: 0; }
.screen-shot img {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
}

/* Theme carousel — a scroll-snap row of framed per-theme screenshots. */
.tc {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tc-track {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* side padding lets the first/last slide center (coverflow). */
  padding: 14px max(8px, calc((100% - 260px) / 2)) 18px;
  scrollbar-width: none;
}
.tc-track::-webkit-scrollbar { display: none; }
.tc-slide {
  flex: 0 0 auto;
  width: min(260px, 70vw);
  scroll-snap-align: center;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* inactive: smaller + dimmed; the centered (active) one pops to full size. */
  opacity: 0.4;
  transform: scale(0.82);
  transform-origin: center center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.tc-slide.is-active {
  opacity: 1;
  transform: scale(1);
}
.tc-frame {
  aspect-ratio: 600 / 900;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: 0 40px 90px -45px rgba(0, 0, 0, 0.85);
}
.tc-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.tc-cap { text-align: center; display: flex; flex-direction: column; gap: 2px; }
.tc-name { font-weight: 600; font-size: 15px; text-transform: lowercase; letter-spacing: -0.01em; }
.tc-blurb { color: var(--muted); font-size: 12.5px; }
.tc-arrow {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.tc-arrow:hover { border-color: var(--accent); color: var(--accent); }
.tc-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.tc-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: var(--line-2);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.tc-dot[aria-current="true"] { background: var(--accent); transform: scale(1.25); }
@media (max-width: 760px) {
  .tc-arrow { display: none; }
}
.screen-copy h3 {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 14px 0 12px;
}
.screen-copy p { margin: 0; color: var(--muted); max-width: 30rem; }

/* ── proof / measured coherence ─────────────────────────────────────── */
.proof-list { display: flex; flex-direction: column; gap: clamp(56px, 9vw, 110px); }
.proof-item {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
/* On a flipped row the image moves to the right via `order`; reverse the column
   widths too so the image keeps the WIDE column (1.25fr) instead of the narrow
   one — otherwise right-hand graphs render smaller than left-hand ones. */
.proof-item.flip { grid-template-columns: 0.75fr 1.25fr; }
.proof-item.flip .proof-shot { order: 2; }
.proof-shot { margin: 0; }
.proof-shot img {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
}
.proof-copy { display: flex; flex-direction: column; }
.proof-metric {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin: 10px 0 2px;
}
.proof-copy h3 {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(24px, 3.4vw, 33px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 6px 0 12px;
}
.proof-copy p { margin: 0; color: var(--muted); max-width: 34rem; }

/* ── how / steps ────────────────────────────────────────────────────── */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  background: var(--bg-2);
  position: relative;
}
.step-n {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--accent-ink);
  background: var(--accent);
  margin-bottom: 18px;
}
.step h3 { font-family: var(--serif); font-weight: 420; font-size: 22px; margin: 0 0 8px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }
/* connecting line between steps */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 47px;
  right: -10px;
  width: 20px;
  height: 1px;
  background: var(--line-2);
}

/* ── tech / under the hood ──────────────────────────────────────────── */
.sec-intro {
  color: var(--muted);
  margin: 16px 0 0;
  font-size: clamp(16px, 2vw, 18px);
}
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.tech {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
}
.tech .tag {
  margin-bottom: 16px;
  display: inline-block;
}
.tech-problem {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 16px;
}
.tech-solution {
  margin: 0;
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 15.5px;
}
.tech-arrow {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 600;
}

/* ── quickstart ─────────────────────────────────────────────────────── */
.qs-list { display: flex; flex-direction: column; gap: 18px; }
.qs {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 3.5vw, 32px);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  transition: border-color 0.18s ease;
}
.qs:hover { border-color: var(--line-2); }
.qs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.qs-h { display: inline-flex; align-items: center; gap: 14px; min-width: 0; }
.qs-n {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--accent-ink);
  background: var(--accent);
  flex: none;
}
.qs h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: clamp(21px, 3vw, 25px);
  letter-spacing: -0.01em;
  margin: 0;
}
.qs-top .tag { flex: none; }
.qs-body { margin: 0 0 18px; color: var(--muted); font-size: 15.5px; max-width: 56rem; }

.qs-code {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  color: var(--ink);
}
.qs-code code { font-family: inherit; }

.qs-params,
.qs-methods {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 11px 22px;
  margin: 0 0 18px;
  align-items: baseline;
}
.qs-flag { font-family: var(--mono); font-size: 13.5px; color: var(--accent); white-space: nowrap; }
.qs-params span { color: var(--muted); font-size: 15px; }
.qs-params em { color: var(--faint); font-style: normal; font-family: var(--mono); font-size: 12.5px; }

/* config-flags reference table: param · env var · default · description */
.qs-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; }
.qs-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 18px 9px 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.qs-table td { padding: 9px 18px 9px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; color: var(--muted); }
.qs-table tr:last-child td { border-bottom: 0; }
.qs-table td:nth-child(4) { width: 100%; }
.qs-env, .qs-def { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.qs-env { color: var(--accent-2); }
.qs-def { color: var(--faint); }
.qs-mlabel {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
  padding-top: 6px;
}
.qs-methods code {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 11px;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.qs-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 4px; }
.qs-dl { font-size: 14px; padding: 10px 16px; }
.qs-doc {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.qs-doc:hover { color: color-mix(in srgb, var(--accent) 80%, white); }
.qs-doc .arrow { transition: transform 0.15s ease; }
.qs-doc:hover .arrow { transform: translateX(3px); }

/* ── cta band ───────────────────────────────────────────────────────── */
.cta {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(40rem 20rem at 50% -20%, rgba(53, 227, 179, 0.14), transparent 60%),
    var(--bg-2);
  padding: clamp(48px, 8vw, 84px) 24px;
  margin-bottom: 24px;
}
.cta h2 {
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(30px, 5.5vw, 52px);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.cta p { color: var(--muted); max-width: 34rem; margin: 0 auto 28px; }
.cta .actions { justify-content: center; }

/* ── colophon (human-authored, AI-assisted note) ────────────────────── */
.colophon { text-align: center; }
.colophon .sec-head { max-width: 46rem; margin: 0 auto 32px; }
.colophon-body { max-width: 44rem; margin: 0 auto; }
.colophon-body p {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.6;
  margin: 0 0 16px;
}
.colophon-body p:last-child { margin-bottom: 0; }

/* ── footer ─────────────────────────────────────────────────────────── */
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px 24px 56px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.foot-brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.foot-note { color: var(--faint); font-size: 14px; margin: 0; }
.foot-links { margin-left: auto; display: flex; gap: 20px; color: var(--muted); font-size: 14px; }
.foot-links a:hover { color: var(--accent); }

/* ── entrance animation (hero) ──────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.hero-copy > *, .hero-shot {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}
.hero-copy .eyebrow { animation-delay: 0.05s; }
.hero-copy h1 { animation-delay: 0.13s; }
.hero-copy .lede { animation-delay: 0.22s; }
.hero-copy .actions { animation-delay: 0.3s; }
.hero-copy .snippet { animation-delay: 0.38s; }
.hero-shot { animation-delay: 0.32s; }

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .hero-shot { order: -1; }
  .frame img { max-width: 260px; }
  .feat-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .screen, .screen.flip .screen-shot { grid-template-columns: 1fr; order: 0; }
  .screen-shot { order: -1 !important; }
  .proof-item, .proof-item.flip, .proof-item.flip .proof-shot { grid-template-columns: 1fr; order: 0; }
  .proof-shot { order: -1 !important; }
  .steps { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
  .nav-links { display: none; }
}

@media (max-width: 560px) {
  .qs-params,
  .qs-methods { grid-template-columns: 1fr; gap: 4px 0; }
  .qs-params span { margin-bottom: 8px; }
  .qs-mlabel { padding-top: 10px; }

  /* Stack the config table into per-row cards — 4 columns don't fit a phone. */
  .qs-table thead { display: none; }
  .qs-table, .qs-table tbody, .qs-table tr, .qs-table td { display: block; width: auto; }
  .qs-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .qs-table tr:last-child { border-bottom: 0; }
  .qs-table td { padding: 0 0 4px; border: 0; }
  .qs-table td:nth-child(2)::before { content: "env  "; color: var(--faint); font-family: var(--mono); font-size: 11px; }
  .qs-table td:nth-child(3)::before { content: "default  "; color: var(--faint); font-family: var(--mono); font-size: 11px; }
  .qs-table td:nth-child(4) { padding-top: 4px; }
}

/* ── lightbox / screenshot carousel ─────────────────────────────────── */
.lb-thumb { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: 1fr auto auto;
  background: color-mix(in srgb, var(--bg) 86%, black);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: lb-in 0.18s ease both;
}
.lightbox[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lb-track {
  grid-row: 1;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
}
.lb-slide img {
  max-width: min(92vw, 460px);
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.85);
  cursor: default;
}
/* Coherence graphs are wide, not portrait phone shots — give them room. */
.lb-slide.wide img { max-width: min(94vw, 1000px); }

.lb-cap {
  grid-row: 2;
  margin: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 0 24px 4px;
}
.lb-dots {
  grid-row: 3;
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 8px 0 max(20px, env(safe-area-inset-bottom));
}
.lb-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line-2);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.lb-dot[aria-current="true"] { background: var(--accent); transform: scale(1.25); }

.lb-btn {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--panel) 80%, transparent);
  color: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.lb-btn:hover { border-color: var(--accent); color: var(--accent); }
.lb-close {
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 20px;
}
.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 30px;
  font-family: var(--sans);
}
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

@media (hover: none) and (max-width: 640px) {
  /* Touch: swiping + dots are enough; the side arrows just cover the image. */
  .lb-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
}

/* ── download page ───────────────────────────────────────────────────────── */
.dl { padding: 72px 0 96px; }
.dl .sec-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.dl-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dl-logos { display: flex; align-items: center; gap: 6px; }
.dl-logo { display: block; opacity: 0.95; }
.dl-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
/* header: left column (headline + description), right column (badge + logos) */
.dl-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dl-card-head-l { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dl-card-head-l h3 { margin: 0; font-size: 18px; min-width: 0; }
.dl-card-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.dl-card-meta .tag { white-space: nowrap; }
.dl-rec { margin: 0; color: var(--muted); font-size: 14.5px; }
/* per-card caveat (e.g. the Pi 32-bit libopus / driver notes) */
.dl-note {
  margin: 4px 0 0;
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  background: color-mix(in srgb, var(--accent-2) 7%, transparent);
  border-left: 2px solid color-mix(in srgb, var(--accent-2) 55%, transparent);
  border-radius: 0 8px 8px 0;
}
.dl-note code { color: var(--ink); }
/* plain explanatory paragraph (e.g. the Docker "what it does" copy) */
.dl-body { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dl-body code { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
/* binary tile footer: filename + SHA-256 on the left, the Download CTA on the right */
.dl-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.dl-file { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dl-fname { font-size: 13px; color: var(--muted); }
.dl-fname code { color: var(--ink); }
.dl-size { color: var(--faint); }
.dl-sha { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-sha-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.dl-sha code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.4;
}
.dl-dl { flex: none; }
.dl-cmd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.dl-cmd code { font-family: var(--mono); font-size: 13px; color: var(--ink); word-break: break-all; }
/* multiline run command: preserve the backslash-continued layout, top-align the copy button */
.dl-cmd-multi { align-items: flex-start; }
.dl-cmd-multi code { white-space: pre; word-break: normal; overflow-x: auto; line-height: 1.6; }
.dl-copy {
  flex: none;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  padding: 3px 10px;
  font: 500 12px var(--mono);
  cursor: pointer;
}
.dl-copy:hover { border-color: var(--accent); color: var(--accent); }
.dl-missing { margin: 0; color: var(--faint); font-size: 14px; }
.dl-missing code { color: var(--muted); }
/* extra links: each a "situation" sentence on the left, an outline button right */
.dl-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.dl-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.dl-link-desc { margin: 0; color: var(--muted); font-size: 15px; }
.dl-link-btn { flex: none; }
@media (max-width: 520px) {
  .dl-link-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ── ESP32 player teaser (download page) — becomes the flasher entry point ── */
.dl-teaser {
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 16px;
  background:
    radial-gradient(130% 150% at 0% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
    var(--panel);
  box-shadow: 0 0 44px -26px color-mix(in srgb, var(--accent) 60%, transparent);
}
.dl-teaser-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.dl-teaser-head h2 { margin: 0; font-size: 19px; }
.dl-soon {
  flex: none;
  font: 600 11px/1 var(--mono, ui-monospace, monospace);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 40%, transparent);
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
}
.dl-teaser-body { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
/* Flasher link sits below the body copy, spaced off it and pushed to the right. */
.dl-teaser .dl-link-btn { display: flex; width: max-content; margin: 18px 0 0 auto; }

/* installer card (download page) — same box as a download card, with a copy cmd */
.dl-doc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 13.5px;
  text-decoration: none;
}
.dl-doc:hover { color: color-mix(in srgb, var(--accent) 80%, white); }
.dl-doc .arrow { transition: transform 0.15s ease; }
.dl-doc:hover .arrow { transform: translateX(3px); }

/* common config flags — its own block UNDER the download cards */
.dl-flags { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.dl-flags .sec-head { margin-bottom: 22px; }

/* home Quickstart: a glowing CTA box under the three steps — motivating text on
   the left, the Download button right-aligned. */
.qs-cta {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 16px;
  background:
    radial-gradient(140% 160% at 0% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 62%),
    var(--panel);
  box-shadow: 0 0 60px -22px color-mix(in srgb, var(--accent) 60%, transparent);
}
.qs-cta-text { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.5; max-width: 60ch; }
.qs-cta-btn { flex: none; }
@media (max-width: 600px) {
  .qs-cta { flex-direction: column; align-items: flex-start; gap: 16px; }
}
/* the measured-coherence sub-header inside the Under-The-Hood section */
.tech-proof-head { margin-top: 72px; }
/* Tech-page headers run full width (the default 40rem cap leaves them stranded
   beside the wide measurement graphs); keep the intro paragraph readable. */
.tech-sec .sec-head { max-width: none; }
.tech-sec .sec-head .sec-intro { max-width: 70rem; }

/* installer walkthrough: an expandable, commented get.sh inside the installer card */
.dl-script { margin-top: 4px; }
.dl-script summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13.5px;
}
.dl-script summary::-webkit-details-marker { display: none; }
.dl-script summary::before { content: "▸"; display: inline-block; transition: transform 0.15s ease; }
.dl-script[open] summary::before { transform: rotate(90deg); }
.dl-script summary:hover { color: color-mix(in srgb, var(--accent) 80%, white); }
.dl-code {
  margin: 12px 0 10px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.55;
}
.dl-code code { font-family: var(--mono); color: var(--ink); white-space: pre; }

/* ── praise / testimonials (fictional) ───────────────────────────────────── */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.quote {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "photo quote" "photo who" "cred cred";
  align-content: start;
  column-gap: 16px;
  row-gap: 8px;
  margin: 0;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.quote-photo {
  grid-area: photo;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--line-2);
  filter: grayscale(0.25);
}
.quote blockquote {
  grid-area: quote;
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
}
.quote figcaption {
  grid-area: who;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.quote-name { font-weight: 600; font-size: 14px; }
.quote-role { color: var(--muted); font-size: 12.5px; }
/* image-source / license attribution (compliance): muted, small, italic, tucked
   bottom-right under the quote, linking to the source on Wikimedia Commons. */
.quote-credit {
  grid-area: cred;
  justify-self: end;
  margin-top: 2px;
  font-size: 11px;
  font-style: italic;
  color: var(--faint);
}
.quote-credit a {
  color: var(--faint);
  text-decoration: none;
  border-bottom: 1px dotted color-mix(in srgb, var(--faint) 60%, transparent);
}
.quote-credit a:hover {
  color: var(--accent);
  border-bottom-color: color-mix(in srgb, var(--accent) 60%, transparent);
}

/* current page highlighted in the nav (persistent underline + brighter text) */
.nav-links a.is-current { color: var(--ink); }
.nav-links a.is-current::after { width: 100%; }
/* hero secondary button carrying the GitHub mark */
.btn-gh .gh-mark { display: block; }

/* ── home topic blocks ───────────────────────────────────────────────────── */
.blocks { display: flex; flex-direction: column; gap: clamp(84px, 13vw, 180px); }
.block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 84px);
  align-items: center;
}
.block.flip .block-shot,
.block.flip .block-term { order: 2; }
.block-shot { margin: 0; }
.block-shot img {
  display: block;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
}
.block-shot.phone img { max-width: 300px; margin: 0 auto; }
.block-copy .kicker { margin-bottom: 16px; }
.block-copy h2 {
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.block-copy p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 18px);
  max-width: 34rem;
}

/* faux-terminal mock used by the install block */
.block-term {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
}
.term-bar {
  display: flex;
  gap: 8px;
  padding: 13px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.term-bar span:nth-child(1) { background: #e0664a; }
.term-bar span:nth-child(2) { background: #e0a64a; }
.term-bar span:nth-child(3) { background: var(--accent); }
.term-body {
  margin: 0;
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted);
  overflow-x: auto;
}
.term-line { display: block; white-space: pre; }
.term-prompt { color: var(--accent); }
.term-cmd { color: var(--ink); }
.term-out { color: var(--muted); }

/* ── sub-page headers (install / ui / tech) ──────────────────────────────── */
.sec-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
}
.sub-head { max-width: 40rem; margin-top: clamp(56px, 9vw, 104px); margin-bottom: 40px; }

/* ── install methods (install page) ──────────────────────────────────────── */
.methods { display: flex; flex-direction: column; gap: 16px; }
.method {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 3.5vw, 30px);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
}
.method-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.method-top h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-size: clamp(21px, 3vw, 26px);
  letter-spacing: -0.01em;
  margin: 0;
}
.method-top .tag { flex: none; }
.method-body { margin: 0 0 18px; color: var(--muted); font-size: 15.5px; max-width: 62ch; }
.method .dl-cmd, .method .qs-code { margin: 0; }
.method-foot { margin-top: 16px; }

@media (max-width: 880px) {
  .block { grid-template-columns: 1fr; }
  .block .block-shot,
  .block .block-term,
  .block.flip .block-shot,
  .block.flip .block-term { order: -1; }
}
