/* Kovura web 2.0. Since Nov 18: a formal, editorial "Gray." world (light gray
   paper, black ink, giant Inter Tight headlines, Newsreader serif text). The
   paper layer at the end of this file overrides the original dark tokens.
   One dark world. Barlow Condensed speaks, Barlow explains, JetBrains Mono
   measures. Mono is only ever used for numbers, units, formulas and the
   labels that sit on instruments. */

@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0a0b0d;
  --panel: #111317;
  --panel-2: #171a1f;
  --panel-3: #1e2228;
  --line: rgba(17, 17, 15, 0.09);
  --line-2: rgba(17, 17, 15, 0.17);
  --ink: #ece8e1;
  --ink-2: #aaa69f;
  --ink-3: #85827c;
  --accent: #ff5420;          /* the app's default accent, Kovura.defaultAccentHex */
  --accent-ink: #ff7a4f;      /* accent as text on the dark ground, 5.9:1 */
  --accent-soft: rgba(255, 84, 32, 0.14);
  --good: #34c759;            /* iOS system green, the app's statusGood */
  --warn: #ff9f0a;
  --bad: #ff453a;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 14px;
  --r-sm: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #0a0b0d; }
html { scrollbar-color: #2a2f36 var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2f36; border-radius: 10px; border: 2px solid var(--bg); }
input, button, select { font: inherit; color: inherit; caret-color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #0a0b0d; padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-feature-settings: "tnum", "zero"; letter-spacing: 0; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums slashed-zero; }

/* ── Type ─────────────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 0.96; letter-spacing: -0.012em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(3rem, 7.4vw, 6rem); }
h2 { font-size: clamp(2.4rem, 5vw, 4.25rem); }
h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); line-height: 1.05; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(1.08rem, 1.4vw, 1.25rem); color: var(--ink-2); max-width: 60ch; line-height: 1.55; }
.lede strong, .lede b { color: var(--ink); font-weight: 500; }
.prose { max-width: 68ch; color: var(--ink-2); }
.prose p + p { margin-top: 0.9em; }
.prose strong { color: var(--ink); font-weight: 600; }
.label { font: 500 0.72rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.dim { color: var(--ink-3); }
.accent { color: var(--accent-ink); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  --b: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--b);
  background: var(--b); color: #0a0b0d;
  font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms, box-shadow 200ms var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -10px rgba(255, 84, 32, 0.6); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: 60ms; }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 200ms var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink-2); box-shadow: none; background: rgba(17, 17, 15, 0.04); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link {
  font-weight: 500; text-decoration: none; color: var(--ink);
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 1px no-repeat;
  transition: background-size 260ms var(--ease);
  padding-bottom: 2px;
}
.link:hover { background-size: 100% 1px; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; color: var(--ink); min-height: 44px; }
.arrow-link svg { width: 16px; height: 16px; transition: transform 200ms var(--ease); color: var(--accent-ink); }
.arrow-link:hover svg { transform: translateX(4px); }
.arrow-link span { background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 1px no-repeat; transition: background-size 260ms var(--ease); padding-bottom: 2px; }
.arrow-link:hover span { background-size: 100% 1px; }

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand .mark { width: 26px; height: 26px; color: var(--ink); }
.brand span { font: 700 1.35rem/1 var(--display); letter-spacing: 0.06em; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  font: 500 0.8rem/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none; padding: 0 11px; border-radius: 999px;
  min-height: 36px; display: inline-flex; align-items: center;
  transition: color 160ms, background-color 160ms;
}
.nav a:hover { color: var(--ink); background: rgba(17, 17, 15, 0.06); }
.nav a[aria-current="page"] { color: var(--ink); background: rgba(17, 17, 15, 0.09); }
.site-header .btn { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 20px; height: 20px; }
.mobile-menu { display: none; }

@media (max-width: 1080px) {
  .nav, .site-header .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-menu[data-open="true"] {
    display: flex; flex-direction: column; position: fixed; inset: var(--header) 0 0 0; z-index: 39;
    background: var(--bg); padding: 24px var(--gutter) 40px; overflow-y: auto;
  }
  .mobile-menu a.m-link {
    font: 600 2.2rem/1 var(--display); text-decoration: none; padding: 12px 0;
    border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline;
  }
  .mobile-menu a.m-link span { font: 500 0.75rem var(--mono); color: var(--ink-3); }
  .mobile-menu .btn { margin-top: 28px; justify-content: center; }
}

/* ── Sections ─────────────────────────────────────────────────────────── */
main > section { padding-block: clamp(72px, 10vw, 128px); border-top: 1px solid var(--line); position: relative; }
main > section:first-child { border-top: 0; }
.sec-head { display: grid; gap: 20px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 860px; }
.sec-head.split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); max-width: none; align-items: end; gap: 40px; }
@media (max-width: 860px) { .sec-head.split { grid-template-columns: 1fr; gap: 20px; } }

/* page heads on inner pages */
.page-head { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 5vw, 64px) !important; }
.page-head .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; }
.page-head h1 { font-size: clamp(2.8rem, 6vw, 5rem); max-width: 14ch; }
.page-head .lede { margin-top: 0; }
@media (max-width: 900px) { .page-head .wrap { grid-template-columns: 1fr; } }
.page-head .meta-row { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Chips / readouts ─────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font: 500 0.72rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
  white-space: nowrap;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.chip.beta { color: var(--accent-ink); border-color: rgba(255, 84, 32, 0.4); }

/* ── Panel (the instrument shell) ─────────────────────────────────────── */
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  position: relative;
}
.panel-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.panel-body { padding: clamp(16px, 2.4vw, 24px); }
.tick-rule { height: 8px; background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 10px); opacity: 0.6; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); gap: 2px; }
.seg button {
  border: 0; background: transparent; cursor: pointer; border-radius: 999px;
  padding: 0 14px; min-height: 34px; font: 500 0.74rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
  transition: background-color 200ms var(--ease), color 200ms;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--ink); color: #0a0b0d; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(64px, 8vw, 104px) !important; min-height: calc(100svh - var(--header)); display: flex; align-items: center; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 12ch; font-size: clamp(3rem, 6.2vw, 5.4rem); }
.hero h1 em { font-style: normal; color: var(--accent-ink); }
.hero .lede { margin-top: 26px; }
.hero .btn-row { margin-top: 34px; }
.cred {
  margin-top: 36px; display: inline-grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  padding: 12px 18px 12px 12px; border: 1px solid var(--line-2); border-radius: 14px; text-decoration: none;
  background: rgba(17, 17, 15, 0.025);
  transition: border-color 200ms, transform 200ms var(--ease), background-color 200ms;
}
.cred:hover { border-color: var(--ink-3); transform: translateY(-2px); background: rgba(17, 17, 15, 0.05); }
.cred-seal { width: 46px; height: 46px; border-radius: 50%; border: 1px dashed rgba(255, 84, 32, 0.6); display: grid; place-items: center; color: var(--accent-ink); }
.cred-seal svg { width: 22px; height: 22px; }
.cred-lines { display: grid; gap: 4px; }
.cred-top { font: 600 0.8rem/1.2 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.cred-sub { font-size: 0.9rem; color: var(--ink-2); line-height: 1.35; }
@media (max-width: 960px) {
  .hero { min-height: 0; }
  .hero .wrap { grid-template-columns: 1fr; }
}

/* hero instrument */
.hud .panel-bar .label b { color: var(--ink); font-weight: 500; }
.hud-view { display: none; }
.hud-view.on { display: block; animation: hud-in 420ms var(--ease); }
@keyframes hud-in { from { opacity: 0; filter: blur(4px); transform: translateY(6px); } }
.hud-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.big-read { font: 500 clamp(4.4rem, 9vw, 6.6rem)/0.85 var(--mono); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.big-read small { font-size: 0.32em; letter-spacing: 0; color: var(--ink-3); margin-left: 4px; }
.verdict { font: 600 1.6rem/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.verdict.good { color: var(--good); } .verdict.warn { color: var(--warn); } .verdict.bad { color: var(--bad); }
.scale { margin-top: 22px; position: relative; }
.scale-track { height: 10px; border-radius: 3px; display: flex; overflow: hidden; gap: 2px; }
.scale-track i { display: block; height: 100%; }
.scale-marker { position: absolute; top: -6px; width: 2px; height: 22px; background: var(--ink); border-radius: 2px; transition: left 700ms var(--ease); box-shadow: 0 0 0 3px var(--panel); }
.scale-ticks { display: flex; justify-content: space-between; margin-top: 8px; }
.scale-ticks span { font: 400 0.7rem var(--mono); color: var(--ink-3); position: absolute; transform: translateX(-50%); }
.scale-ticks { position: relative; height: 14px; }
.hud-rows { margin-top: 26px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.hud-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; align-items: center; }
.hud-row .num { font-size: 0.9rem; }
.hud-row .num.up { color: var(--good); } .hud-row .num.down { color: var(--warn); }
.formula-line {
  margin-top: 18px; font: 400 0.8rem/1.6 var(--mono); color: var(--ink-2);
  padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); overflow-x: auto; white-space: nowrap;
}
.formula-line b { color: var(--accent-ink); font-weight: 500; }
.hud-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--good); margin-right: 6px; vertical-align: middle; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ── Generic grids ────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── Instruments index (home) ─────────────────────────────────────────── */
.inst-list { border-top: 1px solid var(--line); }
.inst {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.15fr) 120px 90px; gap: 28px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background-color 220ms;
}
.inst:hover { background: linear-gradient(90deg, transparent, rgba(17, 17, 15, 0.03) 30%, transparent); }
.inst .k { font: 500 0.78rem var(--mono); color: var(--ink-3); letter-spacing: 0.05em; }
.inst h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.inst p { color: var(--ink-2); font-size: 1rem; }
.inst .go { justify-self: end; }
.inst .spark { width: 120px; height: 34px; color: var(--accent); opacity: .55; transition: opacity 220ms; }
.inst:hover .spark { opacity: 1; }
.inst .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inst:hover .go svg { transform: translateX(4px); }
@media (max-width: 900px) {
  .inst { grid-template-columns: 1fr; gap: 10px; }
  .inst .go { justify-self: start; }
  .inst .spark { display: none; }
}

/* ── Island simulator ─────────────────────────────────────────────────── */
.island-stage { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 48px); align-items: stretch; }
@media (max-width: 900px) { .island-stage { grid-template-columns: 1fr; } }
.phone-top {
  position: relative; border-radius: 48px 48px 0 0; padding: 18px 18px 0;
  background: #000; border: 1px solid #2b2f35; border-bottom: 0;
  min-height: 420px; overflow: hidden;
  background-image: radial-gradient(120% 70% at 50% 120%, rgba(255, 84, 32, 0.22), transparent 60%), linear-gradient(180deg, #050506, #0d0f12);
}
.status-row { display: flex; justify-content: space-between; padding: 6px 22px 0; font: 600 0.95rem/1 var(--body); color: #fff; }
.status-row svg { width: 54px; height: 12px; }
.island {
  margin: 14px auto 0; background: #000; color: #fff; border-radius: 40px;
  width: min(100%, 360px); padding: 16px 18px 16px; display: grid; gap: 12px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 20px 40px -20px rgba(0, 0, 0, 0.9);
  transition: border-radius 420ms var(--ease), padding 420ms var(--ease);
}
.island-top { display: flex; align-items: center; gap: 10px; }
.island-top img { width: 22px; height: 22px; border-radius: 6px; }
.island-top .rt { font: 500 0.78rem var(--mono); color: rgba(255, 255, 255, 0.6); text-transform: uppercase; letter-spacing: 0.04em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.island-top .timer { font: 500 0.95rem var(--mono); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.island-main { display: flex; align-items: center; gap: 14px; }
.island-main .ex { flex: 1; min-width: 0; }
.island-main .ex b { display: block; font: 600 1.25rem/1.1 var(--body); }
.island-main .ex span { font: 500 0.9rem var(--mono); color: rgba(255, 255, 255, 0.7); }
.check {
  width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: #0a0b0d;
  display: grid; place-items: center; cursor: pointer; flex: none;
  transition: transform 160ms var(--ease), background-color 200ms;
}
.check:hover { transform: scale(1.06); }
.check:active { transform: scale(0.94); }
.check svg { width: 26px; height: 26px; }
.check[disabled] { background: var(--good); cursor: default; transform: none; }
.island-progress { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.island-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 600ms var(--ease); }
.island-meta { display: flex; justify-content: space-between; font: 500 0.75rem var(--mono); color: rgba(255, 255, 255, 0.55); }
.island.flash { animation: island-flash 520ms var(--ease); }
@keyframes island-flash { 40% { transform: scale(1.025); box-shadow: 0 0 0 1px rgba(255, 84, 32, 0.6), 0 20px 50px -16px rgba(255, 84, 32, 0.45); } }
.lock-time { text-align: center; margin-top: 36px; font: 600 5.4rem/1 var(--body); color: rgba(255, 255, 255, 0.92); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lock-date { text-align: center; font: 500 1.05rem var(--body); color: rgba(255, 255, 255, 0.7); }
.rpe-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rpe-pick .seg button { min-width: 40px; padding: 0 10px; }

.receipt .panel-body { display: grid; gap: 18px; }
.ledger { font: 400 0.84rem/1.55 var(--mono); color: var(--ink-2); max-height: 128px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); padding: 10px 12px; }
.ledger div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger div.new { color: var(--ink); animation: ledger-in 500ms var(--ease); }
@keyframes ledger-in { from { opacity: 0; transform: translateY(-4px); } }
.ledger .empty { color: var(--ink-3); }
.mbar { display: grid; grid-template-columns: 110px 1fr 112px; gap: 12px; align-items: center; }
.mbar .t { height: 12px; border-radius: 3px; background: rgba(17, 17, 15, 0.06); position: relative; overflow: hidden; }
.mbar .t i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; transition: width 700ms var(--ease), background-color 400ms; }
.mbar .t::after { content: ""; position: absolute; top: 0; bottom: 0; left: 20%; border-left: 1px dashed rgba(17, 17, 15, 0.25); box-shadow: calc(var(--w, 1) * 0px) 0 0 transparent; }
.mbar .t .m50 { position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dashed rgba(17, 17, 15, 0.25); }
.mbar .name { font-size: 0.95rem; }
.mbar .v { font: 400 0.8rem var(--mono); color: var(--ink-2); text-align: right; white-space: nowrap; }
@media (max-width: 520px) { .mbar { grid-template-columns: 84px 1fr 92px; gap: 8px; } }

/* ── Screens strip ────────────────────────────────────────────────────── */
.screens { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); align-items: start; }
.screens figure { margin: 0; overflow: hidden; border-radius: 28px; }
.screens img { width: 100%; height: auto; transition: transform 500ms var(--ease); }
.screens figure:hover img { transform: scale(1.025); }
.screens figure:nth-child(even) { margin-top: 48px; }
@media (max-width: 900px) { .screens { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Data section ─────────────────────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.fact { padding: 26px 26px 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.fact .label { color: var(--accent-ink); }
.fact h3 { font-size: 1.7rem; }
.fact p { color: var(--ink-2); font-size: 1rem; }
.fact svg.ic { width: 26px; height: 26px; color: var(--ink); }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr; } }

/* ── Charts (shared) ──────────────────────────────────────────────────── */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: rgba(17, 17, 15, 0.07); }
.chart text { font: 400 11px var(--mono); fill: var(--ink-3); }
.chart .zone-label { font-size: 10px; letter-spacing: 0.06em; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font: 400 0.78rem var(--mono); color: var(--ink-2); }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 7px; }

/* ── Lab layout (simulators) ─────────────────────────────────────────── */
.lab { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .lab { grid-template-columns: 1fr; } }
.controls { display: grid; gap: 22px; }
.control { display: grid; gap: 10px; }
.control .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.control output { font: 500 0.9rem var(--mono); color: var(--ink); }
.control .hint { font-size: 0.86rem; color: var(--ink-3); line-height: 1.4; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), rgba(17, 17, 15, 0.14) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(17, 17, 15, 0.14); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); margin-top: -8px; border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line-2); transition: transform 150ms var(--ease); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 3px solid var(--bg); }
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.15); }
.preset-list { display: flex; flex-wrap: wrap; gap: 8px; }
.preset {
  border: 1px solid var(--line-2); background: transparent; border-radius: 999px; min-height: 36px; padding: 0 14px; cursor: pointer;
  font: 500 0.78rem var(--mono); color: var(--ink-2); transition: all 180ms var(--ease);
}
.preset:hover { color: var(--ink); border-color: var(--ink-3); }
.preset[aria-pressed="true"] { background: var(--ink); color: #0a0b0d; border-color: var(--ink); }

.readouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.readout { padding: 16px 18px; border-right: 1px solid var(--line); display: grid; gap: 6px; }
.readout:last-child { border-right: 0; }
.readout .v { font: 500 1.9rem/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.readout .v.good { color: var(--good); } .readout .v.warn { color: var(--warn); } .readout .v.bad { color: var(--bad); }
@media (max-width: 640px) { .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .readout:nth-child(2) { border-right: 0; } .readout:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

.bars-edit { cursor: ns-resize; touch-action: none; }
.bars-edit rect.bar { transition: fill 160ms; }
.bars-edit rect.bar:hover, .bars-edit rect.bar.drag { fill: var(--ink) !important; }

.note {
  font-size: 0.92rem; color: var(--ink-2); line-height: 1.5; padding: 14px 16px; border-radius: var(--r-sm);
  background: rgba(17, 17, 15, 0.03); border: 1px solid var(--line);
}
.note strong { color: var(--ink); font-weight: 600; }

/* explain rows under a lab */
.explain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); margin-top: clamp(40px, 6vw, 72px); }
.explain > div { padding: 24px 24px 0 0; display: grid; gap: 10px; align-content: start; }
.explain > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.explain h3 { font-size: 1.45rem; }
.explain p { color: var(--ink-2); font-size: 0.98rem; }
.explain code { font: 400 0.82rem/1.6 var(--mono); color: var(--ink); display: block; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; white-space: pre-wrap; }
@media (max-width: 900px) { .explain { grid-template-columns: 1fr; } .explain > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 24px; } .explain > div { padding-right: 0; } }

/* ── Muscle map ───────────────────────────────────────────────────────── */
.map-wrap { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .map-wrap { grid-template-columns: 1fr; } }
.bodies { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 18px 12px 8px; }
.bodies figure { margin: 0; display: grid; gap: 8px; justify-items: center; }
.bodies svg { width: 100%; max-height: 520px; }
.bodies .body-fill { fill: #1c2026; stroke: rgba(17, 17, 15, 0.16); stroke-width: 1.4; }
.bodies .details { fill: none; stroke: rgba(10, 11, 13, 0.55); stroke-width: 1.2; stroke-linecap: round; pointer-events: none; }
.bodies .muscle { cursor: pointer; transition: fill 380ms var(--ease), opacity 200ms; stroke: rgba(10, 11, 13, 0.8); stroke-width: 1; }
.bodies .muscle:hover { opacity: 0.82; }
.bodies .muscle.sel { stroke: var(--ink); stroke-width: 2.4; }
.bodies .muscle:focus { outline: none; }
.bodies .muscle:focus-visible { stroke: var(--accent); stroke-width: 3; }
.muscle-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.muscle-chips button { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; min-height: 32px; padding: 0 11px; font: 500 0.72rem var(--mono); color: var(--ink-2); cursor: pointer; text-transform: uppercase; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 6px; }
.muscle-chips button i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.muscle-chips button[aria-pressed="true"] { color: var(--ink); border-color: var(--ink); }
.status-legend { display: flex; flex-wrap: wrap; gap: 14px; font: 400 0.76rem var(--mono); color: var(--ink-2); }
.status-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.time-scrub { display: grid; gap: 8px; }

/* ── Reaction test ────────────────────────────────────────────────────── */
.rt-pad {
  position: relative; border-radius: var(--r); min-height: 420px; display: grid; place-items: center; text-align: center;
  border: 1px solid var(--line); background: var(--panel); cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: background-color 90ms linear; touch-action: manipulation; overflow: hidden; padding: 24px;
}
.rt-pad:focus-visible { outline-offset: 4px; }
.rt-pad[data-phase="waiting"] { background: #13161a; cursor: wait; }
.rt-pad[data-phase="ready"] { background: var(--accent); color: #0a0b0d; }
.rt-pad[data-phase="tooSoon"] { background: #2a1210; }
.rt-pad .rt-big { font: 600 clamp(3rem, 8vw, 5.6rem)/0.95 var(--display); letter-spacing: 0.01em; text-transform: uppercase; }
.rt-pad .rt-sub { font: 500 0.85rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 14px; opacity: 0.75; }
.rt-pad .rt-ms { font: 500 clamp(3.6rem, 9vw, 6rem)/1 var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rt-rounds { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }
.rt-rounds i { width: 28px; height: 4px; border-radius: 2px; background: rgba(17, 17, 15, 0.18); }
.rt-rounds i.done { background: currentColor; }
.rt-pad .scanline { position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 84, 32, 0.6), transparent); top: 0; animation: scan 3.2s linear infinite; pointer-events: none; }
.rt-pad[data-phase="ready"] .scanline, .rt-pad[data-phase="done"] .scanline { display: none; }
@keyframes scan { to { top: 100%; } }
.rt-results { display: grid; gap: 16px; }
.trial-bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding-top: 18px; }
.trial-bars div { flex: 1; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: flex-end; height: 100%; }
.trial-bars b { font: 400 0.72rem var(--mono); color: var(--ink-2); font-weight: 400; }
.trial-bars i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: rgba(17, 17, 15, 0.25); transition: height 600ms var(--ease); }
.trial-bars i.med { background: var(--accent); }

/* ── Formula inspector ────────────────────────────────────────────────── */
.inspector { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .inspector { grid-template-columns: 1fr; } }
.f-index { position: sticky; top: calc(var(--header) + 16px); display: grid; gap: 2px; }
@media (max-width: 960px) { .f-index { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.f-index button {
  text-align: left; border: 0; background: transparent; border-radius: 10px; padding: 10px 12px; cursor: pointer; min-height: 44px;
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; color: var(--ink-2); transition: background-color 160ms, color 160ms;
}
.f-index button:hover { background: rgba(17, 17, 15, 0.04); color: var(--ink); }
.f-index button[aria-selected="true"] { background: var(--panel-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.f-index button span { font-weight: 500; }
.f-index button small { font: 400 0.68rem var(--mono); color: var(--ink-3); }
.f-group { font: 500 0.68rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding: 14px 12px 6px; }
@media (max-width: 960px) { .f-group { grid-column: 1 / -1; } }
.f-card { display: none; }
.f-card.on { display: block; animation: hud-in 380ms var(--ease); }
.f-card h2 { font-size: clamp(2rem, 4vw, 3rem); }
.f-card .desc { color: var(--ink-2); margin-top: 14px; max-width: 64ch; }
.f-src { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.eq {
  margin-top: 22px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  font: 400 clamp(0.88rem, 1.4vw, 1.02rem)/1.9 var(--mono); padding: 16px 18px; overflow-x: auto;
}
.eq .ln { white-space: pre; }
.eq var { font-style: normal; color: var(--accent-ink); border-bottom: 1px dotted rgba(255, 122, 79, 0.5); cursor: help; transition: background-color 160ms; border-radius: 2px; }
.eq var.hl, .eq var:hover { background: var(--accent-soft); }
.eq .res { color: var(--ink); font-weight: 600; }
.eq .c { color: var(--ink-3); }
.f-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin-top: 24px; }
@media (max-width: 640px) { .f-inputs { grid-template-columns: 1fr; } }
.f-out { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.f-out .big { font: 500 3rem/1 var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.f-out .tag { font: 600 1.25rem/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase; }
.f-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 26px; border-top: 1px solid var(--line); }
.f-meta > div { padding: 16px 16px 0 0; display: grid; gap: 6px; align-content: start; }
.f-meta > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.f-meta p { font-size: 0.95rem; color: var(--ink-2); }
@media (max-width: 640px) { .f-meta { grid-template-columns: 1fr; } .f-meta > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; } }

/* ── Research ─────────────────────────────────────────────────────────── */
.models { border-top: 1px solid var(--line); }
.model { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.model .n { font: 500 0.85rem var(--mono); color: var(--accent-ink); padding-top: 6px; }
.model h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); line-height: 1; }
.model .file { margin-top: 12px; font: 400 0.76rem var(--mono); color: var(--ink-3); }
.model .what { color: var(--ink-2); font-size: 0.98rem; }
.cites { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.cites li { font-size: 0.93rem; line-height: 1.45; padding-left: 16px; position: relative; color: var(--ink-2); }
.cites li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 7px; height: 1px; background: var(--accent); }
.cites cite { font-style: normal; color: var(--ink); }
.cites .yr { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-3); }
.cites .why { display: block; font-size: 0.85rem; color: var(--ink-3); margin-top: 2px; }
@media (max-width: 860px) { .model { grid-template-columns: 1fr; gap: 12px; } }

/* ── Pricing ──────────────────────────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 820px) { .tiers { grid-template-columns: 1fr; } }
.tier { padding: clamp(22px, 3vw, 34px); display: grid; gap: 18px; align-content: start; }
.tier.featured { border-color: rgba(255, 84, 32, 0.45); }
.tier .price { font: 500 3.4rem/1 var(--mono); letter-spacing: -0.03em; }
.tier .price small { font-size: 1rem; color: var(--ink-3); letter-spacing: 0; }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.tier li { padding: 11px 0 11px 28px; border-bottom: 1px solid var(--line); position: relative; font-size: 0.98rem; }
.tier li svg { position: absolute; left: 0; top: 14px; width: 16px; height: 16px; color: var(--good); }
.tier .btn { justify-content: center; }
.compare { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.compare th, .compare td { text-align: left; padding: 14px 14px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th { font: 500 0.72rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.compare td:first-child { color: var(--ink); font-weight: 500; }
.compare td { color: var(--ink-2); }
.compare td.k { color: var(--ink); }
.table-scroll { overflow-x: auto; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq { border-top: 1px solid var(--line); max-width: 900px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 28px; gap: 16px; align-items: center;
  padding: 22px 0; font: 600 clamp(1.25rem, 2vw, 1.55rem)/1.15 var(--display); letter-spacing: 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; color: var(--ink-3); transition: transform 300ms var(--ease); justify-self: end; }
.faq details[open] summary svg { transform: rotate(45deg); color: var(--accent-ink); }
.faq summary:hover { color: #fff; }
.faq .ans { padding: 0 44px 26px 0; color: var(--ink-2); max-width: 72ch; }

/* ── Legal ────────────────────────────────────────────────────────────── */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.7rem; margin-top: 40px; margin-bottom: 12px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 0.8em; }
.legal ul { padding-left: 20px; margin: 12px 0 0; }
.legal li + li { margin-top: 6px; }

/* ── Close + footer ───────────────────────────────────────────────────── */
.close { text-align: left; }
.close h2 { font-size: clamp(3rem, 8vw, 6rem); max-width: 13ch; }
.close .lede { margin-top: 22px; }
.close .btn-row { margin-top: 32px; }
.site-footer { border-top: 1px solid var(--line); padding-block: 48px 40px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-grid h3 { font: 500 0.72rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot-grid a { color: var(--ink-2); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; transition: color 160ms; }
.foot-grid a:hover { color: var(--ink); }
.foot-grid p { color: var(--ink-2); font-size: 0.95rem; max-width: 36ch; margin-top: 14px; }
.foot-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 400 0.76rem var(--mono); color: var(--ink-3); }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* ── Forms ────────────────────────────────────────────────────────────── */
.field { display: grid; gap: 8px; }
.field label { font: 500 0.78rem var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-2); }
.field input { min-height: 48px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); padding: 0 14px; font-size: 1rem; }
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field input::placeholder { color: var(--ink-3); }

/* ── Entrance (hero only, once) ───────────────────────────────────────── */
[data-enter] > * { animation: enter 900ms var(--ease) both; }
[data-enter] > *:nth-child(2) { animation-delay: 120ms; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .rt-pad .scanline, .live-dot { animation: none !important; }
}

/* ── Live Activity, drawn from KovuraWidgets/WorkoutLiveActivity.swift:
      routine name, % done, a ticking timer and a flat white bar. ───────── */
.island { padding: 18px 22px 18px; gap: 0; }
.island-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.isl-name { font: 800 1.02rem/1.1 var(--body); letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.isl-pct { font: 600 1.02rem/1 var(--mono); }
.isl-timer { text-align: center; font: 600 1.35rem/1 var(--mono); margin: 12px 0 10px; }
.island-progress { border-radius: 0; background: rgba(255, 255, 255, 0.21); }
.island-progress i { background: #fff; border-radius: 0; }
.set-card {
  margin: 28px auto 0; width: min(100%, 380px); background: rgba(28, 31, 36, 0.86);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 26px 26px 0 0; padding: 18px 18px 22px; display: grid; gap: 14px;
}
.set-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.set-head span:first-child { font: 600 1.15rem/1.1 var(--body); }
.set-target { font-size: 1.6rem; font-weight: 500; letter-spacing: -0.02em; }
.set-actions { display: flex; gap: 10px; }
.set-actions .btn { flex: 1; justify-content: center; min-height: 46px; }
.set-actions .btn.ghost { flex: 0 0 auto; }
.set-actions .btn svg { transform: none !important; }
.phone-top { padding-bottom: 0; display: flex; flex-direction: column; }
.phone-top .set-card { margin-top: auto; }
.lock-time { margin-top: 26px; font-size: clamp(3.6rem, 7vw, 5rem); }
.lock-date { margin-bottom: 8px; }
.mbars { display: grid; gap: 10px; }
.mbar.zero .name { color: var(--ink-3); }
select.select {
  min-height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); padding: 0 36px 0 12px;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa69f' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
select.select:focus { border-color: var(--accent); outline: none; }
.ledger .empty { white-space: normal; }

/* ── Round 2: hero split telemetry ───────────────────────────────────── */
.hero .wrap { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(28px, 4vw, 56px); }
.hero h1 { font-size: clamp(2.9rem, 5.4vw, 4.9rem); max-width: 11.5ch; margin-top: 22px; }
@media (max-width: 1180px) { .hero .wrap { grid-template-columns: 1fr; } .hero { min-height: 0; } }
.cred { margin-top: 0; display: inline-flex; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; max-width: 100%; }
.cred-seal { width: 30px; height: 30px; flex: none; border-style: solid; border-color: rgba(255, 84, 32, 0.45); background: var(--accent-soft); }
.cred-seal svg { width: 17px; height: 17px; }
.cred-top { font-size: 0.7rem; line-height: 1.35; color: var(--ink); }
.hud-split { display: grid; grid-template-columns: 1fr 1fr; }
.hud-col { padding: clamp(16px, 2vw, 22px); display: grid; gap: 10px; align-content: start; min-width: 0; }
.hud-col + .hud-col { border-left: 1px solid var(--line); }
.hud-head { display: flex; justify-content: space-between; gap: 8px; }
.hud-head .label:first-child { color: var(--ink); }
.hud .big-read { font-size: clamp(3.4rem, 6vw, 4.8rem); margin-top: 6px; }
.hud .verdict { font-size: 1.3rem; }
.hud .scale { margin-top: 8px; }
.hud .hud-rows { margin-top: 10px; }
.hud .hud-row { font-size: 0.86rem; padding: 7px 0; }
.hud .formula-line { margin-top: 6px; font-size: 0.76rem; }
.hud-chart { margin-top: 10px; }
.hud .seg button { padding: 0 11px; font-size: 0.68rem; }
.hud .scale-marker { transition: left 800ms var(--ease); }
@media (max-width: 640px) {
  .hud-split { grid-template-columns: 1fr; }
  .hud-col + .hud-col { border-left: 0; border-top: 1px solid var(--line); }
  .hide-sm { display: none; }
  .hud .panel-bar { overflow-x: auto; }
}
.small { font-size: 0.82rem; }

/* simulate a set: readiness | load duo */
.duo { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.duo-cell { padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.duo-cell + .duo-cell { border-left: 1px solid var(--line); }
.duo-cell .v { font: 500 2.6rem/1 var(--mono); letter-spacing: -0.03em; }
.duo-cell .verdict { font-size: 1.1rem; }
.duo-cell .verdict:empty::before { content: "—"; color: var(--ink-3); }
.set-actions .btn span { white-space: nowrap; }
@media (max-width: 420px) { .set-actions .btn { font-size: 0.88rem; padding: 0 14px; } }

/* engine cards with a formula flip */
.ecards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .ecards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ecards { grid-template-columns: 1fr; } }
.ecard { position: relative; display: grid; perspective: 1400px; min-height: 380px; }
.ecard-face {
  grid-area: 1 / 1; display: flex; flex-direction: column; gap: 12px; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform 700ms var(--ease), border-color 200ms;
}
.ecard-face.back { transform: rotateY(180deg); background: var(--bg); border-color: rgba(255, 84, 32, 0.35); }
.ecard[data-flipped="true"] .front { transform: rotateY(-180deg); }
.ecard[data-flipped="true"] .back { transform: rotateY(0); }
.ecard:hover .front { border-color: var(--line-2); }
.ecard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 30px; }
.ecard h3 { font-size: 1.55rem; }
.ecard p { font-size: 0.93rem; color: var(--ink-2); line-height: 1.5; }
.ecard-vis { min-height: 92px; display: grid; align-items: center; }
.ecard-actions { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ecard .eq { margin-top: 0; font-size: 0.8rem; line-height: 1.75; padding: 12px; }
.ecard .eq .ln { white-space: pre-wrap; }
.flip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  font: 500 0.72rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; transition: border-color 160ms, background-color 160ms;
}
.flip:hover { border-color: var(--accent); background: var(--accent-soft); }
.flip svg { width: 14px; height: 14px; }
.ecard .arrow-link { font-size: 0.9rem; min-height: 36px; }
.mini-vis { width: 100%; height: 70px; }
.mini-read { display: grid; gap: 6px; }
.big2 { font-size: 1.7rem; font-weight: 500; letter-spacing: -0.02em; }
.ppg { position: relative; border-radius: var(--r-sm); background: #07080a; border: 1px solid var(--line); overflow: hidden; }
.ppg canvas { display: block; width: 100%; height: 80px; }
.ppg-read { position: absolute; right: 8px; top: 6px; display: grid; justify-items: end; gap: 2px; }
.ppg-read .num { font-size: 1rem; color: var(--ink); }
.mini-pad {
  width: 100%; min-height: 92px; border-radius: var(--r-sm); border: 1px solid var(--line-2); cursor: pointer;
  background: #13161a; color: var(--ink); font: 600 1.35rem/1.1 var(--display); letter-spacing: 0.03em; text-transform: uppercase;
  transition: background-color 80ms linear; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.mini-pad[data-phase="ready"] { background: var(--accent); color: #0a0b0d; }
.mini-pad[data-phase="tooSoon"] { background: #2a1210; }
.mini-pad small { display: block; font: 500 0.7rem var(--mono); letter-spacing: 0.06em; opacity: 0.75; margin-top: 4px; }
@media (prefers-reduced-motion: reduce) {
  .ecard-face { transition: opacity 1ms; }
  .ecard[data-flipped="true"] .front { transform: none; opacity: 0; visibility: hidden; }
  .ecard-face.back { transform: none; opacity: 0; visibility: hidden; }
  .ecard[data-flipped="true"] .back { opacity: 1; visibility: visible; }
}
.ecard:not([data-flipped="true"]) .back { visibility: hidden; transition: transform 700ms var(--ease), visibility 0s 350ms; }
.ecard[data-flipped="true"] .front { visibility: hidden; transition: transform 700ms var(--ease), visibility 0s 350ms; }
.btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
@media (max-width: 620px) { .ecard { min-height: 0; } .ecard-vis { min-height: 0; } }
.panel-bar { flex-wrap: wrap; }

/* ════════════════════════════════════════════════════════════════════════
   PAPER LAYER (Nov 18). Formal and editorial: warm gray paper, black ink,
   giant tight grotesque headlines, a serif for reading, mono only for
   numbers. Orange survives as the data colour (the 7-day line, a dot),
   never as decoration.
   ════════════════════════════════════════════════════════════════════════ */
:root {
  color-scheme: light;
  --bg: #e6e5e1;
  --paper-2: #efeeea;
  --panel: #efeeea;
  --panel-2: #f3f2ee;
  --panel-3: #dcdad5;
  --line: rgba(17, 17, 15, 0.13);
  --line-2: rgba(17, 17, 15, 0.26);
  --ink: #111110;
  --ink-2: #3f3e3a;
  --ink-3: #5f5d58;
  --accent: #ff5420;
  --accent-ink: #b8380c;
  --accent-soft: rgba(255, 84, 32, 0.12);
  --good: #1d6b35;
  --warn: #8a5300;
  --bad: #b02a20;
  --display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --body: "Newsreader", Georgia, "Times New Roman", serif;
  --r: 4px;
  --r-sm: 3px;
}
body { font: 400 19px/1.55 var(--body); background: var(--bg); color: var(--ink); }
::selection { background: var(--ink); color: var(--bg); }
html { scrollbar-color: #b9b7b1 var(--bg); }
::-webkit-scrollbar-thumb { background: #b9b7b1; }

/* type */
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.045em; line-height: 0.92; }
h2 { font-size: clamp(2.6rem, 5.6vw, 5.2rem); }
h3 { letter-spacing: -0.03em; line-height: 1.02; }
h1 em, h2 em, h3 em { font-family: var(--body); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.lede { color: var(--ink-2); font-size: clamp(1.1rem, 1.45vw, 1.3rem); line-height: 1.5; }
.lede b, .lede strong { font-weight: 500; color: var(--ink); }
.label { font: 600 0.68rem/1.3 var(--sans); letter-spacing: 0.09em; color: var(--ink-3); }
.chip { font: 600 0.66rem/1 var(--sans); letter-spacing: 0.08em; border-color: var(--line-2); color: var(--ink-2); border-radius: 2px; }
.chip.beta { color: var(--accent-ink); border-color: rgba(184, 56, 12, 0.45); }
.prose { color: var(--ink-2); }
.dim { color: var(--ink-3); }

/* buttons: black, square-cornered, formal */
.btn { --b: var(--ink); background: var(--ink); color: var(--bg); border-color: var(--ink); border-radius: 2px; font: 600 0.98rem/1 var(--sans); letter-spacing: -0.005em; }
.btn:hover { box-shadow: 0 10px 22px -14px rgba(17, 17, 15, 0.55); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.link, .arrow-link span { background-image: linear-gradient(var(--ink), var(--ink)); }
.arrow-link { font-family: var(--sans); font-weight: 600; letter-spacing: -0.01em; }
.arrow-link svg { color: var(--ink); }
.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

/* header: a masthead */
.site-header { background: rgba(230, 229, 225, 0.9); border-bottom: 1px solid var(--ink); }
.brand span { font: 800 1.35rem/1 var(--sans); letter-spacing: -0.04em; }
.brand .mark { color: var(--ink); }
.mast-note { font: 500 0.78rem/1.25 var(--sans); color: var(--ink-2); margin: 0 0 0 4px; }
.nav a { font: 500 0.88rem/1 var(--sans); letter-spacing: -0.01em; text-transform: none; color: var(--ink-2); border-radius: 2px; }
.nav a:hover { background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 0.3em; }
.nav a[aria-current="page"] { background: transparent; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
.site-header .btn { min-height: 36px; }
.menu-btn { border-color: var(--ink); border-radius: 2px; }
@media (max-width: 1240px) { .mast-note { display: none; } }
@media (max-width: 1080px) {
  .mobile-menu[data-open="true"] { background: var(--bg); }
  .mobile-menu a.m-link { font: 700 2.4rem/1 var(--sans); letter-spacing: -0.04em; border-bottom-color: var(--line-2); }
  .mobile-menu a.m-link span { font-family: var(--mono); }
}

/* sections: newspaper rules */
main > section { border-top: 1px solid var(--ink); }
main > section.hero, main > section.page-head { border-top: 0; }
.sec-head.split { align-items: start; }
.sec-head.split .lede { padding-top: 0.5em; }

/* hero: the "Gray." masthead */
.hero { min-height: 0; display: block; padding-block: clamp(20px, 3vw, 36px) clamp(64px, 8vw, 104px) !important; }
.hero .wrap { display: block; }
.hero-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.dateline { font: 500 0.8rem/1.3 var(--sans); color: var(--ink-2); text-align: right; }
.cred { background: transparent; border: 0; padding: 0; gap: 10px; border-radius: 0; }
.cred:hover { background: transparent; transform: none; }
.cred:hover .cred-top { text-decoration: underline; text-underline-offset: 0.25em; }
.cred-seal { width: 28px; height: 28px; background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.cred-top { font: 600 0.74rem/1.3 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; max-width: 46ch; }
.masthead { margin: 0; display: block; max-width: none; }
.mast-word {
  display: block; font: 800 calc((min(100vw, var(--wrap) + 2 * var(--gutter)) - 2 * var(--gutter)) * 0.302)/0.8 var(--display);
  letter-spacing: -0.065em; margin: clamp(10px, 2vw, 26px) 0 0 -0.04em; white-space: nowrap;
}
.h1-line {
  display: block; margin-top: clamp(18px, 2.4vw, 30px); padding-top: clamp(14px, 1.6vw, 20px); border-top: 1px solid var(--ink);
  font: 600 clamp(1.9rem, 3.6vw, 3.3rem)/1.02 var(--display); letter-spacing: -0.04em; max-width: 22ch;
}
.h1-line em { color: var(--ink); }
.hero h1 { font-size: inherit; margin-top: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 60px); margin-top: clamp(22px, 3vw, 40px); align-items: start; }
.hero-copy .lede { margin-top: 0; }
.hero-copy .btn-row { margin-top: 28px; }
@media (max-width: 1100px) { .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .dateline { text-align: left; } }

/* panels: flat paper boxes with ink hairlines */
.panel { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: none; }
.panel-bar { border-bottom-color: var(--line-2); }
.seg { background: transparent; border-color: var(--ink); border-radius: 2px; }
.seg button { font: 600 0.72rem/1 var(--sans); letter-spacing: 0.04em; border-radius: 1px; color: var(--ink-2); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.hud-col + .hud-col { border-left-color: var(--line-2); }
.big-read { color: var(--ink); }
.verdict { font: 700 1.25rem/1 var(--sans); letter-spacing: 0.01em; }
.verdict.good { color: var(--good); } .verdict.warn { color: var(--warn); } .verdict.bad { color: var(--bad); }
.readout .v.good { color: var(--good); } .readout .v.warn { color: var(--warn); } .readout .v.bad { color: var(--bad); }
.scale-marker { background: var(--ink); box-shadow: 0 0 0 3px var(--panel-2); }
.hud-row { border-bottom-color: var(--line); }
.hud-rows { border-top-color: var(--line); }
.formula-line, .eq, .ledger, .explain code { background: var(--bg); border-color: var(--line-2); color: var(--ink); }
.formula-line b, .eq var { color: var(--accent-ink); }
.eq var { border-bottom-color: rgba(184, 56, 12, 0.5); }
.eq .c { color: var(--ink-3); }
.note { background: transparent; border-color: var(--line-2); color: var(--ink-2); font-size: 0.98rem; }
.legend { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-2); }
.status-legend { font-family: var(--sans); color: var(--ink-2); }
.chart text { fill: var(--ink-3); }
.chart .grid line { stroke: rgba(17, 17, 15, 0.1); }
.tick-rule { opacity: 1; }

/* inputs */
input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--ink) var(--p, 50%), rgba(17, 17, 15, 0.16) var(--p, 50%)); }
input[type="range"]::-moz-range-progress { background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { background: var(--bg); border: 2px solid var(--ink); box-shadow: none; }
input[type="range"]::-moz-range-thumb { background: var(--bg); border: 2px solid var(--ink); }
.control output { color: var(--ink); }
.preset { border-color: var(--ink); color: var(--ink); border-radius: 2px; font: 600 0.78rem var(--sans); }
.preset[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
select.select { background-color: var(--bg); border-color: var(--line-2); border-radius: 2px; color: var(--ink); }
.field input { background: var(--bg); border-color: var(--line-2); border-radius: 2px; color: var(--ink); }

/* simulate a set: the phone stays a black phone */
.phone-top { border-color: #111; }
.receipt .panel-body { gap: 16px; }
.duo { border-bottom-color: var(--line-2); }
.duo-cell + .duo-cell { border-left-color: var(--line-2); }
.mbar .t { background: rgba(17, 17, 15, 0.08); }
.mbar .t::after, .mbar .t .m50 { border-left-color: rgba(17, 17, 15, 0.3); }
.mbar .v { color: var(--ink-2); }
.ledger div.new { color: var(--ink); }

/* body map on paper */
.bodies .body-fill { fill: #d6d4ce; stroke: rgba(17, 17, 15, 0.35); }
.bodies .details { stroke: rgba(17, 17, 15, 0.22); }
.bodies .muscle { stroke: rgba(17, 17, 15, 0.45); }
.bodies .muscle.sel { stroke: var(--ink); stroke-width: 2.6; }
.muscle-chips button { border-color: var(--line-2); color: var(--ink-2); border-radius: 2px; }

/* engine cards: index cards */
.ecard-face { background: var(--panel-2); border-color: var(--line-2); border-radius: var(--r); }
.ecard-face.back { background: var(--bg); border-color: var(--ink); }
.ecard:hover .front { border-color: var(--ink); }
.ecard h3 { font-size: 1.7rem; }
.ecard p { color: var(--ink-2); font-size: 1rem; }
.flip { border-color: var(--ink); color: var(--ink); border-radius: 2px; font: 600 0.72rem/1 var(--sans); }
.flip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ppg { background: var(--bg); border-color: var(--line-2); }
.mini-pad { background: var(--bg); color: var(--ink); border-color: var(--ink); border-radius: 2px; font: 700 1.3rem/1.1 var(--sans); letter-spacing: -0.02em; text-transform: none; }
.mini-pad[data-phase="waiting"] { background: var(--panel-3); }
.mini-pad[data-phase="ready"] { background: var(--accent); color: #111110; }
.mini-pad[data-phase="tooSoon"] { background: #e9c9bf; }

/* reaction pad */
.rt-pad { background: var(--panel-2); border-color: var(--ink); }
.rt-pad[data-phase="waiting"] { background: var(--panel-3); }
.rt-pad[data-phase="ready"] { background: var(--accent); color: #111110; }
.rt-pad[data-phase="tooSoon"] { background: #e9c9bf; }
.rt-pad .rt-big { font: 800 clamp(3rem, 8vw, 5.6rem)/0.95 var(--display); letter-spacing: -0.05em; text-transform: none; }
.rt-pad .rt-sub { font-family: var(--sans); font-weight: 600; }
.trial-bars i { background: rgba(17, 17, 15, 0.25); }
.trial-bars b { color: var(--ink-2); }

/* lists and tables */
.inst-list, .models, .faq, .facts, .tier ul { border-top-color: var(--ink); }
.fact, .facts { border-color: var(--line-2); }
.fact .label { color: var(--ink-3); }
.fact svg.ic { color: var(--ink); }
.model { border-bottom-color: var(--line-2); }
.model .n { color: var(--ink-3); }
.cites li::before { background: var(--ink); }
.cites .yr { color: var(--ink-3); }
.faq details { border-bottom-color: var(--line-2); }
.faq summary { font: 700 clamp(1.3rem, 2.1vw, 1.7rem)/1.15 var(--display); letter-spacing: -0.03em; }
.faq summary:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.faq details[open] summary svg { color: var(--ink); }
.compare th { font-family: var(--sans); font-weight: 600; color: var(--ink-3); }
.compare th, .compare td { border-bottom-color: var(--line-2); }
.tier.featured { border-color: var(--ink); }
.tier li svg { color: var(--ink); }
.tier .price { color: var(--ink); }
.f-index button[aria-selected="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.f-index button[aria-selected="true"] small { color: rgba(230, 229, 225, 0.7); }
.f-index button { border-radius: 2px; font-family: var(--sans); }
.f-group { font-family: var(--sans); font-weight: 600; }
.legal h2 { font-size: 1.9rem; }
.page-head h1 { letter-spacing: -0.05em; font-size: clamp(3rem, 6.6vw, 6rem); }
.explain { border-top-color: var(--ink); }
.explain > div + div { border-left-color: var(--line-2); }
.close h2 { font-size: clamp(3.4rem, 9vw, 8rem); letter-spacing: -0.06em; }
.screens figure { border-radius: 30px; }

/* footer */
.site-footer { border-top: 1px solid var(--ink); }
.foot-grid h3 { font-family: var(--sans); font-weight: 600; color: var(--ink-3); letter-spacing: 0.08em; }
.foot-grid a { color: var(--ink-2); font-family: var(--sans); font-size: 0.95rem; }
.foot-base { border-top-color: var(--ink); font-family: var(--sans); color: var(--ink-3); }

.skip { background: var(--ink); color: var(--bg); }
:focus-visible { outline-color: var(--accent-ink); }
.hero h1.masthead { max-width: none; font-size: inherit; }
.hero h1 em { color: var(--ink); font-style: italic; }
/* the phone is a dark object on the paper page */
.set-card { color: #fff; }
.set-card .label { color: rgba(255, 255, 255, 0.6); }
.set-card .seg { border-color: rgba(255, 255, 255, 0.25); }
.set-card .seg button { color: rgba(255, 255, 255, 0.75); }
.set-card .seg button[aria-pressed="true"] { background: #fff; color: #111; }
.set-card .btn { background: var(--accent); border-color: var(--accent); color: #111110; }
.set-card .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.set-card .btn.ghost:hover { background: #fff; color: #111; }
.page-head + section { border-top: 0; }

/* ════════════════════════════════════════════════════════════════════════
   iPHONE: the app's ActiveWorkoutView, rebuilt from its source. SF Mono and
   SF Pro (Black) on Apple devices, the closest webfonts elsewhere.
   ════════════════════════════════════════════════════════════════════════ */
.phone-col { display: grid; justify-items: center; gap: 16px; align-content: start; }
.iphone {
  --app-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --app-sans: -apple-system, "SF Pro Display", "Inter Tight", "Helvetica Neue", sans-serif;
  --app-dim: rgba(235, 235, 245, 0.6);
  position: relative; width: min(100%, 372px); aspect-ratio: 390 / 820; border-radius: 58px; background: #000; color: #fff;
  border: 11px solid #1c1c1e; box-shadow: 0 0 0 1.5px #3a3a3c, 0 40px 80px -30px rgba(17, 17, 15, 0.55), 0 12px 24px -12px rgba(17, 17, 15, 0.35);
  overflow: hidden; font-family: var(--app-mono); isolation: isolate;
  transition: transform 500ms var(--ease);
}
.ios-status { position: absolute; inset: 0 0 auto 0; height: 50px; display: flex; justify-content: space-between; align-items: center; padding: 6px 30px 0 34px; z-index: 6; font: 600 15px/1 var(--app-sans); }
.ios-status .num { font-family: var(--app-sans); font-weight: 600; letter-spacing: 0; }
.ios-status svg { width: 50px; height: 12px; }
.dyn {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 7; background: #000; border-radius: 22px;
  width: 112px; height: 32px; cursor: pointer; overflow: hidden;
  transition: width 520ms cubic-bezier(.2, 1.1, .3, 1), height 520ms cubic-bezier(.2, 1.1, .3, 1), border-radius 520ms;
}
.dyn-compact, .dyn-expanded { position: absolute; inset: 0; opacity: 0; transition: opacity 250ms; }
.dyn-compact { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.dyn-compact svg { width: 18px; height: 18px; }
.dyn-compact .num { font: 800 12px/1 var(--app-mono); }
.iphone.live .dyn { width: 168px; }
.iphone.live .dyn-compact { opacity: 1; }
.iphone.dyn-open .dyn { width: calc(100% - 20px); height: 118px; border-radius: 40px; }
.iphone.dyn-open .dyn-compact { opacity: 0; }
.iphone.dyn-open .dyn-expanded { opacity: 1; transition-delay: 150ms; }
.dyn-expanded { padding: 16px 22px; display: grid; gap: 8px; align-content: center; }
.dyn-row { display: flex; justify-content: space-between; font: 900 15px/1 var(--app-sans); }
.dyn-row .num { font: 900 15px/1 var(--app-mono); }
.dyn-timer { text-align: center; font: 900 20px/1 var(--app-mono); }
.la-bar { height: 4px; background: rgba(255, 255, 255, 0.21); }
.la-bar i { display: block; height: 100%; width: 0; background: #fff; transition: width 600ms var(--ease); }
.dyn.pulse { animation: dyn-pulse 600ms var(--ease); }
@keyframes dyn-pulse { 40% { transform: translateX(-50%) scale(1.06); } }

.screen { position: absolute; inset: 0; transition: opacity 400ms var(--ease), transform 500ms var(--ease), filter 400ms; }
.iphone[data-mode="app"] .lock-screen { opacity: 0; transform: translateY(-4%); pointer-events: none; }
.iphone[data-mode="lock"] .app-screen { opacity: 0; transform: scale(0.94); filter: blur(6px); pointer-events: none; }

.app-screen { display: flex; flex-direction: column; padding-top: 54px; }
.rest-pill { position: absolute; top: 58px; right: 16px; z-index: 3; background: #1c1c1e; border-radius: 999px; padding: 8px 12px; font: 800 13px/1 var(--app-mono); }
.app-nav { display: flex; justify-content: space-between; align-items: center; padding: 26px 22px 4px; }
.app-nav button { background: none; border: 0; cursor: pointer; font: 700 17px/1 var(--app-mono); padding: 6px 0; }
.app-cancel { color: #ff453a; }
.app-finish { color: #fff; font-weight: 900 !important; }
.app-nav svg { width: 20px; height: 20px; }
.app-scroll { flex: 1; overflow-y: auto; padding: 4px 22px 120px; scrollbar-width: none; }
.app-scroll::-webkit-scrollbar { display: none; }
.app-routine { text-align: center; font: 900 12px/1 var(--app-mono); letter-spacing: 0.04em; color: var(--app-dim); margin-top: 14px; }
.app-clock { text-align: center; font: 900 44px/1.1 var(--app-mono); letter-spacing: 0; margin: 6px 0 12px; }
.app-notes { display: grid; gap: 6px; margin-bottom: 18px; }
.app-notes span { font: 900 11px/1 var(--app-mono); color: var(--app-dim); }
.app-notes input { background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); color: #fff; font: 400 15px/1.4 var(--app-mono); padding: 4px 0 8px; caret-color: #ff5420; }
.app-notes input::placeholder { color: rgba(235, 235, 245, 0.3); }
.app-notes input:focus { outline: none; border-bottom-color: #fff; }
.app-ex { border-left: 2px solid #fff; padding: 10px 0 12px 14px; margin-bottom: 18px; }
.app-ex + .app-ex { border-left-color: rgba(255, 255, 255, 0.25); }
.app-ex-head { display: flex; align-items: center; gap: 8px; }
.app-ex-head b { font: 900 18px/1.1 var(--app-sans); letter-spacing: -0.01em; }
.app-ex-head svg { flex: none; }
.app-ex-head .grip { width: 16px; height: 16px; color: var(--app-dim); }
.app-ex-head .db { width: 18px; height: 18px; color: var(--app-dim); }
.app-ex-head .info { width: 14px; height: 14px; color: var(--app-dim); }
.app-ex-head .more { margin-left: auto; font: 900 13px/1 var(--app-sans); letter-spacing: 1px; }
.app-segs { display: flex; gap: 4px; margin: 12px 0 6px; }
.app-segs i { flex: 1; height: 4px; background: rgba(255, 255, 255, 0.25); transition: background-color 400ms; }
.app-segs i.on { background: #fff; }
.set-row { padding: 8px 0; }
.set-row.done { display: flex; align-items: center; gap: 12px; animation: row-in 400ms var(--ease); }
@keyframes row-in { from { opacity: 0; transform: translateY(-4px); } }
.set-row .sn { font: 900 15px/1 var(--app-mono); color: var(--app-dim); width: 16px; }
.set-row.done .sum { flex: 1; font: 700 12.5px/1 var(--app-mono); color: var(--app-dim); }
.set-row.active { border-left: 2px solid #fff; margin-left: -9px; padding-left: 7px; }
.set-line { display: flex; align-items: center; gap: 10px; }
.fld { flex: 1; text-align: center; font: 700 11px/1 var(--app-mono); color: var(--app-dim); border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding-bottom: 6px; }
.fld b { font: 900 18px/1 var(--app-mono); color: #fff; margin-right: 2px; }
.set-line .stk { width: 16px; height: 16px; color: var(--app-dim); flex: none; }
.cb { width: 26px; height: 26px; flex: none; border: 2px solid #fff; border-radius: 4px; background: transparent; color: #000; display: grid; place-items: center; padding: 0; cursor: pointer; transition: transform 150ms var(--ease), background-color 150ms; }
.cb[disabled] { opacity: 0.55; cursor: default; }
.cb:not([disabled]):hover { transform: scale(1.12); background: rgba(255, 255, 255, 0.12); }
.cb:not([disabled]):active { transform: scale(0.9); }
.cb.on { background: #fff; }
.cb svg { width: 18px; height: 18px; }
.rpe-head { display: flex; justify-content: space-between; font: 900 11px/1 var(--app-mono); color: var(--app-dim); margin: 14px 2px 8px 24px; }
.rpe-boxes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rpe-boxes button { height: 40px; border: 2px solid #fff; background: #000; color: #fff; font: 900 17px/1 var(--app-mono); cursor: pointer; transition: background-color 120ms, color 120ms, transform 120ms; }
.rpe-boxes button:hover { background: rgba(255, 255, 255, 0.14); }
.rpe-boxes button:active { transform: scale(0.94); }
.rpe-boxes button[aria-pressed="true"] { background: #fff; color: #000; }
.app-rest { position: absolute; left: 0; right: 0; bottom: 0; background: #0d0d0e; border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 14px 18px 28px; display: flex; align-items: center; gap: 12px; animation: rest-in 400ms var(--ease); }
@keyframes rest-in { from { transform: translateY(100%); } }
.app-rest-line { position: absolute; top: -1px; left: 0; height: 2px; background: #fff; transition: width 1s linear; }
.rest-label { display: block; font: 900 11px/1 var(--app-mono); color: var(--app-dim); }
.rest-time { display: block; font: 900 28px/1.1 var(--app-mono); }
.rest-adj { margin-left: auto; display: flex; border: 2px solid #fff; }
.rest-adj button, .rest-skip { background: none; border: 0; color: #fff; font: 800 12px/1 var(--app-mono); padding: 10px 10px; cursor: pointer; }
.rest-adj button + button { border-left: 1px solid rgba(255, 255, 255, 0.4); }
.rest-adj button:hover { background: rgba(255, 255, 255, 0.14); }
.rest-skip { background: #8e8e93; color: #000; padding: 12px 14px; font-weight: 900; }
.rest-skip:hover { background: #fff; }

.lock-screen { display: flex; flex-direction: column; align-items: center; padding: 70px 14px 0; background: radial-gradient(120% 60% at 50% 110%, rgba(255, 84, 32, 0.35), transparent 60%), linear-gradient(180deg, #121316, #050506); }
.lock-screen .lock-date { font: 600 17px/1 var(--app-sans); color: rgba(255, 255, 255, 0.85); margin-top: 12px; }
.lock-screen .lock-time { font: 700 86px/1 var(--app-sans); color: rgba(255, 255, 255, 0.95); letter-spacing: -0.02em; margin: 4px 0 auto; }
.la-card { width: 100%; background: #000; border-radius: 22px; padding: 16px; display: grid; gap: 10px; margin-bottom: 18px; }
.la-row { display: flex; justify-content: space-between; align-items: baseline; font: 900 20px/1.1 var(--app-sans); }
.la-row .num { font: 900 20px/1 var(--app-mono); }
.la-row2 { display: flex; align-items: center; gap: 10px; }
.la-row2 .la-bar { flex: 1; }
.la-row2 .num { font: 900 12px/1 var(--app-mono); color: rgba(255, 255, 255, 0.6); }
.unlock { margin-bottom: 26px; background: rgba(255, 255, 255, 0.16); border: 0; color: #fff; border-radius: 999px; padding: 10px 16px; font: 600 13px/1 var(--app-sans); cursor: pointer; backdrop-filter: blur(10px); }
.unlock:hover { background: rgba(255, 255, 255, 0.28); }
.phone-switch { border-color: var(--ink); }
.island-stage { align-items: start; }
/* the real logo: app icon tile + KOVURA wordmark */
.brand { gap: 12px; }
.brand-icon { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 0 1px rgba(17, 17, 15, 0.18); background: #fff; transition: transform 300ms var(--ease); }
.brand-word { height: 15px; width: auto; }
.brand:hover .brand-icon { transform: rotate(-6deg) scale(1.06); }

/* ── Pointer motion ─────────────────────────────────────────────────── */
.btn, .flip, .preset, .seg button, .arrow-link { transition: translate 260ms cubic-bezier(.2, 1.4, .4, 1), transform 160ms var(--ease), background-color 160ms, color 160ms, border-color 160ms, box-shadow 200ms; }

.panel, .ecard-face, .fact, .tier, .model { --mx: -400px; --my: -400px; position: relative; }
.panel::before, .ecard-face::before, .fact::before, .tier::before, .model::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(360px circle at var(--mx) var(--my), rgba(255, 84, 32, 0.07), transparent 60%);
  opacity: 0; transition: opacity 300ms;
}
.panel:hover::before, .ecard-face:hover::before, .fact:hover::before, .tier:hover::before, .model:hover::before { opacity: 1; }
.panel > *, .ecard-face > *, .fact > *, .tier > *, .model > * { position: relative; z-index: 1; }
.ecard:hover { transform: translateY(-3px); }
.ecard { transition: transform 300ms var(--ease); }
.fact { transition: background-color 250ms; }
.fact:hover { background: var(--panel-2); }
.screens figure { transition: transform 400ms var(--ease); will-change: transform; }
.mast-word .ml { display: inline-block; transition: transform 380ms cubic-bezier(.2, 1.2, .3, 1), color 300ms; transform-origin: 50% 100%; }
.big-read, .duo-cell .v, .readout .v { transition: translate 300ms var(--ease); }
.faq summary { transition: padding-left 300ms var(--ease), color 200ms; }
.faq summary:hover { padding-left: 10px; }
.inst:hover h3, .model:hover h2 { transform: translateX(6px); }
.model h2 { transition: transform 300ms var(--ease); }
.nav a { position: relative; }
.f-index button { transition: background-color 160ms, color 160ms, padding-left 260ms var(--ease); }
.f-index button:hover { padding-left: 18px; }
.mbar .t i { transition: width 700ms cubic-bezier(.2, 1.3, .3, 1), background-color 400ms; }
/* The compact Live Activity only shows in the island outside the app. */
.iphone.live .dyn { width: 112px; }
.iphone.live .dyn-compact { opacity: 0; }
.iphone.live[data-mode="home"] .dyn { width: 168px; }
.iphone.live[data-mode="home"] .dyn-compact { opacity: 1; }
.iphone[data-mode="app"] .dyn, .iphone[data-mode="lock"] .dyn { pointer-events: none; }
.iphone[data-mode="app"] .home-screen, .iphone[data-mode="lock"] .home-screen { opacity: 0; transform: scale(1.08); pointer-events: none; }
.iphone[data-mode="home"] .app-screen { opacity: 0; transform: scale(0.6); filter: blur(4px); pointer-events: none; }
.iphone[data-mode="home"] .lock-screen { opacity: 0; transform: translateY(-4%); pointer-events: none; }
.home-screen { padding: 92px 22px 22px; display: flex; flex-direction: column; background: radial-gradient(90% 60% at 30% 10%, #3b3f48, transparent 70%), radial-gradient(80% 60% at 80% 90%, rgba(255, 84, 32, 0.4), transparent 70%), #101114; }
.hs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 18px; }
.hs-app { display: block; aspect-ratio: 1; border-radius: 22%; background: hsl(var(--h) 22% 32% / 0.9); }
.hs-dock { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 14px; border-radius: 30px; background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(16px); }
.hs-dock img { width: 100%; aspect-ratio: 1; border-radius: 22%; cursor: pointer; transition: transform 200ms var(--ease); }
.hs-dock img:hover { transform: scale(1.08); }
.phone-switch button { white-space: nowrap; }
.iphone.live.dyn-open[data-mode="home"] .dyn { width: calc(100% - 20px); height: 118px; border-radius: 40px; }
.iphone.live.dyn-open[data-mode="home"] .dyn-compact { opacity: 0; }
/* readable site map */
.smap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 56px; }
@media (max-width: 860px) { .smap { grid-template-columns: 1fr; } }
.smap-group h2 { font-size: 2.4rem; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.smap ol { list-style: none; margin: 0; padding: 0; }
.smap li { border-bottom: 1px solid var(--line-2); padding: 14px 0 16px; }
.smap li a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; text-decoration: none; }
.smap-name { font: 700 1.3rem/1.15 var(--sans); letter-spacing: -0.03em; transition: transform 260ms var(--ease); }
.smap li a:hover .smap-name { transform: translateX(8px); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.smap-path { font-size: 0.8rem; color: var(--ink-3); }
.smap li p { margin-top: 6px; color: var(--ink-2); font-size: 0.98rem; }
.app-nav { padding-top: 46px; }
.rest-pill { top: 50px; right: 18px; padding: 7px 11px; }
/* transparent K. mark, no app-icon tile */
.brand-icon { border-radius: 0; box-shadow: none; background: transparent; width: 24px; height: auto; }
.brand { gap: 10px; }
/* hero: just the masthead, the line and the paragraph */
.hero-row .h1-line { max-width: 18ch; }
.hero-row { display: block; }
.hero-row .masthead { display: block; }
.hero-row { position: relative; }
.hero-row .hero-copy { margin-top: clamp(22px, 3vw, 36px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.hero-row .hero-copy .lede { max-width: 62ch; }
.hero-row .hero-copy .btn-row { margin-top: 0; }
@media (max-width: 900px) { .hero-row .hero-copy { grid-template-columns: 1fr; } }
.hero { padding-bottom: clamp(48px, 6vw, 80px) !important; }
#two-numbers .hud-chart { max-width: 460px; }
/* hero: a quiet readout beside the headline */
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); column-gap: 48px; }
.hero-row .masthead { display: contents; }
.hero-row .mast-word { grid-column: 1 / -1; }
.hero-row .h1-line { grid-column: 1; }
.hero-row .hero-copy { grid-column: 1 / -1; }
.hero-tele {
  grid-column: 2; align-self: end; margin-top: clamp(18px, 2.4vw, 30px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; padding-top: 14px; border-top: 1px solid var(--ink);
  text-decoration: none; color: var(--ink);
}
.tele-cell { display: grid; gap: 4px; }
.tele-v { font-size: 2rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.tele-t { font: 700 0.72rem/1 var(--sans); letter-spacing: 0.04em; }
.tele-t.good { color: var(--good); } .tele-t.warn { color: var(--warn); } .tele-t.bad { color: var(--bad); }
.tele-line { grid-column: 1 / -1; width: 100%; height: 28px; color: var(--ink-3); stroke-dasharray: 520; stroke-dashoffset: 520; animation: tele-draw 5s linear infinite; }
@keyframes tele-draw { to { stroke-dashoffset: 0; } }
.tele-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; }
.tele-go { color: var(--ink); transition: transform 300ms var(--ease); }
.hero-tele:hover .tele-go { transform: translateY(3px); }
.hero-tele:hover .tele-line { color: var(--accent); }
@media (max-width: 900px) { .hero-row { grid-template-columns: 1fr; } .hero-tele { grid-column: 1; max-width: 360px; } }
@media (prefers-reduced-motion: reduce) { .tele-line { animation: none; stroke-dashoffset: 0; } }
/* hero fills the first screen: masthead at the top, paragraph at the bottom */
.hero { min-height: calc(100svh - var(--header)); display: flex !important; padding-block: clamp(20px, 3vw, 36px) clamp(36px, 5vw, 64px) !important; }
.hero { flex-direction: column; }
.hero > .wrap { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: auto 1fr; gap: 0; flex: 1; width: 100%; align-items: stretch !important; }
.hero-row { grid-template-rows: auto auto 1fr; align-content: stretch; }
.hero-row .hero-copy { align-self: end; }
.hero-meta { margin-bottom: clamp(8px, 2vh, 28px); }
.hero-row .mast-word { align-self: center; }
/* hero: "Latest in the app", a slow scrolling changelog in the readout's place */
.hero-log { grid-column: 2; align-self: end; margin-top: clamp(18px, 2.4vw, 30px); padding-top: 14px; border-top: 1px solid var(--ink); display: grid; gap: 10px; }
.log-head { display: flex; justify-content: space-between; align-items: center; }
.log-head .label:first-child { color: var(--ink); }
.log-window { height: 124px; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0, #000 14px, #000 calc(100% - 18px), transparent 100%); }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-list.rolling { animation: log-roll var(--dur, 32s) linear infinite; }
.hero-log:hover .log-list.rolling { animation-play-state: paused; }
@keyframes log-roll { to { transform: translateY(-50%); } }
.log-list li { display: grid; grid-template-columns: 48px 66px 1fr; gap: 8px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); }
.log-date { font-size: 0.74rem; color: var(--ink-3); }
.log-tag { font: 700 0.62rem/1 var(--sans); letter-spacing: 0.07em; text-transform: uppercase; }
.log-tag.new { color: var(--accent-ink); } .log-tag.improved { color: var(--good); } .log-tag.fixed { color: var(--ink-2); }
.log-text { font: 500 0.86rem/1.3 var(--sans); letter-spacing: -0.01em; color: var(--ink); }
@media (max-width: 900px) { .hero-log { grid-column: 1; max-width: 420px; } }
/* no orange text anywhere: orange stays only in charts and the tap flash */
:root { --accent-ink: #111110; }
.formula-line b, .eq var, .eq .res { color: var(--ink); font-weight: 700; }
.eq var { border-bottom-color: rgba(17, 17, 15, 0.4); }
.eq var.hl, .eq var:hover { background: rgba(17, 17, 15, 0.08); }
.log-tag.new { color: var(--ink); }
.chip.beta { color: var(--ink); border-color: var(--ink); }
.h1-line em, .hero h1 em { color: var(--ink); }
:focus-visible { outline-color: var(--ink); }
/* no orange glow under the pointer either */
.panel::before, .ecard-face::before, .fact::before, .tier::before, .model::before { display: none; }
/* the masthead is the real KOVURA wordmark, full width */
.hero-row .mast-word { font-size: 0; line-height: 0; margin: clamp(10px, 2vw, 26px) 0 0; letter-spacing: 0; }
.mast-word img { display: block; width: 100%; height: auto; }
