/* Drippy website. Colours come from the app: Roasted Brown #5B3A29 for controls,
   Amber #DC9430 kept for liquid, the same split the app makes. No external fonts:
   the system face is San Francisco on Apple devices, which is what the app uses. */

:root {
  --bg: #f5f1eb;
  --bg-deep: #ede6dc;
  --surface: #ffffff;
  --surface-2: #faf7f3;
  --text: #1e1612;
  --muted: #6d6058;
  --faint: #9a8d84;
  --line: rgba(60, 38, 26, 0.12);
  --brown: #5b3a29;
  --brown-ink: #5b3a29;
  --on-brown: #fff8f1;
  --amber: #dc9430;
  --amber-soft: #f6e3c4;
  --amber-deep: #b8731c;
  --shadow: 0 1px 2px rgba(40, 24, 16, 0.06), 0 12px 40px -12px rgba(40, 24, 16, 0.22);
  --shadow-lg: 0 2px 6px rgba(40, 24, 16, 0.08), 0 40px 80px -30px rgba(40, 24, 16, 0.4);
  --radius: 24px;
  --radius-sm: 14px;
  --maxw: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110d0b;
    --bg-deep: #0b0807;
    --surface: #1c1613;
    --surface-2: #231c18;
    --text: #f4ede6;
    --muted: #b3a498;
    --faint: #85776d;
    --line: rgba(255, 236, 220, 0.1);
    --brown: #9c6b4e;
    --brown-ink: #d7a47f;
    --on-brown: #fff8f1;
    --amber-soft: #3a2a18;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #110d0b;
  --bg-deep: #0b0807;
  --surface: #1c1613;
  --surface-2: #231c18;
  --text: #f4ede6;
  --muted: #b3a498;
  --faint: #85776d;
  --line: rgba(255, 236, 220, 0.1);
  --brown: #9c6b4e;
  --brown-ink: #d7a47f;
  --on-brown: #fff8f1;
  --amber-soft: #3a2a18;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--brown-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 8px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--brown); color: var(--on-brown); padding: 10px 16px; border-radius: 999px;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.num { font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 2px 8px rgba(60, 30, 10, 0.25); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 999px; transition: color 0.2s, background 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; flex: none;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

@media (max-width: 720px) {
  .nav .nav-extra { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--brown); color: var(--on-brown); box-shadow: 0 8px 24px -10px rgba(91, 58, 41, 0.7); }
.btn-primary:hover { box-shadow: 0 12px 30px -10px rgba(91, 58, 41, 0.85); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn svg { width: 18px; height: 18px; }

.badge-soon {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 0 20px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px;
}
.badge-soon svg { width: 20px; height: 20px; }
.badge-soon small { display: block; font-size: 11px; font-weight: 500; opacity: 0.7; line-height: 1; margin-bottom: 2px; }
.badge-soon span { line-height: 1.1; }

/* ---------- Hero ---------- */

.hero { position: relative; padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 8vw, 88px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--amber) 28%, transparent), transparent);
  pointer-events: none; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 64px); align-items: center; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--amber-deep); font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
:root[data-theme="dark"] .eyebrow { color: var(--amber); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .eyebrow { color: var(--amber); } }
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

.hero h1 { font-size: clamp(44px, 7.4vw, 88px); line-height: 0.98; letter-spacing: -0.035em; margin: 18px 0 20px; font-weight: 800; }
.hero h1 .drip-word { color: var(--amber); background: linear-gradient(180deg, #e9ac4e, var(--amber) 55%, var(--amber-deep)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .lede { font-size: clamp(18px, 2.1vw, 22px); color: var(--muted); max-width: 30ch; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--faint); }

.hero-visual { position: relative; aspect-ratio: 1; width: 100%; max-width: 520px; justify-self: center; }
.hero-visual canvas { width: 100%; height: 100%; display: block; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: left; }
  /* Small enough that the headline still shows on the first screen of a phone. */
  .hero-visual { max-width: min(280px, 72vw); order: -1; margin-bottom: -8px; }
}

/* ---------- Sections ---------- */

section { position: relative; }
.section { padding: clamp(56px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-deep); }
.section-head { max-width: 680px; margin-bottom: clamp(28px, 5vw, 56px); }
.section-head h2 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.05; letter-spacing: -0.03em; margin: 14px 0 14px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: clamp(17px, 1.8vw, 19px); margin: 0; }

/* ---------- Screens carousel ---------- */

.screens { display: flex; gap: clamp(16px, 3vw, 32px); overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--gutter) 28px; margin: 0 calc(var(--gutter) * -1); scrollbar-width: none; }
.screens::-webkit-scrollbar { display: none; }
.screen { flex: 0 0 clamp(210px, 26vw, 268px); scroll-snap-align: center; margin: 0; }
.phone {
  position: relative; border-radius: 42px; padding: 9px; background: #1a1411;
  box-shadow: var(--shadow-lg); transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
}
.phone::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.08); pointer-events: none; }
.phone img { border-radius: 34px; width: 100%; height: auto; aspect-ratio: 640 / 1391; background: var(--surface-2); }
.screen:hover .phone { transform: translateY(-6px); }
.screen figcaption { margin-top: 18px; }
.screen figcaption strong { display: block; font-size: 17px; letter-spacing: -0.01em; }
.screen figcaption span { color: var(--muted); font-size: 15px; }
.carousel-controls { display: flex; gap: 10px; justify-content: flex-end; margin-top: -8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: background 0.2s, opacity 0.2s; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Principles ---------- */

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.principle { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.principle::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  background: var(--amber-soft); color: var(--amber-deep); font-weight: 700; margin-bottom: 18px;
}
:root[data-theme="dark"] .principle::before { color: var(--amber); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .principle::before { color: var(--amber); } }
.principle h3 { font-size: 21px; letter-spacing: -0.015em; margin: 0 0 8px; }
.principle p { color: var(--muted); margin: 0; font-size: 16px; }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; } }

/* ---------- Playground ---------- */

.playground { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .playground { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 28px); }
.panel + .panel { margin-top: 20px; }
.panel h3 { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.015em; }
.panel .sub { color: var(--muted); margin: 0 0 20px; font-size: 15px; }

.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; font-weight: 600; font-size: 15px; }
.field-label output, .field-label .value { font-weight: 700; font-size: 17px; color: var(--text); }
.field-hint { color: var(--muted); font-size: 14px; margin-top: 10px; min-height: 1.4em; }

.segmented { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.segmented button {
  flex: 1; min-height: 38px; border: 0; background: transparent; border-radius: 9px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted); transition: background 0.2s, color 0.2s, box-shadow 0.2s; padding: 0 6px;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px var(--line); }
:root[data-theme="dark"] .segmented button[aria-pressed="true"] { background: #3a302b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segmented button[aria-pressed="true"] { background: #3a302b; } }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-weight: 600; font-size: 15px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 51px; height: 31px; border-radius: 999px; background: color-mix(in srgb, var(--faint) 45%, transparent); position: relative; flex: none; transition: background 0.25s; }
.toggle .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); transition: transform 0.25s cubic-bezier(.3, .7, .3, 1); }
.toggle input:checked + .track { background: #34c759; }
.toggle input:checked + .track::after { transform: translateX(20px); }
.toggle input:focus-visible + .track { outline: 3px solid var(--amber); outline-offset: 2px; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--amber) var(--fill, 50%), color-mix(in srgb, var(--faint) 30%, transparent) var(--fill, 50%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--faint) 30%, transparent); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--amber); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28), 0 0 0 0.5px rgba(0, 0, 0, 0.08); }
input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28); }

/* Columns follow the panel's width, not the window's: four across only when they fit. */
.panel { container-type: inline-size; }
.stats-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
@container (min-width: 540px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 12px; min-width: 0; }
.stat span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 2px; }
.stat strong { display: block; font-size: 22px; letter-spacing: -0.02em; white-space: nowrap; }

.timeline { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; margin: 4px 0 18px; }
.timeline span { display: block; height: 100%; transition: flex-grow 0.5s cubic-bezier(.2, .8, .2, 1); }
.timeline .t-bloom { background: var(--amber-deep); }
.timeline .t-pour { background: var(--amber); }
.timeline .t-drip { background: color-mix(in srgb, var(--amber) 35%, var(--surface-2)); }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; padding-top: 4px; }
.steps .dot { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--surface-2); color: var(--muted); }
.steps li.is-bloom .dot { background: var(--brown); color: var(--on-brown); }
.steps li.is-drip .dot { background: transparent; color: var(--amber); }
.steps .title { font-weight: 600; }
.steps .detail { color: var(--muted); font-size: 14px; }
.steps .clock { color: var(--faint); font-size: 14px; }
.steps li.is-active { background: linear-gradient(90deg, color-mix(in srgb, var(--amber) 14%, transparent), transparent 80%); border-radius: 12px; }

/* The brew preview: a small Pouring Assist. */
.preview { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 3vw, 28px); align-items: center; }
@media (max-width: 520px) { .preview { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.ring { position: relative; width: clamp(180px, 22vw, 220px); aspect-ratio: 1; }
.ring canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring .ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.ring .countdown { font-size: clamp(40px, 5vw, 50px); font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--text); }
.ring .caption { font-size: 13px; color: var(--muted); margin-top: 4px; }
.preview-info .step-name { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 4px; }
.preview-info .instruction { color: var(--brown-ink); font-size: 16px; margin: 0 0 6px; }
.preview-info .range { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.preview-info .pouring { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--brown-ink); min-height: 1.5em; }
.preview-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
@media (max-width: 520px) { .preview-controls { justify-content: center; } }
.preview-controls .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
.speed { font-size: 13px; color: var(--muted); }
.progress { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 18px; }
.progress span { display: block; height: 100%; width: 0; background: var(--brown); transition: width 0.2s linear; }

/* ---------- Caffeine ---------- */

.caffeine { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; align-items: stretch; }
@media (max-width: 960px) { .caffeine { grid-template-columns: 1fr; } }
.time-input { display: flex; gap: 10px; }
.time-input input[type="time"] { flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 12px; font-weight: 600; }
.chart { width: 100%; height: 260px; display: block; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .limit { stroke: var(--faint); stroke-dasharray: 4 5; stroke-width: 1.2; }
.chart .curve { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { fill: url(#caffeineFill); }
.chart text { fill: var(--muted); font-size: 12px; }
.chart .bed { stroke: var(--brown-ink); stroke-width: 1.5; }
.chart .bed-label { fill: var(--brown-ink); font-weight: 600; }
.readouts { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
@container (min-width: 500px) { .readouts { grid-template-columns: repeat(3, 1fr); } }
.disclaimer { color: var(--faint); font-size: 13px; margin-top: 14px; }

/* ---------- Features ---------- */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: transform 0.3s cubic-bezier(.2, .8, .2, 1), box-shadow 0.3s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber-deep); margin-bottom: 18px; }
:root[data-theme="dark"] .feature .ico { color: var(--amber); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .feature .ico { color: var(--amber); } }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.015em; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- Privacy band ---------- */

.privacy-band { border-radius: calc(var(--radius) + 8px); padding: clamp(32px, 6vw, 64px); background: linear-gradient(135deg, #5b3a29, #2a1a12); color: #fbf4ec; position: relative; overflow: hidden; }
.privacy-band::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 999px; background: radial-gradient(closest-side, rgba(220, 148, 48, 0.45), transparent); }
.privacy-band h2 { font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 14px; position: relative; z-index: 1; }
.privacy-band p { color: #e4d4c6; max-width: 56ch; margin: 0 0 26px; position: relative; z-index: 1; font-size: 18px; }
.privacy-list { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.privacy-list li { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; padding: 8px 14px; font-size: 15px; display: inline-flex; gap: 8px; align-items: center; }
.privacy-list svg { width: 16px; height: 16px; color: #f3c98a; }
.privacy-band .btn { position: relative; z-index: 1; background: #fbf4ec; color: #3c2519; }

/* ---------- FAQ ---------- */

.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 600; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform 0.25s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer { padding: 48px 0 56px; border-top: 1px solid var(--line); margin-top: clamp(40px, 6vw, 72px); color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: grid; gap: 20px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-fine { font-size: 13px; color: var(--faint); }

/* ---------- Legal pages ---------- */

.legal-hero { padding: clamp(40px, 7vw, 80px) 0 clamp(20px, 3vw, 32px); }
.legal-hero h1 { font-size: clamp(38px, 6vw, 60px); letter-spacing: -0.035em; line-height: 1.02; margin: 14px 0 12px; }
.legal-hero p { color: var(--muted); margin: 0; font-size: 18px; max-width: 60ch; }
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; padding-bottom: 24px; }
@media (max-width: 900px) { .legal { grid-template-columns: 1fr; } }
.toc { position: sticky; top: 88px; font-size: 14px; }
.toc p { font-weight: 700; margin: 0 0 10px; color: var(--text); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.is-current { color: var(--text); border-left-color: var(--amber); }
/* On a phone the list would push the policy a whole screen down; the summary card does that job. */
@media (max-width: 900px) { .toc { display: none; } }

.prose { max-width: 68ch; }
.prose h2 { font-size: 26px; letter-spacing: -0.02em; margin: 48px 0 12px; line-height: 1.2; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 86%, var(--muted)); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose .summary-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 36px; }
.prose .summary-card h2 { margin-top: 0; font-size: 20px; }
.prose .summary-card ul { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
.table-scroll { overflow-x: auto; }
.legal-hero .updated { color: var(--faint); font-size: 14px; margin-top: 14px; }

/* ---------- Reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s cubic-bezier(.2, .8, .2, 1), transform 0.8s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.panel-spaced { margin-top: 20px; }
.speed-seg { width: 120px; }
.section-flush-top { padding-top: 0; }
