/* BeatAware website. One world, inherited from the app: a verdict-coloured
   field over an off-white page, Bricolage Grotesque at weights 400 to 600,
   ruled rows instead of cards, one white inset surface, a radius ladder of
   34 / 28 / 16 / 26 px. Tokens are the app's DESIGN.md values, 1:1. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/BricolageGrotesque-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --page: #f5f4ef;
  --surface: #ffffff;
  --sep: #e1e3dd;
  --sep-2: #d3d6cf;
  --ink: #15201f;
  --ink-2: #4b5654;
  --mute: #5f6a68;
  --teal: #0d5a57;
  --amber: #85500a;
  --slate: #3b4754;
  --dot-teal: #0d5a57;
  --dot-amber: #85500a;
  --dot-slate: #3b4754;
  --field-ink: #f2f6f3;
  --field-mute: rgba(242, 246, 243, 0.88);
  --field-band: rgba(255, 255, 255, 0.68);
  --field-track: rgba(255, 255, 255, 0.2);
  --danger: #c0392b;
  --scrim: rgba(21, 32, 31, 0.45);
  --band-fill: rgba(13, 90, 87, 0.14);
  --shadow-ink: rgba(21, 32, 31, 0.45);
  --code: #eef0ea;

  --field: var(--slate);
  --font: "Bricolage Grotesque", -apple-system, "SF Pro Text", "Helvetica Neue", sans-serif;
  --r-field: 34px;
  --r-sheet: 28px;
  --r-pill: 26px;
  --r-inset: 16px;
  --gutter: 24px;
  --max: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fade: 600ms;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0f1113;
    --surface: #1a1d20;
    --sep: #2a2e31;
    --sep-2: #363b3f;
    --ink: #eef1ee;
    --ink-2: #b4bbb8;
    --mute: #8c9491;
    --teal: #0b4a47;
    --amber: #6e4108;
    --slate: #2c353f;
    --dot-teal: #4fb3ae;
    --dot-amber: #e0a24a;
    --dot-slate: #8c9aa8;
    --field-mute: rgba(242, 246, 243, 0.86);
    --field-band: rgba(255, 255, 255, 0.66);
    --field-track: rgba(255, 255, 255, 0.16);
    --danger: #e5665a;
    --band-fill: rgba(79, 179, 174, 0.16);
    --shadow-ink: rgba(0, 0, 0, 0.6);
    --code: #15181a;
  }
}
:root[data-theme="dark"] {
  --page: #0f1113;
  --surface: #1a1d20;
  --sep: #2a2e31;
  --sep-2: #363b3f;
  --ink: #eef1ee;
  --ink-2: #b4bbb8;
  --mute: #8c9491;
  --teal: #0b4a47;
  --amber: #6e4108;
  --slate: #2c353f;
  --dot-teal: #4fb3ae;
  --dot-amber: #e0a24a;
  --dot-slate: #8c9aa8;
  --field-mute: rgba(242, 246, 243, 0.86);
  --field-band: rgba(255, 255, 255, 0.66);
  --field-track: rgba(255, 255, 255, 0.16);
  --danger: #e5665a;
  --band-fill: rgba(79, 179, 174, 0.16);
  --shadow-ink: rgba(0, 0, 0, 0.6);
  --code: #15181a;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-weight: 400;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--teal); color: var(--field-ink); }
.field ::selection { background: var(--field-ink); color: var(--field); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.field :focus-visible { outline-color: var(--field-ink); }

h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
code, pre { font-variant-numeric: tabular-nums; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }
pre {
  margin: 0;
  max-width: 100%;
  padding: 18px 20px;
  background: var(--code);
  border-radius: var(--r-inset);
  overflow-x: auto;
  line-height: 1.55;
  font-size: 0.9375rem;
}
pre code { font-size: inherit; }
hr { border: 0; border-top: 1px solid var(--sep); margin: 0; }
small { font-size: 0.875rem; }
strong { font-weight: 600; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--sep-2); border-radius: 999px; border: 3px solid var(--page); }
::-webkit-scrollbar-track { background: transparent; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: var(--r-pill); z-index: 100;
}
.skip:focus { top: 12px; }

/* ---------- type ---------- */

.display {
  font-size: clamp(2.5rem, 1.1rem + 4.2vw, 4.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
  font-variation-settings: "opsz" 96;
}
.headline {
  font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3.1rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.title {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink-2);
  max-width: 62ch;
  text-wrap: pretty;
}
.field .lead { color: var(--field-mute); }
.body { max-width: 62ch; text-wrap: pretty; }
.quiet { color: var(--ink-2); }
.caption {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}
.sub { font-size: 0.9375rem; line-height: 1.45; color: var(--mute); }

.figure {
  font-size: clamp(3.5rem, 2rem + 6vw, 6.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.figure .unit {
  font-size: 0.52em;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.figure-meta {
  font-size: 1rem;
  line-height: 1.35;
  color: var(--field-mute);
  font-variant-numeric: tabular-nums;
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 900px) { .wrap { padding-inline: 48px; } }

.section { padding-block: clamp(64px, 9vw, 128px); }
.section + .section { padding-top: 0; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .lead { margin-top: 2px; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start; }
  .section-head .lead { padding-top: 0.55em; }
  .section-head .lead { margin-top: 0; }
}

.cols { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .cols { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px; align-items: start; }
  .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; }
  .c4 { grid-column: span 4; } .c8 { grid-column: span 8; }
  .start-8 { grid-column: 8 / span 5; }
}

/* ---------- the field ---------- */

.field {
  position: relative;
  background: var(--field);
  color: var(--field-ink);
  border-radius: 0 0 var(--r-field) var(--r-field);
  transition: background-color var(--fade) var(--ease);
}
.field.teal { --field: var(--teal); }
.field.amber { --field: var(--amber); }
.field.slate { --field: var(--slate); }
.field.closing { border-radius: var(--r-field) var(--r-field) 0 0; }

.field .lead, .field .quiet, .field .sub { color: var(--field-mute); }

/* ---------- header ---------- */

.header { position: relative; z-index: 20; }
.header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 72px;
}
.wordmark { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.wordmark svg { height: 26px; width: auto; }
.nav { display: none; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; padding: 8px 12px; border-radius: 999px;
  font-weight: 500; font-size: 0.9375rem; color: var(--field-mute);
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.nav a:hover { color: var(--field-ink); background: var(--field-track); }
.nav a[aria-current="page"] { color: var(--field-ink); background: var(--field-track); }
.header .pill { height: 44px; padding-inline: 20px; font-size: 0.9375rem; width: auto; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding-inline: 14px;
  border-radius: 999px; background: var(--field-track); color: var(--field-ink); font-weight: 500;
}
.menu-btn svg { width: 18px; height: 18px; }
@media (min-width: 1000px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .pill { display: none; }
@media (min-width: 600px) { .header-actions .pill { display: inline-flex; } }

/* menu sheet */
.sheet-scrim {
  position: fixed; inset: 0; background: var(--scrim); z-index: 40;
  opacity: 0; transition: opacity 300ms var(--ease);
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--page); color: var(--ink);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 14px var(--gutter) max(34px, env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 420ms var(--ease);
  max-height: 88vh; overflow: auto;
}
.sheet::before {
  content: ""; display: block; width: 40px; height: 4px; border-radius: 3px;
  background: var(--sep-2); margin: 0 auto 18px;
}
.sheet[hidden], .sheet-scrim[hidden] { display: block; visibility: hidden; pointer-events: none; }
body.menu-open .sheet { transform: none; }
body.menu-open .sheet-scrim { opacity: 1; }
body.menu-open { overflow: hidden; }
.sheet-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sheet-title .title { font-size: 1.25rem; }
.sheet a { text-decoration: none; }
.sheet .close { height: 44px; padding-inline: 14px; border-radius: 999px; color: var(--ink-2); }
.sheet .pill-ink { margin-top: 18px; }

/* ---------- controls ---------- */

.pill, .pill-ink, .pill-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding-inline: 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 1.0625rem; text-decoration: none; white-space: nowrap;
  transition: transform 220ms var(--ease), background-color 220ms var(--ease), color var(--fade) var(--ease);
}
.pill { background: var(--field-ink); color: var(--field); }
.pill:hover { transform: translateY(-1px); }
.pill:active { transform: translateY(0); }
.pill-ink { background: var(--ink); color: var(--page); }
.pill-ink:hover { background: var(--ink-2); }
.pill-outline { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--sep-2); }
.pill-outline:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.pill svg, .pill-ink svg, .pill-outline svg { width: 20px; height: 20px; }
.text-action {
  display: inline-flex; align-items: center; min-height: 44px; gap: 8px;
  color: var(--field-mute); text-decoration: none; font-weight: 500;
}
.text-action:hover { color: var(--field-ink); text-decoration: underline; }
.page-action { color: var(--ink-2); }
.page-action:hover { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; }


/* ---------- rows, insets, dots ---------- */

.rows { border-top: 1px solid var(--sep); }
.row {
  display: grid; gap: 6px 24px; padding: 18px 0; border-bottom: 1px solid var(--sep);
  grid-template-columns: minmax(0, 1fr);
}
.row .t { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
.row .d { color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.row .n { color: var(--mute); font-variant-numeric: tabular-nums; }
@media (min-width: 700px) {
  .row.two { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .row.three { grid-template-columns: 7ch minmax(0, 5fr) minmax(0, 6fr); }
  .row.lead-n { grid-template-columns: 6ch minmax(0, 1fr); }
}

.inset {
  background: var(--surface); border-radius: var(--r-inset);
  padding: 20px 22px;
}
.inset .row { padding: 14px 0; }
.inset .row:last-child { border-bottom: 0; }
.inset .rows { border-top: 0; }

.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--dot-slate); vertical-align: middle; margin-right: 10px; position: relative; top: -1px;
}
.dot.teal { background: var(--dot-teal); }
.dot.amber { background: var(--dot-amber); }
.dot.slate { background: var(--dot-slate); }


/* ---------- phone frame ---------- */

.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 844;
  border-radius: 12%/5.55%;
  background: #15201f;
  padding: 2.5%;
  box-shadow: 0 30px 70px -28px var(--shadow-ink), 0 10px 24px -14px var(--shadow-ink);
}
.phone > img, .phone > picture > img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 10.2%/4.7%;
  background: var(--page);
}
.phone.flat { box-shadow: 0 18px 44px -24px var(--shadow-ink); }

/* ---------- hero ---------- */

.hero { padding: clamp(16px, 3vw, 40px) 0 clamp(56px, 7vw, 96px); }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; }
}
.hero-copy { display: grid; gap: 22px; }
.hero-copy .hero-title { max-width: 18ch; font-size: clamp(2.25rem, 1.2rem + 3.2vw, 3.75rem); }
.hero-title span { display: block; }
.hero-title .hero-title-2 { color: var(--field-mute); margin-top: 0.12em; }
.hero-copy .hero-sub { font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; max-width: 32ch; text-wrap: balance; }
.hero-copy .hero-lead { display: grid; gap: 10px; max-width: 52ch; margin-top: -6px; }
.hero-copy .hero-lead .lead { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem); }
.figure-meta .sample { display: block; margin-top: 4px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.01em; }
.hero-copy .figure-block { display: flex; flex-wrap: wrap; align-items: baseline; align-content: flex-end; gap: 6px 18px; min-height: calc(clamp(3.5rem, 2rem + 6vw, 6.5rem) + 1.125rem); }
.hero-copy .figure-block.yesterday .figure { font-size: clamp(2rem, 1.2rem + 2.6vw, 3rem); font-weight: 500; letter-spacing: -0.03em; }
.hero-copy .figure-block.yesterday .figure .unit { font-size: 0.7em; }
.figure .when { font-weight: 500; margin-right: 0.3em; }
.figure .when[hidden] { display: none; }

.hero-copy .actions { margin-top: 8px; }

.swap { transition: opacity 320ms var(--ease), transform 320ms var(--ease); }
.swap.out { opacity: 0; transform: translateY(6px); }

/* range bar: the app's single instrument */
.range { display: grid; gap: 10px; max-width: 520px; }
.range .track { position: relative; height: 6px; border-radius: 3px; background: var(--field-track); }
.range .band {
  position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--field-band);
  transition: left var(--fade) var(--ease), right var(--fade) var(--ease), opacity var(--fade) var(--ease);
}
.range .marker {
  position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%;
  background: var(--field-ink); transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(21, 32, 31, 0.35);
  transition: left var(--fade) var(--ease), opacity var(--fade) var(--ease);
}
.range .marker.off { opacity: 0; }
.range .labels { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--field-mute); font-variant-numeric: tabular-nums; }
.range .labels b { color: var(--field-ink); font-weight: 600; }

/* the week: three mornings to step through */
.mornings { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.morning {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 10px;
  border-radius: 999px; color: var(--field-mute); font-size: 0.875rem; font-weight: 500;
  transition: background-color 220ms var(--ease), color 220ms var(--ease);
}
.morning { position: relative; }
.morning::after { content: ""; position: absolute; inset: -4px 0; }
.morning .dot { margin: 0; background: var(--field-ink); opacity: 0.55; top: 0; }
.morning[aria-pressed="true"] { background: var(--field-track); color: var(--field-ink); }
.morning[aria-pressed="true"] .dot { opacity: 1; }
.morning:hover { color: var(--field-ink); }

.hero-phone { position: relative; max-width: 360px; margin-inline: auto; width: min(100%, 300px); }
@media (min-width: 900px) { .hero-phone { width: 100%; max-width: 340px; margin-left: auto; margin-right: 0; } }
.hero-phone .phone img { position: absolute; inset: 2.5%; width: 95%; height: 95%; transition: opacity var(--fade) var(--ease); }
.hero-phone .phone img[aria-hidden="true"] { opacity: 0; }

/* ---------- a morning (steps) ---------- */

.steps { display: grid; gap: 40px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }
.step { display: grid; gap: 18px; align-content: start; }
.step .phone { width: min(100%, 260px); margin-inline: auto; }
.step .t { font-weight: 600; font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.3; }
.step .d { color: var(--ink-2); text-wrap: pretty; font-size: 0.9375rem; }
.step .n { font-variant-numeric: tabular-nums; color: var(--mute); font-size: 0.875rem; }
.step-copy { display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid var(--sep); }

.photo img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 4 / 3; border-radius: var(--r-inset); background: var(--surface); }
figcaption { margin-top: 10px; font-size: 0.9375rem; color: var(--mute); }

/* ---------- the instrument (phonocardiogram) ---------- */

.pcg { position: relative; background: var(--surface); border-radius: var(--r-inset); padding: 22px 22px 18px; }
.pcg svg { width: 100%; height: auto; display: block; cursor: crosshair; touch-action: pan-y; }
.pcg .trace { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.pcg .grid { stroke: var(--sep); stroke-width: 0.7; }
.pcg .band { fill: var(--band-fill); }
.pcg .mark { stroke: var(--dot-teal); stroke-width: 2; }
.pcg .label { font-family: var(--font); font-size: 13px; font-weight: 600; fill: var(--ink-2); }
.pcg .label.band-l { fill: var(--dot-teal); font-size: 12px; letter-spacing: 0.04em; }
.pcg svg { min-height: 220px; }
.pcg .cursor { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; transition: opacity 200ms var(--ease); }
.pcg.live .cursor { opacity: 1; }
.pcg-readout {
  display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline;
  padding-top: 16px; margin-top: 8px; border-top: 1px solid var(--sep);
  font-variant-numeric: tabular-nums;
}
.pcg-readout .phase { font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; min-width: 9ch; }
.pcg-readout .ms { color: var(--ink-2); }
.pcg-readout .hint { color: var(--mute); font-size: 0.875rem; margin-left: auto; }

/* ---------- pipeline (vertical timeline) ---------- */

.pipeline { position: relative; display: grid; gap: 0; }
.stage {
  display: grid; gap: 8px 32px; padding: 26px 0; border-top: 1px solid var(--sep);
  grid-template-columns: minmax(0, 1fr);
}
.stage:last-child { border-bottom: 1px solid var(--sep); }
.stage .where { color: var(--mute); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; }
.stage .t { font-weight: 600; font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.3; }
.stage .d { color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }
.stage .spec { display: grid; gap: 6px; align-content: start; font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.stage .spec div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--sep); }
.stage .spec div:last-child { border-bottom: 0; }
.stage .spec span:last-child { color: var(--ink); font-weight: 500; text-align: right; }
.stage .spec span:first-child { color: var(--mute); }
@media (min-width: 800px) {
  .stage { grid-template-columns: 10ch minmax(0, 6fr) minmax(0, 4fr); align-items: start; }
  .stage .where { padding-top: 6px; }
  .stage .t { grid-column: 2; }
  .stage .d { grid-column: 2; }
  .stage .spec { grid-column: 3; grid-row: 1 / span 2; }
}

/* ---------- tables of measurement ---------- */

.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--sep); vertical-align: top; }
.table { max-width: 56rem; }
.table th { font-weight: 600; font-size: 0.8125rem; color: var(--ink-2); letter-spacing: 0.01em; border-bottom-color: var(--sep-2); }
.table td.n, .table th.n { text-align: right; white-space: nowrap; }
.table td:not(:first-child), .table th:not(:first-child) { padding-left: 16px; }
.table .m { color: var(--mute); }
@media (max-width: 699px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 0; border-bottom: 1px solid var(--sep); }
  .table td { border: 0; padding: 2px 0; }
  .table td:not(:first-child) { padding-left: 0; }
  .table td.n { text-align: left; color: var(--ink-2); white-space: normal; }
}

/* ---------- gallery strip ---------- */

.strip { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.strip figure { display: grid; gap: 12px; }
.strip .phone { box-shadow: 0 18px 44px -24px var(--shadow-ink); }

/* ---------- faq ---------- */

.faq details { border-bottom: 1px solid var(--sep); }
.faq details:first-of-type { border-top: 1px solid var(--sep); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 18px 0; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; width: 20px; height: 20px; color: var(--mute); transition: transform 300ms var(--ease); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq .a { padding: 0 0 20px; color: var(--ink-2); max-width: 62ch; text-wrap: pretty; display: grid; gap: 10px; }

/* ---------- publications ---------- */

.pub { display: grid; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--sep); grid-template-columns: minmax(0, 1fr); }
.pub .y { color: var(--mute); font-variant-numeric: tabular-nums; }
.pub .t { font-weight: 600; letter-spacing: -0.01em; text-wrap: pretty; }
.pub .v { color: var(--ink-2); font-size: 0.9375rem; }
.pub .au { color: var(--mute); font-size: 0.9375rem; }
@media (min-width: 700px) {
  .pub { grid-template-columns: 6ch minmax(0, 1fr); }
  .pub .t, .pub .v, .pub .au { grid-column: 2; }
  .pub .y { grid-row: 1 / span 3; padding-top: 2px; }
}

/* ---------- endpoints ---------- */

.endpoint { display: grid; grid-template-columns: 7ch minmax(0, 1fr); gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--sep); align-items: baseline; }
.endpoint .m { font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.02em; color: var(--ink-2); }
.endpoint .m.post, .endpoint .m.put { color: var(--dot-teal); }
.endpoint .m.delete { color: var(--danger); }
.endpoint code { font-size: 0.9375rem; }
.endpoint .d { grid-column: 2; color: var(--mute); font-size: 0.9375rem; }

/* ---------- page header (inner pages) ---------- */

.page-head { padding: clamp(24px, 4vw, 56px) 0 clamp(48px, 6vw, 80px); }
.page-head .wrap { display: grid; gap: 20px; }
.page-head .display { max-width: 16ch; }
.page-head .lead { max-width: 56ch; }

/* ---------- closing field + footer ---------- */

.close-field { margin-top: clamp(48px, 7vw, 96px); padding: clamp(64px, 9vw, 120px) 0; }
.close-field .wrap { display: grid; gap: 28px; }
.close-field .display { max-width: 12ch; }
@media (min-width: 900px) {
  .close-field .wrap { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); align-items: end; }
}
.close-field .actions { align-self: end; }

.footer { padding: clamp(40px, 5vw, 64px) 0 40px; color: var(--ink-2); font-size: 0.9375rem; }
.footer .top { display: grid; gap: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--sep); }
@media (min-width: 760px) { .footer .top { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } }
.footer .wordmark { color: var(--ink); }
.footer .wordmark svg { height: 22px; }
.footer .tag { margin-top: 14px; max-width: 32ch; }
.footer h2 { font-size: 0.8125rem; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; margin-bottom: 12px; }
.footer li { padding: 5px 0; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .bottom { display: grid; gap: 14px; padding-top: 22px; font-size: 0.875rem; color: var(--mute); }
@media (min-width: 760px) { .footer .bottom { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.footer .disclaimer { max-width: 60ch; text-wrap: pretty; font-size: 0.9375rem; }

/* ---------- prose (privacy, terms, articles) ---------- */

.prose { max-width: 68ch; display: grid; gap: 16px; }
.prose h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; margin-top: 18px; }
.prose p, .prose li { color: var(--ink-2); text-wrap: pretty; }
.prose ul { display: grid; gap: 8px; padding-left: 1.2em; list-style: disc; }
.prose li::marker { color: var(--mute); }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .field, .swap, .range .band, .range .marker, .hero-phone .phone img, .pill, .pill-ink, .sheet, .sheet-scrim {
    transition-duration: 1ms !important;
  }
  .swap.out { transform: none; }
}

/* ---------- forms: early access, API key, contact ---------- */

.form { display: grid; gap: 12px; }
.form .fields { display: grid; gap: 12px; }
@media (min-width: 640px) {
  .form.inline .fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: start; }
}
.form label { display: grid; gap: 6px; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.form.inline label { gap: 0; }
.form.inline label > span:not(.visually-hidden) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.field .form label { color: var(--field-mute); }
.form input, .form textarea, .form select {
  font: inherit; font-size: 1.0625rem; line-height: 1.3; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--sep-2); border-radius: var(--r-pill);
  height: 52px; padding: 0 20px; width: 100%; min-width: 0;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.form textarea { height: auto; min-height: 120px; padding: 14px 20px; border-radius: var(--r-inset); resize: vertical; }
.form select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235f6a68' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 18px; }
.form input::placeholder, .form textarea::placeholder { color: var(--mute); }
.form input:focus-visible, .form textarea:focus-visible, .form select:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
.field .form input, .field .form textarea, .field .form select { background: var(--field-ink); color: var(--slate); border-color: transparent; }
.field .form input::placeholder, .field .form textarea::placeholder { color: color-mix(in srgb, var(--slate) 62%, transparent); }
.field .form input:focus-visible, .field .form textarea:focus-visible, .field .form select:focus-visible { border-color: var(--field-ink); box-shadow: 0 0 0 3px var(--field-track); }
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: var(--danger); }
.field .form input[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--danger); border-color: transparent; }
.form button[type="submit"] { width: auto; white-space: nowrap; }
.form button[disabled] { opacity: 0.7; cursor: progress; }
.form .msg { font-size: 0.9375rem; line-height: 1.45; min-height: 1.45em; color: var(--ink-2); text-wrap: pretty; }
.field .form .msg { color: var(--field-mute); }
.form .msg.error { color: var(--danger); }
.field .form .msg.error { color: var(--field-ink); }
.form .msg.error::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-right: 10px; vertical-align: middle; position: relative; top: -1px; }
.form .done { display: grid; gap: 8px; }
.form .done .title { font-size: 1.375rem; }
.form .fine { font-size: 0.875rem; color: var(--mute); text-wrap: pretty; max-width: 56ch; }
.field .form .fine { color: var(--field-mute); }
.form[data-state="done"] .fields, .form[data-state="done"] .fine { display: none; }
.form:not([data-state="done"]) .done { display: none; }
.form.inline .msg { margin-top: -2px; }

/* code blocks that overflow scroll sideways and say so */
pre { position: relative; }
pre[data-overflow="true"] { mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.scroll-hint { font-size: 0.8125rem; color: var(--mute); margin-top: 8px; display: none; }
pre[data-overflow="true"] + .scroll-hint { display: block; }
.endpoint code { overflow-wrap: normal; word-break: keep-all; }
.pub .t { max-width: 62ch; }
.pub .v, .pub .au { max-width: 60ch; }
.sub, .form .msg { max-width: 56ch; }
.hero-join { margin-top: 8px; }
.hero-join + .text-action { margin-top: -6px; }
.close-join { display: grid; gap: 14px; align-self: end; }
.field .form input::placeholder, .field .form textarea::placeholder { color: color-mix(in srgb, var(--slate) 78%, transparent); }

@media (min-width: 640px) {
  .close-join .form.inline .fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .close-join .form.inline button[type="submit"] { grid-column: 1 / -1; justify-self: start; }
}

/* between the single-column phone layout and the wide desktop, the hero form
   needs two rows: name and email, then the button */
@media (min-width: 900px) and (max-width: 1180px) {
  .hero-join .form.inline .fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-join .form.inline button[type="submit"] { grid-column: 1 / -1; justify-self: start; }
}

.phone > picture { display: contents; }

/* light type on the coloured field: a little more leading, tracking and weight */
.field .lead, .field .form .msg, .field .fine, .field .figure-meta, .field .range .labels, .field .morning { font-weight: 450; letter-spacing: 0.004em; }
.field .lead { line-height: 1.5; }

/* ---------- the hold: a heartbeat-timed close-up ---------- */
.photo .hold-art { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: var(--r-inset); background: #0D5A57; }
.hold-art .hold-breath { transform-box: view-box; transform-origin: 780px 790px; animation: hold-breath 4.8s ease-in-out infinite; }
@keyframes hold-breath { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-3px) scale(1.006); } }
.hold-art .hold-ring { opacity: 0; transform-box: fill-box; transform-origin: 100% 50%; }
.hold-art .hold-ring.beat { animation: hold-ring 900ms cubic-bezier(.2,.7,.2,1) both; }
.hold-art .hold-ring.r2.beat { animation-delay: 70ms; }
.hold-art .hold-ring.r3.beat { animation-delay: 140ms; }
.hold-art .hold-ring.soft { --peak: .45; }
@keyframes hold-ring { 0% { opacity: 0; transform: scale(.82); } 18% { opacity: var(--peak, .9); } 100% { opacity: 0; transform: scale(1.18); } }
.hold-art .hold-glow { transition: fill 220ms ease-out; }
.hold-art .hold-glow.beat { fill: #1D857F; }
.hold-art .hold-live { animation: hold-live 1.6s ease-in-out infinite; }
@keyframes hold-live { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .hold-art .hold-breath, .hold-art .hold-live { animation: none; }
  .hold-art .hold-ring { opacity: .45; }
  .hold-art .hold-ring.beat { animation: none; }
}
