/* moorapp.com design tokens and the shared chrome (header, footer, buttons, docs). Spec 2.1.
   Neutral light and dark palettes, Moor brass as the ONLY accent, four feature colours for chips and kickers, the system
   (SF) font stack plus JetBrains Mono for key chips. Pages that opt in with <html data-themeable> follow the system's
   appearance or the header toggle (data-theme="light|dark", saved by site.js); anything else stays dark.
   The token contract is in docs/superpowers/plans/2026-10-26-redesign-contract.md (Site). */

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(/https/moorapp.com/fonts/JetBrainsMono-variable.woff2) format("woff2");
}

/* ---------- Tokens: dark (default) ---------- */
:root, .desk, .panel, .mac-screen, .ch-art, .tp-stage, .launch-art, .screen {
  --bg: #0e0f12;
  --band: #17181c;
  --surface: #1c1d22;
  --surface-2: #25262c;
  --line: rgb(255 255 255 / .10);
  --line-strong: rgb(255 255 255 / .20);
  --text: #f2f2f4;
  --muted: #a8a8b3;               /* 7.9:1 on --bg, 6.9:1 on --band */
  --brass: #e3b46a;               /* brass as text / strokes: 10:1 on --bg */
  --brass-fill: #e3b46a;          /* brass as a fill (buttons): always with --on-brass text */
  --brass-hi: #f6d9a3;
  --on-brass: #1b1206;
  --signal: #4fd18b;
  --warn: #ffb547;
  --err: #ff8a80;
  --f-docks: #6ea8ff;             /* feature colours: chips and kickers only */
  --f-widgets: #5bd49a;
  --f-profiles: #b59bff;
  --f-agents: #ff9a6b;
  --fg-rgb: 242 242 244;
  --accent-rgb: 227 180 106;
  --nav-bg: rgb(14 15 18 / .82);
  --shadow-soft: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .6);
  --shadow-window: 0 2px 6px rgb(0 0 0 / .4), 0 40px 90px -30px rgb(0 0 0 / .8);
  color-scheme: dark;
}
/* ---------- Tokens: light ---------- */
@media (prefers-color-scheme: light) {
  :root[data-themeable]:not([data-theme="dark"]) {
    --bg: #ffffff; --band: #f5f5f7; --surface: #ffffff; --surface-2: #f5f5f7;
    --line: rgb(28 28 33 / .10); --line-strong: rgb(28 28 33 / .22);
    --text: #1c1c21; --muted: #5b5b66;      /* 6.6:1 on white, 6.1:1 on --band */
    --brass: #8a5a14;                       /* 5.9:1 on white */
    --signal: #1f7a4a; --warn: #9a5b00; --err: #b42318;
    --f-docks: #1f5fd1; --f-widgets: #17784a; --f-profiles: #6a42d6; --f-agents: #b4481b;
    --fg-rgb: 28 28 33; --accent-rgb: 138 90 20;
    --nav-bg: rgb(255 255 255 / .85);
    --shadow-soft: 0 1px 2px rgb(20 20 30 / .06), 0 12px 32px -12px rgb(20 20 30 / .18);
    --shadow-window: 0 2px 6px rgb(20 20 30 / .08), 0 40px 90px -30px rgb(20 20 30 / .35);
    color-scheme: light;
  }
}
:root[data-themeable][data-theme="light"] {
  --bg: #ffffff; --band: #f5f5f7; --surface: #ffffff; --surface-2: #f5f5f7;
  --line: rgb(28 28 33 / .10); --line-strong: rgb(28 28 33 / .22);
  --text: #1c1c21; --muted: #5b5b66;
  --brass: #8a5a14;
  --signal: #1f7a4a; --warn: #9a5b00; --err: #b42318;
  --f-docks: #1f5fd1; --f-widgets: #17784a; --f-profiles: #6a42d6; --f-agents: #b4481b;
  --fg-rgb: 28 28 33; --accent-rgb: 138 90 20;
  --nav-bg: rgb(255 255 255 / .85);
  --shadow-soft: 0 1px 2px rgb(20 20 30 / .06), 0 12px 32px -12px rgb(20 20 30 / .18);
  --shadow-window: 0 2px 6px rgb(20 20 30 / .08), 0 40px 90px -30px rgb(20 20 30 / .35);
  color-scheme: light;
}

/* ---------- Tokens: type, shape, motion (same in both appearances) ---------- */
:root {
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-display: clamp(2.5rem, 1.6rem + 3.2vw, 3.5rem);   /* H1: 56/60 on desktop */
  --lh-display: 1.0715;
  --fs-h2: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);          /* 40/46 */
  --fs-h3: 1.5rem;                                        /* 24/30 */
  --fs-h4: 1.125rem;                                      /* 18/26 */
  --fs-body: 1.0625rem;                                   /* 17/26 */
  --fs-small: .9375rem;                                   /* 15/22 */
  --fs-fine: .875rem;                                     /* 14/20: nothing is smaller */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
  --gutter: clamp(16px, 5vw, 72px);
  --measure: 70ch;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: .6s;
  --nav-h: 64px;
}

/* Legacy names, kept so home.css, launchpad.css, theme.css and the blog keep working until their pieces move to the
   tokens above. Whoever migrates a stylesheet deletes the aliases it no longer uses. --ink was the BACKGROUND. */
:root, .desk, .panel, .mac-screen, .ch-art, .tp-stage, .launch-art, .screen {
  --ink: var(--bg); --ink-2: var(--band); --deep: var(--band); --tide: var(--surface-2);
  --mist: var(--muted); --foam: var(--text);
  --brass-2: var(--brass); --gold-1: var(--brass-hi); --gold-2: var(--brass-fill); --on-gold: var(--on-brass);
  --card-shadow: var(--shadow-window); --serif: var(--sans);
  color: var(--text);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--fs-body)/1.53 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img, video, svg { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 60; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: var(--r-md);
  background: var(--brass-fill); color: var(--on-brass); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { text-wrap: balance; }
h1 { font: 700 var(--fs-display)/var(--lh-display) var(--sans); letter-spacing: -0.025em; margin: 0 0 24px; }
h2 { font: 700 var(--fs-h2)/1.15 var(--sans); letter-spacing: -0.02em; }
h3 { font: 600 var(--fs-h3)/1.25 var(--sans); letter-spacing: -0.01em; }
h4 { font: 600 var(--fs-h4)/1.4 var(--sans); }
h1 em, h2 em, .section-title em { font-style: normal; color: var(--brass); }

/* Key chips and feature chips */
kbd, .chip {
  font: 500 var(--fs-fine)/1 var(--mono);
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; gap: 4px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text);
}
kbd { font-size: .875em; min-height: 0; padding: 3px 7px; display: inline-block; line-height: 1.2; }
.kicker, .eyebrow { font: 600 var(--fs-fine)/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--brass); margin: 0 0 16px; }
.chip.docks, .kicker.docks { color: var(--f-docks); }
.chip.widgets, .kicker.widgets { color: var(--f-widgets); }
.chip.profiles, .kicker.profiles { color: var(--f-profiles); }
.chip.agents, .kicker.agents { color: var(--f-agents); }
.chip.docks, .chip.widgets, .chip.profiles, .chip.agents { border-color: currentColor; border-bottom-width: 1px; background: color-mix(in srgb, currentColor 10%, transparent); }
.chip.docks > *, .chip.widgets > *, .chip.profiles > *, .chip.agents > * { color: inherit; }
.fine { font: 400 var(--fs-fine)/1.5 var(--sans); color: var(--muted); margin: 0; }
.muted { color: var(--muted); }

/* ---------- Buttons: .button is the primary (brass); .button.ghost is the quiet one ---------- */
.button, .waitlist button, .notify button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--r-md);
  background: var(--brass-fill); color: var(--on-brass); font: 600 var(--fs-body)/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), background-color .15s, border-color .15s;
}
.button:hover, .waitlist button:hover, .notify button:hover { background: var(--brass-hi); transform: translateY(-1px); }
.button:active { transform: none; }
.button:disabled, .waitlist button:disabled, .notify button:disabled { opacity: .6; cursor: default; transform: none; }
/* Download: Mac-style, black with the Apple logo on light pages and white on dark ones. */
.button.mac { background: var(--text); color: var(--bg); }
.button.mac:hover { background: rgb(var(--fg-rgb) / .82); }
.button.mac::before {
  content: ""; flex: none; width: 1.05em; height: 1.05em; margin-top: -.15em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701'/%3E%3C/svg%3E") center / contain no-repeat;
}
.button.ghost, .button.secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.button.ghost:hover, .button.secondary:hover { background: rgb(var(--fg-rgb) / .06); border-color: rgb(var(--fg-rgb) / .35); }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-note { flex-basis: 100%; margin: 6px 0 0; font: 400 var(--fs-fine)/1.5 var(--sans); color: var(--muted); }
.form-note.ok { color: var(--signal); }
.form-note.err { color: var(--err); }
.hp { position: absolute; left: -9999px; }

/* Forms (the license lookup and the newsletter box) */
.waitlist, .notify { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.waitlist input[type=email], .waitlist input[type=text], .notify input[type=email] {
  flex: 1 1 240px; min-width: 0; min-height: 44px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s;
}
/* A labelled field: the visible label sits above its input; the Find button lines up with the inputs' bottom edge. */
.waitlist:has(.field) { align-items: flex-end; }
.field { flex: 1 1 240px; min-width: 0; }
.field label { display: block; margin: 0 0 6px; font: 600 var(--fs-small)/1.4 var(--sans); color: var(--text); }
/* No placeholder to mark the box, so its edge has to be seen on its own (3:1). */
.waitlist .field input { display: block; width: 100%; border-color: var(--muted); }
.order { margin: 16px 0; }
.order strong, .order-number { color: var(--text); }
.order-number { font: 600 1em var(--mono); letter-spacing: .04em; user-select: all; }
.waitlist input:focus, .notify input:focus { border-color: var(--brass); outline-offset: 2px; }
.waitlist input::placeholder, .notify input::placeholder { color: var(--muted); }

/* ---------- Header (partial: <!--#header-->) ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; min-height: var(--nav-h);
  display: flex; align-items: center; gap: 8px; padding: 0 var(--gutter);
  background: var(--nav-bg); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 700 1.25rem/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; color: var(--text); }
.brand img { border-radius: 7px; flex: none; }
.nav nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill); font-size: var(--fs-small); font-weight: 500;
  color: var(--muted); text-decoration: none; transition: color .15s, background-color .15s; }
.nav nav a:hover { color: var(--text); background: rgb(var(--fg-rgb) / .06); }
.nav nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brass); border-radius: 0; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.nav-actions .button { padding: 0 16px; font-size: var(--fs-small); }
.nav-tools { display: flex; align-items: center; gap: 4px; margin-left: 4px; }   /* the two toggles are added by site.js */
.theme-toggle, .menu-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--text); transition: background-color .15s, border-color .15s; }
.theme-toggle:hover, .menu-toggle:hover { background: rgb(var(--fg-rgb) / .08); border-color: var(--line); }
.theme-toggle svg, .menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-toggle { display: none; }
@media (max-width: 920px) {
  .menu-toggle { display: inline-grid; }
  .nav nav { display: none; }
  .nav-actions { margin-left: auto; }
  .nav.open nav { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    padding: 8px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-soft); max-height: calc(100svh - var(--nav-h)); overflow-y: auto; }
  .nav.open nav a { min-height: 48px; padding: 0; border-radius: 0; font-size: var(--fs-body); color: var(--text); border-bottom: 1px solid var(--line); background: none; }
  .nav.open nav a[aria-current="page"] { box-shadow: none; color: var(--brass); }
}
@media (max-width: 560px) { .nav-actions .ghost { display: none; } .nav { gap: 4px; } .nav-tools { margin-left: 0; } .nav-actions { margin-left: auto; } }
@media (max-width: 400px) { .nav { gap: 8px; } .nav-actions .button { padding: 0 12px; } .brand { gap: 8px; } }
/* At 320 px the header's menu button ran off the right edge: the logo alone stands for "Moor" (the link keeps its "Moor home" label). */
@media (max-width: 359px) { .nav .brand span { display: none; } }

/* ---------- Footer (partial: <!--#footer-->) ---------- */
.site-footer { background: var(--band); border-top: 1px solid var(--line); padding: 56px var(--gutter) 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; max-width: 1240px; margin: 0 auto; }
.footer-about p { margin: 12px 0 0; color: var(--muted); max-width: 30ch; }
.footer-about p.fine { margin-top: 4px; }
.macbase-badge { display: inline-block; margin-top: 16px; }
.macbase-badge img { display: block; height: 54px; width: auto; }
.site-footer h2 { font: 600 var(--fs-fine)/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer nav a, .footer-legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; font-size: var(--fs-small); }
.site-footer nav a:hover, .footer-legal a:hover, .footer-bar a:hover { color: var(--brass); text-decoration: underline; }
.footer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; max-width: 1240px; margin: 28px auto 0; padding-top: 16px; border-top: 1px solid var(--line); }
.footer-bar .fine { flex: 1 1 380px; }
.footer-bar .fine a { text-decoration: underline; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0 16px; }
.footer-legal a { color: var(--muted); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
/* The blog's own renderer still writes the old footer until it consumes the partial. */
.footer { padding: 32px var(--gutter) 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: var(--fs-small); }
.footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--text); }
.footer .fine { flex-basis: 100%; }
.nav .nav-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); background: var(--brass-fill); color: var(--on-brass) !important; font-weight: 600; }

/* ---------- Motion: fade-up, never required to read ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal { animation: fade-up .7s var(--ease) both; animation-delay: calc(var(--d, 0) * 100ms + 80ms); }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .fade-up { animation: fade-up linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* A pause button for any looping, self-playing clip that has no native controls (added by site.js) */
.has-pause { position: relative; }
.video-pause { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid rgb(255 255 255 / .3); background: rgb(14 15 18 / .72); color: #f2f2f4; font: 600 var(--fs-small)/1 var(--sans); cursor: pointer; backdrop-filter: blur(10px); }
.video-pause:hover { background: rgb(14 15 18 / .9); }

/* ---------- Launch offer counter (offer.js) ---------- */
.offer-bar { display: block; width: 100%; height: 10px; border-radius: var(--r-pill); background: rgb(var(--fg-rgb) / .12); overflow: hidden; }
.offer-bar > span { display: block; height: 100%; width: var(--offer-pct, 0%); border-radius: inherit; background: var(--brass-fill); transition: width .6s var(--ease); }
.offer-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 14px; border-radius: var(--r-pill); font: 600 var(--fs-small)/1 var(--sans);
  background: rgb(var(--accent-rgb) / .14); color: var(--brass); border: 1px solid rgb(var(--accent-rgb) / .4); }

/* ---------- Shared section pieces ---------- */
section { padding: clamp(64px, 9vw, 120px) var(--gutter); }
.section-title { font: 700 var(--fs-h2)/1.15 var(--sans); letter-spacing: -0.02em; margin: 0 0 40px; max-width: 900px; }
.section-title.small { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem); }
.ticks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 16px; }
.ticks li { padding-left: 26px; position: relative; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .6em; width: 10px; height: 10px; border-radius: 3px; background: var(--brass-fill); transform: rotate(45deg); }
.ticks b { color: var(--text); font-weight: 600; }
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 44px; padding: 12px 0; font: 600 var(--fs-h4)/1.4 var(--sans); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 1.5rem/1 var(--sans); color: var(--brass); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: 0 0 16px; max-width: 720px; }

/* The builders panel on the current homepage (the homepage piece replaces this block) */
.panel { padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-window); }
.panel-head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-small); }
.panel-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); }
.panel-head .muted { margin-left: auto; font: 400 var(--fs-fine) var(--mono); }
.panel-big { font: 700 3rem/1 var(--sans); margin: 16px 0 4px; }
.panel-sub { font-size: var(--fs-small); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 110px; margin: 22px 0; }
.bars i { height: var(--h); border-radius: 6px 6px 3px 3px; background: rgb(var(--accent-rgb) / .35); }
.bars i.today { background: var(--brass-fill); }
.orders { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 18px; font: 400 var(--fs-fine) var(--mono); }
.orders .muted { margin: 0; }
.up { color: var(--signal); }
.safe-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.safe-grid p { margin: 0; color: var(--muted); }
.safe-grid b { display: block; color: var(--text); font-weight: 600; margin-bottom: 6px; }
@media (max-width: 900px) { .safe-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .safe-grid { grid-template-columns: 1fr; } }

/* ---------- Long-form pages (legal, changelog, 404, license, thanks) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: calc(var(--nav-h) + 56px) var(--gutter) 96px; }
.doc h2 { font: 700 var(--fs-h2)/1.2 var(--sans); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 48px 0 12px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.doc h3 { font: 600 var(--fs-h4)/1.4 var(--sans); margin: 28px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--text); }
.doc .anchor { display: block; padding-block: 10px; margin-block: -10px; color: inherit; text-decoration: none; }   /* heading permalinks: 44px+ target, no layout change */
.doc .anchor:hover::after, .doc .anchor:focus-visible::after { content: " #"; color: var(--brass); }
.doc a:not(.anchor):not(.button) { color: var(--brass); text-underline-offset: 3px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc code { font: 400 .9em var(--mono); background: rgb(var(--fg-rgb) / .07); padding: 2px 6px; border-radius: 6px; color: var(--text); }
.doc pre { background: var(--band); border: 1px solid var(--line); padding: 16px; border-radius: var(--r-md); overflow-x: auto; }
.doc pre code { background: none; padding: 0; }
.doc blockquote { margin: 18px 0; padding: 12px 18px; border-left: 3px solid var(--brass); background: rgb(var(--accent-rgb) / .08); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text); }
.doc .tip { border-left: 3px solid var(--brass); padding: 4px 0 4px 16px; }
.doc .ctas { margin: 24px 0; }
.doc .updated { font: 400 var(--fs-fine) var(--mono); color: var(--brass); }
.table { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--r-md); }
.doc table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); }
.doc th { color: var(--text); font-weight: 600; background: var(--band); }
.doc tr:last-child td { border-bottom: 0; }
.licensebox { font: 400 var(--fs-small)/1.5 var(--mono); word-break: break-all; padding: 18px; border-radius: var(--r-md); background: var(--band); border: 1px solid rgb(var(--accent-rgb) / .4); user-select: all; }
.release { border-top: 1px solid var(--line); padding: 26px 0; }
.pager { display: flex; justify-content: space-between; gap: 20px; margin: 56px 0 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.pager a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.pager a:hover { text-decoration: underline; }

/* Docs: sidebar, article, table of contents */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; gap: 48px; max-width: 1240px; margin: 0 auto; padding: calc(var(--nav-h) + 40px) var(--gutter) 90px; }
.docs .doc { padding: 0; max-width: 760px; margin: 0; }
.docs-nav, .toc { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; font-size: var(--fs-small); }
.docs-nav ul, .toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.docs-nav a, .toc a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; }
.docs-nav a:hover, .toc a:hover { color: var(--text); background: rgb(var(--fg-rgb) / .06); }
.docs-nav a[aria-current] { color: var(--on-brass); background: var(--brass-fill); font-weight: 600; }
.doc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.card { position: relative; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); transition: transform .3s var(--ease), border-color .3s; }
.card:hover { transform: translateY(-3px); border-color: rgb(var(--accent-rgb) / .45); }
.doc-cards .card { text-decoration: none; }
.doc-cards .card h3 { font: 600 var(--fs-h4)/1.3 var(--sans); margin: 0 0 8px; color: var(--text); }
.doc-cards .card p { font-size: var(--fs-small); margin: 0; }
.doc-cards .card.has-image { padding-top: 14px; }
.doc-cards .card img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: center bottom; border-radius: 10px; margin-bottom: 16px; border: 1px solid var(--line); }
@media (max-width: 1100px) { .docs { grid-template-columns: 200px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 760px) { .docs { grid-template-columns: 1fr; } .docs-nav { position: static; } .docs-nav ul { display: flex; flex-wrap: wrap; } .doc-cards { grid-template-columns: 1fr; } }

/* Docs pictures (captured from Moor at 2x) and videos (/video/<name>.mp4 with a .jpg poster) */
.doc figure { margin: 26px 0 30px; }
.doc figure img { display: block; max-width: 100%; width: auto; height: auto; margin: 0 auto; border-radius: var(--r-md); border: 1px solid var(--line); box-shadow: var(--shadow-window); background: var(--band); }
.doc figcaption { margin-top: 10px; font-size: var(--fs-fine); color: var(--muted); text-align: center; }
.doc figure.video video { display: block; width: 100%; height: auto; border-radius: var(--r-md); border: 1px solid var(--line); box-shadow: var(--shadow-window); background: #0d1428; }
.doc figure.video video:not([width]) { aspect-ratio: 16 / 9; }
.doc .gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 26px 0 30px; }
.doc .gallery figure { margin: 0; }
@media (max-width: 620px) { .doc .gallery { grid-template-columns: 1fr; } }

/* ---------- Analytics consent (analytics.js) ---------- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; padding: 14px 16px;
  border-radius: var(--r-md); background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-window); font: 400 var(--fs-small)/1.45 var(--sans); }
.consent p { margin: 0; flex: 1 1 280px; }
.consent a { color: inherit; text-decoration: underline; }
.consent div { display: flex; gap: 8px; }
.consent button { min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); font: 600 var(--fs-small) var(--sans); cursor: pointer;
  color: var(--text); background: transparent; border: 1px solid var(--line-strong); }
.consent button.primary { background: var(--brass-fill); color: var(--on-brass); border-color: var(--brass-fill); }
.consent button:focus-visible, .privacy-choices:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.privacy-choices { margin: 8px auto 0; display: block; min-height: 44px; padding: 0 12px; background: none; border: 0;
  color: var(--muted); font: 500 var(--fs-fine) var(--sans); text-decoration: underline; cursor: pointer; }
@media (prefers-reduced-motion: no-preference) { .consent { animation: consent-in .25s ease-out; } }
@keyframes consent-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Docs shell: grouped sidebar, Docs menu, search, on-page contents (Pages piece) ----------
   Appended after the original docs layout above, so these rules win. Three columns above 1100px; from 1100px down to 901px the
   sidebar moves behind the Docs menu and the "On this page" column stays; at 900px and below the contents become an inline list.
   Every target is 44px. Without JavaScript the sidebar stays open and the menu button stays hidden. */
.docs { grid-template-columns: 240px minmax(0, 1fr) 200px; gap: 0 40px; }
.docs-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 24px; }
.docs-menu-btn, .docs-search-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 var(--fs-small)/1 var(--sans); cursor: pointer; }
.docs-menu-btn:hover, .docs-search-btn:hover { border-color: rgb(var(--fg-rgb) / .4); }
.docs-menu-btn svg, .docs-search-btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.docs-menu-btn { display: none; }
.docs-search-btn { flex: 1 1 260px; max-width: 420px; color: var(--muted); }
.docs-search-btn[hidden] { display: none; }
.docs-kbd { margin-left: auto; }
.docs-nav { grid-column: 1; max-height: calc(100svh - var(--nav-h) - 48px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.docs-group + .docs-group { margin-top: 12px; }
.docs-group h2 { margin: 0; padding: 8px 12px 2px; font: 600 var(--fs-fine)/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.docs-nav a { min-height: 44px; }
.docs-article { grid-column: 2; min-width: 0; }
.toc { grid-column: 3; }
.toc-inline { display: none; margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 16px; background: var(--surface); }
.toc-inline summary { font: 600 var(--fs-small)/1.4 var(--sans); min-height: 44px; }
.toc-inline ul { list-style: none; margin: 0 0 8px; padding: 0; }
.toc-inline a { display: flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.toc-inline a:hover { color: var(--text); }
.doc-group-h { margin: 40px 0 0; font: 600 var(--fs-fine)/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--brass); }
.doc-group-h + .doc-cards { margin-top: 14px; }
.docs-article .pager a, .docs-article .fine a { min-height: 44px; display: inline-flex; align-items: center; }

@media (max-width: 1100px) {
  .docs { grid-template-columns: minmax(0, 1fr) 190px; gap: 0 32px; }
  .docs-nav { grid-column: 1 / -1; position: static; max-height: none; margin-bottom: 24px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
  .docs-article { grid-column: 1; }
  .toc { grid-column: 2; display: block; }
  html.docs-js .docs-menu-btn { display: inline-flex; }
  html.docs-js .docs-nav { display: none; }
  html.docs-js .docs-nav.open { display: block; }
  .docs-nav ul { display: grid; }
}
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs-article, .toc { grid-column: 1; }
  .toc { display: none; }
  .toc-inline { display: block; }
}

/* The search dialog (public/docs/docs.js builds it) */
.docs-search { width: min(640px, calc(100% - 32px)); max-height: 80svh; margin: 10svh auto auto; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-window); overflow: hidden; }
.docs-search[open] { display: flex; flex-direction: column; }
.docs-search::backdrop { background: rgb(0 0 0 / .55); }
.ds-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ds-head label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ds-input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg); color: var(--text); font: inherit; }
.ds-input:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.ds-close { min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 500 var(--fs-small)/1 var(--sans); cursor: pointer; }
.ds-status { margin: 0; padding: 10px 16px; color: var(--muted); font: 400 var(--fs-small)/1.4 var(--sans); }
.ds-results { list-style: none; margin: 0; padding: 0 8px 8px; overflow-y: auto; }
.ds-results a { display: block; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; }
.ds-results a:hover, .ds-results a:focus-visible { background: rgb(var(--fg-rgb) / .07); }
.ds-title { display: block; font-weight: 600; }
.ds-excerpt { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-small); line-height: 1.45; }
.ds-excerpt mark { background: rgb(var(--accent-rgb) / .28); color: var(--text); border-radius: 3px; }
