/* ============================================================
   AudioRun — static site
   Palette: asphalt-at-dusk darks, warm near-white, ember orange
   Type: Barlow Condensed (display) / Barlow (body) / JetBrains Mono (data)
   ============================================================ */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/barlow-condensed-v13-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/barlow-condensed-v13-latin-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/barlow-v13-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/barlow-v13-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/barlow-v13-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-v24-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-v24-latin-500.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --night: #171310;
  --night-2: #221b16;
  --night-3: #2d241d;
  --paper: #fcfbf9;
  --card: #ffffff;
  --line: #e9e2da;
  --line-dark: #3a2f26;
  --ink: #201a15;
  --muted: #6e645c;
  --muted-dark: #a89c90;
  --ember: #e65100;
  --ember-deep: #c74600;
  --ember-bright: #ff8a3d;
  --ember-faint: #fdeee3;

  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --radius: 14px;
  --radius-lg: 20px;
  --container: 1120px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--ember-deep); }
a:hover { color: var(--ember); }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 10px 0 14px;
}

.section-lead {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---------- Nav ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(23, 19, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-dark);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img { width: 32px; height: 32px; }

.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  color: var(--muted-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover { color: #fff; }

.nav-links a.nav-cta {
  color: #fff;
  background: var(--ember);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
}

.nav-links a.nav-cta:hover { background: var(--ember-bright); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 480px at 78% 18%, rgba(230, 81, 0, 0.16), transparent 62%),
    var(--night);
  color: #fff;
  padding: 88px 0 96px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 18px 0 22px;
}

.hero h1 .accent { color: var(--ember-bright); }

.nowrap { white-space: nowrap; }

.hero-sub {
  color: var(--muted-dark);
  font-size: 1.2rem;
  max-width: 34rem;
  margin-bottom: 32px;
}

.hero-sub strong { color: #fff; font-weight: 600; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 44px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--ember); color: #fff; }
.btn-primary:hover { background: var(--ember-bright); color: #fff; }

.btn-ghost {
  color: #fff;
  border: 1px solid var(--line-dark);
}
.btn-ghost:hover { border-color: var(--muted-dark); color: #fff; }

/* the three zeros */
.zeros {
  display: flex;
  gap: 40px;
}

.zero .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: var(--ember-bright);
}

.zero .l {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-dark);
}

/* ---------- Coach card (signature) ---------- */
.coach-card {
  background: var(--night-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  padding: 26px 26px 30px;
  box-shadow:
    0 24px 70px -30px rgba(230, 81, 0, 0.35),
    0 8px 30px rgba(0, 0, 0, 0.45);
  max-width: 460px;
  justify-self: end;
  width: 100%;
}

.coach-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--muted-dark);
  text-transform: uppercase;
}

.rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ember-bright);
}

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember-bright);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.coach-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0 24px;
}

.coach-stat .v {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.35rem;
  color: #fff;
}

.coach-stat .v small {
  font-size: 0.75rem;
  color: var(--muted-dark);
  font-weight: 400;
}

.coach-stat .k {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-top: 3px;
}

/* waveform */
.waveform {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 56px;
  margin-bottom: 24px;
}

.waveform span {
  flex: 1;
  border-radius: 2px;
  background: var(--ember);
  height: 18%;
  animation: wave 1.15s ease-in-out infinite;
  transform-origin: center;
}

/* varied rhythm across bars */
.waveform span:nth-child(4n+1) { animation-delay: -0.9s; }
.waveform span:nth-child(4n+2) { animation-delay: -0.6s; background: var(--ember-bright); }
.waveform span:nth-child(4n+3) { animation-delay: -0.3s; }
.waveform span:nth-child(4n)   { animation-delay: -1.1s; background: var(--ember-deep); }
.waveform span:nth-child(7n)   { animation-delay: -0.45s; }
.waveform span:nth-child(11n)  { animation-delay: -0.75s; }

@keyframes wave {
  0%, 100% { height: 16%; }
  50% { height: 92%; }
}

.coach-quote {
  border-left: 3px solid var(--ember);
  padding-left: 16px;
  min-height: 96px;
}

.coach-quote .who {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ember-bright);
  margin-bottom: 6px;
}

.coach-quote p {
  color: #f3ece5;
  font-size: 1.04rem;
  line-height: 1.5;
  transition: opacity 0.45s ease;
}

.coach-quote p.fading { opacity: 0; }

/* ---------- Sections shared ---------- */
.section { padding: 92px 0; }

.section-head { margin-bottom: 48px; }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature:hover {
  border-color: #dccfc2;
  box-shadow: 0 12px 32px -18px rgba(32, 26, 21, 0.25);
}

.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--ember-faint);
  color: var(--ember);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.feature h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.feature p { color: var(--muted); font-size: 1rem; }

/* ---------- Privacy ---------- */
.privacy { background: #f5f1ec; border-block: 1px solid var(--line); }

.dest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 36px;
}

.dest {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.dest .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.tag-default { background: var(--ember-faint); color: var(--ember-deep); }
.tag-optin { background: #efe9e2; color: var(--muted); }

.dest h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.dest p { color: var(--muted); font-size: 0.98rem; }

.privacy-link { font-weight: 600; }

/* ---------- Latest: blog + changelog teasers ---------- */
.latest { background: #f5f1ec; border-top: 1px solid var(--line); }

.latest .section-head { margin-bottom: 40px; }

.latest-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.latest-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.latest-col-head > span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.latest-col-head .text-link { font-size: 0.95rem; }

.text-link { font-weight: 600; text-decoration: none; }

.post-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}

.post-mini {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.post-mini:hover {
  border-color: #dccfc2;
  box-shadow: 0 12px 32px -18px rgba(32, 26, 21, 0.25);
}

.post-mini img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: var(--night);
}

.post-mini-body {
  display: block;
  padding: 16px 20px 20px;
}

.post-mini .post-date { display: block; margin-bottom: 6px; }

.post-mini h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 0;
  transition: color 0.15s;
}

.post-mini:hover h3 { color: var(--ember-deep); }

.latest-changelog .release-card { margin-top: 22px; }

.release-card {
  background:
    radial-gradient(420px 260px at 85% 0%, rgba(230, 81, 0, 0.18), transparent 62%),
    var(--night);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 30px 28px 32px;
  box-shadow: 0 20px 50px -30px rgba(230, 81, 0, 0.3), 0 6px 24px rgba(0, 0, 0, 0.3);
}

.release-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 14px 0 4px;
  color: #fff;
}

.release-card time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--muted-dark);
  margin-bottom: 20px;
}

.release-card ul {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
}

.release-card li {
  position: relative;
  padding-left: 20px;
  color: #cfc4b9;
  font-size: 0.98rem;
  line-height: 1.5;
}

.release-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--ember);
}

.release-card li strong { color: #fff; }

.release-card .text-link { color: var(--ember-bright); }
.release-card .text-link:hover { color: #fff; }

/* ---------- Beta ---------- */
.beta-panel {
  background:
    radial-gradient(640px 300px at 85% 0%, rgba(230, 81, 0, 0.18), transparent 60%),
    var(--night);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 64px 56px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.beta-panel .section-title { margin-top: 8px; }

.beta-panel p { color: var(--muted-dark); max-width: 34rem; }

.beta-panel p strong { color: #fff; }

.beta-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.beta-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.beta-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* display:flex above would otherwise override the UA [hidden] rule */
.beta-form-row[hidden] { display: none; }

.beta-form input[type="email"] {
  flex: 1 1 200px;
  min-width: 0;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font: inherit;
  font-size: 1rem;
}

.beta-form input[type="email"]::placeholder { color: var(--muted-dark); }

.beta-form input[type="email"]:focus {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-color: transparent;
}

.beta-form .btn { border: 0; cursor: pointer; }
.beta-form .btn:disabled { opacity: 0.6; cursor: wait; }

/* Honeypot — hidden from humans, present for bots. */
.beta-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.beta-form-msg {
  font-size: 0.95rem;
  color: #8ce99a;
}

.beta-form-msg.err { color: #ffa8a8; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.beta-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted-dark);
  line-height: 1.7;
}

.beta-note a { color: inherit; text-decoration: underline; }

/* ---------- Footer ---------- */
.footer {
  background: var(--night);
  color: var(--muted-dark);
  padding: 52px 0 40px;
  border-top: 1px solid var(--line-dark);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.footer .brand span { font-size: 1.25rem; }

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted-dark);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links a:hover { color: #fff; }

.footer-meta {
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.footer-meta .no-tracking {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ---------- Privacy policy page ---------- */
.policy {
  max-width: 46rem;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.policy h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  text-transform: uppercase;
  line-height: 1.02;
  margin: 10px 0 8px;
}

.policy .effective {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 36px;
}

.policy h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.65rem;
  text-transform: uppercase;
  margin: 42px 0 12px;
}

.policy p, .policy li { color: #3d352e; margin-bottom: 12px; }

.policy ul { padding-left: 22px; margin-bottom: 16px; }

.policy li { margin-bottom: 8px; }

/* Anchored headings (e.g. help.html#garmin-watch) must clear the sticky navbar */
.policy h2[id] { scroll-margin-top: 84px; }

.policy h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  text-transform: uppercase;
  margin: 30px 0 10px;
}

.policy dl { margin-bottom: 16px; }

.policy dt {
  font-weight: 600;
  margin-top: 16px;
}

.policy dd { color: #3d352e; margin: 2px 0 0; }

/* ---------- Help page: collapsible sections ---------- */
/* Sections are <details>, collapsed by default so the page stays short.
   Jump links into a closed section are opened by script.js. */
.help-section {
  border-top: 1px solid var(--line);
  scroll-margin-top: 84px;
}

.help-section:last-of-type { border-bottom: 1px solid var(--line); }

.help-section:first-of-type { margin-top: 28px; }

.help-section[open] { padding-bottom: 14px; }

.help-section summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
}

.help-section summary::-webkit-details-marker { display: none; }

.help-section summary h2 { margin: 0; }

.help-section summary:hover h2 { color: var(--ember-deep); }

.help-section summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--ember);
  flex-shrink: 0;
}

.help-section[open] summary::after { content: '−'; }

/* ---------- Help page: jump sidebar + content ---------- */
.help-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 46rem);
  justify-content: center;
  gap: 56px;
  padding: 72px 24px 96px;
}

.help-layout .policy {
  margin: 0;
  padding: 0;
}

.help-toc {
  position: sticky;
  top: 88px;
  align-self: start;
  padding-top: 6px;
}

.help-toc .toc-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.help-toc nav {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--line);
}

.help-toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.35;
}

.help-toc a:hover {
  color: var(--ember-deep);
  border-left-color: var(--ember);
}

/* Narrow screens: the sidebar becomes a compact jump bar above the title */
@media (max-width: 940px) {
  .help-layout { display: block; }

  .help-toc {
    position: static;
    padding-top: 0;
    margin-bottom: 44px;
  }

  .help-toc nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 20px;
    border-left: none;
  }

  .help-toc a {
    padding: 0;
    margin-left: 0;
    border-left: none;
  }
}

/* ---------- Changelog page ---------- */
.changelog h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.changelog h2 .date {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- Blog ---------- */
.post figure {
  margin: 30px 0;
}

.post figure a {
  display: block;
}

.post figure img {
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--night);
}

.post figcaption {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 10px;
  font-style: italic;
}

.post table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.post th,
.post td {
  border: 1px solid var(--line);
  padding: 9px 14px;
  text-align: left;
}

.post th {
  background: #f5f1ec;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.post blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--ember-deep);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: #3d352e;
}

.post code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: #f5f1ec;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}

.post .back-link {
  margin-top: 48px;
  font-weight: 600;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  margin-top: 36px;
}

.post-card .post-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.blog-index .post-card h2 {
  margin: 0 0 10px;
}

.post-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.post-card.featured {
  margin-top: 0;
  padding: 34px 32px;
}

.post-card.featured h2 { font-size: 2.1rem; }

.post-card h2 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}

.post-card h2 a:hover {
  color: var(--ember-deep);
}

.post-card p {
  color: var(--muted);
}

.post-card .read-more {
  font-weight: 600;
}

/* ---------- Reveal on scroll (only when JS is running) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .waveform span { animation: none; height: 45%; }
  .waveform span:nth-child(3n) { height: 70%; }
  .waveform span:nth-child(4n) { height: 25%; }
  .waveform span:nth-child(5n) { height: 85%; }
  .rec-dot { animation: none; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .coach-quote p { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .latest-grid { grid-template-columns: 1fr; }

  .latest-changelog { margin-top: 24px; }

  .coach-card { justify-self: start; }

  .feature-grid, .dest-grid { grid-template-columns: repeat(2, 1fr); }

  .beta-panel {
    grid-template-columns: 1fr;
    padding: 48px 36px;
  }
}

@media (max-width: 680px) {
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--night);
    border-bottom: 1px solid var(--line-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 24px;
    gap: 18px;
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-toggle { display: block; }

  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { padding: 56px 0 64px; }

  .zeros { gap: 26px; flex-wrap: wrap; }

  .feature-grid, .dest-grid, .post-mini-grid { grid-template-columns: 1fr; }

  .section { padding: 64px 0; }

  .post-card.featured { padding: 26px 24px; }

  .post-card.featured h2 { font-size: 1.7rem; }

  .beta-panel { padding: 40px 24px; }
}

/* ---------- For-nerds page (fornerds.html) ----------
   The plain version of the front page: one column, no cards, no icons.
   Display face for headings, mono only for data (versions, sizes, names). */
.nerds {
  max-width: 50rem;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.nerds ::selection { background: var(--ember); color: #fff; }

.nerds h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 14px;
  text-wrap: balance;
}

.nerds .lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38rem;
  margin-bottom: 28px;
}

.nerds .updated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 28px;
}

.nerds h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0;
}

/* Collapsible sections: <details>, closed by default so the page stays short.
   script.js opens the section a jump link points at. */
.nerds-section {
  border-top: 1px solid var(--line);
  scroll-margin-top: 84px;
}

.nerds-section:first-of-type { margin-top: 24px; }

.nerds-section[open] { padding-bottom: 16px; }

.nerds-section summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 16px;
  cursor: pointer;
  list-style: none;
}

.nerds-section summary::-webkit-details-marker { display: none; }

.nerds-section summary:hover h2 { color: var(--ember-deep); }

.nerds-section summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.15rem;
  line-height: 1;
  color: var(--ember);
  flex-shrink: 0;
}

.nerds-section[open] summary::after { content: '−'; }

.nerds h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  text-transform: uppercase;
  margin: 26px 0 8px;
}

.nerds p, .nerds li, .nerds dd, .nerds td { color: #3d352e; }

.nerds p { max-width: 40rem; margin-bottom: 12px; }

.nerds ul { padding-left: 20px; margin: 0 0 16px; max-width: 42rem; }

.nerds li { margin-bottom: 9px; }

.nerds li strong, .nerds p strong, .nerds dd strong { color: var(--ink); font-weight: 600; }

.nerds code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: #f3eee8;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Quick facts: label / value rows */
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 28px;
  padding: 18px 0;
  margin: 0 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts dt {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}

.facts dd { margin: 0; }

/* On-this-page links */
.nerds .toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.nerds .toc a { text-decoration: none; font-weight: 500; }
.nerds .toc a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Data tables: hairlines only, scroll sideways on narrow screens */
.nerds .tbl { overflow-x: auto; margin: 6px 0 20px; }

.nerds table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  line-height: 1.45;
}

.nerds th, .nerds td {
  text-align: left;
  vertical-align: top;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--line);
}

.nerds th {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.nerds td.k {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink);
}

.nerds .aside {
  font-size: 0.93rem;
  color: var(--muted);
  max-width: 40rem;
}

.nerds .cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 18px 0 8px;
}

.nerds .cta .text-link { font-weight: 500; }

@media (max-width: 680px) {
  .nerds { padding-top: 44px; }
  .facts { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dt { margin-top: 12px; }
  .facts dt:first-child { margin-top: 0; }
  /* The section headings are inside <summary> now, so the gap lives on the
     summary padding, not on the h2. */
  .nerds-section summary { padding: 18px 0 14px; }

  /* Tables stack: each row becomes a block, the key cell its heading.
     Cells carrying data-label print it as a small mono label. */
  .nerds thead { display: none; }
  .nerds tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nerds tr:first-child { border-top: 1px solid var(--line); }
  .nerds td { display: block; padding: 0; border: 0; }
  .nerds td.k { white-space: normal; margin-bottom: 4px; }
  .nerds td + td { margin-top: 6px; }
  .nerds td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
  }
}
