/* Scout website: one stylesheet for index.html, privacy.html and terms.html.
   Static, no build step. Fonts are self-hosted (fonts.css); nothing loads from a third party.
   Colours are tokens on :root, redefined for dark mode. The page follows the system theme
   unless the visitor picks one with the toggle (html[data-theme]). */

:root {
  color-scheme: light;
  /* Neutrals: a cool, slightly green-grey paper. The rust accent and the three
     confidence colours (ok / warn / bad = verified / single-source / contradicted)
     carry the brand, so new work should keep green, amber and red for those meanings. */
  --bg: #f3f4f1;
  --surface: #ffffff;
  --sunk: #e9ebe6;
  --line: #dde0d9;
  --line-2: #cbd0c8;
  --ink: #15171a;
  --ink-2: #41464b;
  --ink-3: #5d6369;
  --acc: #a3431a;
  --acc-ink: #8a3712;
  --acc-wash: #f5e8e0;
  --ok: #2c7349;
  --ok-wash: #e4f1e8;
  --warn: #8a5d00;
  --warn-wash: #f9f0d8;
  --bad: #b0302a;
  --bad-wash: #fae8e6;
  --code-bg: #16181b;
  --code-ink: #e9ece8;
  --code-dim: #9aa09b;
  --on-code-acc: #ee8a5c; /* accent on --code-bg, which is dark in both themes */
  --shadow: 0 1px 2px rgba(21, 23, 26, .05), 0 12px 32px -16px rgba(21, 23, 26, .18);
  --shadow-lg: 0 2px 4px rgba(21, 23, 26, .04), 0 32px 64px -32px rgba(21, 23, 26, .28);

  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1120px;
  --gutter: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1112;
    --surface: #171a1c;
    --sunk: #0a0b0c;
    --line: #262a2e;
    --line-2: #353a3f;
    --ink: #eef0ec;
    --ink-2: #c3c8c4;
    --ink-3: #979d9a;
    --acc: #e8946a;
    --acc-ink: #f0a985;
    --acc-wash: #2a1a12;
    --ok: #6cc893;
    --ok-wash: #13271c;
    --warn: #e5b85a;
    --warn-wash: #2a2312;
    --bad: #f08a80;
    --bad-wash: #2d1715;
    --code-bg: #08090a;
    --code-ink: #e9ece8;
    --code-dim: #8f9691;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 32px 64px -32px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1112;
  --surface: #171a1c;
  --sunk: #0a0b0c;
  --line: #262a2e;
  --line-2: #353a3f;
  --ink: #eef0ec;
  --ink-2: #c3c8c4;
  --ink-3: #979d9a;
  --acc: #e8946a;
  --acc-ink: #f0a985;
  --acc-wash: #2a1a12;
  --ok: #6cc893;
  --ok-wash: #13271c;
  --warn: #e5b85a;
  --warn-wash: #2a2312;
  --bad: #f08a80;
  --bad-wash: #2d1715;
  --code-bg: #08090a;
  --code-ink: #e9ece8;
  --code-dim: #8f9691;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 32px 64px -32px rgba(0, 0, 0, .8);
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--acc-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 4px; }
code, kbd { font-family: var(--mono); font-size: .88em; }
p code, li code, td code { background: var(--sunk); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--ink); white-space: nowrap; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 650; letter-spacing: -.022em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--acc-wash); color: var(--ink); }

[hidden] { display: none !important; }
.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; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; color: var(--bg); }

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

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 8px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.02em; margin-right: auto; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav { display: none; gap: 2px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--sunk); }
@media (min-width: 1040px) { .nav { display: flex; } }
.nav a.on { color: var(--ink); background: var(--sunk); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .sun { display: none; }
  :root:not([data-theme]) .theme-btn .moon { display: block; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border-radius: 11px;
  font: 600 16px/1 var(--sans); letter-spacing: -.01em; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-2); color: var(--bg); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14.5px; border-radius: 9px; }
.head-cta { display: none; }
@media (min-width: 560px) { .head-cta { display: inline-flex; margin-left: 6px; } }

/* ---------- sections ---------- */
section { padding: 72px 0; }
@media (min-width: 900px) { section { padding: 104px 0; } }
.section-alt { background: var(--sunk); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* Section labels read as bracketed mono tags: [ Who it's for ]. The brackets are
   generated, so the copy stays plain text, and screen readers skip them. */
.kicker, .section-head .kicker { font: 500 13px/1.3 var(--mono); color: var(--acc-ink); letter-spacing: .04em; margin: 0 0 14px; }
.kicker::before { content: "[ "; content: "[ " / ""; color: var(--ink-3); }
.kicker::after { content: " ]"; content: " ]" / ""; color: var(--ink-3); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.12; }
.section-head p { margin-top: 16px; font-size: 18.5px; color: var(--ink-2); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 72px; }
@media (min-width: 900px) { .hero { padding: 88px 0 104px; } }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: start; }
  .hero-grid > div:first-child { padding-top: 72px; }
}
.hero h1 { font-size: clamp(38px, 5.2vw, 58px); line-height: 1.03; letter-spacing: -.035em; font-weight: 700; }
.hero .lede { margin-top: 22px; font-size: clamp(18px, 2.1vw, 20.5px); line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.fineprint { margin-top: 18px; font-size: 14.5px; color: var(--ink-3); }
.fineprint a { color: var(--ink-2); }
.proof { list-style: none; margin: 28px 0 0; padding: 16px 0 0; border-top: 1px dashed var(--line-2); display: flex; flex-wrap: wrap; gap: 8px 22px; font: 400 13px/1.45 var(--mono); color: var(--ink-3); }
.proof b { color: var(--ink); font-weight: 500; }
.hero .fineprint { margin-top: 12px; }

/* ---------- problem strip ---------- */
.trio { display: grid; gap: 16px; }
@media (min-width: 820px) { .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 19px; line-height: 1.3; }
.card p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }
.card .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--acc-wash); color: var(--acc-ink); margin-bottom: 16px; }
.card .ic svg { width: 20px; height: 20px; }

/* four-stage morning, after the "assembly line" pattern: the cost before the product */
.mock-fig.stages-fig { margin-bottom: 44px; }
/* Scroll-driven: the figure sticks under the header while you scroll through the track,
   and flips from "without" to "with" halfway. Only when it fits on screen (site.js sets
   .scrolly and --fig-h); otherwise it flips once you've scrolled past it. */
.morning-track.scrolly { height: calc(var(--fig-h, 0px) + 70vh); margin-bottom: 44px; }
.morning-track.scrolly > .stages-fig { position: sticky; top: var(--stick, 76px); margin-bottom: 0; }
.stages-progress { display: none; height: 2px; margin: -6px 0 16px; background: var(--line); border-radius: 2px; overflow: hidden; }
.stages-progress i { display: block; height: 100%; width: 0; background: var(--acc); }
.scrolly .stages-progress { display: block; }
.stages-hint { display: none; }
.scrolly .stages-fig[data-view="without"] .stages-hint { display: inline; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stages { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; } }
.stage { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stage .k { font: 500 11.5px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.stage b { font-size: clamp(30px, 3.4vw, 38px); line-height: 1; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.stage .d { font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.stage .apps-list { font: 400 11.5px/1.5 var(--mono); color: var(--ink-3); margin-top: auto; padding-top: 6px; }
@media (min-width: 900px) {
  .stage:not(:last-child)::after { content: "→"; content: "→" / ""; position: absolute; right: -21px; top: 18px; font-family: var(--mono); font-size: 14px; color: var(--ink-3); }
}
.tally { margin-top: 16px; font: 500 14px/1.5 var(--mono); color: var(--bad); }
/* with / without: one switch rewrites all four stages in place */
.stages-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.stages-lbl { font: 500 12.5px/1.3 var(--mono); color: var(--ink-3); letter-spacing: .04em; }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.seg button { font: 500 13.5px var(--sans); color: var(--ink-2); background: none; border: 0; border-radius: 999px; padding: 7px 14px; min-height: 34px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
html:not(.js) .seg { display: none; }
.stage b, .stage .d, .stage .apps-list { transition: opacity .2s ease; }
.stages.swap .stage b, .stages.swap .stage .d, .stages.swap .stage .apps-list { opacity: 0; }
.stages-fig[data-view="with"] .stage { border-color: var(--line-2); }
.stages-fig[data-view="with"] .stage b { color: var(--acc-ink); }
.stages-fig[data-view="with"] .tally { color: var(--ink); }

/* ---------- what the vault is: the one dark band ---------- */
.vault { background: var(--code-bg); color: var(--code-ink); border-block: 1px solid var(--line); }
.vault .kicker { color: var(--on-code-acc); }
.vault .kicker::before, .vault .kicker::after { color: var(--code-dim); }
.vault h2 { color: var(--code-ink); font-size: clamp(30px, 5vw, 52px); line-height: 1.08; letter-spacing: -.03em; max-width: 18em; }
/* Reserve two lines on narrower screens, where the longest ending wraps, so nothing below jumps. */
@media (max-width: 899px) { .vault h2 { min-height: 2.16em; } }
.rot { color: var(--on-code-acc); display: inline-block; border-bottom: 3px solid currentColor; line-height: 1.02; }
@media (prefers-reduced-motion: no-preference) { .rot { transition: opacity .25s ease; } .rot.out { opacity: 0; } }
.vault-grid { display: grid; gap: 28px; margin-top: 36px; }
@media (min-width: 900px) { .vault-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.defs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.defs li { position: relative; padding-left: 28px; font-size: 17px; color: var(--code-ink); }
.defs li::before { content: "→"; content: "→" / ""; position: absolute; left: 0; font-family: var(--mono); color: var(--code-dim); }
.vault-text { display: grid; gap: 16px; align-content: start; }
.vault-text p { color: var(--code-ink); opacity: .86; font-size: 17px; }
.vault-text .vault-path { font: 400 13px/1.4 var(--mono); color: var(--code-dim); opacity: 1; }
.vault-text code { background: none; border: 0; padding: 0; color: var(--on-code-acc); white-space: nowrap; }

/* ---------- day timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 820px) { .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1080px) { .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.slot { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.slot .when { font-family: var(--mono); font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.slot .when::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); flex: none; }
.slot h3 { font-size: 19px; }
.slot p { color: var(--ink-2); font-size: 16px; }
.note { margin-top: 22px; font-size: 15.5px; color: var(--ink-3); max-width: 60em; }

/* ---------- feature rows ---------- */
.feature { display: grid; gap: 36px; align-items: center; }
.feature + .feature { margin-top: 88px; }
@media (min-width: 1000px) {
  .feature { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; }
  .feature.flip > :first-child { order: 2; }
  .feature > div:first-child { max-width: 34em; }
}
.feature h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; }
.feature .body { margin-top: 14px; color: var(--ink-2); font-size: 17.5px; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.feature > div > .checks:first-child { margin-top: 0; }
.checks li { position: relative; padding-left: 30px; color: var(--ink-2); font-size: 16.5px; }
.checks li::before {
  content: ''; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--ok-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%232c7349' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center/16px no-repeat;
}
:root[data-theme="dark"] .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236cc893' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .checks li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236cc893' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E"); }
}
.checks b { color: var(--ink); font-weight: 600; }

/* ---------- trust grid ---------- */
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }

/* ---------- install ---------- */
.install-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .install-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; } }
.install-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.install-card .step { font-size: 13.5px; font-weight: 600; color: var(--acc-ink); }
.install-card h3 { font-size: 22px; }
.install-card p { color: var(--ink-2); font-size: 16px; }
.install-card ol { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 16px; display: grid; gap: 6px; }
.install-card .btn { align-self: flex-start; margin-top: 4px; }
.reqs { margin-top: 24px; display: grid; gap: 10px; color: var(--ink-2); font-size: 15.5px; }
.reqs b { color: var(--ink); }

.code-wrap { position: relative; }
.code {
  margin: 0; background: var(--code-bg); color: var(--code-ink); border-radius: 12px;
  padding: 14px 92px 14px 16px; font-family: var(--mono); font-size: 13.5px; line-height: 1.65;
  white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line);
}
.code .dim { color: var(--code-dim); }
.copy {
  position: absolute; top: 8px; right: 8px; height: 34px; min-width: 34px; padding: 0 9px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: var(--code-ink);
  font: 500 12.5px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.copy:hover { background: rgba(255, 255, 255, .14); }
.copy svg { width: 15px; height: 15px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 14px; font-size: 22px; font-weight: 400; color: var(--ink-3); }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 0 18px; color: var(--ink-2); font-size: 16px; display: grid; gap: 10px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--ink-3); font-size: 14.5px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.site-foot .brand { font-size: 16px; margin-right: 0; }
.site-foot .brand img { width: 24px; height: 24px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-left: auto; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .meta { flex-basis: 100%; font-size: 13.5px; }

/* =========================================================
   Illustrative mockups (HTML, not screenshots). Decorative:
   each sits in a <figure> with a caption and aria-hidden art.
   ========================================================= */
/* Captions are numbered like figures in a paper: "fig. 01  Live demo: …".
   The counter skips hidden figures, so the hero's with/without pair shares one number. */
body { counter-reset: fig; }
.mock-fig { margin: 0; counter-increment: fig; }
.mock-fig figcaption { margin-top: 14px; font: 400 12.5px/1.5 var(--mono); color: var(--ink-3); display: flex; gap: 10px; align-items: baseline; }
.mock-fig figcaption::before { content: "fig. " counter(fig, decimal-leading-zero); content: "fig. " counter(fig, decimal-leading-zero) / ""; color: var(--ink); font-weight: 500; flex: none; }
.mock { font-family: var(--sans); color: var(--ink); user-select: none; }
.mock * { letter-spacing: 0; }

/* menu-bar strip + popover (hero) */
.desk { position: relative; border-radius: 18px; padding: 0 0 28px; background:
  radial-gradient(120% 90% at 85% 0%, var(--acc-wash) 0%, transparent 60%), var(--sunk);
  border: 1px solid var(--line); overflow: hidden; }
.menubar { display: flex; align-items: center; gap: 14px; height: 30px; padding: 0 14px; font-size: 12px; color: var(--ink-2);
  background: color-mix(in srgb, var(--surface) 70%, transparent); border-bottom: 1px solid var(--line); }
.menubar .sp { flex: 1; }
.menubar .mb-scout { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 5px; background: var(--line); color: var(--ink); font-weight: 600; }
.menubar .mb-scout svg { width: 13px; height: 13px; }
.popover { width: min(360px, calc(100% - 28px)); margin: 12px 14px 0 auto; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 14px; display: grid; gap: 12px; }
.pop-head { display: flex; align-items: center; gap: 10px; }
.pop-head .av { width: 30px; height: 30px; border-radius: 50%; background: var(--acc-wash); color: var(--acc-ink); display: grid; place-items: center; }
.pop-head .av svg { width: 16px; height: 16px; }
.pop-head .t b { display: block; font-size: 15px; font-weight: 650; }
.pop-head .t span { font-size: 11px; color: var(--ink-3); }
.pop-head .urgent { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--bad); background: var(--bad-wash); border-radius: 999px; padding: 4px 9px; }
.pop-head .open { font-size: 11.5px; border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 9px; color: var(--ink-2); }
.status { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; background: var(--bg); }
.status .led { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.status b { display: block; font-size: 12.5px; font-weight: 600; }
.status span { font-size: 11px; color: var(--ink-3); }
.cap { font-size: 9.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.up { border: 1px solid var(--line); border-radius: 9px; background: var(--bg); padding: 0 10px; }
.up .r { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.up .r:first-child { border-top: 0; }
.up .r b { display: block; font-size: 12px; font-weight: 550; }
.up .r span { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.up .r i { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 550; color: var(--acc-ink); }

/* briefing card (hero, overlapping) */
.brief { width: min(420px, calc(100% - 28px)); margin: -18px auto 0 14px; position: relative; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 16px 16px 6px; }
@media (min-width: 560px) { .brief { margin-top: -64px; } }
.brief-h { display: flex; align-items: baseline; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.brief-h b { font-size: 14px; font-weight: 650; }
.brief-h span { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.item { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.item:first-of-type { border-top: 0; }
.item .p { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }
.item h4 { font-size: 13px; font-weight: 600; line-height: 1.4; letter-spacing: -.005em; }
.item p { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.45; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tag { font-family: var(--mono); font-size: 10px; font-weight: 500; border-radius: 5px; padding: 2px 7px; background: var(--sunk); color: var(--ink-2); border: 1px solid var(--line); }
.tag.ok { background: var(--ok-wash); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-wash); color: var(--warn); border-color: transparent; }
.tag.bad { background: var(--bad-wash); color: var(--bad); border-color: transparent; }
.p.red { background: var(--bad); } .p.amb { background: var(--warn); } .p.gray { background: var(--ink-3); }

/* app window */
.win { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.win-bar span { margin: 0 auto; font-size: 12px; color: var(--ink-3); font-weight: 500; padding-right: 40px; }
.win-body { display: grid; grid-template-columns: 1fr; min-height: 300px; }
@media (min-width: 560px) { .win-body { grid-template-columns: 150px 1fr; } }
.side { display: none; background: var(--bg); border-right: 1px solid var(--line); padding: 12px 8px; font-size: 12px; }
@media (min-width: 560px) { .side { display: block; } }
.side .g { font-size: 9.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 4px 8px 6px; }
.side .s { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 7px; color: var(--ink-2); }
.side .s.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.side .s em { margin-left: auto; font-style: normal; font-size: 10px; background: var(--acc-wash); color: var(--acc-ink); border-radius: 999px; padding: 0 6px; }
.pane { padding: 16px; display: grid; gap: 12px; align-content: start; }
.pane h5 { margin: 0; font-size: 16px; font-weight: 650; }
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 10px 12px; background: var(--warn-wash); color: var(--ink); font-size: 12px; line-height: 1.45; }
.alert svg { width: 16px; height: 16px; color: var(--warn); flex: none; margin-top: 1px; }
.alert b { display: block; font-size: 12.5px; }
.alert .act { margin-left: auto; align-self: center; font-size: 11px; font-weight: 600; border: 1px solid var(--line-2); background: var(--surface); border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); }
.tile span { display: block; font-size: 10px; color: var(--ink-3); }
.tile b { font-size: 17px; font-weight: 650; }
.tile small { display: block; font-size: 10px; color: var(--ok); margin-top: 1px; }
.runs { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.runs .r { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 9px; align-items: center; padding: 8px 11px; border-top: 1px solid var(--line); font-size: 11.5px; }
.runs .r:first-child { border-top: 0; }
.runs .r .led { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.runs .r .led.warn { background: var(--warn); }
.runs .r b { font-weight: 550; }
.runs .r span { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }


/* privacy layers */
.layers { display: grid; gap: 10px; align-content: start; }
.layer { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.layer .n { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--acc-wash); color: var(--acc-ink); font-weight: 700; font-size: 14px; }
.layer b { display: block; font-size: 15.5px; color: var(--ink); font-weight: 600; }
.layer span { display: block; font-size: 14.5px; color: var(--ink-2); margin-top: 2px; }

/* =========================================================
   Interactive layer. Everything below works without JS too:
   html.js is set by site.js, and JS-only controls are hidden
   until then. Reduced motion turns off every animation.
   ========================================================= */

/* header extras: jump palette button, scroll progress */
.kbd-btn { display: none; width: auto; padding: 0 6px; }
.kbd-btn kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; color: var(--ink-2); background: var(--surface); }
@media (min-width: 900px) and (hover: hover) { .kbd-btn { display: inline-grid; } }
/* chapter strip: a numbered index under the header, shown only while a chapter
   (01-06) is on screen. Without JS it stays hidden; the header nav still works. */
/* It hangs below the header instead of sitting in the page flow: growing the sticky header
   pushed the whole page down 40px mid-scroll, which read as jitter (and could flip which
   section counted as current, toggling the strip back off). Showing it now moves nothing. */
.chapters { display: none; }
html.js .chapters { display: block; position: absolute; left: 0; right: 0; top: 100%; background: color-mix(in srgb, var(--bg) 96%, transparent); border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-4px); pointer-events: none; transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
html.js .chapters.on { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .2s ease, transform .2s ease, visibility 0s; }
.chapters .wrap { display: flex; gap: 4px; height: 40px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.chapters .wrap::-webkit-scrollbar { display: none; }
.chapters a { flex: none; display: inline-flex; gap: 7px; align-items: baseline; padding: 5px 10px; border-radius: 7px; font: 400 13px/1.2 var(--mono); color: var(--ink-3); text-decoration: none; }
.chapters a span { color: var(--ink-3); font-size: 11.5px; }
.chapters a:hover { color: var(--ink); background: var(--sunk); }
.chapters a.on { color: var(--ink); background: var(--sunk); }
.chapters a.on span { color: var(--acc-ink); }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.progress i { display: block; height: 100%; width: 0; background: var(--acc); }
section[id], h2[id] { scroll-margin-top: 116px; }

/* scroll reveal (only below the fold, only when motion is OK) */
@media (prefers-reduced-motion: no-preference) {
  html.js .rv { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), transform .6s cubic-bezier(.2, .7, .2, 1) var(--d, 0s); }
  html.js .rv.in { opacity: 1; transform: none; }
  .btn-primary { transition: background .15s, transform .2s ease-out; }
}

/* small buttons used inside demos */
.mini {
  font: 600 12.5px/1.2 var(--sans); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  border-radius: 8px; padding: 6px 11px; min-height: 32px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.mini:hover { border-color: var(--ink-3); }
.mini.ok { background: var(--ok-wash); color: var(--ok); border-color: transparent; }
.mini.act { background: var(--ink); color: var(--bg); border-color: transparent; }
.mini.act:hover { background: var(--ink-2); }
.mini:disabled { opacity: .5; cursor: default; }
html:not(.js) .mini, html:not(.js) .why-btn { display: none; }

/* ---------- hero: live briefing ---------- */
.hero-vis { display: grid; gap: 14px; perspective: 1400px; }
.desk { transition: transform .3s ease-out; }

.brief-h .mini { margin-left: 8px; padding: 3px 8px; min-height: 24px; font-size: 11px; }
.scan { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 10px 0 4px; max-height: 70px; overflow: hidden; transition: max-height .35s ease, opacity .35s ease, padding .35s ease; }
.scan.gone { max-height: 0; opacity: 0; padding: 0; }
.sc { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: 5px; border: 1px dashed var(--line-2); color: var(--ink-3); transition: background .2s, color .2s, border-color .2s; }
.sc.done { border-style: solid; border-color: transparent; background: var(--ok-wash); color: var(--ok); }
.scn { margin-left: auto; font-size: 10.5px; color: var(--ink-3); }
.scn b { color: var(--ink); }
html:not(.js) .scan { display: none; }
.brief .item { transition: opacity .4s ease, transform .4s ease; }
html.js .brief .item:not(.shown) { opacity: 0; transform: translateY(6px); }
.tags { align-items: center; }
.why-btn { margin-left: auto; font: 600 11px var(--sans); color: var(--acc-ink); background: none; border: 0; padding: 4px 0 4px 6px; cursor: pointer; }
.why-btn::after { content: '›'; display: inline-block; margin-left: 4px; transition: transform .2s; }
.why-btn[aria-expanded="true"]::after { transform: rotate(90deg); }
.why { margin-top: 8px; font-size: 11.5px; line-height: 1.5; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.why b { color: var(--ink); font-weight: 600; }


/* ---------- how it works: scroll-driven day ---------- */
.day { display: grid; gap: 24px; }
.day-panel { display: none; }
@media (min-width: 1000px) {
  .day { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 48px; align-items: start; }
  /* below the header and the chapter strip (~101px), and centred in the viewport when there is room,
     so the pinned panel doesn't sit at the top of a mostly empty column */
  .day-panel { display: grid; gap: 14px; position: sticky; top: max(118px, calc(50vh - 230px)); }
  .timeline.steps { grid-template-columns: minmax(0, 1fr); }
  .timeline.steps .slot.on { border-color: var(--acc); box-shadow: var(--shadow); background: linear-gradient(180deg, var(--acc-wash), var(--surface) 70%); }
}
.timeline.steps .slot { transition: border-color .35s, box-shadow .35s, background .35s; }
.dial { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px 14px; }
.rail { position: relative; height: 10px; border-radius: 99px; border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--sunk) 0 25%, var(--acc-wash) 25% 95.8%, var(--sunk) 95.8%); }
.mk { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--ink-3); }
.needle { position: absolute; top: -10px; bottom: -10px; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--acc);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 20%, transparent); transition: left .55s cubic-bezier(.2, .7, .2, 1), opacity .3s; }
.needle.off { opacity: 0; }
.hours { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.dp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.dp-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dp-time { font-family: var(--mono); font-size: 28px; font-weight: 600; color: var(--acc-ink); letter-spacing: -.02em; }
.dp-top b { font-size: 19px; font-weight: 650; }
.io { display: grid; grid-template-columns: 62px 1fr; gap: 10px; font-size: 15.5px; color: var(--ink-2); }
.io span { font-family: var(--mono); font-size: 12px; color: var(--ink-3); padding-top: 3px; }
.io em { font-style: normal; }
.dp-commit { font-family: var(--mono); font-size: 12.5px; background: var(--code-bg); color: var(--code-ink); border-radius: 9px; padding: 10px 12px; overflow-wrap: anywhere; margin-top: 4px; }
.dp.flash { animation: pop .4s ease; }
.dp-hint { font-size: 13.5px; color: var(--ink-3); }

/* ---------- self-improvement bento ---------- */
/* One full-width row per habit: the text on the left, its demo on the right, like the feature
   rows elsewhere. Side by side in a three-column grid, the cards' very different demo heights
   left large empty areas in or under the shorter cards. */
.bento { display: grid; gap: 16px; }
.demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; }
.demo-card h3 { font-size: 18.5px; line-height: 1.3; }
.demo-card > p { color: var(--ink-2); font-size: 15px; }
.demo-card .demo { margin-top: 4px; }
@media (min-width: 860px) {
  .bento { gap: 20px; }
  .demo-card { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-rows: auto auto; column-gap: 48px; row-gap: 10px; padding: 28px 32px; }
  .demo-card > h3 { grid-column: 1; align-self: end; font-size: 21px; }
  .demo-card > p { grid-column: 1; align-self: start; font-size: 16px; max-width: 34em; }
  .demo-card .demo { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; align-self: center; }
}
.demo { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 13.5px; display: grid; gap: 9px; align-content: start; }
.demo .mini { justify-self: start; }
.mono { font-family: var(--mono); font-size: 12px; }
.pill { font-family: var(--mono); font-size: 11px; font-weight: 500; border-radius: 999px; padding: 2px 9px; transition: background .2s, color .2s; }
.pill.bad { background: var(--bad-wash); color: var(--bad); }
.pill.ok { background: var(--ok-wash); color: var(--ok); }
.pc-head, .pr-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--ink-2); flex-wrap: wrap; }
.pcard .ln { display: grid; grid-template-columns: 50px 1fr; gap: 8px; color: var(--ink); line-height: 1.45; }
.pcard .ln span { font-family: var(--mono); font-size: 11px; color: var(--ink-3); padding-top: 2px; }
.pc-foot { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: 12.5px; border-top: 1px dashed var(--line-2); padding-top: 9px; }
.occ { display: flex; gap: 4px; flex: none; }
.occ i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); transition: background .3s; }
.pcard[data-state="fixed"] .occ i { background: var(--ok); }
.pr-timer { font-size: 12px; color: var(--warn); font-weight: 600; }
.prop[data-state="applied"] .pr-timer { color: var(--ok); }
.prop[data-state="rejected"] .pr-timer { color: var(--ink-3); }
.pr-text span { color: var(--ink-3); font-size: 12.5px; }
.pr-file { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-2); }
.diffstat .a { color: var(--ok); } .diffstat .r { color: var(--bad); }
.pr-diff { margin: 0; font: 400 11.5px/1.65 var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pr-diff .a { color: var(--ok); } .pr-diff .r { color: var(--bad); } .pr-diff .d { color: var(--ink-3); }
.prop[data-state="rejected"] .pr-diff { opacity: .45; }
.prop[data-state="rejected"] .pr-text { text-decoration: line-through; color: var(--ink-3); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.prop { grid-template-areas: "head" "file" "diff" "swap" "acts"; }
.prop .pr-head { grid-area: head; } .prop .pr-file { grid-area: file; } .prop .pr-diff { grid-area: diff; }
.prop .pr-text, .prop .commit-line { grid-area: swap; align-self: center; } .prop .acts { grid-area: acts; }
.commit-line { visibility: hidden; font-family: var(--mono); font-size: 11.5px; line-height: 1.5; background: var(--code-bg); color: var(--code-ink); border-radius: 8px; padding: 8px 10px; }
.commit-line b, .commit-line em { color: var(--code-dim); font-weight: 500; font-style: normal; }
.prop[data-state="applied"] .commit-line { visibility: visible; }
.prop[data-state="applied"] .pr-text { visibility: hidden; }
.held { border-left: 3px solid var(--warn); }
.held[data-state="confirmed"] { border-left-color: var(--ok); }
.held[data-state="rejected"] { border-left-color: var(--ink-3); }
.held-lbl { font-weight: 600; font-size: 12.5px; color: var(--warn); }
.held[data-state="confirmed"] .held-lbl { color: var(--ok); }
.held[data-state="rejected"] .held-lbl { color: var(--ink-2); }
.held-claim { line-height: 1.5; min-height: 4.5em; } /* the answered text is shorter; keep the row from shrinking as it plays */
@media (min-width: 860px) { .held-claim { min-height: 3em; } }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* research queue, inside the research run in 01 */
.slot .rq { margin-top: 6px; }
.rq-pin { display: grid; gap: 3px; background: var(--acc-wash); border-radius: 8px; padding: 8px 10px; }
.rq-pin code { font-size: 11.5px; color: var(--acc-ink); overflow-wrap: anywhere; white-space: normal; background: none; border: 0; padding: 0; }
.rq-pin span { font-size: 11.5px; color: var(--ink-2); }
.rq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rq-list li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 6px; transition: background .3s; }
.rq-list li b { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.rq-list li span { font-size: 12px; color: var(--ink-3); }
.rq-list li.running { background: var(--acc-wash); }
.rq-list li.running span { color: var(--acc-ink); }
.rq-list li.done b { color: var(--ink-3); text-decoration: line-through; }
.rq-list li.done span { color: var(--ink-3); }

/* the Slack question, inside 06 */
.chat { padding: 0; overflow: hidden; gap: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.chat-head .av { width: 28px; height: 28px; border-radius: 8px; background: var(--acc); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.chat-head b { display: block; font-size: 13px; line-height: 1.2; }
.chat-head span { font-size: 11px; color: var(--ink-3); }
.chat-head .mini { margin-left: auto; min-width: 32px; justify-content: center; }
.chat-body { display: flex; flex-direction: column; gap: 8px; padding: 12px; min-height: 196px; }
.msg { max-width: 90%; padding: 8px 11px; border-radius: 12px; font-size: 13px; line-height: 1.45; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.msg.me { align-self: flex-end; background: var(--ink); color: var(--bg); border-color: transparent; }
.msg .react { display: flex; gap: 6px; margin-top: 7px; }
.msg .react button { border: 1px solid var(--line-2); background: var(--bg); border-radius: 999px; padding: 2px 9px; min-height: 28px; cursor: pointer; font-size: 13px; }
.msg .react button[aria-pressed="true"] { background: var(--acc-wash); border-color: var(--acc); }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.chat-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 12px 12px; }
.chat-chips:empty { display: none; }
@media (prefers-reduced-motion: no-preference) { .msg { animation: pop .25s ease; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- cross-check sandbox ---------- */
.xc { padding: 18px; gap: 14px; background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow-lg); border-radius: 14px; }
.xc-claim { display: grid; gap: 4px; }
.xc-claim b { font-size: 16.5px; line-height: 1.35; }
.xc-srcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 440px) { .xc-srcs { grid-template-columns: minmax(0, 1fr); } }
.srct { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 10px; align-items: center; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 56px; cursor: pointer; color: var(--ink); font: inherit; transition: border-color .2s, background .2s; }
.srct:hover { border-color: var(--ink-3); }
.srct .sw { grid-row: span 2; width: 30px; height: 18px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; }
.srct .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.srct[aria-pressed="true"] { background: var(--surface); border-color: var(--line-2); }
.srct[aria-pressed="true"] .sw { background: var(--ok); }
.srct.conflict[aria-pressed="true"] .sw { background: var(--bad); }
.srct[aria-pressed="true"] .sw::after { transform: translateX(12px); }
.srct b { font-size: 14px; font-weight: 600; }
.srct small { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.xc-out { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 14.5px; color: var(--ink-2); min-height: 64px; }
/* tall enough for the longest result (contradicted), so the box never resizes as the tag changes */
@media (max-width: 520px) { .xc-out { min-height: 86px; } }
.xc-out .tag { font-size: 12px; padding: 3px 9px; flex: none; }
.xc-out.flash { animation: pop .3s ease; }

/* ---------- how it reads: tools → vault → outputs ---------- */
.hub-fig { margin-bottom: 48px; }
.hub-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px; }
.hub { width: 100%; min-width: 620px; height: auto; display: block; overflow: visible; }
.hub .ln { stroke: var(--line-2); stroke-width: 1.4; fill: none; }
.hub .ln.out { stroke: var(--acc); stroke-opacity: .55; }
.hub .nd rect { fill: var(--bg); stroke: var(--line-2); }
.hub .nd text { font: 400 12px var(--mono); fill: var(--ink); }
.hub .lbl rect { fill: var(--surface); stroke: var(--line); }
.hub .lbl text { font: 400 10px var(--mono); fill: var(--ink-3); }
.hub .core rect { fill: var(--ink); }
.hub .core text { font: 500 14px var(--mono); fill: var(--bg); }
.hub .core .s { font-size: 10.5px; font-weight: 400; fill: var(--bg); opacity: .75; }
.hub .hd { font: 500 10px var(--mono); letter-spacing: .08em; fill: var(--ink-3); }
.hub-hint { display: none; }
@media (max-width: 699px) { .hub-hint { display: inline; } }

/* ---------- everything is a file: annotated note ---------- */
.spec { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 14px; display: grid; gap: 12px; }
.spec-code { margin: 0; background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 14px 16px; font: 400 12.5px/1.7 var(--mono); overflow-x: auto; white-space: pre; }
.spec-code .d { color: var(--code-dim); }
.spec-code .y { color: #e5b85a; } /* on --code-bg, dark in both themes */
.spec-code .l { color: var(--on-code-acc); }
.spec-code .h { color: #ffffff; font-weight: 500; }
.spec-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .spec-notes { grid-template-columns: minmax(0, 1fr); } }
.sn { border-left: 2px solid var(--line-2); padding: 2px 0 2px 10px; display: grid; gap: 3px; min-width: 0; }
.sn .k { font: 500 11px/1.2 var(--mono); letter-spacing: .04em; }
.sn span:last-child { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.sn.y { border-left-style: dashed; } .sn.y .k { color: var(--ink-2); }
.sn.p { border-color: var(--ink-3); } .sn.p .k { color: var(--ink); }
.sn.l { border-color: var(--acc); } .sn.l .k { color: var(--acc-ink); }
.equation { font: 500 12px/1.4 var(--mono); letter-spacing: .04em; color: var(--ink-2); border-top: 1px dashed var(--line-2); padding-top: 10px; }

/* ---------- what's in the vault: folder bar ---------- */
.mock-fig.vault-fig { margin: 72px 0 0; }
.vault-bar { border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.vb-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--ink); color: var(--bg); font: 400 13px/1.3 var(--mono); padding: 12px 16px; }
.vb-top b { font-weight: 500; }
.vb-top span { opacity: .75; }
.vb-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .vb-cols { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.vb-cols > div { padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 899px) { .vb-cols > div:nth-child(2n) { border-right: 0; } .vb-cols > div:nth-last-child(-n+2) { border-bottom: 0; } }
@media (min-width: 900px) { .vb-cols > div { border-bottom: 0; } .vb-cols > div:last-child { border-right: 0; } }
.vb-trace { margin-top: 12px; min-height: 2.9em; font: 400 13px/1.45 var(--mono); color: var(--ink-2); }
.vb-trace b { color: var(--acc-ink); font-weight: 500; }
html:not(.js) .vb-trace { display: none; }
.fc { transition: background .2s, color .2s, opacity .2s, box-shadow .2s; }
.vault-bar.tracing .fc:not(.hot) { opacity: .4; }
.fc.hot { background: var(--acc-wash); color: var(--acc-ink); box-shadow: inset 0 0 0 1px var(--acc); }
.spec-code button.l { font: inherit; color: var(--on-code-acc); background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; border-radius: 3px; }
.spec-code button.l:hover, .spec-code button.l.on { color: #ffffff; background: rgba(238, 138, 92, .25); text-decoration: none; }
.vb-cols h4 { font: 500 12.5px/1.3 var(--mono); letter-spacing: 0; margin-bottom: 4px; }
.vb-cols h4 small { display: block; font: 400 11.5px/1.3 var(--sans); color: var(--ink-3); margin-top: 3px; }
.fc { font: 400 11px/1.3 var(--mono); background: var(--sunk); color: var(--ink-2); border-radius: 5px; padding: 4px 6px; overflow-wrap: anywhere; }
.fc.more { background: none; color: var(--ink-3); padding: 2px 0 0; font-family: var(--sans); font-size: 11.5px; }

/* ---------- every run is a commit: heatmap + log ---------- */
.commits { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 18px; display: grid; gap: 14px; }
.cm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; font: 400 12.5px/1.3 var(--mono); color: var(--ink-3); }
.cm-head b { font: 650 24px/1 var(--sans); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }
.heat { display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; grid-template-columns: repeat(52, minmax(0, 1fr)); gap: 2px; }
.heat i { aspect-ratio: 1; border-radius: 2px; background: var(--sunk); }
.heat i.l1 { background: color-mix(in srgb, var(--acc) 25%, var(--surface)); }
.heat i.l2 { background: color-mix(in srgb, var(--acc) 45%, var(--surface)); }
.heat i.l3 { background: color-mix(in srgb, var(--acc) 70%, var(--surface)); }
.heat i.l4 { background: var(--acc); }

/* ---------- read it anywhere ---------- */
.readers-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .readers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.readers-split { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1000px) { .readers-split { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; } }
.chat-fig .chat { background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow-lg); border-radius: 14px; }
.chat-fig .chat-body { min-height: 260px; background: var(--bg); }
.readers-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 4px; align-content: start; }
.readers-grid b { font: 500 14px/1.3 var(--mono); color: var(--ink); }
.readers-grid li span { font-size: 15px; color: var(--ink-2); }
.readers-grid .soon b::after { content: " · planned"; font-weight: 400; color: var(--ink-3); }

.log { font-family: var(--mono); font-size: 11.5px; line-height: 1.6; background: var(--code-bg); color: var(--code-ink); border-radius: 9px; padding: 10px 12px; display: grid; gap: 2px; }
.log b { color: var(--code-dim); font-weight: 500; }

/* ---------- jump palette (⌘K) ---------- */
.cmdk { position: fixed; inset: 0; z-index: 200; display: grid; place-items: start center; padding: 14vh 16px 16px; background: color-mix(in srgb, var(--ink) 32%, transparent); }
.cmdk[hidden] { display: none; }
.cmdk-box { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.cmdk input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: 500 17px var(--sans); padding: 16px 18px; outline: none; }
.cmdk ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.cmdk li { padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-size: 15px; }
.cmdk li.sel { background: var(--acc-wash); color: var(--ink); }
.cmdk-foot { font-size: 12px; color: var(--ink-3); padding: 8px 14px 12px; border-top: 1px solid var(--line); }
.cmdk-foot kbd { border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; font-size: 11px; margin-right: 2px; }

/* reduced motion: no transitions anywhere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- legal pages ---------- */
.legal main { padding: 56px 0 24px; }
.legal .doc { max-width: 720px; }
.legal h1 { font-size: clamp(34px, 5vw, 46px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
.legal .updated { font-family: var(--mono); font-size: 13px; color: var(--ink-3); margin: 10px 0 32px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; line-height: 1.25; }
.legal h3 { font-size: 17.5px; margin: 26px 0 8px; }
.legal p, .legal li { font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.legal p { margin: 0 0 16px; }
.legal ul { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin: 0 0 8px; }
.legal b, .legal strong { color: var(--ink); font-weight: 600; }
.legal .lead { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 24px 8px; margin: 0 0 20px; }
.legal .lead p { font-size: 18px; color: var(--ink); }
.legal .code { padding-right: 16px; margin: 0 0 16px; }
