/* =============================================================
   QMerse — site.css
   The whole site, between Velon Energy (midnight ink, warm paper bands, mono section labels) and Goodfire
   (white space, serif headlines, sentence-case sans actions): one QMerse blue accent, calm motion. Every page loads this file, plus at
   most one small page file (css/p-<page>.css) for components only that page uses.
   ============================================================= */

/* ---- Fonts: self-hosted Geist and Geist Mono (SIL OFL 1.1), Google Fonts' own subsets ---- */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../assets/fonts/geist-v5-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../assets/fonts/geist-v5-latin.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: 'Geist Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../assets/fonts/geist-mono-v6-symbols2.woff2) format('woff2');
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../assets/fonts/geist-mono-v6-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../assets/fonts/geist-mono-v6-latin.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; }

/* Newsreader (Production Type, SIL OFL 1.1): the editorial serif for display headings */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../assets/fonts/newsreader-400-v26-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../assets/fonts/newsreader-400-v26-latin.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; }

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; scroll-padding-top: 90px; }
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---- Design tokens ---- */
:root {
  --ink:        #0b1118;   /* deep midnight */
  --ink-2:      #111a25;   /* surfaces */
  --ink-3:      #18222f;   /* card surfaces on dark */
  --line:       rgba(255,255,255,0.08);
  --line-2:     rgba(255,255,255,0.14);

  --paper:      #eef3f8;
  --paper-2:    #e2e9f1;
  --paper-line: rgba(11,17,24,0.10);

  --acc:     #4d8dff;   /* QMerse blue, lifted for the dark palette */
  --acc-hi:  #7fb0ff;
  --acc-dk:  #2a5fd0;
  --acc-rgb: 77,141,255; --acc-hi-rgb: 127,176,255;
  --signal:     #5dd2a6;
  --amber:      #f0c96b;

  --text:       #e8e5df;
  --text-mute:  rgba(232,229,223,0.66);
  --text-dim:   rgba(232,229,223,0.58);
  --text-d:     #1a2230;
  --text-d-mute: rgba(26,34,48,0.70);

  --font-display: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sans:    'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-serif:   'Newsreader', 'Iowan Old Style', Georgia, serif;   /* display headings: the Goodfire half of the blend */

  --radius: 6px;
  --radius-lg: 14px;
  --r-sq: 4px;        /* Goodfire's squared cards and tiles */
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 56px);

  --ease: cubic-bezier(0.2, 0.65, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* palette roles: every page background, surface and outline below goes through these */
  --bg: var(--ink);              /* page and section background */
  --bg-rgb: 11,17,24;            /* the same, for scrims: rgba(var(--bg-rgb), a) */
  --surface: var(--ink-2);       /* cards, tiles, tables */
  --fill: rgba(255,255,255,0.025);
  --grid: rgba(255,255,255,0.03);
  --on-accent: var(--ink);       /* text on a blue or green fill */
  --hdr-bg: rgba(11,17,24,0.94);
  --win-bg: #0d141d;             /* app window frame */
  --win-bar: linear-gradient(180deg, #131c27, #0f1720);
  --ft-bg: var(--ink); --ft-text: var(--text); --ft-mute: var(--text-mute); --ft-dim: var(--text-dim); --ft-line: var(--line); --ft-acc: var(--acc-hi);
  --shadow: rgba(0,0,0,0.85);
  --acc-fill: var(--acc);  /* the accent behind text (buttons, badges, pressed chips) */
  --track: rgba(255,255,255,0.07); --seg-on: var(--ink-3);   /* segmented switches: the track and the raised segment */
}

/* ---- Goodfire's palette: white and warm off-white, ink text, QMerse blue, a warm grey footer (the default) ---- */
html[data-theme="light"] {
  --bg: #ffffff; --bg-rgb: 255,255,255;
  --surface: #f8fafc;
  --line: rgba(29,39,42,0.12); --line-2: rgba(29,39,42,0.22);
  --text: #1d272a; --text-mute: rgba(29,39,42,0.74); --text-dim: rgba(29,39,42,0.66);
  --acc: #0b5be6; --acc-hi: #0a52d0; --acc-dk: #0a3fa8; --acc-rgb: 11,91,230; --acc-hi-rgb: 11,91,230;
  --acc-fill: #0b5be6;  /* white small text on it: 5.75:1 */
  --track: rgba(29,39,42,0.06); --seg-on: #ffffff;
  --signal: #0f7a57;
  --fill: rgba(29,39,42,0.03); --grid: rgba(29,39,42,0.055);
  --on-accent: #ffffff;
  --hdr-bg: rgba(255,255,255,0.92);
  --win-bg: #ffffff; --win-bar: linear-gradient(180deg, #fbfbfc, #f3f4f6);
  --ft-bg: #0f171e; --ft-text: #eef0f2; --ft-mute: rgba(238,240,242,0.78); --ft-dim: rgba(238,240,242,0.66); --ft-line: rgba(238,240,242,0.12); --ft-acc: #7fb0ff;
  --shadow: rgba(29,39,42,0.28);
  color-scheme: light;
}
html[data-theme="light"] [data-tone="paper"] { --tp-bg: #eef3f8; }
html[data-theme="light"] [data-tone="white"] { --tp-bg: #ffffff; }

/* ---- Base ---- */
html, body { background: var(--bg); color: var(--text); }
body {
  font-family: var(--font-sans); font-weight: 400; font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--acc-fill); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--acc-hi); outline-offset: 3px; border-radius: 2px; }
[data-tone] :focus-visible { outline-color: var(--tp-acc); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: auto; z-index: 1000; background: var(--ink); color: var(--acc-hi); padding: 10px 16px;
  border: 1px solid var(--acc-hi); border-radius: 6px; font: 500 14px/1 var(--font-sans); }
.skip-link:focus { left: 12px; top: 12px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- Type primitives ---- */
.section-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--acc-hi); margin-bottom: 28px; display: inline-flex; align-items: center; gap: 10px;
}
.section-label::before { content: ''; width: 22px; height: 1px; background: var(--acc); }

/* Geist has no italic cut: <em> in headings is carried by colour, not slant */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.03em; line-height: 1.06; color: var(--text); text-wrap: balance; }
h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(34px, 4.4vw, 60px); letter-spacing: -0.022em; line-height: 1.04; font-optical-sizing: auto; }
h3 { font-size: clamp(22px, 2.3vw, 30px); letter-spacing: -0.025em; }
h2 em, h3 em { color: inherit; }
em { font-style: normal; }
@media (max-width: 379px) { h2 { font-size: 30px; } }

.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--text-mute); max-width: 39.6em; font-weight: 400; }
.lede em { color: var(--text); }
.mono, code { font-family: var(--font-mono); font-size: 0.92em; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: var(--hdr-bg); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 78px; }
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { height: 30px; width: auto; }
.logo .on-light { display: none; }
html[data-theme="light"] .site-header .logo .on-dark, html[data-theme="light"] .nav-top .logo .on-dark { display: none; }
html[data-theme="light"] .site-header .logo .on-light, html[data-theme="light"] .nav-top .logo .on-light { display: block; }
.header-tools { display: inline-flex; align-items: center; gap: 10px; }
.hdr-link, .menu-btn, .nav-close {
  display: inline-flex; align-items: center; gap: 12px;
  font: 500 14.5px/1 var(--font-sans); letter-spacing: -0.005em; color: var(--text);
  padding: 11px 16px; border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.hdr-link { color: var(--text-mute); }
.hdr-link.hdr-quiet, .menu-btn { border-color: transparent; }
.hdr-link:hover, .menu-btn:hover, .nav-close:hover { border-color: var(--acc); color: var(--acc-hi); }
.hdr-link.hdr-go { color: var(--on-accent); background: var(--acc-fill); border-color: var(--acc-fill); }
.hdr-link.hdr-go:hover { background: var(--acc-hi); border-color: var(--acc-hi); color: var(--on-accent); }
.menu-btn { gap: 14px; }
.pal { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; flex: none; }
.pal button { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; transition: background 0.25s; }
.pal button i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-2); }
.pal [data-pal="light"] i { background: linear-gradient(135deg, #ffffff 50%, #eef3f8 50%); }
.pal [data-pal="dark"] i { background: linear-gradient(135deg, #0b1118 50%, #18222f 50%); }
.pal button[aria-checked="true"] { background: var(--acc); }
.pal button[aria-checked="true"] i { border-color: var(--on-accent); }
.pal button:not([aria-checked="true"]):hover { background: var(--fill); }
.nav-foot .pal-row { display: inline-flex; align-items: center; gap: 12px; }
.menu-btn .bars { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-btn .bars span { display: block; width: 18px; height: 1.5px; background: currentColor; }
.nav-close .x { font-family: var(--font-sans); font-size: 18px; line-height: 1; }

/* ---- Nav overlay (numbered, full screen) ---- */
.nav-overlay {
  position: fixed; inset: 0; z-index: 100; height: 100%; height: 100dvh;
  background: var(--bg); display: grid; grid-template-rows: auto 1fr auto;
  padding: 0 var(--gutter) 32px; overflow-y: auto; overscroll-behavior: contain;
  transform: translateY(-101%); visibility: hidden; pointer-events: none;
  transition: transform 0.55s var(--ease), visibility 0s linear 0.55s;
}
.nav-overlay.open { transform: translateY(0); visibility: visible; pointer-events: auto; transition: transform 0.55s var(--ease), visibility 0s; }
.nav-top { display: flex; justify-content: space-between; align-items: center; height: 78px; max-width: var(--container); width: 100%; margin: 0 auto; }
.nav-top, .nav-main, .nav-foot { max-width: calc(var(--container) - 2 * var(--gutter)) !important; }
.nav-main { align-self: center; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; column-gap: clamp(28px, 5vw, 80px); max-width: var(--container); margin: 0 auto; width: 100%; }
.nav-main li { border-top: 1px solid var(--line); }
.nav-main li:nth-child(4n) { border-bottom: 1px solid var(--line); }
.nav-main a {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 22px; padding: 18px 4px;
  font-family: var(--font-display); font-size: clamp(23px, 3vw, 40px); line-height: 1; letter-spacing: -0.03em; color: var(--text);
  transition: color 0.4s var(--ease), padding-left 0.4s var(--ease);
}
.nav-main a .num { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.15em; color: var(--text-dim); font-weight: 500; }
.nav-main a .arrow { font-family: var(--font-sans); font-size: 26px; color: var(--text-dim); transform: translateX(-12px); opacity: 0; transition: transform 0.4s var(--ease), opacity 0.4s var(--ease), color 0.4s var(--ease); }
.nav-main a:hover { color: var(--acc-hi); padding-left: 14px; }
.nav-main a:hover .arrow { transform: none; opacity: 1; color: var(--acc-hi); }
.nav-main a.is-current, .nav-main a.is-current .num { color: var(--acc-hi); }
.nav-main a.is-current .num::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-inline-end: 8px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.nav-foot { max-width: var(--container); width: 100%; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); padding-top: 22px; }
.nav-foot a:not(.btn) { color: var(--text-mute); transition: color 0.3s; }
.nav-foot a:not(.btn):hover { color: var(--acc-hi); }
.nav-foot .nf-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
@media (max-width: 760px) { .nav-main { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: 1fr; } .nav-main li:nth-child(4) { border-bottom: 0; } .nav-main li:last-child { border-bottom: 1px solid var(--line); } }
@media (max-height: 720px) { .nav-main a { padding: 13px 4px; font-size: clamp(20px, 3vw, 32px); } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px;
  font: 500 15.5px/1 var(--font-sans); letter-spacing: -0.005em; border: 1px solid currentColor; white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--acc-fill); color: var(--on-accent); border-color: var(--acc-fill); }
.btn-primary:hover { background: var(--acc-hi); border-color: var(--acc-hi); }
.btn-ghost { color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--acc-fill); color: var(--on-accent); border-color: var(--acc-fill); }
.text-link {
  display: inline-flex; align-items: center; gap: 8px; padding-bottom: 3px; border-bottom: 1px solid var(--line-2);
  font: 500 15.5px/1.3 var(--font-sans); letter-spacing: -0.005em; color: var(--text);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.text-link:hover { color: var(--acc-hi); border-color: var(--acc); }
@media (max-width: 380px) { .btn { padding-inline: 18px; } }

/* ---- Sections and tones ---- */
.section { padding: clamp(64px, 9.5vw, 124px) 0; position: relative; }
.home .section { padding: clamp(60px, 8vw, 108px) 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: end; margin-bottom: clamp(40px, 6vw, 76px); }
.sec-head .lede { margin: 0; }
.sec-head.solo { grid-template-columns: 1fr; }
@media (max-width: 880px) { .sec-head { grid-template-columns: 1fr; align-items: start; } }

/* Paper sections: content-led sections sit on warm paper; cards inside stay dark */
[data-tone="paper"] {
  --tp-bg: #eef3f8; --tp-ink: #1a2230; --tp-mute: rgba(26,34,48,0.78); --tp-dim: rgba(26,34,48,0.72);
  --tp-acc: #0b52d0; --tp-line: rgba(11,17,24,0.18); --tp-grid: rgba(11,17,24,0.05); --tp-ok: #0f6e4e; --tp-lift: rgba(11,17,24,0.5);
  background-color: var(--tp-bg); color: var(--tp-ink);
}
[data-tone="white"] {
  --tp-bg: #ffffff; --tp-ink: #1a2230; --tp-mute: rgba(26,34,48,0.76); --tp-dim: rgba(26,34,48,0.66);
  --tp-acc: #0b52d0; --tp-line: rgba(26,34,48,0.16); --tp-grid: rgba(26,34,48,0.045); --tp-ok: #0f6e4e; --tp-lift: rgba(11,17,24,0.35);
  background-color: var(--tp-bg); color: var(--tp-ink);
}
[data-tone="paper"] + [data-tone="white"], [data-tone="white"] + [data-tone="white"] { border-top: 1px solid var(--tp-line); }
:is([data-tone="paper"], [data-tone="white"]) .section-label { color: var(--tp-acc); }
[data-tone] .section-label::before { background: var(--tp-acc); }
[data-tone] h2 { color: var(--tp-ink); }
[data-tone] h2 em { color: inherit; }
[data-tone] .lede { color: var(--tp-mute); }
[data-tone] .lede em { color: var(--tp-ink); }
[data-tone] .btn-ghost:not(:hover) { color: var(--tp-ink); border-color: var(--tp-line); }
[data-tone] .text-link { color: var(--tp-ink); border-color: var(--tp-line); }
[data-tone] .text-link:hover { color: var(--tp-acc); border-color: var(--tp-acc); }
/* Dark palette, after Velon: long dark runs and few paper bands. A band marked data-dark="ink" follows the dark
   palette there; data-dark="paper" turns a white band into paper so it joins its neighbour. The light palette is untouched. */
html[data-theme="dark"] [data-dark="ink"] { --tp-bg: var(--ink); --tp-ink: var(--text); --tp-mute: var(--text-mute); --tp-dim: var(--text-dim); --tp-acc: var(--acc-hi);
  --tp-line: var(--line-2); --tp-grid: var(--grid); --tp-ok: var(--signal); --tp-lift: var(--shadow); --tp-hover: var(--fill); }
html[data-theme="dark"] [data-dark="paper"] { --tp-bg: #eef3f8; --tp-ink: #1a2230; --tp-mute: rgba(26,34,48,0.78); --tp-dim: rgba(26,34,48,0.72); --tp-line: rgba(11,17,24,0.18); border-top: 0; }
html[data-theme="dark"] [data-tone]:not([data-dark="ink"]) .btn-primary { background: #0b5be6; border-color: #0b5be6; color: #ffffff; }
html[data-theme="dark"] [data-tone]:not([data-dark="ink"]) .btn-primary:hover { background: #0a52d0; border-color: #0a52d0; }
html[data-theme="dark"] [data-dark="ink"] .on-light { display: none; }
html[data-theme="dark"] [data-dark="ink"] .on-dark { display: block; }
.grid-bg::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--tp-grid, var(--grid)) 1px, transparent 1px), linear-gradient(90deg, var(--tp-grid, var(--grid)) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(90% 70% at 50% 0%, #000 15%, transparent 75%); mask-image: radial-gradient(90% 70% at 50% 0%, #000 15%, transparent 75%);
}
.grid-bg > .container { position: relative; }

/* ---- Reveal ---- */
.reveal { transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); }
.js .reveal:not(.in) { opacity: 0; transform: translateY(18px); }
html:not(.js):not(.js-ready) :is(.menu-btn, .pal, .pal-row) { display: none; }   /* the script never ran: the footer carries every link */
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }
@keyframes rmFade { from { opacity: 0; } to { opacity: 1; } }

/* =============================================================
   01 · Hero: drifting constellation, the slogan, then the real app
   ============================================================= */
.hero {
  position: relative; overflow: hidden; isolation: isolate; background: var(--bg);
  padding: clamp(40px, 5vw, 72px) 0 clamp(56px, 7vw, 96px);
}
.hero-canvas { position: absolute; inset: 0 0 auto 0; width: 100%; height: min(100%, 1000px); z-index: 0; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(70% 70% at 14% 22%, rgba(var(--bg-rgb),0.88) 0%, rgba(var(--bg-rgb),0.5) 45%, rgba(var(--bg-rgb),0.05) 80%),
    radial-gradient(42% 46% at 74% 22%, rgba(var(--bg-rgb),0.92) 0%, rgba(var(--bg-rgb),0.6) 55%, rgba(var(--bg-rgb),0) 85%),
    linear-gradient(180deg, rgba(var(--bg-rgb),0) 0%, rgba(var(--bg-rgb),0) 38%, rgba(var(--bg-rgb),0.9) 72%, var(--bg) 100%);
}
@media (max-width: 980px) {
  .hero-scrim { background: linear-gradient(180deg, rgba(var(--bg-rgb),0.55) 0%, rgba(var(--bg-rgb),0.82) 30%, rgba(var(--bg-rgb),0.9) 60%, var(--bg) 100%); }
}
.hero-inner { position: relative; z-index: 2; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 5vw, 80px); align-items: end; }
.hero-slogan { font-family: var(--font-serif); font-weight: 400; font-size: clamp(40px, 4.9vw, 70px); line-height: 1.0; letter-spacing: -0.025em; margin: 0; font-optical-sizing: auto; }
.hero-copy { padding-top: clamp(8px, 2vw, 28px); }
.hero-slogan em { color: var(--acc-hi); }
/* the headline carries the hero (the header holds Start building free); one quiet link sits level with its last line */
.hero-side { padding-bottom: clamp(6px, 0.9vw, 14px); }
.hero-side .hero-ctas { margin-top: 0; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; column-gap: 24px; row-gap: 18px; margin-top: 26px; }

.hero-note { margin-top: 22px; font-size: 14.5px; line-height: 1.5; color: var(--text-dim); }

@media (max-width: 980px) { .hero-top { grid-template-columns: 1fr; align-items: start; gap: 28px; } .hero-side { padding-bottom: 0; } }
@media (min-width: 981px) { .hero-slogan em { white-space: nowrap; } }
/* short laptop screens: pull the tour and the app up into the first viewport */
@media (min-width: 981px) and (max-height: 820px) { .hero { padding-top: clamp(24px, 4vh, 44px); } .hero-slogan { font-size: clamp(40px, 4.3vw, 60px); } .stage { margin-top: 24px; } }
@media (max-width: 340px) { .tour-txt { min-height: 6.6em; } }
@media (max-width: 480px) {
  .hero-slogan { font-size: 37px; }
}
@media (max-width: 379px) { .hero-slogan { font-size: 32px; } }

/* Slogan reveal: each line rises out of an invisible edge, the blue line lands a beat later, one pass of light */
.slogan-anim .hero-side { animation: sloganUp 1.1s var(--ease-out) 0.95s both; }
.hero-slogan.is-split .sl { display: block; clip-path: inset(-0.14em -0.5em -0.3em -0.5em); }
.hero-slogan.is-split .sl-in { display: block; animation: slIn 1.3s var(--ease-out) both; animation-delay: var(--d); }
.hero-slogan.is-split em { position: relative; display: inline-block; }
.hero-slogan .sw-sheen { -webkit-user-select: none; user-select: none;
  position: absolute; inset: 0; pointer-events: none; color: transparent; -webkit-text-fill-color: transparent;
  background: linear-gradient(100deg, transparent 43%, rgba(214,230,255,0.35) 47%, rgba(236,244,255,0.8) 50%, rgba(214,230,255,0.35) 53%, transparent 57%) no-repeat;
  background-size: 300% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text;
  animation: swSheen 2.2s cubic-bezier(0.45, 0, 0.2, 1) 1.5s both;
}
@keyframes slIn { from { transform: translateY(calc(100% + 0.45em)); } to { transform: none; } }
@keyframes swSheen { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes sloganFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sloganUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- The real app: the tour is the window's top bar, the screenshot sits in a fixed frame below ---- */
.stage { margin-top: clamp(32px, 3.4vw, 48px); }
.home .stage { margin-top: clamp(30px, 3.2vw, 44px); }
.win {
  position: relative; border: 1px solid var(--line-2); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--win-bg); box-shadow: 0 50px 120px -50px var(--shadow), 0 0 0 1px rgba(0,0,0,0.06);
}

.seg { display: inline-flex; align-items: center; padding: 3px; border-radius: 999px; gap: 2px; flex: none; background: var(--track); }
.tour-ctl .seg { margin-inline-start: 6px; }
.seg-k { padding: 0 6px 0 10px; font-size: 13px; color: var(--text-dim); }
.seg button { font: 500 13.5px/1 var(--font-sans); letter-spacing: -0.005em; padding: 8px 13px; border-radius: 999px; color: var(--text-mute); transition: background 0.25s, color 0.25s, box-shadow 0.25s; }
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.14), 0 0 0 1px var(--line); }
.seg button:not([aria-pressed="true"]):hover { color: var(--text); }

.tour {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 20px; align-items: center;
  padding: 12px 14px 13px 16px; border-bottom: 1px solid var(--line); background: var(--win-bar);
}
.tour-n { font: 500 13.5px/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--text-dim); white-space: nowrap; }
.tour-n b { font-weight: 600; color: var(--text); }
.tour-txt { min-width: 0; min-height: 66px; display: flex; flex-direction: column; justify-content: center; }
.tour-t { font-family: var(--font-display); font-weight: 500; font-size: 15.5px; letter-spacing: -0.01em; color: var(--text); }
.tour-d { font-size: 13.5px; line-height: 1.45; color: var(--text-mute); margin-top: 1px; }
.tour-ctl { display: inline-flex; gap: 8px; align-items: center; }
.ctl {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 13px; border-radius: 999px; border: 1px solid transparent; background: var(--track);
  font: 500 13.5px/1 var(--font-sans); letter-spacing: -0.005em; color: var(--text); white-space: nowrap;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.ctl:hover { color: var(--acc-hi); background: rgba(var(--acc-rgb),0.12); }
.ctl-zoom[aria-pressed="true"] { background: rgba(var(--acc-rgb),0.16); color: var(--acc-hi); }
.tour-prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; overflow: hidden; }
.tour-prog i { display: block; height: 100%; width: 0; background: var(--acc-hi); }
.tour-prog.run i { animation: tourProg var(--tour-ms, 5200ms) linear both; }
@keyframes tourProg { from { width: 0; } to { width: 100%; } }

/* the frame takes the shape of whichever screenshot is showing, so neither is letterboxed */
.shot { position: relative; overflow: hidden; overflow: clip; aspect-ratio: 1577 / 909; background: #0b1017; }
@media (min-width: 761px) { .shot:has(> .shot-fig[data-theme="dark"].on) { aspect-ratio: 1909 / 862; } }
.shot-fig { position: absolute; inset: 0; display: none; place-items: center; }
.shot-fig[data-theme="light"] { background: #eef1f6; }
.shot-fig[data-theme="dark"] { background: #0b1017; }
.shot-fig.on { display: grid; animation: rmFade 0.5s ease both; }
.shot-zoom { position: relative; width: 100%; transform-origin: var(--zx, 50%) var(--zy, 50%); transition: transform 0.8s var(--ease-out); }
.shot.is-zoom .shot-zoom { transform: scale(var(--zs, 1.7)); }
.shot-fig picture { display: block; }
.shot-fig img { width: 100%; height: auto; display: block; }
/* spotlight: everything outside the active point dims a little */
.shot-spot { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), rgba(11,17,24,0) 0, rgba(11,17,24,0) var(--sr, 120px), rgba(11,17,24,0.36) calc(var(--sr, 120px) + 90px)); }
.shot-fig[data-theme="light"] .shot-spot { background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), rgba(11,17,24,0) 0, rgba(11,17,24,0) var(--sr, 120px), rgba(11,17,24,0.12) calc(var(--sr, 120px) + 90px)); }
.shot.has-spot .shot-spot { opacity: 1; }
.shot.is-zoom .shot-spot { opacity: 0; }
.hs {
  position: absolute; left: var(--x); top: var(--y); z-index: 2; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--on-accent);
  background: var(--acc-hi); box-shadow: 0 0 0 4px rgba(var(--acc-hi-rgb),0.25), 0 6px 18px rgba(0,0,0,0.45);
  transition: transform 0.3s var(--ease), background 0.3s, box-shadow 0.3s;
}
.hs::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(var(--acc-hi-rgb),0.7); opacity: 0; }
.hs::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; }
.hs:not([aria-current="step"]) { width: 14px; height: 14px; margin: -7px 0 0 -7px; font-size: 0; box-shadow: 0 0 0 3px rgba(var(--acc-hi-rgb),0.28), 0 2px 8px rgba(0,0,0,0.35); }
.hs:not([aria-current="step"]):hover, .hs:not([aria-current="step"]):focus-visible { width: 30px; height: 30px; margin: -15px 0 0 -15px; font-size: 11px; }
html[data-theme="light"] .hs:not([aria-current="step"]) { box-shadow: 0 0 0 3px rgba(255,255,255,0.95), 0 2px 8px rgba(11,17,24,0.3); }
.hs[aria-current="step"] { background: var(--signal); box-shadow: 0 0 0 5px rgba(93,210,166,0.28), 0 6px 18px rgba(0,0,0,0.45); }
.hs[aria-current="step"]::after { opacity: 1; border-color: rgba(93,210,166,0.8); animation: hsRing 2.4s ease-out infinite; }
.shot.is-zoom .hs { transform: scale(0.6); }
@keyframes hsRing { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.9); opacity: 0; } }

@media (max-width: 1100px) { .tour { grid-template-columns: auto minmax(0, 1fr); } .tour-ctl { grid-column: 1 / -1; flex-wrap: wrap; } }
/* phones: a readable screenshot that pans to each point, rather than a tiny one that zooms */
@media (max-width: 760px) {
  .stage .win { display: flex; flex-direction: column; }            /* the screenshot first, the words under it */
  .shot { order: 1; }
  .tour { order: 2; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 14px 15px; border-bottom: 0; border-top: 1px solid var(--line); }
  .tour-prog { top: -1px; bottom: auto; }
  .tour-txt { min-height: 4.6em; }
  .tour-ctl { flex-wrap: nowrap; gap: 6px; }
  .tour-ctl .seg { margin-inline-start: auto; }
  .seg-k { display: none; }
  .hs { top: max(var(--y), 20px); }
  .shot { aspect-ratio: auto; height: min(86vw, 330px); }
  .shot-fig { display: none; place-items: initial; }
  .shot-fig.on { display: block; }
  .shot-zoom { height: 100%; width: max-content; transition: translate 0.8s var(--ease-out); }
  .shot-fig picture { height: 100%; }
  .shot-fig img { height: 100%; width: auto; max-width: none; }
  .shot .shot-spot, [data-tour-zoom] { display: none; }
  .hs[aria-current="step"] { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 10px; }
}
/* narrow phones: the Light/Dark switch takes its own line rather than crowd the play button */
@media (max-width: 380px) {
  .tour-ctl { flex-wrap: wrap; }
  .tour-ctl .ctl-play { flex: none; }
  .tour-ctl .seg { margin-inline-start: 0; }
}

/* =============================================================
   03 · See it run: two recordings, chosen by plain text tabs
   ============================================================= */
.runs { background: var(--bg); overflow: hidden; }
.home .uses + .runs { padding-top: clamp(16px, 3vw, 40px); }
.runs .container { position: relative; z-index: 1; }
.run-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(22px, 3vw, 44px); align-items: start; }
.run-tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--line); }
.run-tab { position: relative; display: block; text-align: start; padding: 0 0 14px; color: var(--text-dim); transition: color 0.25s; }
.run-tab:hover { color: var(--text-mute); }
.run-tab[aria-selected="true"] { color: var(--text); }
.rt-t { font: 500 17px/1.3 var(--font-sans); letter-spacing: -0.012em; }
.rt-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; overflow: hidden; }
.run-tab[aria-selected="true"] .rt-bar { background: var(--text); }
.rt-bar i { display: block; height: 100%; width: 0; background: var(--acc-hi); }

.run-panel { display: none; }
.run-panel.on { display: block; animation: rmFade 0.45s ease both; }
.run-panel .win { border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.run-media { border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: 0 40px 90px -50px var(--shadow); }
.run-panel:focus-visible { outline-offset: 4px; border-radius: var(--radius-lg); }
.run-media { position: relative; background: #0b1017; aspect-ratio: 1380 / 800; overflow: hidden; }
.run-media.light { background: #f3f5f9; aspect-ratio: 1225 / 881; }
.run-media video, .run-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vplay {
  position: absolute; right: 16px; top: 16px; z-index: 2; display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 9px; border-radius: 999px;
  background: rgba(11,17,24,0.82); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 500 13.5px/1 var(--font-sans); color: #e8e5df;
  transition: border-color 0.25s, color 0.25s;
}
.vplay:hover { border-color: var(--acc-hi); color: var(--acc-hi); }
.vplay .ic { width: 22px; height: 22px; border-radius: 50%; background: var(--acc-fill); display: grid; place-items: center; color: var(--on-accent); }
.vplay .ic svg { width: 10px; height: 10px; }
.vprog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.08); z-index: 2; }
.vprog i { display: block; height: 100%; width: 0; background: var(--acc-hi); }
.run-cap { padding: 18px 0 0; max-width: 46em; }
.run-cap p { font-size: 16px; line-height: 1.6; color: var(--text-mute); }
.run-cap p strong { color: var(--text); font-weight: 500; }

/* desktop: one wide player under a row of tabs, so the recordings play near their native size */
@media (min-width: 981px) {
  .run-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .run-media { aspect-ratio: 1380 / 800; }
}
@media (max-width: 980px) {
  .run-grid { grid-template-columns: 1fr; }
  .run-tabs { gap: 24px; }
}
@media (max-width: 600px) { .vplay .lbl { display: none; } .vplay { padding: 8px; } }

/* =============================================================
   04 · Customer proof: one quote, set large in the serif
   ============================================================= */
.proof-in { display: grid; grid-template-columns: minmax(0, 1fr); }
.proof figure { max-width: 1000px; }
.home .proof { padding-block: clamp(64px, 8vw, 112px); }
.proof blockquote { font-family: var(--font-serif); font-weight: 400; font-size: clamp(25px, 2.9vw, 40px); line-height: 1.22; letter-spacing: -0.015em; color: var(--tp-ink); text-wrap: pretty; }
.proof blockquote em { color: var(--tp-acc); }
.proof blockquote::before { content: '“'; display: block; font-size: 1.4em; line-height: 0.6; color: var(--tp-acc); margin-bottom: 14px; }
.proof figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--tp-line); }
.who { display: flex; align-items: center; gap: 14px; }

.who strong { display: block; font-weight: 500; color: var(--tp-ink); font-size: 16px; }
.who strong + span { display: block; margin-top: 2px; font-size: 14.5px; color: var(--tp-dim); }
.who-logo .on-dark { display: none; }
.who-logo { margin-inline-start: auto; opacity: 0.85; transition: opacity 0.3s; }
.who-logo:hover { opacity: 1; }
.who-logo img { height: 24px; width: auto; }
@media (max-width: 880px) { .who-logo { margin-inline-start: 0; } }

/* =============================================================
   05 · How it works: stages on one rail, a gate between each (also used, with three stages, on inner pages)
   ============================================================= */
.how { position: relative; overflow: hidden; }
.gw { --rail: 56px; --gw-v: 0; position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.gw::before, .gw-fill { content: ''; position: absolute; inset-inline-start: 0; top: var(--rail); height: 1px; }
.gw::before { inset-inline-end: 0; background: var(--tp-line); }
.gw-fill { width: var(--fill, 0px); background: var(--tp-acc, var(--acc)); transition: width 0.85s linear, opacity 0.5s; }
.gw-stage { position: relative; display: flex; flex-direction: column; padding-top: calc(var(--rail) + 34px); }
.gw-node {
  position: absolute; z-index: 1; top: calc(var(--rail) - 14px); inset-inline-start: calc(50% - 14px); width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--tp-bg); border: 1px solid var(--tp-line); box-shadow: 0 0 0 5px var(--tp-bg);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--tp-mute); transition: background 0.4s, border-color 0.4s, color 0.4s, box-shadow 0.4s;
}
.gw-stage.is-lit .gw-node { background: var(--tp-acc, var(--acc-hi)); border-color: var(--tp-acc, var(--acc-hi)); color: #fff; box-shadow: 0 0 0 5px var(--tp-bg); }
html[data-theme="dark"] [data-dark="ink"] .gw-stage.is-lit .gw-node { color: var(--ink); }
.gw-gate { position: absolute; z-index: 1; top: 0; inset-inline-end: -91px; width: 160px; height: calc(var(--rail) + 10px); display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none; }

.gw-gl { font-size: 12.5px; color: var(--tp-mute); margin-top: 4px; white-space: nowrap; }
.gw-gate.is-lit .gw-gl { animation: gwGl 0.4s ease 0.7s both; }
@keyframes gwGl { from { color: var(--tp-mute); } to { color: var(--tp-ok); } }
.gw-dia { position: absolute; top: calc(var(--rail) - 9px); left: calc(50% - 9px); width: 18px; height: 18px; display: grid; place-items: center; transform: rotate(45deg); border-radius: 3px;
  background: var(--tp-bg); border: 1px solid var(--tp-line); box-shadow: 0 0 0 5px var(--tp-bg); }
.gw-dia::after { content: '✓'; transform: rotate(-45deg); font-size: 10px; font-weight: 700; line-height: 1; color: var(--ink); opacity: 0; }
.gw-gate.is-lit .gw-dia { animation: gwGate 1.3s forwards; }
.gw-gate.is-lit .gw-dia::after { animation: gwTick 1.3s forwards; }
@keyframes gwGate {
  0% { background: var(--tp-bg); border-color: var(--tp-acc); }
  30%, 45% { background: rgba(11,82,208,0.18); border-color: var(--tp-acc); }
  70%, 100% { background: #5dd2a6; border-color: #5dd2a6; }
}
@keyframes gwTick { 0%, 62% { opacity: 0; } 78%, 100% { opacity: 1; } }
.gw-card { flex: 1; display: flex; flex-direction: column; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 2vw, 26px);
  box-shadow: 0 30px 60px -32px var(--tp-lift); transition: border-color 0.45s, box-shadow 0.45s; }
.gw-stage.is-lit .gw-card { border-color: rgba(var(--acc-hi-rgb),0.42); }
.gw-verb { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--acc-hi); }

.gw-card h3 { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.22; letter-spacing: -0.015em; margin: 0 0 10px; }
.gw-card p { font-size: 14.5px; line-height: 1.55; color: var(--text-mute); margin: 0 0 20px; }

@media (max-width: 1080px) {
  .gw { --gw-v: 1; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .gw::before { top: 14px; bottom: 14px; inset-inline-start: 14px; inset-inline-end: auto; width: 1px; height: auto; }
  .gw-fill { top: 0; inset-inline-start: 14px; width: 1px; height: var(--fill, 0px); transition: height 0.85s linear, opacity 0.5s; background: var(--tp-acc, var(--acc)); }
  .gw-stage { padding-top: 0; padding-inline-start: 50px; }
  .gw-node { top: 18px; inset-inline-start: 0; }
  .gw-gate { position: relative; top: auto; inset-inline-end: auto; width: auto; height: auto; flex-direction: row; align-items: baseline; gap: 12px; padding: 24px 0; text-align: start; }
  .gw-gl { margin-top: 0; }
  .gw-dia { top: calc(50% - 9px); left: auto; inset-inline-start: -45px; }
}
@media (max-width: 1080px) and (min-width: 640px) {
  .gw-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 28px; align-content: start; grid-template-areas: "vis verb" "vis h3" "vis p" "vis tags"; }
  .gw-verb { grid-area: verb; }  .gw-card h3 { grid-area: h3; margin-top: 10px; } .gw-card p { grid-area: p; } 
}
@media (max-width: 639px) { .gw-card h3 { margin-top: 0; } .gw-gate { padding: 18px 0; } }
.home .gw-card h3 { font-size: clamp(20px, 1.7vw, 24px); margin-top: 12px; }
.home .gw-card p { font-size: 15.5px; margin-bottom: 0; }
html[data-theme="light"] .home .gw-card, html[data-theme="light"] .home .gw-stage.is-lit .gw-card { background: transparent; border: 0; box-shadow: none; padding: 0 16px 0 0; }
@media (max-width: 1080px) and (min-width: 640px) { .home .gw-card { display: flex; flex-direction: column; } }

/* =============================================================
   06 · What you get: one row of tinted tiles (after Goodfire's pillar rows), each ending in a crop of the real app
   ============================================================= */
.pillars { position: relative; }

.pil-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pil-cards:focus-visible { outline-offset: -2px; }
.pc { position: relative; display: flex; flex-direction: column; min-height: 470px; padding: 22px 22px 0; border-radius: 4px; background: var(--pc); color: #1d272a; overflow: hidden; }
.pc :is(h3, h4) { font-family: var(--font-sans); font-weight: 500; font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; color: #1d272a; margin-bottom: 10px; }
.pc p { font-size: 14.5px; line-height: 1.55; color: #26313a; }
.pc-art { position: relative; margin: auto -22px 0 0; margin-top: auto; height: 210px; border-radius: var(--r-sq) 0 0 0; overflow: hidden; background: #0b1017;
  box-shadow: -16px -10px 40px -24px rgba(11,17,24,0.6); transform: translate(10px, 8px); }
.pc-art img { width: 100%; height: 100%; object-fit: cover; object-position: var(--op, 50% 50%); }
.pc-art.light { background: #eef1f6; }

.pc > p { margin-bottom: 0; }
.pil-cards.pil-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pil-4 .pc { min-height: 0; }
.pil-4 .pc > p { margin-bottom: 30px; }
.pil-4 .pc-art { height: 240px; }
@media (max-width: 1100px) and (min-width: 901px) { .pil-cards.pil-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 900px) {
  .pil-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px; scroll-padding-inline: var(--gutter); }
  .pil-cards::-webkit-scrollbar { display: none; }
  .pc { flex: 0 0 min(300px, 80vw); scroll-snap-align: start; min-height: 440px; }
}

/* anything animated pauses while off screen */
.is-offscreen *, .is-offscreen { animation-play-state: paused !important; }

/* =============================================================
   02 · Use cases: one sliding row of builds, image first
   ============================================================= */
.uses { background: var(--tp-bg, var(--bg)); }
.sel-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; margin: -6px -6px 0; padding: 6px 6px 8px; scroll-padding-inline: 6px; }
.sel-row::-webkit-scrollbar { display: none; }
.sel-row > .sel-t { flex: 0 0 calc((100% - 2 * 14px) / 3); scroll-snap-align: start; }
.sel-nav { display: flex; align-items: center; gap: 10px; margin-top: 18px; }

.sel-nav[hidden] { display: none; }
.sel-bar { position: relative; flex: 1; height: 2px; margin-inline-end: 12px; border-radius: 2px; background: var(--line); overflow: hidden; }
.sel-bar i { position: absolute; inset-block: 0; inline-size: calc(var(--w, 0.5) * 100%); inset-inline-start: calc(var(--p, 0) * (100% - var(--w, 0.5) * 100%)); border-radius: 2px; background: var(--acc-hi); }
.sel-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text); font-size: 16px; line-height: 1; transition: border-color 0.25s, background-color 0.25s, color 0.25s, opacity 0.25s; }
.sel-btn:hover:not([aria-disabled="true"]) { border-color: var(--acc-hi); background: rgba(var(--acc-rgb),0.14); color: var(--acc-hi); }
.sel-btn[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.sel-t { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease); }
.sel-t:hover { border-color: rgba(var(--acc-hi-rgb),0.5); transform: translateY(-3px); }
.home .sel-t { background: none; border: 0; border-radius: 0; overflow: visible; }
.home .sel-t:hover { transform: none; }
.home .sel-v { border: 1px solid var(--line); border-radius: 10px; }
.home .sel-b { padding: 18px 8px 0 0; gap: 8px; }
.home .sel-n { font-size: 20px; }
.home .sel-n::after { content: '\2192'; content: '\2192' / ''; display: inline-block; margin-inline-start: 8px; color: var(--text-dim); transition: transform 0.3s var(--ease), color 0.3s; }
.home .sel-t:hover .sel-n::after { transform: translateX(4px); color: var(--acc-hi); }
.home .sel-go { display: none; }
.uses-all { margin-top: 22px; }
.sel-v { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0a0f15; border-bottom: 1px solid var(--line); }
.sel-v img { width: 100%; height: 100%; object-fit: cover; object-position: var(--op, 50% 50%); transition: transform 0.8s var(--ease-out); }
.sel-t:hover .sel-v img { transform: scale(1.04); }
.sel-b { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 20px; flex: 1; }

.sel-n { font-family: var(--font-display); font-weight: 500; font-size: 19px; line-height: 1.25; letter-spacing: -0.015em; }
.sel-d { font-size: 14px; line-height: 1.55; color: var(--text-mute); }

.sel-go { position: absolute; inset-inline-end: 16px; bottom: 18px; font-style: normal; font-size: 15px; color: var(--acc-hi); opacity: 0.75; transition: opacity 0.3s, transform 0.3s var(--ease); }
.sel-t:hover .sel-go { opacity: 1; transform: translateX(3px); }

@media (max-width: 1100px) {
  .sel-row { gap: 12px; margin-inline: calc(-1 * var(--gutter)); padding: 6px var(--gutter) 8px; scroll-padding-inline: var(--gutter); }
  .sel-row > .sel-t { flex: 0 0 min(320px, 78vw); }
}

/* =============================================================
   08 · Who it's for: a ruled list (after Goodfire)
   ============================================================= */
.who-in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 100px); align-items: center; }
.who-copy .lede { margin-top: 22px; font-size: clamp(17px, 1.4vw, 20px); }
.who-ctas { display: flex; flex-wrap: wrap; align-items: center; column-gap: 28px; row-gap: 18px; margin-top: 32px; }
.who-list { border-top: 1px solid var(--tp-line); }
.who-list li { border-bottom: 1px solid var(--tp-line); }
.who-list a { display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 20px; align-items: center; padding: 20px 4px; color: var(--tp-ink); transition: background 0.3s, padding 0.4s var(--ease); }
.who-list a:hover { background: var(--tp-hover, rgba(255,255,255,0.55)); padding-inline: 12px; }
.wl-t { font-family: var(--font-sans); font-weight: 500; font-size: clamp(18px, 1.6vw, 22px); letter-spacing: -0.012em; line-height: 1.25; }
.wl-t span { display: block; margin-top: 4px; font-weight: 400; font-size: 14px; line-height: 1.45; letter-spacing: 0; color: var(--tp-mute); }
.who-list i { font-style: normal; font-size: 22px; color: var(--tp-ink); transition: transform 0.3s var(--ease), color 0.3s; }
.who-list a:hover i { transform: translateX(4px); color: var(--tp-acc); }
@media (max-width: 980px) { .who-in { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .who-list a { grid-template-columns: minmax(0, 1fr) 20px; gap: 14px; } }

/* =============================================================
   07 · Take the code with you: a ruled comparison
   ============================================================= */
.own { background: var(--bg); border-top: 1px solid var(--line); overflow: hidden; }
.own .container { position: relative; z-index: 1; }
.spec { border-top: 1px solid var(--line-2); }
.spec-row { display: grid; grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr) minmax(0, 1.15fr); border-bottom: 1px solid var(--line); }
.spec-row > * { padding: 22px 22px 22px 0; }
.spec-h { font-size: 14px; color: var(--text-dim); }
.spec-h > * { padding-block: 14px; }
.spec-h .us { color: var(--text); font-weight: 500; }
.spec-k { font-size: 16px; font-weight: 500; color: var(--text); }
.spec-them { color: var(--text-mute); font-size: 16px; line-height: 1.5; }
.spec-us { color: var(--text); font-size: 16px; line-height: 1.5; display: flex; gap: 10px; }
.spec-us::before { content: '✓'; color: var(--signal); font-weight: 700; }
.own-note { margin-top: 24px; font-size: 15px; color: var(--text-mute); }
.own-note a { color: var(--acc-hi); border-bottom: 1px solid rgba(var(--acc-hi-rgb),0.4); }
.own-note a:hover { border-color: var(--acc-hi); }
@media (max-width: 760px) {
  .spec-row { grid-template-columns: 1fr; }
  .spec-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .spec-them::before { content: 'Typical platforms'; display: block; margin-bottom: 4px; font: 400 13px/1.4 var(--font-sans); color: var(--text-dim); }
  .spec-us { flex-wrap: wrap; row-gap: 4px; }
  .spec-us::before { content: '✓ QMerse'; flex: 0 0 100%; font: 500 13px/1.4 var(--font-sans); color: var(--signal); }
  .spec-k { padding: 18px 0 4px; }
  .spec-them { padding: 6px 0 10px; font-size: 15px; }
  .spec-us { padding: 6px 0 18px; }
}

/* =============================================================
   09 · Common questions: ruled rows, each ending in a plain +
   ============================================================= */
.faq-in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.faq-list { border-top: 1px solid var(--tp-line); }
.faq-list details { border-bottom: 1px solid var(--tp-line); }
.faq-list summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 20px; align-items: center; padding: 21px 0;
  font-family: var(--font-sans); font-weight: 500; font-size: clamp(18px, 1.5vw, 21px); letter-spacing: -0.012em; line-height: 1.3; color: var(--tp-ink); transition: color 0.3s; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--tp-acc); }
.faq-list summary .pm { width: 20px; height: 20px; position: relative; color: var(--tp-ink); transition: color 0.3s; }
.faq-list summary .pm::before, .faq-list summary .pm::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; margin: -0.75px 0 0 -7px; background: currentColor; transition: transform 0.3s var(--ease); }
.faq-list summary .pm::after { transform: rotate(90deg); }
.faq-list details[open] summary .pm { color: var(--tp-acc); }
.faq-list details[open] summary .pm::after { transform: rotate(0deg); }
.faq-a { padding: 0 50px 24px 0; color: var(--tp-mute); font-size: 16px; line-height: 1.65; }
.faq-a a { color: var(--tp-acc); border-bottom: 1px solid currentColor; }
.faq-a a:hover { border-color: var(--tp-acc); }
details[open] .faq-a { animation: faqIn 0.45s var(--ease-out) both; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.faq-more { margin-top: 28px; }
@media (max-width: 880px) { .faq-in { grid-template-columns: 1fr; } .faq-a { padding-right: 0; } }

/* =============================================================
   10 · Closing call: centred on grid paper, the QMerse mark above (after Goodfire)
   ============================================================= */
.cta { position: relative; overflow: hidden; padding: clamp(64px, 8.5vw, 120px) 0; text-align: center; border-top: 1px solid var(--tp-line); }
.grid-paper { background-image: linear-gradient(var(--tp-grid) 1px, transparent 1px), linear-gradient(90deg, var(--tp-grid) 1px, transparent 1px); background-size: 32px 32px; }
.cta .container { position: relative; z-index: 1; }
/* The real QMerse mark, with its brand gradient (not a single-colour silhouette) */
.cta-mark { display: block; width: 56px; height: 56px; margin: 0 auto 26px; background: url(../assets/icons/qmerse-icon-mark-112.png) center / contain no-repeat; }
.cta .section-label { justify-content: center; }
.cta h2 { font-size: clamp(38px, 5vw, 70px); line-height: 1.02; margin: 0 auto; max-width: 13em; }
.cta .lede { margin: 22px auto 0; max-width: 32em; }
.cta-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (max-width: 480px) { .cta-actions { flex-direction: column; align-items: stretch; max-width: 340px; margin-inline: auto; } .cta-actions .btn { justify-content: center; } }
.cta h2 em { color: var(--tp-acc); }
.cta-alt { margin-top: 28px; font-size: 15px; line-height: 1.5; color: var(--tp-mute); }
.cta-alt a { color: var(--tp-acc); border-bottom: 1px solid currentColor; margin-inline-start: 6px; white-space: nowrap; }
.cta-alt a:hover { border-color: var(--tp-acc); }
@media (max-width: 480px) { .cta h2 { font-size: 34px; } }

/* =============================================================
   Inner pages: page hero (breadcrumb, serif title, lede) and the quiet "up next" row
   ============================================================= */
.page-hero { position: relative; overflow: hidden; isolation: isolate; background: var(--bg); border-bottom: 1px solid var(--line);
  padding: clamp(44px, 6vw, 88px) 0 clamp(48px, 6.5vw, 96px); }
.page-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(80% 90% at 20% 0%, #000 10%, transparent 70%); mask-image: radial-gradient(80% 90% at 20% 0%, #000 10%, transparent 70%); }
.page-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 70% at 90% 10%, rgba(var(--acc-rgb),0.1), transparent 60%); }
html[data-theme="light"] .page-hero::after { display: none; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: clamp(28px, 4vw, 44px);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.breadcrumb a { color: var(--text-mute); padding-block: 3px; transition: color 0.3s var(--ease); }
.breadcrumb a:hover { color: var(--acc-hi); }
.breadcrumb .sep { color: var(--acc); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr); gap: clamp(24px, 5vw, 80px); align-items: end; }
.page-hero h1 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(40px, 5.2vw, 74px); line-height: 1.02; letter-spacing: -0.025em; margin: 0; }
.page-hero h1 em { color: var(--acc-hi); }
.page-hero .lede { margin: 0; font-size: clamp(17px, 1.4vw, 20px); text-wrap: pretty; }
.page-hero .hero-ctas { margin-top: 26px; }
@media (max-width: 880px) { .page-hero-grid { grid-template-columns: 1fr; align-items: start; } }
@media (max-width: 480px) { .page-hero h1 { font-size: 38px; } }

.up-next { display: block; position: relative; overflow: hidden; color: var(--text); background: var(--surface); border-top: 1px solid var(--line); }
.up-next::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--acc-rgb),0.18), rgba(var(--acc-rgb),0.04));
  transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease); }
.up-next:hover::before, .up-next:focus-visible::before { transform: scaleX(1); }
.up-next:focus-visible { outline: 2px solid var(--acc-hi); outline-offset: -4px; }
.un-in { position: relative; display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); padding-block: clamp(26px, 3.4vw, 44px); }
.un-k { flex: none; font-size: 14.5px; line-height: 1.4; color: var(--text-dim); }
.un-t { flex: 1; min-width: 0; font-family: var(--font-serif); font-weight: 400; font-size: clamp(24px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -0.018em; text-wrap: balance; }
.un-t em { color: var(--text-dim); transition: color 0.4s; }
.up-next:hover .un-t em { color: var(--acc-hi); }
.un-go { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); font-size: 19px; transition: background 0.4s, border-color 0.4s, color 0.4s, transform 0.4s var(--ease); }
.up-next:hover .un-go { background: var(--acc); border-color: var(--acc); color: var(--on-accent); transform: translateX(6px); }
@media (max-width: 640px) { .un-in { flex-wrap: wrap; gap: 10px 16px; } .un-k { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .up-next::before, .un-go { transition: none; } }

/* ---- The rail with three stages ---- */
.gw.gw-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1080px) { .gw.gw-3 { grid-template-columns: minmax(0, 1fr); } }

/* =============================================================
   Forms (Netlify): labelled fields, errors written in when a field is checked, a status line after sending.
   Colours come from the palette, or from the paper tones when the form sits on a [data-tone] section.
   ============================================================= */
.form-card { --f-bg: var(--surface); --f-field: var(--bg); --f-ink: var(--text); --f-mute: var(--text-mute); --f-dim: var(--text-dim); --f-line: var(--line-2);
  --f-err: #ff9a8b; --f-ok: var(--signal);
  padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--f-bg); color: var(--f-ink); }
html[data-theme="light"] .form-card { --f-err: #b42318; }
[data-tone] .form-card { --f-bg: #ffffff; --f-field: #ffffff; --f-ink: var(--tp-ink); --f-mute: var(--tp-mute); --f-dim: var(--tp-dim); --f-line: var(--tp-line);
  --f-err: #b42318; --f-ok: var(--tp-ok); border-color: var(--tp-line); box-shadow: 0 30px 60px -40px var(--tp-lift); }
.form-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.form-req { font-size: 13.5px; color: var(--f-dim); }
.fm-n { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--f-dim); }
.req { color: var(--acc-hi); }
[data-tone] .req { color: var(--tp-acc); }
.form-meter { display: inline-flex; align-items: center; gap: 10px; }
.fm-bars { display: inline-flex; gap: 4px; }
.fm-bars i { width: 18px; height: 4px; border-radius: 2px; background: var(--f-line); transition: background-color 0.3s; }
.fm-bars i.on { background: var(--acc); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fg { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fg.full { grid-column: 1 / -1; }
.fg label { font: 500 14.5px/1.35 var(--font-sans); letter-spacing: -0.005em; color: var(--f-ink); }
.fg input, .fg select, .fg textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--f-line); border-radius: var(--radius); background-color: var(--f-field); color: var(--f-ink);
  font: 400 16px/1.45 var(--font-sans); transition: border-color 0.2s, box-shadow 0.2s;
}
.fg textarea { resize: vertical; min-height: 128px; }
.fg select { appearance: none; -webkit-appearance: none; padding-inline-end: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
.fg input::placeholder, .fg textarea::placeholder { color: var(--f-dim); opacity: 1; }
.fg :is(input, select, textarea):hover { border-color: var(--acc); }
.fg :is(input, select, textarea):focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(var(--acc-rgb),0.24); }
.fg.has-error :is(input, select, textarea) { border-color: var(--f-err); }
.fg .err { font-size: 13.5px; line-height: 1.4; color: var(--f-err); }
.fg .err:empty { display: none; }
.form-go { width: 100%; justify-content: center; margin-top: 24px; }
.form-go:disabled { opacity: 0.7; cursor: progress; }
.form-status { margin-top: 14px; font-size: 15px; line-height: 1.5; color: var(--f-mute); }
.form-status:empty { display: none; }
.form-status.ok { color: var(--f-ok); }
.form-status.bad { color: var(--f-err); }
.form-status a { color: inherit; border-bottom: 1px solid currentColor; }
html:not(.js) .form-meter { display: none; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---- Footer ---- */
html[data-theme="light"] .site-footer :focus-visible { outline-color: var(--ft-text); }
.site-footer { background: var(--ft-bg); border-top: 1px solid var(--ft-line); padding: clamp(44px, 5vw, 72px) 0 28px; color: var(--ft-mute); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 50px; margin-bottom: 44px; }
.footer-brand .ft-logo { height: 34px; width: auto; margin-bottom: 22px; }
.footer-brand p { font-size: 14px; max-width: 23.8em; color: var(--ft-mute); }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ft-line); display: grid; place-items: center; color: var(--ft-mute); transition: border-color 0.3s, color 0.3s; }
.footer-social a:hover { border-color: var(--ft-acc); color: var(--ft-acc); }
.footer-social svg { width: 15px; height: 15px; fill: currentColor; }
.footer-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ft-dim); margin-bottom: 22px; font-weight: 500; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-size: 14px; color: var(--ft-text); display: inline-flex; align-items: center; gap: 8px; min-height: 24px; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--ft-acc); text-decoration: underline; text-underline-offset: 4px; }
.footer-col a::after { content: '→'; font-family: var(--font-sans); opacity: 0; transform: translateX(-6px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.footer-col a[target="_blank"]::after { content: '↗'; }
.footer-col a:hover::after { opacity: 1; transform: none; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: 26px; border-top: 1px solid var(--ft-line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ft-dim); }
.footer-bottom a { color: var(--ft-mute); white-space: nowrap; transition: color 0.3s var(--ease); }
.footer-bottom a:hover { color: var(--ft-acc); }
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-inner { height: 64px; }
  .logo img { height: 25px; }
  .menu-btn, .hdr-link { padding: 9px 12px; font-size: 14px; }
  .menu-btn .label { display: none; }
  .hdr-link.hdr-quiet, .header-tools .pal { display: none; }
  .hdr-link.hdr-go { padding: 9px 13px; font-size: 13.5px; }
  .header-tools { gap: 6px; }
  .nav-top { height: 64px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Reduced motion: calm, not off. Content still fades in and builds in sequence; what goes is travel and looping. */
@media (max-width: 400px) { .logo img { height: 22px; } }
/* the narrowest phones keep Start building free in the header: a smaller logo and tighter padding make room */
@media (max-width: 359px) {
  .logo img { height: 19px; }
  .header-tools { gap: 2px; }
  .hdr-link.hdr-go { padding: 8px 10px; font-size: 13px; }
  .menu-btn { padding: 8px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .reveal { transform: none !important; transition-property: opacity !important; }
  .nav-overlay { transform: none; opacity: 0; transition: opacity 0.3s ease, visibility 0s linear 0.3s; }
  .nav-overlay.open { opacity: 1; transition: opacity 0.3s ease; }
  .hero-slogan.is-split .sl-in { animation-name: rmFade; animation-duration: 1.4s; }
  .slogan-anim .hero-side { animation-name: rmFade; }
  .hs::after { animation: none !important; }
  
  .card:hover, .sel-t:hover, .sel-t:hover .sel-v img { transform: none; }
  .shot-zoom { transition: none; }
}

/* ---- Light palette: a few surfaces that differ ---- */
html[data-theme="light"] .sel-v { background: #eef2f7; }
html[data-theme="light"] .tour-prog i, html[data-theme="light"] .rt-bar i { background: var(--acc); }

/* ---------- Hero refinements ----------
   The right column explains the product and carries the primary call to action;
   the constellation canvas is gone (it ran behind the slogan); the tour shows one
   point at a time; the app follows the header palette, so its own switch is hidden. */
.hero-side { max-width: 440px; }
.hero-lede { margin: 0 0 22px; font-size: clamp(16.5px, 1.25vw, 18.5px); line-height: 1.55; color: var(--text-dim); text-wrap: pretty; }
.hero-side .hero-note { margin-top: 16px; font-size: 13.5px; }
@media (min-width: 981px) { .hero-top { grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); } }
.hs:not([aria-current="step"]), html[data-theme="light"] .hs:not([aria-current="step"]) { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; opacity: 0.45; box-shadow: none; }
.hs:not([aria-current="step"]):hover, .hs:not([aria-current="step"]):focus-visible { width: 30px; height: 30px; margin: -15px 0 0 -15px; opacity: 1; }
.tour .seg { display: none; }

/* ---------- Hero, split: copy on the left, a drawn workflow with one step opened on the right ---------- */
@media (min-width: 981px) {
  .hero-top.hero-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .hero-split .hero-slogan { font-size: clamp(40px, 4.1vw, 62px); }
}
.hero-split .hero-side { max-width: 480px; padding-bottom: 0; margin-top: 34px; }
.hero-fig { margin: 0; width: 100%; max-width: 600px; justify-self: end; background: var(--bg); border: 1px solid var(--text);
  box-shadow: 10px 10px 0 rgba(var(--acc-rgb), 0.08); }
.hf-bar { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-mute); }
.hf-live { color: var(--signal); }
.hero-fig svg { display: block; width: 100%; height: auto; background: radial-gradient(var(--line) 1px, transparent 1px) 0 0 / 18px 18px; }
.hf-n { fill: var(--bg); stroke: var(--line-2); stroke-width: 1; }
.hf-ac-box { fill: rgba(var(--acc-rgb), 0.1); stroke: var(--acc-hi); stroke-width: 1.2; }
.hf-ok-box { fill: rgba(var(--acc-rgb), 0.04); stroke: var(--signal); stroke-width: 1.2; stroke-dasharray: 4 3; }
.hf-t { font-family: var(--font-mono); font-size: 10.5px; fill: var(--text); letter-spacing: 0.04em; }
.hf-s { font-family: var(--font-mono); font-size: 9px; fill: var(--text-mute); letter-spacing: 0.04em; }
.hf-ac { fill: var(--acc-hi); } .hf-ok { fill: var(--signal); }
.hf-w { fill: none; stroke: var(--line-2); stroke-width: 1; }
.hf-f { fill: none; stroke: var(--acc-hi); stroke-width: 1.3; stroke-dasharray: 4 7; animation: hfFlow 1.6s linear infinite; }
@keyframes hfFlow { to { stroke-dashoffset: -22; } }
.hf-acc-stroke { stroke: var(--acc-hi); } .hf-acc-fill { fill: var(--acc-hi); }
.hf-panel { fill: var(--bg); } .hf-panel-head { fill: rgba(var(--acc-rgb), 0.1); } .hf-rule { stroke: var(--line); }
@media (max-width: 980px) { .hero-fig { justify-self: stretch; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .hf-f { animation: none; } }
html[data-theme="dark"] .hero-fig { border-color: var(--line-2); box-shadow: none; }
/* Hero diagram run: wires in QMerse orange, as on the canvas; with JS the running node lights up in turn */
.hero-fig { --hf-run: #f26b1d; --hf-run-rgb: 242,107,29; }
.hero-fig .hf-w { stroke: rgba(var(--hf-run-rgb), 0.5); }
.hero-fig .hf-f { stroke: var(--hf-run); }
.hero-fig .hf-later { opacity: 0.5; }
.hero-fig:not(.hf-anim) .hf-x { display: none; }
.hf-anim .hf-f { opacity: 0; transition: opacity 0.3s; }
.hf-anim .hf-f.is-run { opacity: 1; }
.hf-anim .hf-node { opacity: 0.45; transition: opacity 0.4s; }
.hf-anim .hf-node.is-run, .hf-anim .hf-node.is-done { opacity: 1; }
.hf-anim .hf-node rect { transition: stroke 0.3s, fill 0.3s; }
.hf-anim .hf-node.is-run rect:not(.hf-halo) { stroke: var(--hf-run); stroke-width: 1.6; stroke-dasharray: none; fill: rgba(var(--hf-run-rgb), 0.08); }
.hf-anim .hf-node.is-run .hf-halo { stroke: var(--hf-run); }
.hf-anim .hf-node.is-run { animation: hfPulse 1.2s ease-in-out infinite; }
@keyframes hfPulse { 50% { filter: drop-shadow(0 0 6px rgba(var(--hf-run-rgb), 0.55)); } }
/* Inspector rows: the agent's reasoning unboxes row by row (--d staggers them) while the agent runs, then stays */
.hf-anim .hf-row { opacity: 0; transform: translateY(5px); transition: opacity 0.45s, transform 0.45s; }
.hf-anim .hf-row.is-run, .hf-anim .hf-row.is-done { opacity: 1; transform: none; }
.hf-anim .hf-row.is-run { transition-delay: var(--d, 0s); }
/* Hero diagram: a vertical, readable version on phones */
.hero-fig .hf-narrow { display: none; }
@media (max-width: 640px) { .hero-fig .hf-wide { display: none; } .hero-fig .hf-narrow { display: block; } .hf-run { display: none; } .hero-fig { margin-top: 32px; box-shadow: 6px 6px 0 rgba(var(--acc-rgb), 0.08); } }

/* ---------- Hero proof strip: logo + one short verbatim quote, under the hero copy ---------- */
.hero-proof { margin: clamp(36px, 4vw, 56px) 0 0; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 40px; align-items: center; }
.hp-k { font-size: 14px; color: var(--text-dim); white-space: nowrap; }
.hp-logo img { height: 24px; width: auto; display: block; }
.hp-q { margin: 0; padding-left: 40px; border-left: 1px solid var(--line); }
.hp-q p { margin: 0; font-family: var(--font-serif); font-size: clamp(16px, 1.25vw, 18.5px); line-height: 1.5; color: var(--text); text-wrap: pretty; }
.hp-q figcaption { margin-top: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--text-mute); }
@media (max-width: 760px) { .hero-proof { grid-template-columns: auto 1fr; gap: 14px 20px; } .hp-q { grid-column: 1 / -1; padding-left: 0; border-left: 0; } }
.hp-logo .on-dark { display: none; }
html[data-theme="dark"] .hp-logo .on-light { display: none; }
html[data-theme="dark"] .hp-logo .on-dark { display: block; }

/* ---------- Canvas tour, desktop: every stop listed beside a zoomed screenshot (js/tour-steps.js) ---------- */
.tour-head { margin-top: clamp(72px, 8vw, 120px); margin-bottom: 0; }
.ts-side { display: none; }
.ts-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ts-list li { border-bottom: 1px solid var(--line); }
.ts-btn { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 10px; width: 100%; padding: 13px 4px; text-align: left;
  background: none; border: 0; cursor: pointer; font: inherit; color: inherit; }
.ts-n { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; padding-top: 4px; color: var(--text-mute); }
.ts-t { display: block; font-family: var(--font-sans); font-weight: 500; font-size: 15.5px; letter-spacing: -0.01em; color: var(--text-dim); transition: color 0.25s; }
.ts-d { display: none; margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: var(--text-mute); }
.ts-btn:hover .ts-t, li.on .ts-t { color: var(--text); }
li.on .ts-n { color: var(--acc-hi); }
li.on .ts-d { display: block; animation: rmFade 0.4s ease both; }
.ts-prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; }
.ts-prog i { display: block; height: 100%; width: 0; background: var(--acc-hi); }
li.on .ts-prog i { width: 100%; opacity: 0.35; }
.ts-playing li.on .ts-prog i { opacity: 1; animation: tsProg var(--ts-ms, 5200ms) linear both; }
@keyframes tsProg { from { width: 0; } to { width: 100%; } }
.ts-play { margin-top: 18px; align-self: flex-start; }
@media (min-width: 981px) {
  .stage.ts-on { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: clamp(28px, 3.4vw, 52px); align-items: start; }
  .stage.ts-on .ts-side { display: flex; flex-direction: column; }
  .stage.ts-on .tour { display: none; }
  .stage.ts-on .win { box-shadow: 0 30px 70px -44px var(--shadow); }
  .stage.ts-on .shot-spot { display: none; }
  .stage.ts-on .hs:not([aria-current="step"]) { display: none; }
}
@media (max-width: 980px) { .tour-head { margin-bottom: 0; } }

/* ---------- How it works: four stages, each with a drawn diagram (replaces the gated rail) ---------- */
.hw { list-style: none; margin: clamp(40px, 4.5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--tp-ink); }
.hw-step { padding: 26px 24px 8px 0; }
.hw-step + .hw-step { padding-left: 24px; border-left: 1px solid var(--tp-line); }
.hw-k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tp-acc); }
.hw-fig { margin: 18px 0 22px; border: 1px solid var(--tp-line); background: rgba(255,255,255,0.55); }
.hw-fig svg { display: block; width: 100%; height: auto; }
.hw-step h3 { font-family: var(--font-sans); font-weight: 500; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.25; letter-spacing: -0.012em; margin: 0 0 8px; color: var(--tp-ink); }
.hw-step p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--tp-mute); }
.hw .hf-n { fill: #fff; stroke: var(--tp-line); }
.hw .hf-ac-box { fill: rgba(var(--acc-rgb), 0.08); stroke: var(--tp-acc); }
.hw .hf-ok-box { fill: rgba(15,110,78,0.06); stroke: var(--tp-ok); }
.hw .hf-t { fill: var(--tp-ink); } .hw .hf-s { fill: var(--tp-mute); }
.hw .hf-ac { fill: var(--tp-acc); } .hw .hf-ok { fill: var(--tp-ok); }
.hw .hf-w { stroke: var(--tp-line); } .hw .hf-f { stroke: var(--tp-acc); } .hw .hf-rule { stroke: var(--tp-line); }
@media (max-width: 1000px) { .hw { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hw-step:nth-child(3) { padding-left: 0; border-left: 0; } .hw-step:nth-child(n+3) { border-top: 1px solid var(--tp-line); } }
@media (max-width: 560px) { .hw { grid-template-columns: 1fr; } .hw-step + .hw-step { padding-left: 0; border-left: 0; border-top: 1px solid var(--tp-line); } }

/* ---------- No lock-in: a dark band in both palettes, copy left and the export drawn right ---------- */
.own-dark { --d-bg: #0a1322; --d-panel: #101b2e; --d-line: rgba(226,232,240,0.12); --d-text: #e6ebf2; --d-dim: #b4bfcf; --d-mute: #8c98ab; --d-acc: #7fb0ff; --d-ok: #5dd2a6;
  background: var(--d-bg); color: var(--d-text); border-top: 0; }
.own-in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(36px, 5vw, 80px); align-items: center; }
.own-dark .section-label { color: var(--d-acc); } .own-dark .section-label::before { background: var(--d-acc); }
.own-dark h2 { color: #fff; } .own-dark h2 em { color: var(--d-acc); }
.own-dark .lede { color: var(--d-dim); margin-top: 20px; }
.own-list { margin: 26px 0 0; border-top: 1px solid var(--d-line); }
.own-list div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--d-line); }
.own-list dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--d-mute); padding-top: 3px; }
.own-list dd { margin: 0; font-size: 15px; line-height: 1.5; color: var(--d-text); }
.own-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.own-dark .btn-ghost { color: var(--d-text); border-color: rgba(226,232,240,0.3); }
.own-dark .btn-ghost:hover { background: #fff; color: var(--d-bg); border-color: #fff; }
.own-panel { margin: 0; background: var(--d-panel); border: 1px solid var(--d-line); border-radius: 12px; overflow: hidden; }
.op-bar, .op-foot { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--d-mute); }
.op-bar { border-bottom: 1px solid var(--d-line); } .op-foot { border-top: 1px solid var(--d-line); }
.op-live { color: var(--d-ok); }
.own-panel svg { display: block; width: 100%; height: auto; }
.op-n { fill: #0f1a2c; stroke: rgba(226,232,240,0.22); }
.op-ac { fill: rgba(127,176,255,0.1); stroke: var(--d-acc); stroke-width: 1.2; }
.op-ok { fill: rgba(93,210,166,0.08); stroke: var(--d-ok); stroke-width: 1.2; stroke-dasharray: 4 3; }
.op-code { fill: #0b1424; stroke: rgba(226,232,240,0.18); }
.op-rule { stroke: var(--d-line); }
.op-t { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; fill: var(--d-text); }
.op-s { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; fill: var(--d-mute); }
.op-c { font-family: var(--font-mono); font-size: 11px; fill: var(--d-text); }
.op-kw, .op-acc { fill: var(--d-acc); } .op-okt { fill: var(--d-ok); }
/* Wires in QMerse orange, as on the canvas (shares --hf-run with the hero) */
.own-panel { --hf-run: #f26b1d; --hf-run-rgb: 242,107,29; }
.op-w { fill: none; stroke: rgba(var(--hf-run-rgb), 0.5); }
.op-f { fill: none; stroke: var(--hf-run); stroke-width: 1.3; stroke-dasharray: 4 7; animation: hfFlow 1.6s linear infinite; }
.op-arrow { fill: none; stroke: var(--hf-run); stroke-width: 1.3; }
@media (prefers-reduced-motion: reduce) { .op-f { animation: none; } }
/* Export panel run: with JS the running node lights up in turn, as in the hero */
.op-anim .op-f { opacity: 0; transition: opacity 0.3s; }
.op-anim .op-f.is-run { opacity: 1; }
.op-anim .op-node { opacity: 0.45; transition: opacity 0.4s; }
.op-anim .op-node.is-run, .op-anim .op-node.is-done { opacity: 1; }
.op-anim .op-node rect { transition: stroke 0.3s, fill 0.3s; }
.op-anim .op-node.is-run rect { stroke: var(--hf-run); stroke-width: 1.6; stroke-dasharray: none; fill: rgba(var(--hf-run-rgb), 0.08); }
.op-anim .op-node.is-run { animation: hfPulse 1.2s ease-in-out infinite; }
@media (max-width: 980px) { .own-in { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .own-list div { grid-template-columns: 1fr; gap: 4px; } }
/* No lock-in follows the palette: white with a light panel in light mode, dark navy in dark mode */
html[data-theme="light"] .own-dark { --d-bg: #ffffff; --d-panel: #ffffff; --d-line: rgba(11,20,36,0.12); --d-text: #1a2230; --d-dim: #4b5668;
  --d-mute: #6b778a; --d-acc: #0b52d0; --d-ok: #0f7a57; }
html[data-theme="light"] .own-dark h2 { color: var(--d-text); }
html[data-theme="light"] .own-dark .btn-ghost { color: var(--d-text); border-color: rgba(11,20,36,0.25); }
html[data-theme="light"] .own-dark .btn-ghost:hover { background: var(--d-text); color: #fff; border-color: var(--d-text); }
html[data-theme="light"] .own-panel { border-color: rgba(11,20,36,0.18); box-shadow: 10px 10px 0 rgba(var(--acc-rgb), 0.06); }
html[data-theme="light"] .op-n { fill: #fff; stroke: rgba(11,20,36,0.2); }
html[data-theme="light"] .op-ac { fill: rgba(11,82,208,0.08); }
html[data-theme="light"] .op-ok { fill: rgba(15,122,87,0.06); }
html[data-theme="light"] .op-code { fill: #f5f8fb; stroke: rgba(11,20,36,0.16); }
/* The canvas tour as its own band (slate), straight after the hero */
.tour-sec .tour-head { margin-top: 0; }
.tour-sec .stage { margin-top: clamp(32px, 3.4vw, 48px); }
html[data-theme="light"] .tour-sec .win { background: #fff; }
/* No lock-in in light mode sits on slate between two white bands */
html[data-theme="light"] .own-dark { --d-bg: #eef3f8; }
/* ---------- Dark palette: every band stays dark and alternates two navy tones (ink / ink-2),
   mirroring the white / slate rhythm of the light palette. Overrides the earlier paper bands. ---------- */
html[data-theme="dark"] [data-tone] { --tp-bg: var(--ink); --tp-ink: var(--text); --tp-mute: var(--text-mute); --tp-dim: var(--text-dim); --tp-acc: var(--acc-hi);
  --tp-line: var(--line-2); --tp-grid: var(--grid); --tp-ok: var(--signal); --tp-lift: var(--shadow); --tp-hover: var(--fill); }
html[data-theme="dark"] [data-tone="paper"] { --tp-bg: #131d2a; }
html[data-theme="dark"] [data-tone] .on-light { display: none; }
html[data-theme="dark"] [data-tone] .on-dark { display: block; }
html[data-theme="dark"] .own-dark { --d-bg: #131d2a; }
html[data-theme="dark"] .hw-fig { background: rgba(255,255,255,0.03); }
html[data-theme="dark"] .hw .hf-n { fill: var(--ink); }
html[data-theme="dark"] .hw .hf-ok-box { fill: rgba(93,210,166,0.08); }
/* Dark palette: components that were drawn white inside light bands */
html[data-theme="dark"] [data-tone] .form-card { --f-bg: var(--surface); --f-field: var(--bg); }
html[data-theme="dark"] .pc { background: linear-gradient(180deg, #17253b, #121c2c); color: var(--text); }
html[data-theme="dark"] .pc :is(h3, h4) { color: var(--text); }
html[data-theme="dark"] .pc p { color: var(--text-dim); }
html[data-theme="dark"] .ct-vis { background-color: rgba(255,255,255,0.03); }
html[data-theme="dark"] .ct-node { fill: var(--ink); }
html[data-theme="dark"] .ct-node.q { fill: rgba(127,176,255,0.1); }

/* Three-step variant of the drawn step columns (who-its-for, implementation) */
.hw-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hw-link { display: inline-block; margin-top: 14px; }
@media (max-width: 1000px) { .hw-3 { grid-template-columns: 1fr; } .hw-3 .hw-step + .hw-step { padding-left: 0; border-left: 0; border-top: 1px solid var(--tp-line); } }

/* "The parts you wire together": flat panels instead of blue-gradient cards */
.pc { background: var(--tp-bg, var(--bg)); border: 1px solid var(--tp-line, var(--line)); border-radius: 10px; color: var(--tp-ink, var(--text)); min-height: 440px; }
html[data-theme="light"] .pc { background: #fff; }
.pc :is(h3, h4) { color: var(--tp-ink, var(--text)); }
.pc p { color: var(--tp-mute, var(--text-dim)); }
.pc-art { margin: auto -22px 0 0; border-top: 1px solid var(--tp-line, var(--line)); border-left: 1px solid var(--tp-line, var(--line)); border-radius: 8px 0 0 0; }
html[data-theme="dark"] .pc { background: var(--ink); }

/* Domain partners hero: the drawn diagram spans the page width */
.dp-fig { max-width: none; margin-top: clamp(36px, 4vw, 56px); justify-self: stretch; }

/* ---------- Long-form pages: privacy, terms and notes ---------- */
.prose > * { max-width: 760px; }
.prose-meta { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tp-mute); margin: 0 0 32px; }
.prose h2 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(24px, 2.2vw, 30px); letter-spacing: -0.015em; line-height: 1.2; margin: 44px 0 14px; color: var(--tp-ink); }
.prose p, .prose li { font-size: 17px; line-height: 1.7; color: var(--tp-dim); }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 18px; padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--tp-ink); font-weight: 500; }
.prose a:not(.text-link) { color: var(--tp-acc); text-decoration: underline; text-underline-offset: 3px; }
.prose code { font-family: var(--font-mono); font-size: 0.85em; padding: 1px 6px; border-radius: 4px; background: rgba(var(--acc-rgb), 0.08); color: var(--tp-ink); }
.prose-back { margin-top: 48px; }
.note-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.note-card { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 28px; border: 1px solid var(--tp-line); border-radius: 10px; background: var(--tp-bg); color: var(--tp-ink); transition: border-color 0.25s, transform 0.25s; }
.note-card:hover { border-color: var(--tp-acc); transform: translateY(-2px); }
.note-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tp-acc); }
.note-t { font-family: var(--font-serif); font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -0.015em; }
.note-d { font-size: 15.5px; line-height: 1.6; color: var(--tp-mute); }
.note-go { margin-top: auto; padding-top: 8px; font-size: 14.5px; font-weight: 500; color: var(--tp-ink); }
@media (max-width: 760px) { .note-list { grid-template-columns: 1fr; } }
/* Tour: the active marker in orange with a white ring, so it stands out on the canvas */
.hs[aria-current="step"] { background: #f26b1d; color: #fff;
  box-shadow: 0 0 0 3px #fff, 0 0 0 7px rgba(242,107,29,0.35), 0 6px 18px rgba(11,17,24,0.35); }
.hs[aria-current="step"]::after { border-color: rgba(242,107,29,0.75); }

/* Who it's for list: a small line-drawn icon per audience */
.who-list.has-ic a { grid-template-columns: 56px minmax(0, 1fr) 28px; gap: 18px; }
.wl-ic { display: grid; place-items: center; width: 56px; height: 48px; border: 1px solid var(--tp-line); border-radius: 8px; background: var(--tp-bg); transition: border-color 0.3s; }
html[data-theme="light"] .wl-ic { background: #fff; }
.wl-ic svg { width: 46px; height: 36px; stroke: var(--tp-mute); }
.wl-ic svg .ac { stroke: var(--tp-acc); }
.who-list a:hover .wl-ic { border-color: var(--tp-acc); }
@media (max-width: 480px) { .who-list.has-ic a { grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 12px; } .wl-ic { width: 44px; height: 40px; } .wl-ic svg { width: 32px; height: 26px; } }
/* ---------- Palette switch: a slim segmented control with line-drawn sun and moon ---------- */
.pal { gap: 2px; padding: 3px; border: 1px solid var(--line); background: var(--track); }
.pal button { width: 30px; height: 26px; border-radius: 999px; transition: background 0.25s, box-shadow 0.25s; }
.pal button i { width: 15px; height: 15px; border: 0; border-radius: 0; background: var(--text-mute) !important;
  -webkit-mask: var(--pal-ic) center / contain no-repeat; mask: var(--pal-ic) center / contain no-repeat; transition: background 0.25s; }
.pal [data-pal="light"] i { --pal-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2.5v2.2M12 19.3v2.2M2.5 12h2.2M19.3 12h2.2M5.3 5.3l1.6 1.6M17.1 17.1l1.6 1.6M5.3 18.7l1.6-1.6M17.1 6.9l1.6-1.6'/%3E%3C/svg%3E"); }
.pal [data-pal="dark"] i { --pal-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z'/%3E%3C/svg%3E"); }
.pal button[aria-checked="true"] { background: var(--seg-on); box-shadow: 0 1px 2px rgba(0,0,0,0.12), 0 0 0 1px var(--line); }
html[data-theme="light"] .pal button[aria-checked="true"] { background: #fff; }
.pal button[aria-checked="true"] i { background: var(--text) !important; }
.pal button:not([aria-checked="true"]):hover { background: transparent; }
.pal button:not([aria-checked="true"]):hover i { background: var(--text) !important; }
/* Menu with six items: two columns of three */
.nav-main { grid-template-rows: repeat(3, auto); }
.nav-main li:nth-child(4n) { border-bottom: 0; }
.nav-main li:nth-child(3n) { border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .nav-main { grid-template-rows: none; } .nav-main li:nth-child(3n) { border-bottom: 0; } .nav-main li:last-child { border-bottom: 1px solid var(--line); } }
