/* ===========================================================================
   BayesChat — landing
   ---------------------------------------------------------------------------
   One paper, one ink, one grid. No accent colour in the page's own chrome;
   hierarchy comes from mass (solid blocks), hairline rules and air. Colour
   appears in exactly two places, and both are the product rather than the
   page: the App Store mark, and the app's brand blue inside the mockups.

   Three voices:
     Geist          display + body
     JetBrains Mono labels, numerals, data
   =========================================================================== */

/* ---- Tokens ------------------------------------------------------------- */
:root{
  color-scheme: light;
  --paper:      #f7f6f3;
  --paper-2:    #ffffff;
  --ink:        #0b0b0c;
  --ink-2:      #57564f;
  --ink-3:      #8a8880;
  --line:       rgba(11,11,12,.13);
  --line-soft:  rgba(11,11,12,.065);
  --fill:       #0b0b0c;
  --fill-ink:   #f7f6f3;
  --band:       #0b0b0c;
  --shadow:     0 1px 2px rgba(11,11,12,.04), 0 20px 44px -28px rgba(11,11,12,.30);
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 64px);
}
html[data-theme="dark"]{
  color-scheme: dark;
  --paper:      #0a0a0b;
  --paper-2:    #131315;
  --ink:        #f4f4f1;
  --ink-2:      #a3a29b;
  --ink-3:      #6e6d67;
  --line:       rgba(244,244,241,.14);
  --line-soft:  rgba(244,244,241,.07);
  --fill:       #f4f4f1;
  --fill-ink:   #0a0a0b;
  --band:       #141416;
  --shadow:     0 1px 2px rgba(0,0,0,.4), 0 20px 44px -28px rgba(0,0,0,.8);
}

@font-face{
  font-family:"Geist"; font-weight:400 700; font-style:normal; font-display:swap;
  src:url("assets/fonts/geist-latin-var.woff2") format("woff2");
  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:"JetBrains Mono"; font-weight:400 700; font-style:normal; font-display:swap;
  src:url("assets/fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  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;
}

/* ---- Scenes -------------------------------------------------------------
   A scene is a film composition, mounted live. It is drawn at the film's
   1920x1080 and scaled to the column, so what the page shows is the same
   drawing the film renders — not a second illustration of the same feature.
   ------------------------------------------------------------------------- */
.scene{
  position:relative; margin:0; overflow:hidden;
  aspect-ratio: 4 / 5;
  border:1px solid var(--line-soft); border-radius:14px;
  background:var(--paper);
}

/* ---- Watch it work ------------------------------------------------------
   One frame, three chapters. The steps scroll past on the left; the frame
   stays put on the right and swaps screen as each step crosses the middle of
   the viewport. The frame is a film scene, so it is a portrait crop of a
   16:9 composition — the sides that get cropped are empty paper.
   ------------------------------------------------------------------------- */
/* a section that has no illustration: the copy keeps the column it had, and
   the type does the work */
.split--solo{ grid-template-columns:minmax(0, 1fr) !important; }
.split--solo .split__copy{ max-width:none; }

.watch{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(300px, 460px);
  gap:clamp(32px, 5vw, 96px);
  align-items:start;
  margin-top:clamp(28px, 4vw, 56px);
}
.watch__steps{ display:flex; flex-direction:column; }
.step{
  min-height:72vh;
  display:flex; flex-direction:column; justify-content:center;
  padding:8px 0;
}
.step h3{
  margin:18px 0 20px;
  font-size:clamp(26px, 2.7vw, 42px);
  line-height:1.04; letter-spacing:-.036em; font-weight:600;
}
.step .lede{ max-width:44ch; }
.scene--watch{
  position:sticky;
  top:calc(72px + 20px);
  max-height:calc(100vh - 112px);
}
@media (max-width: 900px){
  .watch{ grid-template-columns:1fr; gap:28px; }
  .scene--watch{
    position:relative; top:0;
    order:-1;
    max-height:none;
    width:min(100%, 420px);
  }
  .step{ min-height:0; margin-bottom:44px; }
  .step h3{ font-size:clamp(24px, 6vw, 32px); }
}
.scene__frame{
  position:absolute; inset:0; display:block;
  width:100%; height:100%; border:0;
  pointer-events:none;
}
.scene__fallback{ padding:24px; color:var(--ink-3); font-size:14px; }

/* ---- Base --------------------------------------------------------------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font:400 17px/1.6 var(--sans);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
h1,h2,h3,p,ul,ol,dl,dd,dt,figure{ margin:0; }
ul,ol{ list-style:none; padding:0; }
a{ color:inherit; text-decoration:none; }
img,video{ display:block; max-width:100%; }
button{ font:inherit; color:inherit; background:none; border:0; padding:0; cursor:pointer; }
:focus-visible{ outline:2px solid var(--ink); outline-offset:3px; border-radius:2px; }
::selection{ background:var(--ink); color:var(--paper); }
/* The bar is sticky on the landing page, so a jump to #pricing must not land
   underneath it. It is 73px on a desktop but wraps onto a second hairline row
   below 1100px, where it is ~122px — one hard-coded offset cannot clear both,
   and the second row used to hide the top of the target section. --nav-h is
   measured at runtime (index.html); the fallbacks keep the first paint, and a
   no-JS visit, honest. */
section[id], main[id]{ scroll-margin-top:calc(var(--nav-h, 88px) + 14px); }
@media (max-width:1100px){
  section[id], main[id]{ scroll-margin-top:calc(var(--nav-h, 122px) + 14px); }
}

/* film grain — one static tile */
body::after{
  content:""; position:fixed; inset:0; z-index:99; pointer-events:none;
  opacity:.045;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-theme="dark"] body::after{ opacity:.055; }

.shell{
  width:min(1160px, calc(100% - var(--gutter)*2));
  margin-inline:auto;
}
.visually-hidden{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0;
}
.mono{
  font-family:var(--mono);
  font-size:10.5px;
  font-weight:500;
  letter-spacing:.17em;
  text-transform:uppercase;
  line-height:1.4;
}
.skip{
  position:absolute; left:-9999px; top:0; z-index:200;
  background:var(--fill); color:var(--fill-ink);
  padding:12px 18px; border-radius:0 0 10px 0;
}
.skip:focus{ left:0; }

/* ---- Controls ----------------------------------------------------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  height:52px; padding:0 24px; border-radius:999px;
  font-size:15px; font-weight:500; letter-spacing:-.01em;
  background:var(--fill); color:var(--fill-ink);
  transition:transform .25s cubic-bezier(.22,1,.36,1), opacity .2s ease;
}
.btn:hover{ transform:translateY(-1px); opacity:.94; }
.btn svg{ width:17px; height:21px; flex:none; }
.btn--ghost{
  background:transparent; color:var(--ink);
  border:1px solid var(--line);
}
.btn--ghost:hover{ border-color:var(--ink-3); opacity:1; }
.btn--sm{ height:42px; padding:0 20px; font-size:14px; }
/* the demo button sits beside the App Store badge and is the only one that is
   not a store button: same height, ghost fill, a play glyph instead of a logo */
.btn--film svg{ width:15px; height:15px; }

/* ===========================================================================
   NAV
   =========================================================================== */
.nav{
  position:sticky; top:0; z-index:50;
  background:var(--paper);
  border-bottom:1px solid var(--line-soft);
  transition:background .25s ease, border-color .25s ease;
}
/* over a black band the bar inverts instead of showing a light seam */
.nav.is-dark{
  background:#0b0b0c;
  border-bottom-color:rgba(244,244,241,.08);
  --ink:#f4f4f1; --ink-2:#a3a29b; --ink-3:#6e6d67;
  --line:rgba(244,244,241,.16); --line-soft:rgba(244,244,241,.08);
  --fill:#f4f4f1; --fill-ink:#0b0b0c;
}
html[data-theme="dark"] .nav.is-dark{ background:#141416; }
/* A sticky bar is right for the landing page and wrong for a long read, where it
   would sit over the text for the whole article. Interior pages opt out. */
.nav--static{ position:static; }
.nav__inner{ display:flex; align-items:center; gap:44px; padding:15px 0; }
.brand{
  display:flex; align-items:center; gap:9px;
  color:var(--ink); font-weight:600; font-size:16px; letter-spacing:-.02em;
}
.brand svg{ width:21px; height:21px; }
/* The links sit at the right end of the bar, as they did before: the cluster
   reads as navigation, and the two controls follow it. Below 1101px they drop
   to their own full-width row (see RESPONSIVE). */
.nav__links{ display:flex; gap:30px; margin-left:auto; }
.nav__links a{ font-size:14px; color:var(--ink-2); transition:color .2s ease; }
.nav__links a:hover{ color:var(--ink); }
/* the repo is the one link that is not a page section, so it wears a pill:
   the GitHub mark plus the word, in ink rather than the muted grey */
.nav__links a.nav-github{
  display:inline-flex; align-items:center; gap:6px;
  margin:-5px 0; padding:4px 11px;
  border:1px solid var(--line); border-radius:999px;
  color:var(--ink); font-weight:500;
}
.nav__links a.nav-github:hover{ border-color:var(--ink-3); }
.nav__links a.nav-github svg{ width:14px; height:14px; flex:none; }
/* The nav is the one piece of chrome that appears on every page, so it keeps to
   the shell's right edge on all of them. It used to follow the hero phone's
   inset line (--mock-inset, ~64px inside the shell); that made the whole nav
   jump sideways when moving between the landing page and the blog, where the
   hero — and therefore the measurement — does not exist. The phone still sits
   on the mocks' line; only the nav stopped following it. */
.nav__tools{ display:flex; align-items:center; gap:12px; margin-left:24px; }
.theme{
  width:38px; height:38px; border-radius:999px;
  display:grid; place-items:center;
  border:1px solid var(--line); color:var(--ink);
  transition:background .2s ease, border-color .2s ease;
}
.theme:hover{ background:var(--line-soft); border-color:var(--ink-3); }
.theme svg{ width:15px; height:15px; }
/* default (and no-JS) is the light icon; JS flips it with data-theme */
.theme__moon{ display:none; }
html[data-theme="dark"] .theme__sun{ display:none; }
html[data-theme="dark"] .theme__moon{ display:block; }
/* controls that need JS do not pretend to work without it */
html:not(.js) .theme{ display:none; }

/* ===========================================================================
   HERO
   =========================================================================== */
.hero{ padding-top:clamp(22px,2.8vw,38px); }
.hero__top{
  display:grid; grid-template-columns:minmax(0,1fr) clamp(280px,31vw,440px);
  align-items:end; gap:clamp(28px,5vw,72px);
  min-height:calc(100svh - 300px);
  padding-bottom:clamp(20px,3vw,44px);
}
.hero__copy{ min-width:0; }

/* the five things the product is, in the order the App Store lists them:
   a hairline ledger, not a features block */
.sells{ margin-top:clamp(20px,2.2vw,26px); }
.sells li{
  display:grid; grid-template-columns:26px minmax(0,1fr); gap:14px;
  padding:9px 0; border-top:1px solid var(--line-soft);
  font-size:14px; line-height:1.5; color:var(--ink-2);
}
.sells li:last-child{ border-bottom:1px solid var(--line-soft); }
.sells__num{
  font-family:var(--mono); font-size:10px; font-weight:500;
  letter-spacing:.13em; color:var(--ink-3); line-height:2.1;
}
.sells strong{ font-weight:600; color:var(--ink); letter-spacing:-.005em; }
.hero h1{
  /* three lines, a five-row ledger and a phone that is 900px tall at its
     design width: the headline gives way so the first screen still holds
     the whole proposition */
  font-size:clamp(42px, 5.1vw, 74px);
  line-height:.96; letter-spacing:-.042em; font-weight:600;
}
/* the brand name has to live inside the H1 for search, but reads as a label */
.hero-brand{
  display:block;
  font-family:var(--mono);
  font-size:clamp(10px, .78vw, 11.5px);
  font-weight:500;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--ink-3);
  margin-bottom:clamp(18px,2vw,26px);
}
/* an unmarked door: the eyebrow opens the note about the name */
.hero-brand[role="button"]{ cursor:pointer; }
.hero-brand[role="button"]:hover{ color:var(--ink-2); }
.hero-brand[role="button"]:focus-visible{ outline:2px solid var(--ink); outline-offset:4px; border-radius:2px; }
/* 52ch, not 34: the sub-line sets as a single line (617px of text) as soon
   as the copy column passes ~563px — that is a ~625px viewport; the 621-624px
   sliver still wraps. It runs wider than the headline's longest line on
   purpose: a deck under a headline, not a label inside it. Below 620px the
   override further down tightens it back to two lines at 30ch. */
.hero__sub{
  margin-top:24px; max-width:52ch;
  font-size:clamp(17px,1.3vw,19px); line-height:1.55; color:var(--ink-2);
}
.hero__cta{ display:flex; align-items:center; gap:clamp(16px,1.8vw,26px); margin-top:32px; flex-wrap:wrap; }
.link-arrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:15px; color:var(--ink);
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:6px;
  text-decoration-color:var(--line);
  transition:text-decoration-color .2s ease;
}
.link-arrow:hover{ text-decoration-color:var(--ink); }
.link-arrow span{ font-size:13px; opacity:.55; }

/* contents index */
.hero__index{ width:clamp(212px, 19vw, 258px); padding-bottom:5px; }
.hero__index-head{ color:var(--ink-3); margin-bottom:15px; }
.hero__index li{ border-top:1px solid var(--line-soft); }
.hero__index li:last-child{ border-bottom:1px solid var(--line-soft); }
.hero__index a{
  display:flex; align-items:baseline; gap:15px;
  padding:11px 0;
  font-size:14px; letter-spacing:-.005em; color:var(--ink);
}
.hero__index .num{
  font-family:var(--mono); font-size:10px; font-weight:500;
  letter-spacing:.13em; color:var(--ink-3); min-width:18px;
}
.hero__index a:hover .name{ text-decoration:underline; text-underline-offset:3px; }

.hero__facts{
  display:flex; align-items:center; gap:30px; flex-wrap:wrap;
  border-top:1px solid var(--line);
  padding:16px 0 18px;
  color:var(--ink-3);
}
.hero__facts .push{ margin-left:auto; }

/* ===========================================================================
   FEATURE SECTIONS
   =========================================================================== */
.section{ padding:clamp(76px,9vw,128px) 0; }

.head{ margin-bottom:clamp(40px,5vw,64px); }
.head .mono{ color:var(--ink-3); display:block; margin-bottom:24px; }
.head h2{
  font-size:clamp(34px, 4.4vw, 58px);
  line-height:1.02; letter-spacing:-.038em; font-weight:600;
  max-width:18ch;
}
.head--wide h2{ max-width:24ch; }
.head__sub{
  margin-top:22px; font-size:clamp(16px,1.2vw,17.5px); line-height:1.62;
  color:var(--ink-2); max-width:54ch;
}

/* The copy is a caption for the mockup, so it sits on the mockup's centre line
   rather than hanging off its top edge. Measured at 1440: the two columns are
   symmetric (426 + 86 + 648 = 1160) but the copy is 230–410px against a card of
   304–614px, so top-aligning leaves every section short on one side — and the
   distance from the H2 to the paragraph then changes from section to section.
   Centred, the air above and below the copy block is always equal, whatever the
   copy's length, and the block's centre is in the same place every time. */
.split{
  display:grid; grid-template-columns:minmax(0,4.6fr) minmax(0,7fr);
  gap:clamp(40px,6vw,96px); align-items:center;
}
.split--flip{ grid-template-columns:minmax(0,7fr) minmax(0,4.6fr); }
.split__copy{ min-width:0; }

.lede{
  font-size:clamp(17px,1.35vw,19px); line-height:1.62; color:var(--ink-2);
  max-width:42ch;
}
.lede + .lede{ margin-top:14px; }
.checks{ margin-top:38px; display:grid; }
.checks li{
  display:grid; grid-template-columns:auto 1fr; gap:14px;
  font-size:15.5px; line-height:1.5; color:var(--ink);
  padding:15px 0; border-top:1px solid var(--line-soft);
}
.checks .tick{ color:var(--ink-3); font-family:var(--mono); font-size:13px; line-height:1.75; }

/* a feature's own heading sits in the copy column rather than in a .head above
   both columns: the mockup is the section's other half, not its illustration */
.split__copy .mono{ display:block; margin-bottom:20px; color:var(--ink-3); }
.split__copy h2{
  font-size:clamp(30px,3.4vw,44px);
  line-height:1.06; letter-spacing:-.034em; font-weight:600;
  max-width:16ch;
}
.split__copy .lede{ margin-top:18px; }
.split__copy .checks{ margin-top:30px; }

/* ---- panel (mockups) ---- */
.panel{
  background:var(--paper-2);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.panel__head{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:20px 24px 18px;
  font-size:15px; font-weight:600; letter-spacing:-.01em;
}
.panel__head .ghost{
  font-family:var(--mono); font-size:10.5px; font-weight:500; letter-spacing:.12em;
  text-transform:uppercase; color:var(--ink-3);
  border:1px solid var(--line); border-radius:999px; padding:5px 11px;
  white-space:nowrap;
}
.tabs{ display:flex; gap:6px; padding:0 24px 20px; flex-wrap:wrap; }
.tab{
  height:38px; padding:0 16px; border-radius:999px;
  font-size:13.5px; font-weight:500; color:var(--ink-2);
  border:1px solid var(--line);
  transition:background .22s ease, color .22s ease, border-color .22s ease;
}
.tab:hover{ border-color:var(--ink-3); }
.tab[aria-selected="true"]{ background:var(--fill); color:var(--fill-ink); border-color:var(--fill); }

.rows{ border-top:1px solid var(--line-soft); }
.rows .row{
  display:grid; grid-template-columns:120px minmax(0,1fr);
  gap:20px; align-items:baseline;
  padding:15px 24px;
  border-bottom:1px solid var(--line-soft);
}
.rows dt{ font-size:13.5px; color:var(--ink-3); }
.rows dd{
  font-family:var(--mono); font-size:12.5px; color:var(--ink);
  letter-spacing:-.01em; overflow-wrap:anywhere;
}
.rows dd.prompt{ font-family:var(--sans); font-size:14px; line-height:1.5; color:var(--ink-2); }
.panel__foot{
  padding:16px 24px 20px; color:var(--ink-3);
  display:flex; align-items:center; gap:10px;
}
.panel__foot::before{
  content:""; width:5px; height:5px; border-radius:50%;
  background:var(--ink-3); flex:none;
}

/* ---- provider list ---- */
.providers{ border-top:1px solid var(--line-soft); }
.prow{
  display:grid; grid-template-columns:8px minmax(104px,auto) minmax(0,1fr) auto;
  gap:12px; align-items:baseline;
  padding:13px 24px; border-bottom:1px solid var(--line-soft);
}
.prow__dot{
  width:5px; height:5px; border-radius:50%; background:var(--ink);
  align-self:center;
}
/* a hollow dot means "not a cloud key": your own network, or a blank slot */
.prow--local .prow__dot{ background:transparent; border:1px solid var(--ink-3); }
.prow__name{ font-size:14px; color:var(--ink); white-space:nowrap; }
.prow__url{
  font-family:var(--mono); font-size:11px; color:var(--ink-3);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.prow__tag{
  font-family:var(--mono); font-size:9.5px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--ink-3); white-space:nowrap;
}

/* ---- session parameters ---- */
.params{ border-top:1px solid var(--line-soft); padding:2px 24px 6px; }
.param{ padding:15px 0; border-bottom:1px solid var(--line-soft); }
.param:last-child{ border-bottom:0; }
.param__head{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; }
.param__head span{ font-size:13.5px; color:var(--ink-2); }
.param__head b{
  font-family:var(--mono); font-weight:500; font-size:12.5px; color:var(--ink);
  letter-spacing:-.01em;
}
.meter{ position:relative; height:2px; margin-top:13px; border-radius:2px; background:var(--line); }
.meter span{
  position:absolute; top:50%; left:var(--at);
  transform:translate(-50%,-50%);
  width:9px; height:9px; border-radius:50%; background:var(--ink);
}
.seg{ display:flex; gap:4px; margin-top:11px; }
.seg span{
  flex:1; text-align:center; padding:7px 2px;
  border:1px solid var(--line); border-radius:999px;
  font-size:11.5px; color:var(--ink-3); white-space:nowrap;
}
.seg .is-on{ background:var(--fill); color:var(--fill-ink); border-color:var(--fill); }

/* ---- appearance ---- */
.look{ border-top:1px solid var(--line-soft); padding:2px 24px 8px; }
.look__row{ padding:15px 0; border-bottom:1px solid var(--line-soft); }
.look__row:last-child{ border-bottom:0; }
.look__label{ display:block; font-size:13.5px; color:var(--ink-2); }
.look__row .seg{ margin-top:11px; }
.chips{ display:flex; flex-wrap:wrap; gap:5px; margin-top:11px; }
.chips span{
  padding:5px 10px; border:1px solid var(--line); border-radius:999px;
  font-family:var(--mono); font-size:10px; letter-spacing:.09em;
  text-transform:uppercase; color:var(--ink-3);
}
.chips .is-on{ background:var(--fill); color:var(--fill-ink); border-color:var(--fill); }

/* ---- tool trace ---- */
.trace{ border-top:1px solid var(--line-soft); }
.trace__row{
  display:grid; grid-template-columns:minmax(0,1fr) auto auto;
  gap:16px; align-items:baseline;
  padding:14px 24px;
  border-bottom:1px solid var(--line-soft);
  font-family:var(--mono); font-size:12.5px;
}
.trace__row.is-dim{ color:var(--ink-3); }
.trace__time{ color:var(--ink-3); font-size:11.5px; }
.trace__ok{ color:var(--ink); }
.trace__note{
  grid-column:1 / -1;
  font-family:var(--sans); font-size:12.5px; color:var(--ink-3);
  margin-top:2px;
}
.trace__row.is-dim .trace__name,
.trace__row.is-dim .trace__time{ color:var(--ink-3); }

/* ===========================================================================
   QUIET — memory
   =========================================================================== */
.quiet{ padding:clamp(96px,12vw,168px) 0; border-top:1px solid var(--line-soft); }
.quiet__inner{ max-width:820px; margin-inline:auto; text-align:center; }
.quiet .mono{ color:var(--ink-3); display:block; margin-bottom:32px; }
.quiet h2{
  font-size:clamp(34px, 4.6vw, 62px);
  line-height:1.04; letter-spacing:-.04em; font-weight:600;
}
.quiet__body{
  margin:28px auto 0; max-width:46ch;
  font-size:clamp(16px,1.25vw,18px); line-height:1.65; color:var(--ink-2);
}
.quiet__diagram{
  display:flex; align-items:center; justify-content:center; gap:14px;
  margin:56px 0 0; flex-wrap:wrap;
}
.quiet__node{
  font-family:var(--mono); font-size:10.5px; letter-spacing:.14em; text-transform:uppercase;
  border:1px solid var(--line); border-radius:999px; padding:8px 14px;
  color:var(--ink-2); white-space:nowrap;
}
.quiet__wire{
  position:relative; width:clamp(60px,14vw,160px); height:1px;
  background:var(--line); flex:none;
}
.quiet__wire::after{
  content:"your key"; position:absolute; left:50%; top:-10px; transform:translateX(-50%);
  font-family:var(--mono); font-size:8.5px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--ink-3); background:var(--paper); padding:0 8px; white-space:nowrap;
}
.quiet__caption{
  margin-top:18px; color:var(--ink-3);
  font-family:var(--mono); font-size:10.5px; letter-spacing:.14em; text-transform:uppercase;
}
.quiet__facts{
  display:flex; justify-content:center; flex-wrap:wrap;
  margin-top:52px; padding-top:24px; border-top:1px solid var(--line-soft);
  color:var(--ink-3);
}
.quiet__facts span + span::before{
  content:"·"; padding:0 clamp(14px,3vw,28px); color:var(--ink-3);
}

/* ===========================================================================
   BAND — inverted section
   =========================================================================== */
.band{
  background:var(--band);
  --paper:var(--band);
  --paper-2:#17171a;
  --ink:#f4f4f1; --ink-2:#a3a29b; --ink-3:#6e6d67;
  --line:rgba(244,244,241,.16); --line-soft:rgba(244,244,241,.08);
  --fill:#f4f4f1; --fill-ink:#0b0b0c;
  --shadow:0 1px 2px rgba(0,0,0,.5), 0 24px 50px -30px rgba(0,0,0,.9);
  color:var(--ink);
  padding:clamp(76px,9vw,128px) 0;
  border-top:1px solid var(--line-soft);
  border-bottom:1px solid var(--line-soft);
}
.band .head h2{ max-width:16ch; }

/* ---- lock screen ---- */
.lock{
  border:1px solid var(--line); border-radius:22px;
  background:rgba(255,255,255,.035);
  padding:20px;
  font-family:var(--sans);
}
.lock__head{
  display:flex; align-items:baseline; justify-content:space-between;
  color:var(--ink-3); margin-bottom:18px;
}
.lock__time{ font-size:13px; color:var(--ink-2); font-family:var(--mono); letter-spacing:.06em; }
.lock__card{
  border:1px solid var(--line); border-radius:16px;
  background:rgba(255,255,255,.05);
  padding:16px 18px;
}
.lock__card + .lock__card{ margin-top:12px; }
.lock__title{ display:flex; justify-content:space-between; gap:12px; font-size:14px; font-weight:500; }
.lock__sub{ margin-top:4px; font-size:13px; color:var(--ink-2); }
.lock__bar{
  margin-top:14px; height:4px; border-radius:2px;
  background:rgba(255,255,255,.14); overflow:hidden;
}
.lock__bar span{ display:block; width:62%; height:100%; background:var(--ink); border-radius:2px; }
.lock__foot{
  display:flex; justify-content:space-between; gap:12px;
  margin-top:10px; font-size:11.5px; color:var(--ink-3);
}
.lock__done{ display:flex; align-items:center; gap:10px; font-size:13px; }
.lock__done .badge{
  width:22px; height:22px; border-radius:6px; flex:none;
  display:grid; place-items:center; font-size:11px;
  background:var(--ink); color:var(--band);
}
.lock__note{ margin-top:16px; color:var(--ink-3); }
.lock__when{ margin-left:auto; font-family:var(--mono); font-size:10.5px; color:var(--ink-3); letter-spacing:.1em; }

/* ===========================================================================
   COMPARE
   =========================================================================== */
.table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.table{
  width:100%; min-width:660px; border-collapse:collapse;
  font-size:14.5px; color:var(--ink);
}
.table thead th{
  font-family:var(--mono); font-size:10px; font-weight:500; letter-spacing:.14em;
  text-transform:uppercase; color:var(--ink-3); text-align:left;
  padding:0 14px 12px; border-bottom:1px solid var(--line);
}
.table thead th.mark{ text-align:center; }
.table thead th:first-child{ width:40%; }
.table thead th.mark{ width:15%; }
.table tbody th{
  font-weight:400; text-align:left; color:var(--ink);
  padding:15px 14px; border-bottom:1px solid var(--line-soft);
}
.table tbody td{
  padding:15px 14px; border-bottom:1px solid var(--line-soft);
  text-align:center; color:var(--ink-2);
}
.table tbody tr:last-child th,
.table tbody tr:last-child td{ border-bottom:1px solid var(--line); }
.table .col-own{ font-weight:500; color:var(--ink); }
.table .yes{ font-size:15px; line-height:1; }
.table .partial{ font-size:13px; color:var(--ink-3); }
.table .no{ color:var(--ink-3); }
.table__legend{
  display:flex; gap:22px; flex-wrap:wrap;
  margin-top:16px; color:var(--ink-3);
}
.table .narrow{ display:none; }
.table__note{
  margin-top:28px; max-width:64ch;
  font-size:13.5px; line-height:1.6; color:var(--ink-3);
}
.table__note a{ text-decoration:underline; text-underline-offset:4px; text-decoration-color:var(--line); }
.table__note a:hover{ text-decoration-color:var(--ink); }

/* ===========================================================================
   PRICING
   =========================================================================== */
.plans{ display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:stretch; }
.plan{
  border:1px solid var(--line); border-radius:22px;
  background:var(--paper-2);
  padding:clamp(24px,3vw,36px);
  display:flex; flex-direction:column;
}
/* Pro is not a different colour any more: a black-on-light card (and its
   inverse in dark mode) read as a hole punched in the paper. It is the same
   surface with a stronger edge, a hair of tint, and the only filled button —
   hierarchy from weight, not from a second theme. */
.plan--pro{
  background:var(--paper-2);
  background:color-mix(in srgb, var(--ink) 4%, var(--paper-2));
  border-color:var(--ink);
  color:var(--ink);
  box-shadow:var(--shadow);
}
.plan__top{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.plan__name{ font-size:15px; font-weight:500; }
.plan__tag{
  font-family:var(--mono); font-size:9.5px; letter-spacing:.14em; text-transform:uppercase;
  border:1px solid currentColor; border-radius:999px; padding:4px 9px; opacity:.55;
}
.plan__price{
  font-size:clamp(44px,4.6vw,58px); line-height:1;
  letter-spacing:-.045em; font-weight:600; margin-top:24px;
}
.plan__price small{ font-size:.38em; letter-spacing:0; font-weight:400; margin-left:6px; opacity:.55; }
.plan__sub{ margin-top:10px; font-size:13.5px; color:var(--ink-2); }
.plan__list{ margin-top:28px; display:grid; gap:0; border-top:1px solid var(--line-soft); }
.plan__list li{
  padding:11px 0; font-size:14.5px; line-height:1.45;
  border-bottom:1px solid var(--line-soft);
  display:grid; grid-template-columns:auto 1fr; gap:11px;
}
.plan__list li::before{ content:"·"; color:var(--ink-3); }
/* both cards end at the same line: the list stays at the top, the button is
   pinned to the bottom of the stretched grid cell */
.plan__cta{ margin-top:auto; padding-top:28px; }
.plan__cta .btn{ width:100%; }
/* ===========================================================================
   FAQ
   =========================================================================== */
.faq__grid{
  display:grid; grid-template-columns:1fr 1fr;
  gap:0 clamp(32px,5vw,80px);
  align-items:start;
}
.faq details{
  border-bottom:1px solid var(--line-soft);
  padding:18px 0;
}
.faq details:first-child{ border-top:1px solid var(--line-soft); }
.faq summary{
  display:flex; align-items:baseline; justify-content:space-between; gap:20px;
  list-style:none; cursor:pointer;
  font-size:15.5px; line-height:1.45; letter-spacing:-.01em;
}
.faq summary::-webkit-details-marker{ display:none; }
.faq summary::after{
  content:"+"; font-family:var(--mono); font-size:13px; color:var(--ink-3);
  flex:none; transition:transform .2s ease;
}
.faq details[open] summary::after{ content:"–"; }
.faq details p{
  margin-top:12px; font-size:14.5px; line-height:1.62; color:var(--ink-2);
  max-width:54ch;
}

/* ===========================================================================
   FINAL CTA
   =========================================================================== */
.cta{ padding:clamp(84px,10vw,140px) 0; }
.cta__inner{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:clamp(32px,6vw,80px); flex-wrap:wrap;
}
.cta h2{
  font-size:clamp(36px,5.2vw,72px);
  line-height:.98; letter-spacing:-.042em; font-weight:600;
}
.cta__kicker{ display:block; margin-bottom:20px; color:var(--ink-3); }
.cta__sub{ margin-top:20px; font-size:17px; color:var(--ink-2); max-width:34ch; }
/* every button shares the width of the widest label (the mail address), so the
   column reads as one stack instead of four ragged pills */
.cta__actions{ display:flex; flex-direction:column; align-items:stretch; gap:14px; }
.cta__actions .mono{ color:var(--ink-3); }
/* the address is a mailto, so it is set in the mono face rather than as a
   button label pretending to be prose */
.cta__actions .btn[href^="mailto:"]{ font-family:var(--mono); font-size:14px; font-weight:500; letter-spacing:.01em; }
/* the Discord and X marks are square; the Apple mark is a tall logo */
.cta__actions .btn--ghost svg{ width:16px; height:16px; }
.cta__actions .btn--ghost[href*="apps.apple.com"] svg{ width:15px; height:18px; }

/* ===========================================================================
   FOOTER
   =========================================================================== */
.footer{ padding:clamp(48px,6vw,72px) 0 36px; border-top:1px solid var(--line-soft); }
.footer__grid{
  display:grid; grid-template-columns:1.5fr repeat(3,1fr);
  gap:clamp(28px,4vw,56px);
}
.footer__brand{ display:flex; flex-direction:column; gap:14px; max-width:26ch; }
.footer__brand p{ font-size:13.5px; line-height:1.6; color:var(--ink-3); }
.footer__col h3{
  font-family:var(--mono); font-size:9.5px; font-weight:500;
  letter-spacing:.15em; text-transform:uppercase; color:var(--ink-3);
  margin-bottom:14px;
}
.footer__col li + li{ margin-top:9px; }
.footer__col a{ font-size:13.5px; color:var(--ink-2); }
.footer__col a:hover{ color:var(--ink); }
.footer__legal{
  display:flex; align-items:center; gap:20px; flex-wrap:wrap;
  margin-top:clamp(36px,5vw,56px); padding-top:20px;
  border-top:1px solid var(--line-soft);
  color:var(--ink-3);
}
.footer__legal .push{ margin-left:auto; }

/* ===========================================================================
   BAYES' THEOREM — the easter egg
   ---------------------------------------------------------------------------
   A quiet door in the footer (and the tiny eyebrow above the hero headline).
   It opens a dialog, not a page: there is nothing to navigate to, and asking
   for one would make it an About page rather than a note.
   =========================================================================== */
.egg-trigger{
  align-self:flex-start;
  display:inline-flex; align-items:center; gap:8px;
  padding:0; margin-top:2px;
  font-family:var(--mono); font-size:10px; font-weight:500;
  letter-spacing:.15em; text-transform:uppercase;
  color:var(--ink-3);
  transition:color .2s ease;
}
.egg-trigger:hover{ color:var(--ink); }
.egg-trigger:focus-visible{ outline:2px solid var(--ink); outline-offset:4px; border-radius:3px; }
.egg-trigger__mark{ font-size:15px; line-height:1; letter-spacing:0; }

.bayes{
  width:min(560px, calc(100% - 40px));
  max-width:none; max-height:calc(100dvh - 40px);
  overflow-y:auto;
  padding:0; border:1px solid var(--line); border-radius:22px;
  background:var(--paper-2); color:var(--ink);
  box-shadow:0 40px 90px -40px rgba(11,11,12,.55);
}
.bayes::backdrop{ background:rgba(8,8,9,.55); backdrop-filter:blur(6px); }
.bayes[open]{ animation:film-in .26s cubic-bezier(.22,1,.36,1); }
html[data-theme="dark"] .bayes{ box-shadow:0 40px 90px -40px rgba(0,0,0,.85); }
.bayes__card{ position:relative; padding:clamp(28px,4.4vw,46px); }
.bayes__close{
  position:absolute; top:16px; right:16px;
  width:34px; height:34px; display:grid; place-items:center;
  border-radius:50%; border:1px solid var(--line); color:var(--ink-2);
  transition:color .2s ease, border-color .2s ease;
}
.bayes__close:hover{ color:var(--ink); border-color:var(--ink-3); }
.bayes__close svg{ width:16px; height:16px; }
.bayes__kicker{ display:block; color:var(--ink-3); margin-bottom:16px; }
.bayes h2{
  font-size:clamp(30px,4vw,42px); line-height:1.02;
  letter-spacing:-.035em; font-weight:600;
}
.bayes__lead{ margin-top:14px; font-size:16px; line-height:1.55; color:var(--ink-2); }
.bayes__formula{
  display:flex; align-items:center; justify-content:center; gap:12px;
  margin:26px 0; padding:22px 14px;
  border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft);
  font-family:var(--mono); font-size:clamp(15px,2.5vw,20px);
  color:var(--ink); letter-spacing:.01em;
}
.bayes__eq{ color:var(--ink-3); }
.bayes__frac{ display:inline-flex; flex-direction:column; align-items:center; line-height:1.2; }
.bayes__frac-num{ padding:0 8px 6px; border-bottom:1px solid currentColor; }
.bayes__frac-den{ padding-top:6px; }
.bayes p{ font-size:14.5px; line-height:1.62; color:var(--ink-2); }
.bayes p + p{ margin-top:14px; }
.bayes__sign{
  margin-top:22px; padding-top:18px;
  border-top:1px solid var(--line-soft);
  font-size:15px; line-height:1.5; color:var(--ink);
}

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */
/* The links do not fold into a hamburger: they drop to their own hairline row
   and scroll sideways if they ever outgrow the screen. One less thing to
   open, one less state to get wrong. This happens a little earlier than the
   rest of the layout now that the GitHub pill rides in the link row. */
@media (max-width: 1100px){
  .nav__inner{ flex-wrap:wrap; gap:12px; }
  .nav__links{
    order:3; width:100%; margin-left:0; gap:22px;
    padding:11px 0 1px; margin-top:2px;
    border-top:1px solid var(--line-soft);
    overflow-x:auto; scrollbar-width:none;
    white-space:nowrap;
  }
  .nav__links::-webkit-scrollbar{ display:none; }
  .nav__links a{ font-size:13.5px; }
  .nav__tools{ margin-left:auto; }
}

/* A portrait iPad is wide enough to keep two hero columns, but too narrow to
   give the phone a decent slot: at 1024px the right-hand column is only 31vw,
   so the phone shrinks to a thumbnail. In portrait the copy takes the page and
   the phone gets a full-width stage underneath it instead. Landscape keeps the
   two columns — a 1024x768 tablet has the phone on the right, not below. */
@media (max-width: 980px), (max-width: 1120px) and (orientation: portrait){
  .hero__top{ grid-template-columns:minmax(0,1fr); min-height:0; padding-bottom:0; }
  .hero__index{ display:none; }
  .hero .mock{ order:2; margin-top:clamp(28px,5vw,48px); }
}

/* A landscape tablet or short laptop is wide and shallow. Anchoring the phone
   to the bottom of the copy column (the desktop behaviour) drops it under the
   fold and leaves the top of the right column empty, so on these screens the
   phone starts at the top with the copy and uses the height the screen has. */
@media (min-width: 981px) and (max-height: 880px){
  .hero__top{ align-items:start; }
}

@media (max-width: 980px){
  .sells li{ font-size:14px; }

  .split, .split--flip{ grid-template-columns:minmax(0,1fr); }
  .split--flip .panel,
  .split--flip .lock{ order:2; }

  .plans{ grid-template-columns:1fr; }
  .faq__grid{ grid-template-columns:1fr; }
  .faq details:first-child{ border-top:0; }
  .faq__grid > div:first-child details:first-child{ border-top:1px solid var(--line-soft); }

  .footer__grid{ grid-template-columns:1fr 1fr; }
  .footer__brand{ grid-column:1 / -1; }
}

@media (max-width: 620px){
  .hero h1{ letter-spacing:-.032em; }
  .hero__sub{ font-size:16px; max-width:30ch; }
  .hero__cta{ flex-direction:column; align-items:stretch; gap:18px; }
  .hero__cta .btn{ width:100%; }
  .link-arrow{ align-self:center; text-decoration:none; }
  .hero__facts{ gap:10px 16px; margin-top:24px; font-size:9.5px; letter-spacing:.15em; }
  .hero__facts .push{ display:none; }


  .rows .row{ grid-template-columns:96px minmax(0,1fr); padding:14px 18px; }
  .panel__head,.tabs{ padding-left:18px; padding-right:18px; }
  .panel__foot{ padding-left:18px; padding-right:18px; }
  .trace__row{ padding:14px 18px; }
  /* the base URL is the first thing a phone can afford to lose */
  .prow{ grid-template-columns:8px minmax(0,1fr) auto; padding:12px 18px; }
  .prow__url{ display:none; }
  .params,.look{ padding-left:18px; padding-right:18px; }
  .chips span{ padding:4px 8px; font-size:9px; letter-spacing:.06em; }
  .seg span{ font-size:11px; padding:6px 2px; }

  /* the comparison has to fit a phone without a hidden scroll */
  .table-wrap{ overflow-x:visible; }
  .table{ min-width:0; table-layout:fixed; font-size:13px; }
  .table thead th{ font-size:8.5px; letter-spacing:.04em; padding:0 5px 10px; }
  .table thead th:first-child{ width:35%; }
  .table thead th.mark{ width:16.25%; }
  .table tbody th{ padding:13px 6px; font-size:13px; line-height:1.35; }
  .table tbody td{ padding:13px 4px; }
  .table .wide{ display:none; }
  .table .narrow{ display:inline; }

  .cta__inner{ flex-direction:column; align-items:flex-start; }
  .cta__actions{ width:100%; }
  .cta__actions .btn{ width:100%; }

  .quiet__facts{ flex-direction:column; gap:9px; }
  .quiet__facts span + span::before{ content:none; }
  .quiet__wire{ width:64px; }
  .quiet__wire::after{ font-size:8px; letter-spacing:.08em; }

  .footer__grid{ grid-template-columns:1fr 1fr; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ transition:none !important; animation:none !important; }
  .btn:hover{ transform:none; }
}

/* ===========================================================================
   THE FILM
   ---------------------------------------------------------------------------
   The promo film playing in a dialog. It is not a video file: the composition
   is HTML, and assets/js/film-player.js turns a 1920x1080 iframe into the
   stage. Everything here is chrome around that stage.

   The dialog is a fixed box, not a sized-by-content one: `min(1180px, 94vw)` by
   `min(760px, 90dvh)`. The stage takes the space the bar and the controls leave
   and the player fits the film inside it, letterboxed, so the same layout works
   on a 27" monitor, a 13" laptop and a phone held sideways without a media
   query per case. 1180x660 of stage is a 0.61 scale of the authored 1920.
   =========================================================================== */
html.is-film-open{ overflow:hidden; }

.film{
  width:min(1180px, 94vw); height:min(760px, 90dvh);
  max-width:none; max-height:none;
  padding:0; border:0; border-radius:18px; overflow:hidden;
  background:var(--paper); color:var(--ink);
  box-shadow:0 40px 90px -40px rgba(11,11,12,.55);
}
.film::backdrop{ background:rgba(8,8,9,.7); backdrop-filter:blur(7px); }
.film[open]{ animation:film-in .26s cubic-bezier(.22,1,.36,1); }
@keyframes film-in{ from{ opacity:0; transform:translateY(10px) scale(.985); } }

.film__box{ display:flex; flex-direction:column; height:100%; }

.film__bar{
  display:flex; align-items:center; gap:14px;
  padding:13px 14px 13px 20px; border-bottom:1px solid var(--line);
}
.film__title{
  font-size:14px; font-weight:500; letter-spacing:-.01em; color:var(--ink);
}
.film__close{
  margin-left:auto; width:34px; height:34px; flex:none;
  display:grid; place-items:center; border-radius:50%;
  color:var(--ink-2); border:1px solid var(--line);
  transition:color .2s ease, border-color .2s ease;
}
.film__close:hover{ color:var(--ink); border-color:var(--ink-3); }
.film__close svg{ width:17px; height:17px; }

/* the stage: the film's own 1920x1080 canvas, scaled by a transform so the
   composition lays out exactly as authored. The box is whatever the dialog
   leaves; the player centres the film in it. Both the stage and the frame are
   the film's own paper, so the letterbox is not a black bar — it is more of the
   same page, and the film has no visible edge. */
.film__stage{
  position:relative; flex:1 1 auto; min-height:0; overflow:hidden;
  /* the film's own paper, in both themes: the composition has one palette, and
     a letterbox in any other colour would draw a box around the film */
  background:#f7f6f3;
}
.film__poster{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:contain; display:block;
}
/* The film lives inside a clipped, pixel-snapped box. The box edge is what
   meets the paper; the iframe's own edge always sits a hair outside it and is
   cropped, so the compositor never shows a blended boundary column. */
.film__clip{
  position:absolute; top:0; left:0;
  overflow:hidden; background:#f7f6f3;
}
.film__frame{
  position:absolute; top:0; left:0;
  width:1920px; height:1080px; border:0; display:block;
  transform-origin:top left;
}

.film__controls{
  display:flex; align-items:center; gap:16px;
  padding:12px 20px 14px; border-top:1px solid var(--line);
}
.film__play{
  width:38px; height:38px; flex:none; display:grid; place-items:center;
  border-radius:50%; background:var(--fill); color:var(--fill-ink);
  transition:opacity .2s ease;
}
.film__play:hover{ opacity:.86; }
.film__play svg{ width:17px; height:17px; }
.film__play [data-icon="pause"]{ display:none; }
.film__play[data-state="pause"] [data-icon="play"]{ display:none; }
.film__play[data-state="pause"] [data-icon="pause"]{ display:block; }

.film__seek{
  flex:1; min-width:0; height:20px; accent-color:var(--ink);
  cursor:pointer;
}
.film__time{
  flex:none; font-size:12px; color:var(--ink-3); letter-spacing:.02em;
  font-variant-numeric:tabular-nums;
}
.film__hint{
  padding:0 20px 14px; font-size:12px; color:var(--ink-3);
}
/* the film is a 16:9 drawing; on a portrait phone it is 390 px wide and the
   phone inside it is 60 px. Rather than a second cut of the film, say the one
   thing that helps. */
.film__rotate{
  display:none; padding:0 20px 14px; font-size:12px; color:var(--ink-3);
}

@media (max-width: 720px){
  .film{
    width:100vw; max-width:100vw; height:100dvh;
    border-radius:0;
  }
  .film__bar{ padding:12px 12px 12px 16px; }
  .film__controls{ padding:10px 16px 12px; }
  .film__title{ font-size:13px; }
}
@media (orientation:portrait) and (max-width: 720px){
  .film__rotate{ display:block; }
}

/* a phone held sideways: the dialog takes the whole screen, because every pixel
   of height it does not take is a pixel the film cannot use */
@media (max-height: 480px){
  .film{ width:100vw; height:100dvh; border-radius:0; }
  .film__bar{ padding:8px 10px 8px 14px; }
  .film__controls{ padding:8px 14px 10px; gap:12px; }
  .film__title{ font-size:12px; }
  .film__play{ width:32px; height:32px; }
  .film__play svg{ width:14px; height:14px; }
}
