/* liaison.sh base. Tokens follow the Liaison web app theme (apps/web/src/styles/theme.css),
   fonts are the app's faces (Geist under the OFL; Clash Display, the official Fontshare files, under the ITF FFL), and the app colours follow
   apps/web/src/modules/shell/app-color.ts: one hue per app id, fixed saturation and lightness
   per surface, so the colours read as one family. */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("fonts/ClashDisplay-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Clash Display"; src: url("fonts/ClashDisplay-Semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #f4f4f6;
  --surface-hover: #ecedf1;
  --elevated: #ffffff;
  --border-subtle: #ececf0;
  --border: #dfdfe5;
  --border-strong: #cdcdd5;
  --text: #2a2a32;
  --text-2: #5a5a64;
  --text-3: #6e6e78;
  --accent: #4a5468;
  --accent-fg: #ffffff;
  --accent-hover: #2f3849;
  --slate: #4a5468;
  --warning: #a87900;
  --success: #1f9d55;
  --focus: #4a5468;
  --shadow: 0 1px 2px rgba(20, 20, 26, 0.04), 0 12px 32px -12px rgba(20, 20, 26, 0.16);
  --shadow-lg: 0 2px 6px rgba(20, 20, 26, 0.06), 0 30px 70px -20px rgba(20, 20, 26, 0.28);
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 22px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Clash Display", "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1200px;
  --gutter: 32px;
  --header: 60px;

  /* App hues: hash of the app id (appHue in app-color.ts). */
  --h-agents: 102;     /* agents   */
  --h-mail: 119;       /* mail     */
  --h-tickets: 39;     /* tickets  */
  --h-knowledge: 270;  /* knowledge */
  --h-invoicing: 186;  /* invoicing */
  --h-shipping: 20;    /* boxtal   */
  --h-store: 350;      /* shopify  */
  --h-accounting: 280; /* pennylane */
  --h-projects: 274;   /* projects */
  --h-calendar: 166;   /* calendar */
  --h-contacts: 203;   /* contacts */

  /* Per-theme lightness for the derived app tones. */
  --tint-l: 95%; --tint-s: 70%;
  --tint2-l: 89%; --tint2-s: 62%;
  --ink-l: 26%; --ink-s: 58%;
  --line-l: 80%; --line-s: 42%;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #111113;
    --surface: #18181c;
    --surface-hover: #232329;
    --elevated: #1c1c20;
    --border-subtle: #1e1e24;
    --border: #2a2a33;
    --border-strong: #363642;
    --text: #e2e2e8;
    --text-2: #a0a0aa;
    --text-3: #8a8a94;
    --accent: #b0b8c8;
    --accent-fg: #16161a;
    --accent-hover: #c8d0e0;
    --slate: #b0b8c8;
    --warning: #d4a020;
    --success: #3dbf70;
    --focus: #c8d0e0;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.35), 0 30px 80px -20px rgba(0, 0, 0, 0.8);
    --tint-l: 14%; --tint-s: 26%;
    --tint2-l: 19%; --tint2-s: 30%;
    --ink-l: 80%; --ink-s: 62%;
    --line-l: 30%; --line-s: 30%;
  }
}

/* An element owned by an app: set --h, read the derived tones. */
.app-agents { --h: var(--h-agents); }
.app-mail { --h: var(--h-mail); }
.app-tickets { --h: var(--h-tickets); }
.app-knowledge { --h: var(--h-knowledge); }
.app-invoicing { --h: var(--h-invoicing); }
.app-shipping { --h: var(--h-shipping); }
.app-store { --h: var(--h-store); }
.app-accounting { --h: var(--h-accounting); }
.app-projects { --h: var(--h-projects); }
.app-calendar { --h: var(--h-calendar); }
.app-contacts { --h: var(--h-contacts); }
[class*="app-"] {
  --app-square: hsl(var(--h) 52% 45%);            /* appSquareColor: filled square, white glyph */
  --app-icon: hsl(var(--h) 48% 52%);              /* appIconColor: bare glyph on the page */
  --app-tint: hsl(var(--h) var(--tint-s) var(--tint-l));
  --app-tint-2: hsl(var(--h) var(--tint2-s) var(--tint2-l));
  --app-ink: hsl(var(--h) var(--ink-s) var(--ink-l));
  --app-line: hsl(var(--h) var(--line-s) var(--line-l));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font); overflow-wrap: break-word; overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg, picture { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
code, pre, kbd { font-family: var(--mono); font-size: 0.875em; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; line-height: 1.15; }
h1, h2 { font-family: var(--display); font-weight: 500; letter-spacing: -0.01em; }
figure { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.muted { color: var(--text-2); }
.small { font-size: 0.875rem; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 30; background: var(--accent); color: var(--accent-fg); padding: 8px 14px; border-radius: var(--radius-md); }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 600px) { :root { --gutter: 16px; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 20; height: var(--header);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.1875rem; letter-spacing: 0; }
.brand svg { width: 26px; height: 26px; flex: none; }
.mark rect { fill: var(--text); } .mark path { stroke: var(--bg); } .mark circle { fill: var(--bg); }
.site-header nav { margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a { display: block; padding: 6px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text-2); font-size: 0.9rem; }
.nav-links a:hover { color: var(--text); background: var(--surface); }
.lang { flex: none; padding: 6px 8px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text-2); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; }
.lang:hover { color: var(--text); background: var(--surface); }
.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 0.9rem; color: var(--text-2); background: var(--elevated); }
.menu summary::-webkit-details-marker { display: none; }
.menu ul { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; list-style: none; padding: 6px; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.menu ul a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none; }
.menu ul a:hover { background: var(--surface); }
@media (max-width: 900px) { .site-header nav { display: none; } .menu { display: block; } }
@media (max-width: 420px) {
  .site-header .wrap { gap: 8px; }
  .site-header .btn { padding: 7px 10px; font-size: 0.875rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .menu summary { padding: 6px 10px; font-size: 0.875rem; }
  .brand { font-size: 1.0625rem; gap: 8px; }
  .brand svg { width: 24px; height: 24px; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-md); border: 1px solid transparent;
  font: inherit; font-weight: 500; font-size: 0.9375rem; line-height: 1.3; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--elevated); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-lg { padding: 12px 20px; font-size: 1rem; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ── App glyphs and pills (the product's own shapes) ── */
.glyph { /* Work-list square: app colour fill, white glyph */
  width: 32px; height: 32px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: var(--app-square); color: #fff;
}
.glyph svg { width: 18px; height: 18px; }
.glyph.sm { width: 22px; height: 22px; border-radius: 6px; } .glyph.sm svg { width: 13px; height: 13px; }
.glyph.lg { width: 44px; height: 44px; border-radius: 11px; } .glyph.lg svg { width: 24px; height: 24px; }
.ico { width: 18px; height: 18px; color: var(--app-icon); flex: none; }
.pill { /* the action chip: rounded-full, semibold, small */
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 0.8125rem; font-weight: 600; line-height: 1.2; padding: 4px 10px 4px 6px; border-radius: 999px;
  background: var(--app-tint); color: var(--app-ink); border: 1px solid var(--app-line);
}
.pill .dot { width: 16px; height: 16px; border-radius: 5px; background: var(--app-square); color: #fff; display: grid; place-items: center; }
.pill .dot svg { width: 10px; height: 10px; }
.pill b { font-weight: 600; } .pill span { font-weight: 500; opacity: .85; }
.agent-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); padding: 2px 7px; border-radius: 5px; }

/* ── Code ── */
.code { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); margin: 16px 0; overflow: hidden; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--border-subtle); font-size: 0.75rem; color: var(--text-2); }
.code pre { margin: 0; padding: 14px 16px; line-height: 1.75; font-size: 0.8125rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.code pre code { font-size: inherit; }
.code .prompt, .code .comment { color: var(--text-3); user-select: none; }
.code .comment { user-select: auto; }
.code .copy { font: inherit; font-size: 0.75rem; padding: 3px 10px; cursor: pointer; color: var(--text-2); background: var(--elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.code .copy:hover { color: var(--text); }

/* ── FAQ ── */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 36px 20px 0; position: relative; font-weight: 600; font-size: 1.0625rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 0 20px; color: var(--text-2); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ── Video ── */
.video-ctl button {
  font: inherit; font-size: 0.75rem; font-weight: 500; color: var(--text-2); background: var(--elevated); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.video-ctl button:hover { color: var(--text); }
@media (prefers-color-scheme: dark) { video, .shot img { filter: brightness(0.92); } }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 56px; font-size: 0.875rem; color: var(--text-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.site-footer nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer p { margin: 6px 0 0; }
.site-footer .brand { color: var(--text); font-size: 1.0625rem; }
.site-footer .brand svg { width: 22px; height: 22px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── Home ── */
/* One content width for the whole site: 1296px of content, centred. */
:root { --wrap: 1360px; }
/* Proposal A: product-forward. The workspace is open from the first screen:
   the app rail in its colours, the story, and an attention column that follows it. */

.eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); margin: 0 0 14px; }
.sub { font-size: 1.125rem; color: var(--text-2); margin: 16px 0 0; max-width: 680px; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); line-height: 1.08; }
h3 { font-size: 1.0625rem; letter-spacing: -0.01em; }

/* ── Hero ──
   One rule set for every window: the hero is capped at the page width and centred; the video
   takes what the fold leaves under the headline (measured by site.js as --hero-above, with a
   CSS estimate as fallback); the chronology sits beside it at exactly the video's height and
   adapts its content to that height through a size container. */
.hero {
  --side-min: 16.5rem;
  --side-max: 25rem;
  --stage-gap: clamp(20px, 2.2vw, 36px);
  --fold-room: calc(100svh - var(--hero-above, 19rem) - 24px);
  --video-fit: max(24rem, calc((var(--fold-room) - 14px) * 1.6 + 14px));
  padding: 26px 0 72px;
  position: relative;
}
.hero::before { /* a quiet wash of the story's app colours, behind the video */
  content: ""; position: absolute; inset: 120px 0 auto 0; height: 70%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 12% 40%, hsl(var(--h-tickets) 80% 60% / .14), transparent 70%),
    radial-gradient(35% 45% at 88% 30%, hsl(var(--h-agents) 70% 55% / .12), transparent 70%),
    radial-gradient(40% 50% at 60% 90%, hsl(var(--h-shipping) 70% 60% / .10), transparent 70%);
}
.hero-wrap { /* as wide as the video the fold allows plus the chronology, centred, never wider than the page */
  max-width: min(var(--wrap), calc(var(--video-fit) + var(--stage-gap) + var(--side-max) + 2 * var(--gutter)));
}
.hero-head { margin-bottom: clamp(16px, 2.4svh, 24px); }
.hero h1 {
  font-size: clamp(1.875rem, min(0.9rem + 2.4vw, 0.4rem + 5.4svh), 3.25rem);
  line-height: 1.04; letter-spacing: -0.005em; max-width: 20em;
}
.hero-side {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px 40px;
  margin-top: clamp(10px, 1.6svh, 16px);
}
.hero .lede { font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem); color: var(--text-2); margin: 0; line-height: 1.5; max-width: 40em; }
.hero-act { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hero .btn-lg { padding: 11px 18px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.8125rem; color: var(--text-2); }
.facts li { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.facts li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--border-strong); }
@media (max-width: 860px) { .hero-side { grid-template-columns: minmax(0, 1fr); } }

.stage {
  display: grid; gap: var(--stage-gap); align-items: stretch; justify-content: start;
  /* video: the fold's room at 8:5 (plus the frame's 14px), never more than the width allows */
  grid-template-columns:
    min(calc(100% - var(--side-min) - var(--stage-gap)), var(--video-fit))
    minmax(var(--side-min), 1fr);
}
.frame {
  border: 1px solid var(--border); border-radius: var(--radius-2xl); overflow: hidden; align-self: start;
  background: var(--elevated); padding: 6px; box-shadow: var(--shadow-lg); min-width: 0;
}
.frame video { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 14px; background: var(--bg); }

/* The chronology: the page narrating the recording, not a panel of the app. As a size
   container it never adds height to the row: it is exactly as tall as the video frame. */
.chrono {
  --cur-h: 230; --cur-s: 0%;
  container: chrono / size;
  display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden;
}
.chrono[data-cur="tickets"] { --cur-h: var(--h-tickets); --cur-s: 52%; }
.chrono[data-cur="shipping"] { --cur-h: var(--h-shipping); --cur-s: 52%; }
.chrono[data-cur="agents"] { --cur-h: var(--h-agents); --cur-s: 52%; }
.chrono-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 4px; }
.chrono h2 { font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem); line-height: 1.2; }
.chrono-clock { font-family: var(--mono); font-size: 0.75rem; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chrono-bar { flex: none; height: 3px; border-radius: 3px; background: var(--border); margin: 10px 0 10px; overflow: hidden; }
.chrono-bar span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: hsl(var(--cur-h) var(--cur-s) 45%); border-radius: inherit; transition: background-color .4s; }
.chrono-steps { list-style: none; display: grid; gap: 2px; min-height: 0; }
.cstep { position: relative; padding-left: 26px; min-width: 0; }
.cstep:not(:last-child)::before, .cstep:not(:last-child)::after { /* the connector to the next step */
  content: ""; position: absolute; left: 6px; top: 30px; bottom: -12px; width: 2px; border-radius: 2px; background: var(--border);
}
.cstep:not(:last-child)::after { background: var(--app-square); transform-origin: top; transform: scaleY(var(--seg, 0)); }
.cdot {
  position: absolute; left: 0; top: 14px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border-strong);
  transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.cstep-btn {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 8px; width: 100%; min-width: 0;
  text-align: left; font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 12px;
  padding: 8px 10px; cursor: default; transition: background-color .3s, border-color .3s, opacity .3s;
}
.cstep-btn:not(:disabled) { cursor: pointer; }
.cstep-btn:not(:disabled):hover { background: var(--surface); }
.ctime { font-family: var(--mono); font-size: 0.75rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cstep-btn .pill { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 0.75rem; padding: 2px 8px 2px 4px; }
.cstep-btn .pill .dot { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.ctext { grid-column: 1 / -1; font-size: clamp(0.8125rem, 0.78rem + 0.12vw, 0.875rem); line-height: 1.42; color: var(--text-2); overflow-wrap: anywhere; }
/* States, set by the script as the video plays. Without it every step reads as plain text. */
.story-js .cstep:not(.is-on) .cstep-btn { opacity: .5; }
.story-js .cstep:not(.is-on) .pill { filter: grayscale(1); }
.cstep.is-done .cdot {
  background: var(--app-square) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2 5 8.2 9 4' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
  border-color: var(--app-square);
}
.cstep.is-current .cdot { border-color: var(--app-square); background: var(--app-tint); box-shadow: 0 0 0 4px hsl(var(--h) 52% 45% / .2); }
.cstep.is-current .cstep-btn { background: var(--app-tint); border-color: var(--app-line); }
.cstep.is-current .ctext { color: var(--text); }
.chrono .video-ctl { margin-top: auto; display: flex; justify-content: flex-start; padding: 8px 0 0 36px; }
.chrono-caption { display: none; }

/* Shorter video, shorter chronology: past this height only the current step keeps its sentence
   (without the script, each sentence is cut to two lines); lower still, one line each. */
@container chrono (max-height: 31rem) {
  .story-js .cstep:not(.is-current) .ctext { display: none; }
  html:not(.story-js) .ctext { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .cstep:not(:last-child)::before, .cstep:not(:last-child)::after { top: 28px; bottom: -10px; }
  .cstep-btn { padding: 6px 10px; }
}
@container chrono (max-height: 21rem) {
  .chrono-bar { margin: 8px 0; }
  .cstep.is-current .ctext { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  html:not(.story-js) .ctext { -webkit-line-clamp: 1; }
  .chrono .video-ctl { padding-top: 4px; }
}
@container chrono (max-height: 15rem) {
  .chrono-clock { display: none; }
  .ctext { display: none !important; }
}

/* Narrow windows: the chronology goes under the video and takes its natural height. */
@media (max-width: 960px) {
  .hero-wrap { max-width: var(--wrap); }
  .stage { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .chrono { container-type: normal; overflow: visible; }
  .chrono .video-ctl { margin-top: 4px; }
}
@media (max-width: 760px) {
  .frame { padding: 4px; border-radius: var(--radius-xl); }
  .frame video { border-radius: 12px; }
  .chrono .video-ctl { padding-left: 0; }
  /* Phones: once the script runs, the steps become one compact row of time marks and the
     current step's line shows underneath. Without it, the stacked list stays. */
  .story-js .chrono-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .story-js .cstep { padding-left: 0; }
  .story-js .cstep:not(:last-child)::before, .story-js .cstep:not(:last-child)::after { left: calc(50% + 12px); right: calc(-50% + 12px); width: auto; top: 13px; bottom: auto; height: 2px; }
  .story-js .cstep:not(:last-child)::after { transform-origin: left; transform: scaleX(var(--seg, 0)); }
  .story-js .cdot { left: calc(50% - 7px); top: 7px; }
  .story-js .cstep-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 2px 6px; border-radius: 10px; }
  .story-js .cstep.is-current .cstep-btn { background: transparent; border-color: transparent; }
  .story-js .cstep.is-current .ctime { color: var(--app-ink); font-weight: 600; }
  .story-js .cstep-btn .pill { font-size: 0; padding: 0; border: 0; background: none; gap: 0; }
  .story-js .cstep-btn .pill .dot { width: 18px; height: 18px; border-radius: 5px; }
  .story-js .cstep-btn .pill .dot svg { width: 11px; height: 11px; }
  .story-js .ctext { display: none; }
  .story-js .chrono-caption[data-caption] { display: block; min-height: 4.4em; margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 0.875rem; line-height: 1.45;
    background: hsl(var(--cur-h) 70% var(--tint-l)); border: 1px solid hsl(var(--cur-h) var(--line-s) var(--line-l)); color: var(--text); transition: background-color .4s, border-color .4s; }
  .story-js .chrono[data-cur=""] .chrono-caption { background: var(--surface); border-color: var(--border-subtle); color: var(--text-2); }
}
@media (prefers-color-scheme: dark) { .story-js .chrono-caption[data-caption] { background: hsl(var(--cur-h) 26% var(--tint-l)); } }

/* ── Sections ── */
.block { padding: 112px 0; }
.block.tint { background: var(--surface); border-block: 1px solid var(--border-subtle); }
.head-row { max-width: 760px; margin-bottom: 44px; }
@media (max-width: 600px) { .block { padding: 72px 0; } }

/* Apps: the Work-list square, the name, and the one action that waits for approval. */
.apps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.app {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 20px; border-radius: var(--radius-xl); background: var(--elevated); border: 1px solid var(--border);
  position: relative; overflow: hidden; transition: border-color .2s, background-color .2s, transform .2s;
}
.app::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--app-square); opacity: .9; }
.app:hover { border-color: var(--app-line); background: color-mix(in srgb, var(--app-tint) 55%, var(--elevated)); transform: translateY(-2px); }
.app .glyph { margin-bottom: 10px; }
.app p { color: var(--text-2); font-size: 0.9375rem; margin: 0 0 12px; line-height: 1.45; }
.app .pill { margin-top: auto; font-size: 0.75rem; padding: 3px 9px; }
.app.more { border-style: dashed; background: transparent; }
.app.more::after { display: none; }
.app.more:hover { transform: none; background: transparent; border-color: var(--border-strong); }
.glyphs { display: flex; gap: 6px; margin-bottom: 14px; }
.glyph.add { background: var(--surface-hover); color: var(--text-2); }
.legend { margin-top: 18px; }
@media (max-width: 960px) { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .apps { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .app { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 2px 14px; padding: 16px; }
  .app .glyph, .app .glyphs { grid-row: 1 / span 3; margin: 2px 0 0; }
  .app .glyphs { flex-direction: column; gap: 4px; }
  .app .glyphs .glyph { margin: 0; }
  .app p { margin: 0 0 8px; font-size: 0.875rem; }
  .app .pill { justify-self: start; }
  .app::after { inset: 0 auto 0 0; width: 3px; height: auto; }
}

/* Trust */
.trust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 28px; margin: 40px 0 0; }
.points dt { font-weight: 600; display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.points dt svg { width: 20px; height: 20px; color: var(--text); }
.points dd { margin: 0; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; }
.tray { border: 1px solid var(--border); border-radius: var(--radius-2xl); background: var(--elevated); box-shadow: var(--shadow-lg); overflow: hidden; position: sticky; top: 90px; }
.tray-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; font-size: 0.75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); border-bottom: 1px solid var(--border-subtle); }
.tray .count { margin-left: auto; font-family: var(--mono); letter-spacing: 0; }
.tray ul { list-style: none; }
.tray li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-subtle); align-items: center; }
.tray li .pill { justify-self: start; }
.tray li .t { grid-column: 1 / -1; font-weight: 500; font-size: 0.9375rem; }
.tray li .by { grid-row: 1; grid-column: 2; font-size: 0.75rem; color: var(--text-3); }
.tray li:first-child { background: color-mix(in srgb, var(--app-tint) 55%, var(--elevated)); }
.tray-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; }
.tray-foot .b { font-size: 0.8125rem; font-weight: 500; padding: 6px 12px; border-radius: var(--radius-md); border: 1px solid var(--border); color: var(--text-2); }
.tray-foot .b.primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
@media (max-width: 960px) { .trust { grid-template-columns: minmax(0, 1fr); } .tray { position: static; } }
@media (max-width: 520px) { .points { grid-template-columns: minmax(0, 1fr); } .tray li { grid-template-columns: minmax(0, 1fr); } .tray li .by { grid-row: auto; grid-column: auto; } }

.diagram { margin-top: 64px; border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: 32px; background: var(--elevated); }
.diagram img { margin: 0 auto; width: 100%; max-width: 880px; }
.diagram figcaption { font-size: 0.875rem; color: var(--text-2); text-align: center; margin-top: 12px; }
@media (max-width: 600px) { .diagram { padding: 14px; } }

/* Demo */
.demo { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.steps { list-style: none; counter-reset: s; margin: 28px 0 32px; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 8px; background: var(--surface-hover); color: var(--text); font-size: 0.8125rem; font-weight: 600; display: grid; place-items: center; transform: translateY(-2px); font-family: var(--mono); }
.shot { border: 1px solid var(--border); border-radius: var(--radius-2xl); background: var(--surface); padding: 8px; box-shadow: var(--shadow-lg); }
.shot img { border-radius: 14px; width: 100%; }
@media (max-width: 960px) { .demo { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

/* Run your own */
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: 28px; background: var(--elevated); min-width: 0; }
.panel h3 { font-size: 1.25rem; margin-bottom: 8px; }
.panel .tag { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 10px; }
.fineprint { margin-top: 24px; max-width: 820px; }
@media (max-width: 860px) { .paths { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .panel { padding: 20px; } }

/* FAQ */
.faq-title { font-size: 1.5rem; margin-bottom: 18px; font-family: var(--font); font-weight: 600; }

/* Final */
.final { padding: 32px 0 112px; }
.final-card { text-align: center; padding: 72px 24px; border-radius: 28px; border: 1px solid var(--border); background: var(--elevated); box-shadow: var(--shadow); }
.final-glyphs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.final-glyphs .glyph { transition: transform .25s; }
.final-card:hover .final-glyphs .glyph:nth-child(odd) { transform: translateY(-4px) rotate(-4deg); }
.final-card:hover .final-glyphs .glyph:nth-child(even) { transform: translateY(-4px) rotate(4deg); }
.final h2 { margin-bottom: 14px; }
.final p { color: var(--text-2); font-size: 1.125rem; margin: 0 auto 28px; max-width: 560px; }
.final .cta-row { justify-content: center; }
@media (max-width: 480px) { .final-glyphs .glyph.lg { width: 34px; height: 34px; border-radius: 9px; } .final-glyphs .glyph.lg svg { width: 18px; height: 18px; } .final-card { padding: 48px 18px; } }

/* Terminals read as terminals in both themes. */
.code { background: #16161a; border-color: #2a2a33; color: #e2e2e8; }
.code-bar { border-color: #26262e; color: #9a9aa4; }
.code .prompt, .code .comment { color: #7a7a84; }
.code .copy { background: #222228; color: #c0c0c8; border-color: #33333c; }
.code .copy:hover { color: #fff; }

/* ── Inner pages (services, about, legal) ── */
main > section { padding: 88px 0; }
main > section + section { border-top: 1px solid var(--border-subtle); }
main > section.hero, main > section.block, main > section.final { border-top: 0; }
@media (max-width: 600px) { main > section { padding: 64px 0; } }
.narrow { max-width: calc(760px + 2 * var(--gutter)); }
.narrow .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .narrow .cards.three { grid-template-columns: minmax(0, 1fr); } .narrow .cards.three .wide { grid-column: auto; } }
.page-head { padding: 72px 0 40px; position: relative; border-top: 0; }
.page-head::before { /* the same quiet wash as the home hero */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 100%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 60% at 8% 30%, hsl(var(--h-tickets) 80% 60% / .12), transparent 70%),
    radial-gradient(30% 50% at 92% 20%, hsl(var(--h-agents) 70% 55% / .10), transparent 70%);
}
.page-head h1 { font-size: clamp(2.125rem, 1.2rem + 2.6vw, 3.25rem); line-height: 1.04; }
.page-head .lede { font-size: 1.1875rem; color: var(--text-2); margin: 20px 0 0; max-width: 680px; line-height: 1.55; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2, .prose h2 { font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.08; }
.section-head p { font-size: 1.125rem; color: var(--text-2); margin: 16px 0 0; }

.prose { padding-top: 8px; }
.prose h2 { margin: 64px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 28px 0 8px; }
.prose ul, .prose ol:not(.steps) { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--text-3); }
.prose .diagram { margin-top: 28px; }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.three .wide { grid-column: span 2; }
.card { border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 24px; background: var(--elevated); position: relative; overflow: hidden; }
.card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--app-square, var(--border-strong)); }
.card h3 { margin: 0 0 8px; font-size: 1.125rem; }
.card p { color: var(--text-2); margin: 0; font-size: 0.9375rem; line-height: 1.5; }
.card .glyph { margin-bottom: 14px; }
@media (max-width: 720px) { .cards.three { grid-template-columns: minmax(0, 1fr); } .cards.three .wide { grid-column: auto; } }

.prose .steps li { grid-template-columns: 30px minmax(0, 1fr); }
.callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-md); padding: 16px 20px; background: var(--surface); margin-top: 32px; }
.callout p:last-child { margin-bottom: 0; }
.label { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-2); vertical-align: 2px; margin-left: 6px; text-transform: uppercase; }
.todo { border: 1.5px dashed #c93236; border-radius: var(--radius-md); padding: 12px 16px; margin: 0 0 1em; color: #c93236; background: rgba(201, 50, 54, 0.05); font-size: 0.9375rem; }
@media (prefers-color-scheme: dark) { .todo { color: #f08a8a; border-color: #e86464; background: rgba(232, 100, 100, 0.07); } }

.founder { display: flex; gap: 24px; align-items: flex-start; }
.founder img { width: 96px; height: 96px; border-radius: 50%; flex: none; border: 1px solid var(--border); object-fit: cover; margin-top: 4px; }
.founder p:last-child { margin-bottom: 0; }
@media (max-width: 520px) { .founder { flex-direction: column; gap: 16px; } .founder img { width: 80px; height: 80px; } }

.nav-links a[aria-current="page"] { color: var(--text); background: var(--surface); }
.menu ul a[aria-current="page"] { background: var(--surface); font-weight: 600; }
.site-footer a[aria-current="page"] { color: var(--text); }
.glyph.neutral { background: var(--surface-hover); color: var(--text); }
.card .glyphs { display: flex; gap: 5px; margin-bottom: 14px; }
.card .glyphs .glyph { margin: 0; }
.card.tools::after { background: linear-gradient(90deg, hsl(var(--h-mail) 52% 45%), hsl(var(--h-tickets) 52% 45%), hsl(var(--h-store) 52% 45%), hsl(var(--h-invoicing) 52% 45%), hsl(var(--h-shipping) 52% 45%), hsl(var(--h-accounting) 52% 45%)); }

/* ── Customers / notes ──
   Case-study pages, the home cards and the notes (blog). Product-like mock cards reuse the
   tray's look; every colour is an existing token or the app tones. */
.case-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.case-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 24px; text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--elevated); position: relative; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.case-card:hover { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
.case-card .glyphs { margin-bottom: 10px; }
.case-kicker { font-size: 0.875rem; font-weight: 500; color: var(--text-2); margin: 0; }
.case-card h3 { font-size: 1.25rem; line-height: 1.25; margin: 4px 0 2px; text-wrap: balance; }
.case-meta { color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.case-link { margin-top: auto; padding-top: 12px; font-weight: 600; font-size: 0.9375rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.case-card:hover .case-link { text-decoration-thickness: 2px; }
.case-cards.page { margin-top: 8px; }
@media (max-width: 860px) { .case-cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .case-card { padding: 20px; } }

.case-intro { max-width: 760px; }
.case-intro .eyebrow { margin-bottom: 4px; }
.case-intro .eyebrow a, .article-wrap .eyebrow a { text-decoration: none; display: inline-block; padding-block: 10px; margin-block: -10px; }
.case-intro .eyebrow a:hover, .article-wrap .eyebrow a:hover { text-decoration: underline; }
.case-intro .case-kicker { margin-bottom: 16px; }
.case-intro .lede { max-width: 700px; text-wrap: pretty; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 24px; font-size: 0.9375rem; color: var(--text-2); }
.byline img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex: none; }
.byline time { white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--border); }
.stat .v { font-family: var(--display); font-weight: 600; font-size: clamp(2.25rem, 1.2rem + 2.4vw, 3.5rem); line-height: 1; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat p { margin: 12px 0 0; color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; max-width: 34ch; text-wrap: pretty; }
@media (max-width: 720px) { .stats { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 32px; } .stat .v { font-size: 3rem; } .stat p { max-width: none; } }

main > section.case-body { padding: 72px 0; }
main > section.page-head + section.case-body { padding-top: 24px; border-top: 0; }
@media (max-width: 600px) { main > section.case-body { padding: 48px 0; } main > section.page-head + section.case-body { padding-top: 16px; } }
.case-stack { display: grid; gap: 40px; }
.case-story { max-width: 760px; }

.cancelled { padding: 22px; border-radius: var(--radius-xl); background: var(--surface-hover); border: 1px solid var(--border); }
.cancelled-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 14px; }
.cancelled-head b { font-size: 1.125rem; letter-spacing: -0.01em; }
.cancelled-head span { font-size: 0.875rem; color: var(--text-2); }
.cancelled-note { margin: 14px 0 0; font-size: 0.8125rem; color: var(--text-2); }
.swaps { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.swap { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; min-width: 0; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border); font-size: 0.9375rem; }
.swap s { color: var(--text-3); text-decoration-thickness: 1.5px; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.swap .pill { flex: none; }
@media (max-width: 440px) { .swap { flex-wrap: wrap; row-gap: 6px; } }
@media (min-width: 720px) { .swaps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1340px) { .swaps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .swaps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.pull { margin: 0 0 32px; max-width: 760px; }
.pull blockquote { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.75rem); line-height: 1.3; letter-spacing: -0.01em; text-wrap: pretty; }
.pull blockquote p { margin: 0; text-indent: -0.42em; }
.pull figcaption { margin-top: 12px; color: var(--text-2); font-size: 0.9375rem; text-wrap: pretty; }

.mocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.mock { border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--elevated); box-shadow: var(--shadow); overflow: hidden; min-width: 0; display: flex; flex-direction: column; }
.mock-body { padding: 18px; font-size: 0.875rem; flex: 1; }
.mock-h { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; font-size: 0.875rem; margin-bottom: 14px; min-width: 0; }
.mock-h > span:not(.glyph):not(.count) { min-width: 0; overflow-wrap: anywhere; }
.mock-h .count { margin-left: auto; font-family: var(--mono); font-weight: 600; color: var(--text-2); }
.mock-note { border-left: 3px solid var(--app-square); padding: 2px 0 2px 12px; line-height: 1.5; }
.mock-note .l { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-2); margin-bottom: 5px; }
.mock-checks { list-style: none; margin: 12px 0 0; display: grid; gap: 4px; font-size: 0.8125rem; color: var(--text-2); }
.mock-checks li { padding-left: 18px; position: relative; }
.mock-checks li::before { content: ""; position: absolute; left: 1px; top: .35em; width: 9px; height: 5px; border-left: 2px solid var(--success); border-bottom: 2px solid var(--success); transform: rotate(-45deg); }
.mock figcaption { padding: 12px 18px 14px; border-top: 1px solid var(--border-subtle); background: var(--surface); font-size: 0.8125rem; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.mock-rows { list-style: none; margin: 0 -18px -18px; border-top: 1px solid var(--border-subtle); }
.mock-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--border-subtle); }
.mock-row:last-child { border-bottom: 0; }
.mock-row .t { display: grid; gap: 5px; justify-items: start; min-width: 0; font-weight: 500; line-height: 1.3; }
.mock-row .t > span:last-child { font-size: 0.75rem; font-weight: 400; color: var(--text-2); }
.mock-row .pill { font-size: 0.75rem; padding: 2px 8px 2px 4px; }
.mb { font-size: 0.75rem; font-weight: 500; padding: 5px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.mb.primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.flow { list-style: none; display: grid; gap: 14px; justify-items: start; font-size: 0.8125rem; }
.flow li { position: relative; padding: 5px 9px; border-radius: var(--radius-sm); background: var(--app-tint); border: 1px solid var(--app-line); color: var(--app-ink); font-weight: 500; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 100%; height: 14px; width: 1px; background: var(--border-strong); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpis .k { color: var(--text-2); font-size: 0.75rem; }
.kpis .n { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.spark { margin-top: 12px; width: 100%; height: 48px; }
.spark .area { fill: var(--app-tint); }
.spark .line { fill: none; stroke: var(--app-square); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark circle { fill: var(--app-square); }
.bubble { padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface); font-weight: 500; line-height: 1.4; }
.mock-note.after { margin-top: 12px; }
@media (max-width: 1059px) { .mocks { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mocks > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 700px) { .mocks { grid-template-columns: minmax(0, 1fr); } }

.chapter { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 16px; padding: 28px 0; border-top: 1px solid var(--border-subtle); }
.chapter:first-child, .pull + .chapter { border-top: 0; padding-top: 0; }
.chapter .glyph { grid-row: 1 / span 2; margin-top: 2px; }
.chapter h2 { font-family: var(--font); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.3; }
.chapter p { margin: 8px 0 0; color: var(--text-2); max-width: 62ch; text-wrap: pretty; }
.chapter p a { color: var(--text); }
@media (max-width: 520px) { .chapter { grid-template-columns: minmax(0, 1fr); } .chapter .glyph { grid-row: auto; margin-bottom: 8px; } }

.back { font-size: 0.9375rem; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0; }
.back a { color: var(--text-2); display: inline-block; padding-block: 10px; }
.chapter + .back { margin-top: 12px; }

/* Notes */
.note-list { list-style: none; border-top: 1px solid var(--border); }
.note-item { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 4px 24px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.note-item time { font-family: var(--mono); font-size: 0.8125rem; color: var(--text-3); padding-top: 5px; }
.note-item h2 { font-family: var(--font); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.01em; line-height: 1.3; }
.note-item h2 a { text-decoration: none; display: inline-block; padding-block: 8px; margin-block: -8px; }
.note-item h2 a:hover { text-decoration: underline; }
.note-item p { margin: 8px 0 0; color: var(--text-2); max-width: 62ch; text-wrap: pretty; }
@media (max-width: 600px) { .note-item { grid-template-columns: minmax(0, 1fr); } }
.article-wrap { max-width: calc(640px + 2 * var(--gutter)); }
.article { font-size: 1.1875rem; line-height: 1.7; padding-top: 24px; padding-bottom: 72px; }
.article p { margin: 0 0 1.3em; }
.article a { text-decoration-thickness: 1px; }
.article .back { font-size: 0.9375rem; line-height: 1.6; margin-top: 24px; }
