/* MyLabs MCP landing - Calm Range (sibling of the MyFinance Calm Ledger). Static, no build step.
   Fonts: Geologica + IBM Plex Mono, self-hosted (SIL OFL 1.1, licenses in /fonts). */

@font-face {
  font-family: "Geologica";
  src: url("/fonts/geologica-var-cyrillic.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Geologica";
  src: url("/fonts/geologica-var-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-600-cyrillic.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #F8F7F3;
  --surface: #FFFEFB;
  --ink: #16181B;
  --muted: #5E6268;
  --rule: #E2E1DA;
  --rule-soft: #ECEBE5;
  --accent: #2D5E95;
  --accent-deep: #234B78;
  --accent-tint: #E8EEF5;
  --on-accent: #FFFFFF;
  --line: #3A6EA5;
  --band: rgba(58, 110, 165, .14);
  --band-edge: rgba(58, 110, 165, .45);
  --band-solid: #DAE0E5;
  --amber: #B0721C;
  --amber-ink: #8F5B10;
  --amber-tint: #FBF1E2;
  --zone: rgba(176, 114, 28, .09);
  --grid: #E4E3DC;
  --tile: #F3F2EE;
  --shadow: 0 1px 2px rgba(22, 24, 27, .05), 0 8px 28px rgba(22, 24, 27, .07);
  --display: "Geologica", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --header-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141513;
    --surface: #1B1C1A;
    --ink: #ECEBE5;
    --muted: #A2A19A;
    --rule: #2B2C29;
    --rule-soft: #222320;
    --accent: #8FB4E3;
    --accent-deep: #AAC7EC;
    --accent-tint: #1B2633;
    --on-accent: #0F1722;
    --line: #6FA0D6;
    --band: rgba(111, 160, 214, .17);
    --band-edge: rgba(111, 160, 214, .5);
    --band-solid: #313941;
    --amber: #E0A84A;
    --amber-ink: #E8B661;
    --amber-tint: #3A2F1D;
    --zone: rgba(224, 168, 74, .11);
    --grid: #2E2E2B;
    --tile: #222320;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* `clip`, not `hidden`: no scroll container, so the sticky header keeps working. */
html, body { overflow-x: clip; }
[id] { scroll-margin-top: calc(var(--header-h) + 14px); }
a, button, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
ul, ol { list-style-position: outside; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 18px; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.site-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.logo b { color: var(--accent); font-weight: 700; }
/* The mark: interval brackets (the range your lab printed) around a value. */
.mark { width: 28px; height: 28px; display: block; overflow: visible; flex-shrink: 0; color: var(--accent); }
.mark path, .mark circle { fill: currentColor; transition: transform .25s ease; }
.logo:hover .mk-l, a:hover > .mark .mk-l { transform: translateX(-3px); }
.logo:hover .mk-r, a:hover > .mark .mk-r { transform: translateX(3px); }
nav.main { display: flex; gap: 22px; margin-left: auto; }
nav.main a { text-decoration: none; font-size: 14.5px; color: var(--muted); }
nav.main a:hover { color: var(--ink); }
.hd-cta {
  font-family: var(--mono); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--rule); border-radius: 8px; padding: 7px 14px;
}
.hd-cta:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- hero: the headline on top, the product under it at full width ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
/* The hero text keeps the page's column (logo, sections); the chat window
   under it is wider on purpose, so the product gets the room. */
.wrap.wide { max-width: 1280px; }
.hero-top { position: relative; z-index: 1; padding-block: 44px 36px; --h1: clamp(2.7rem, 7.2vw, 5.8rem); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--rule); border-radius: 999px; padding: 6px 13px;
  color: var(--muted); background: var(--surface);
}
.chip.acc { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--rule)); }
.hero-top h1 { font-size: var(--h1); line-height: 1; letter-spacing: -.045em; font-weight: 650; margin-bottom: 30px; }
/* Each phrase wraps as a whole: "Every lab." / "Every year." on a phone. */
.hero-top h1 .l1 > span { display: inline-block; }
.hero-top h1 .l2 { display: block; color: var(--accent); }
.hero-sub { font-size: 19px; color: var(--muted); max-width: 34em; margin-bottom: 28px; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cta-row.center { justify-content: center; }
.btn {
  font-family: var(--display); font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px;
  border-radius: 10px; border: 1px solid transparent;
  transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-solid:hover { background: var(--accent-deep); box-shadow: var(--shadow); }
.btn-ghost { background: var(--surface); border-color: var(--rule); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.hero-note { flex-basis: 100%; font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 4px; }
/* Wide screens: the first line runs the full width, the intro takes the empty
   space to the right of "One chart." and the buttons sit under it on the left.
   The h1's line-height is 1, so each line is exactly var(--h1) tall: pulling
   the intro up by .8 of it starts it at the top of line 2, plus .2em of air
   under the descenders of line 1 (any font, the fallback included). */
@media (min-width: 1000px) {
  .hero-top h1 { margin-bottom: 0; }
  .hero-top h1 .l1 { display: block; white-space: nowrap; }
  .hero-top .hero-sub { position: relative; width: min(560px, 50%); margin: calc(var(--h1) * -.8) 0 0 auto; font-size: 18px; }
  .hero-top .cta-row { margin-top: 30px; }
  .hero-top .hero-note { flex-basis: auto; margin: 0 0 0 10px; }
}

/* ---------- the stage: a whole chat window, inside a lab range band ---------- */
.hero-stage { position: relative; padding: 4px 0 84px; }
.hero-band {
  position: absolute; left: 0; right: 0; top: 16%; bottom: 30%; z-index: 0;
  background: color-mix(in srgb, var(--band) 60%, transparent);
  border-block: 1px dashed var(--band-edge);
}
.hero-stage > .wrap { position: relative; z-index: 1; }
.demo {
  display: grid; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: auto 1fr;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(22, 24, 27, .05), 0 24px 64px rgba(22, 24, 27, .10);
  overflow: hidden; min-width: 0;
}
.demo-bar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em;
}
.demo-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); }
.demo-title { margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live { margin-left: auto; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.demo-pause {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; cursor: pointer; flex-shrink: 0;
  margin-left: 10px; min-height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--paper); color: var(--muted);
}
.demo-pause:hover { color: var(--accent); border-color: var(--accent); }
.demo-pause[hidden] { display: none; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
/* The scenes as the chat list of an AI app; a phone shows them as one row. */
.demo-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 18px 12px 12px; border-right: 1px solid var(--rule); background: var(--paper); }
.side-k { padding: 0 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.demo-chips { display: flex; flex-direction: column; gap: 4px; }
.demo-chips button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink);
  font-family: var(--display); transition: background .15s ease, border-color .15s ease;
}
.demo-chips .ct { font-size: 14px; font-weight: 600; line-height: 1.3; }
.demo-chips .cs { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; color: var(--muted); }
.demo-chips button:hover { background: var(--surface); border-color: var(--rule); }
.demo-chips button[aria-pressed="true"] { background: var(--accent-tint); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.demo-chips button[aria-pressed="true"] .ct { color: var(--accent); }
.side-conn { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 10px 4px; border-top: 1px solid var(--rule); font-size: 13px; font-weight: 600; }
.side-conn span { white-space: nowrap; }
.side-conn .mark { width: 18px; height: 18px; }
.side-conn small { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--accent); }
/* The renders size themselves to this box (container queries below), not to the screen. */
.demo-main { container: demo / inline-size; display: flex; flex-direction: column; min-width: 0; }
/* Every scene sits in the same grid cell: the box is as tall as the tallest
   scene, so switching scenes never moves the page. */
.demo-body { display: grid; flex: 1; padding: 26px 30px 22px; }
.scene { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 14px; align-self: start; min-width: 0; visibility: hidden; }
.scene.on { visibility: visible; }
.msg { max-width: min(88%, 620px); padding: 11px 15px; border-radius: 14px; font-size: 15px; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; font-weight: 500; }
.msg.ai { align-self: flex-start; background: var(--accent-tint); border-bottom-left-radius: 4px; }
.msg b { font-weight: 650; }
.att {
  display: flex; align-items: center; gap: 7px; width: max-content; max-width: 100%; margin-bottom: 7px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em;
  border: 1px solid color-mix(in srgb, var(--paper) 30%, transparent); border-radius: 8px; padding: 4px 9px;
}
.att svg { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 14px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: tb 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tb { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.caret { display: inline-block; width: 2px; height: 1em; background: currentColor; vertical-align: -2px; margin-left: 1px; animation: blink .9s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* Staged reveal while the scene plays (classes set by app.js). */
.scene .stage { transition: opacity .45s ease, transform .45s ease; }
.scene .stage.wait { opacity: 0; transform: translateY(8px); }
.demo-inputbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 30px 22px;
  border: 1px solid var(--rule); border-radius: 12px; padding: 9px 8px 9px 14px;
  background: var(--paper); font-size: 14px; color: var(--muted);
}
.demo-inputbar .send {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px;
}
/* ---------- dashboard renders inside the chat ---------- */
.render { align-self: stretch; min-width: 0; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); padding: 13px 13px 11px; }
.r-h { font-size: 14px; font-weight: 650; line-height: 1.3; }
.r-sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.r-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; margin-bottom: 10px; }
.r-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.r-tile { background: var(--tile); border-radius: 10px; padding: 8px 11px; min-width: 0; }
.r-tile .v { font-family: var(--mono); font-size: 18px; font-weight: 600; line-height: 1.2; }
.r-tile .k { font-size: 11px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.r-tile.out .v { color: var(--amber-ink); }
.r-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.r-card { background: var(--tile); border-radius: 10px; padding: 8px 10px 6px; min-width: 0; }
.r-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.r-card .n { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.r-card .val { font-family: var(--mono); font-size: 13px; font-weight: 600; white-space: nowrap; }
.r-card .val small, .r-row .vl small { color: var(--muted); font-weight: 400; font-size: 10.5px; }
.r-card .meta { display: flex; justify-content: space-between; gap: 6px; font-size: 10.5px; color: var(--muted); }
.sdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: var(--muted); }
.sdot.in { background: var(--line); }
.sdot.out { background: var(--amber); }
.tag { font-size: 10.5px; font-weight: 600; color: var(--amber-ink); white-space: nowrap; }
.tag.ok { color: var(--line); }
.r-rows { display: flex; flex-direction: column; }
.r-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 128px; gap: 4px 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--grid); }
.r-row:last-child { border-bottom: 0; }
.r-row .nm { font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-row .vl { font-family: var(--mono); font-size: 13px; font-weight: 600; white-space: nowrap; }
.r-row .vl.out { color: var(--amber-ink); }
.r-row .note { grid-column: 1 / -1; font-size: 11px; color: var(--muted); margin-top: -2px; }
.r-row .note b { font-weight: 600; color: var(--line); }
.r-row .note b.out { color: var(--amber-ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.sw-band, .sw-zone { display: inline-block; width: 14px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.sw-band { background: var(--band); box-shadow: inset 0 0 0 1px var(--band-edge); }
.sw-zone { background: var(--zone); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 35%, transparent); }
.r-foot { font-size: 10.5px; color: var(--muted); margin-top: 8px; }
.prof { display: flex; gap: 6px; margin-bottom: 10px; }
.prof span { font-size: 12px; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 11px; color: var(--muted); }
.prof span.on { color: var(--accent); border-color: var(--accent); background: var(--accent-tint); font-weight: 600; }

.hist-grid { display: grid; gap: 12px 22px; }
.hist-list { display: none; flex-direction: column; list-style: none; padding-left: 18px; border-left: 1px solid var(--grid); }
.hist-list li { display: grid; grid-template-columns: 62px 44px minmax(0, 1fr); align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--grid); }
.hist-list li:last-child { border-bottom: 0; }
.hist-list .d { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.hist-list .lb { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.hist-list .v { font-family: var(--mono); font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; }
.hist-list .v.out { color: var(--amber-ink); }
.hist-list .v.in { color: var(--line); }
.hist-list .v small { margin-left: 4px; font-size: 10.5px; font-weight: 400; color: var(--muted); }
/* Three sizes of the history chart (330, 440 and 600 wide), each shown where
   it prints its 10 px labels at about 8.5-12 px: never one chart stretched or squeezed. */
.hist.v-w, .hist.v-xl { display: none; }
@container demo (min-width: 470px) {
  .hist.v-n { display: none; }
  .hist.v-w { display: block; }
  .hist-main { width: 100%; max-width: 520px; margin-inline: auto; } /* chart and legend capped together, centred */
}
@container demo (min-width: 640px) {
  .hist.v-w { display: none; }
  .hist.v-xl { display: block; }
  .hist-main { max-width: 700px; }
}
@container demo (min-width: 760px) {
  .render { padding: 18px 20px 14px; }
  .r-tiles { gap: 10px; }
  .r-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .r-row { grid-template-columns: minmax(0, 1fr) 92px 190px minmax(0, 1.3fr); gap: 4px 18px; padding: 8px 0; }
  .r-row .note { grid-column: auto; margin-top: 0; }
  .r-rows.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .r-rows.two .r-row { grid-template-columns: minmax(0, 1fr) auto 150px; }
  .r-rows.two .r-row:nth-last-child(2) { border-bottom: 0; }
}
/* Name over value when the card is narrow: two cards in a phone-wide box, or
   four in a row before there is room for both on one line. */
@container demo (max-width: 449.98px) or ((min-width: 760px) and (max-width: 899.98px)) {
  .r-card .top { flex-direction: column; align-items: flex-start; gap: 0; }
  .r-card .n { max-width: 100%; }
  .r-card .cnt { display: none; }
}
@container demo (min-width: 860px) {
  .hist-grid { grid-template-columns: minmax(0, 1fr) 232px; }
  .hist-list { display: flex; }
}

/* ---------- charts: geometry from the real MCP Apps dashboard ---------- */
.mini, .hist, .rbar { display: block; width: 100%; height: auto; overflow: visible; }
.mini { margin: 3px 0 2px; }
.only-narrow { display: none; }
.mini .z, .hist .z, .rbar .z { fill: var(--zone); }
.mini .b, .hist .b { fill: var(--band); }
.mini .be, .hist .be { stroke: var(--band-edge); stroke-dasharray: 3 3; }
.rbar .bs { fill: var(--band-solid); }
.rbar .bt { stroke: var(--band-edge); }
.rbar .rl { font-family: var(--mono); font-size: 9px; fill: var(--muted); text-anchor: middle; }
.hist .gl { stroke: var(--grid); }
.hist .ax { font-family: var(--mono); font-size: 10px; fill: var(--muted); }
.hist .ax.e { text-anchor: end; }
.hist .ax.s { text-anchor: start; }
.hist .ax.m { text-anchor: middle; }
.hist .lc { stroke: var(--muted); stroke-dasharray: 2 4; }
.mini .ln, .hist .ln { fill: none; stroke: var(--line); stroke-width: 1.6; stroke-linejoin: round; }
.hist .ln.big { stroke-width: 2; }
.mini .pt, .hist .pt, .rbar .pt { stroke: var(--surface); stroke-width: 1.5; }
.mini .pt.in, .hist .pt.in, .rbar .pt.in { fill: var(--line); }
.mini .pt.out, .hist .pt.out, .rbar .pt.out { fill: var(--amber); }
.hist .vl { font-family: var(--display); font-size: 11px; font-weight: 600; text-anchor: middle; }
.hist .vl.in { fill: var(--line); }
.hist .vl.out { fill: var(--amber-ink); }
.hist .dl { font-family: var(--mono); font-size: 10px; fill: var(--muted); text-anchor: middle; }
.hist .sw { font-family: var(--display); font-size: 10px; font-weight: 600; text-anchor: middle; }
.hist .sw.in { fill: var(--line); }
.hist .sw.out { fill: var(--amber-ink); }

/* ---------- sections ---------- */
section { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); padding: 88px 0; }
section > .wrap { position: relative; z-index: 1; }
/* Unit glyphs as watermarks: the lab-world twin of MyFinance's currencies. */
.swm {
  position: absolute; top: 3%; z-index: 0;
  font-family: var(--mono); font-weight: 600; line-height: 1; font-size: min(22vw, 280px);
  color: var(--rule-soft); user-select: none; pointer-events: none;
}
.swm.right { right: -2%; }
.swm.left { left: -2%; }
.eyebrow { display: block; margin-bottom: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.12; letter-spacing: -.025em; font-weight: 650; text-wrap: balance; margin-bottom: 12px; }
h3 { font-size: 17px; line-height: 1.35; letter-spacing: -.01em; font-weight: 650; margin-bottom: 7px; }
.sec-sub { font-size: 18px; color: var(--muted); max-width: 36em; margin-bottom: 44px; text-wrap: pretty; }
.soften { font-size: 14.5px; color: var(--muted); margin-top: 26px; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--surface); }
.step { padding: 30px 28px 32px; border-right: 1px solid var(--rule); }
.step:last-child { border-right: 0; }
.step .n { display: block; margin-bottom: 14px; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.step h3 { font-size: 19px; }
.step p { font-size: 15.5px; color: var(--muted); }

/* any lab, any language */
.labs-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 26px; margin-bottom: 26px; }
.panel-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 24px 24px 22px; min-width: 0; }
.pc-k { display: block; margin-bottom: 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.names { display: flex; flex-wrap: wrap; gap: 8px; }
.name { display: inline-flex; align-items: baseline; gap: 8px; border: 1px solid var(--rule); border-radius: 8px; padding: 6px 11px; background: var(--paper); font-size: 15.5px; font-weight: 500; }
.name i { font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--muted); }
.merge { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.merge::before, .merge::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.canon { border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--rule)); border-radius: 12px; padding: 16px 18px 12px; background: var(--paper); }
.canon-top { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }
.canon-n { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.canon-n small { font-size: 13px; color: var(--muted); font-weight: 400; }
.canon-v { font-family: var(--mono); font-size: 15px; font-weight: 600; white-space: nowrap; }
.canon-v span { color: var(--muted); font-weight: 400; }
.canon .rbar { margin-top: 8px; max-width: 320px; }
.canon-code { margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.chart-cap { font-size: 14px; color: var(--muted); margin-top: 10px; }
.chart-cap b { color: var(--ink); font-weight: 600; }

/* feature grids */
.feat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.feat-grid.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feat { background: var(--surface); padding: 26px 24px 28px; }
.feat .fi { display: block; margin-bottom: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .05em; color: var(--accent); }
.feat h3 { font-size: 16.5px; }
.feat p { font-size: 14px; color: var(--muted); line-height: 1.55; }

/* try saying */
.ledger { border-top: 1px solid var(--rule); }
.lrow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 20px 4px; border-bottom: 1px solid var(--rule); }
.lrow .ln { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.lrow .say { font-size: 18px; font-weight: 550; letter-spacing: -.005em; }
.lrow .say .ph { color: var(--muted); font-weight: 400; font-style: italic; }
.lrow .res { font-family: var(--mono); font-size: 13.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.lrow .res b { color: var(--accent); font-weight: 600; }

/* install */
.tabs { display: flex; width: max-content; max-width: 100%; margin-bottom: 26px; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--surface); }
.tab { font-family: var(--display); font-size: 15px; font-weight: 600; cursor: pointer; min-height: 44px; padding: 0 22px; border: 0; border-right: 1px solid var(--rule); background: transparent; color: var(--muted); }
.tab:last-child { border-right: 0; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.tpanel { border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); padding: 30px 32px; }
.tpanel[hidden] { display: none; }
.tpanel ol { padding-left: 22px; display: flex; flex-direction: column; gap: 9px; font-size: 16px; }
.warn-line { margin-top: 18px; padding: 12px 16px; border-radius: 8px; background: var(--amber-tint); font-size: 14.5px; }
.warn-line b { color: var(--amber-ink); }
.soft { margin-top: 16px; font-size: 14px; color: var(--muted); }
.srv-url { font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--accent); overflow-wrap: anywhere; }
pre.code { font-family: var(--mono); font-size: 13.5px; line-height: 1.55; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; overflow-x: auto; }
code.inline { font-family: var(--mono); font-size: .88em; background: var(--rule-soft); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }

/* why */
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.cmp-col { border: 1px solid var(--rule); border-radius: 14px; padding: 30px 30px 26px; background: var(--surface); }
.cmp-col.ours { border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }
.cmp-col h3 { font-family: var(--mono); font-size: 12.5px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.cmp-col.ours h3 { color: var(--accent); }
.cmp-col ul { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.cmp-col li { position: relative; padding-left: 26px; font-size: 16px; }
.cmp-col.old li { color: var(--muted); }
.cmp-col.old li::before { content: "\00D7"; position: absolute; left: 2px; font-weight: 700; color: var(--amber); }
.cmp-col.ours li::before { content: "\2713"; position: absolute; left: 0; font-weight: 700; color: var(--accent); }

/* not a diagnosis */
.bound { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.label-card { border: 1.5px solid var(--ink); border-radius: 12px; padding: 20px 22px 18px; background: var(--surface); }
.label-card .lk { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1.5px solid var(--ink); font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.label-card p { font-size: 19px; line-height: 1.45; font-weight: 550; letter-spacing: -.01em; text-wrap: pretty; }
.label-card .lf { margin-top: 14px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.dolist + .dolist { margin-top: 30px; }
.dolist h3 { font-family: var(--mono); font-size: 12.5px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.dolist.never h3 { color: var(--muted); }
.dolist ul { list-style: none; border-top: 1px solid var(--rule); }
.dolist li { padding: 11px 0 11px 28px; border-bottom: 1px solid var(--rule); position: relative; font-size: 16px; }
.dolist li::before { content: "\2713"; position: absolute; left: 2px; font-weight: 700; color: var(--accent); }
.dolist.never li { color: var(--muted); }
.dolist.never li::before { content: "\2013"; color: var(--muted); }

/* privacy */
.sec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 34px; }
.sec-item { border-top: 2px solid var(--accent); padding-top: 16px; }
.sec-item .sk { display: block; margin-bottom: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sec-item h3 { font-size: 16.5px; }
.sec-item p { font-size: 14.5px; color: var(--muted); }

/* faq */
.faq { border-top: 1px solid var(--rule); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 2px; position: relative; font-size: 17.5px; font-weight: 550; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-family: var(--mono); font-size: 22px; color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--accent); }
.faq .fa { padding: 0 40px 20px 2px; font-size: 15.5px; color: var(--muted); }

/* final + footer */
.final { padding: 96px 0; text-align: center; border-bottom: 1px solid var(--rule); background: var(--surface); }
.final h2 { max-width: 18em; margin: 0 auto 12px; }
.final-sub { font-size: 18px; color: var(--muted); margin-bottom: 30px; }
.beta-line { margin-top: 26px; font-size: 14.5px; color: var(--muted); }
footer.site-foot { padding: 34px 0 40px; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; font-size: 14px; color: var(--muted); }
.foot-inner a { text-decoration: none; }
.foot-inner a:hover { color: var(--ink); }
.foot-inner .logo { font-size: 15px; color: var(--ink); margin-right: auto; }
.foot-inner .logo .mark { width: 22px; height: 22px; }
.foot-legal { margin-top: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); max-width: 52em; }
.foot-legal b { color: var(--ink); font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .demo { grid-template-columns: minmax(0, 1fr); }
  .demo-side { padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .side-k, .side-conn, .demo-chips .cs { display: none; }
  .demo-chips { flex-direction: row; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -14px; padding-inline: 14px; }
  .demo-chips::-webkit-scrollbar { display: none; }
  .demo-chips button { width: auto; flex-shrink: 0; justify-content: center; min-height: 38px; padding: 0 13px; border-radius: 999px; border-color: var(--rule); background: var(--surface); }
  .demo-chips .ct { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .02em; color: var(--muted); }
  .demo-body { padding: 22px 22px 20px; }
  .demo-inputbar { margin: 0 22px 18px; }
}
@media (max-width: 980px) {
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat-grid.cols3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .labs-grid { grid-template-columns: minmax(0, 1fr); }
  .bound { grid-template-columns: minmax(0, 1fr); gap: 34px; }
}
@media (max-width: 920px) {
  .sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav.main { display: none; }
  .hd-cta { margin-left: auto; }
}
@media (max-width: 820px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { border-right: 0; border-bottom: 1px solid var(--rule); }
  .step:last-child { border-bottom: 0; }
  .cmp { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  section { padding: 60px 0; }
  .final { padding: 68px 0; }
  .lrow { grid-template-columns: 34px minmax(0, 1fr); gap: 6px 14px; }
  .lrow .res { grid-column: 2; text-align: left; white-space: normal; }
  .lrow .say { font-size: 17px; }
}
@media (max-width: 600px) {
  .sec-grid, .feat-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-inner a { padding: 8px 0; }
}
/* Phones: narrow chart variants keep axis text readable (a 560-wide chart
   squeezed to 330 px would print 6 px labels). */
@media (max-width: 520px) {
  .only-wide { display: none; }
  .only-narrow { display: block; }
}
@media (max-width: 480px) {
  :root { --header-h: 56px; }
  .wrap { padding: 0 16px; }
  .site-inner { gap: 12px; }
  .hd-cta { padding: 10px 15px; font-size: 13.5px; }
  .hero-sub { font-size: 17.5px; }
  .tabs { width: 100%; }
  .tab { flex: 1 1 0; padding: 0 8px; font-size: 14.5px; }
  .tpanel { padding: 22px 18px; }
  .step { padding: 24px 20px 26px; }
  .cmp-col { padding: 24px 20px 22px; }
  .feat { padding: 22px 18px 24px; }
  .panel-card { padding: 20px 16px 18px; }
  .hero-stage { padding-bottom: 56px; }
  .demo { border-radius: 14px; }
  .demo-body { padding: 16px 12px 18px; }
  .demo-inputbar { margin: 0 12px 14px; }
  .demo-side { padding: 10px 12px; }
  .demo-chips { margin-inline: -12px; padding-inline: 12px; }
  .demo-bar { padding: 12px 14px; }
  .demo-bar .dot { display: none; }
  .demo-title { margin-left: 0; }
  .render { padding: 11px 10px 10px; }
  .r-row { grid-template-columns: minmax(0, 1fr) auto; }
  .r-row .rbar { grid-column: 1 / -1; max-width: 240px; }
  .r-row.xtra { display: none; } /* the fourth row would make this scene set the demo's height */
  .msg { max-width: 94%; }
}
@media (hover: none) {
  .hd-cta:active, .btn-ghost:active { border-color: var(--accent); color: var(--accent); }
  nav.main a:active, .foot-inner a:active, .faq summary:active { color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-dot, .typing i, .caret { animation: none; }
  .scene .stage, .mark path, .mark circle { transition: none; }
}
