/* ==========================================================================
   maccrab.com: design system (lean prototype)
   One idea: show the product, say little, prove it with links.
   Orange is for the crab mark and the Copy button. Everything else is warm neutrals.
   ========================================================================== */

/* ---------- Fonts (self-hosted, OFL 1.1: see /assets/fonts/OFL-IBM-Plex.txt) ---------- */
@font-face { font-family: "Plex Sans"; src: url("/assets/fonts/plex-sans-var.woff2") format("woff2"); font-weight: 100 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/assets/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  /* warm near-black sampled from the app window, so the page and the product share one black */
  --bg: #110e0d;
  --raise: #191514;
  --raise-2: #211c1b;
  --inset: #0b0909;
  --line: #2b2422;
  --line-2: #3d3432;
  --text: #f4ede9;
  --text-2: #c4b8b2;      /* 9.9:1 on --bg */
  --text-3: #9a8d87;      /* 6.0:1 on --bg: the floor for any text */
  --accent: #ff6a3d;      /* crab orange: the logo only */
  --accent-fill: #c13e20; /* the app's own primary-button fill; white text 5.28:1 */
  --on-accent: #ffffff;
  --accent-ink: #ff8a63;  /* orange as text or icon, 8.3:1 */
  --live: #5fd68a;
  --on-live: #0b1a10;
  --focus: #ff6a3d;
  --shot-ring: rgba(255, 236, 226, 0.12);
  --shot-shadow: 0 60px 120px -50px rgba(0, 0, 0, 0.9), 0 24px 48px -24px rgba(0, 0, 0, 0.6);

  --sans: "Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-display: clamp(3rem, 1.6rem + 4.4vw, 5.5rem);
  --fs-h2: clamp(2rem, 1.35rem + 1.9vw, 3rem);
  --fs-h3: 1.125rem;
  --fs-lede: clamp(1.125rem, 1.02rem + 0.35vw, 1.3125rem);
  --fs-small: 0.875rem;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --sec-pad: clamp(72px, 7.5vw, 112px);
  --radius: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f1ec;
  --raise: #fffcf9;
  --raise-2: #ece6e0;
  --inset: #120f0e;
  --line: #e2d9d1;
  --line-2: #cfc4bb;
  --text: #1b1513;
  --text-2: #4a3f3a;
  --text-3: #6b5f59;
  --accent-fill: #a03010; /* white text 7.2:1 */
  --accent-ink: #b23d17;
  --live: #1e7a45;
  --on-live: #ffffff;
  --focus: #b23d17;
  --shot-ring: rgba(27, 21, 19, 0.16);
  --shot-shadow: 0 60px 100px -50px rgba(60, 30, 20, 0.45), 0 24px 48px -28px rgba(60, 30, 20, 0.35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
[data-theme="light"] body { -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; }
/* panels that stay dark in the light theme keep the dark theme's smoothing */
.term, .sim-panel, .code, .appsim-static { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
p a { color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
@media (hover: hover) { p a:hover { text-decoration-color: currentColor; } }
code, pre { font-family: var(--mono); }
p code { font-size: 0.9em; color: var(--text); white-space: nowrap; }
::selection { background: rgba(255, 106, 61, 0.32); color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.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; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { display: inline-block; width: 0.75em; height: 0.75em; margin-left: 0.3em; flex: none; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--accent-fill); color: var(--on-accent); font-weight: 600; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* the logo, unchanged from the live site */
.crab { width: 28px; height: 28px; flex: none; shape-rendering: crispEdges; }
.crab-shell { fill: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
.nav { margin-left: auto; }
.nav ul { display: flex; gap: 2px; list-style: none; padding: 0; }
.nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 8px; font-size: 0.875rem; font-weight: 500; color: var(--text-2); text-decoration: none; transition: color 120ms var(--ease), background-color 120ms var(--ease); }
@media (hover: hover) { .nav a:hover { color: var(--text); background: var(--raise); } }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.theme-toggle button { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: var(--text-3); cursor: pointer; }
.theme-toggle svg { width: 15px; height: 15px; }
@media (hover: hover) { .theme-toggle button:hover { color: var(--text); } }
.theme-toggle button[aria-pressed="true"] { background: var(--raise-2); color: var(--text); }
.mnav-btn { display: none; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text); cursor: pointer; }
.mnav { border-top: 1px solid var(--line); background: var(--bg); }
.mnav ul { list-style: none; padding-block: 8px 16px; }
.mnav a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); font-weight: 500; text-decoration: none; }
.mnav li:last-child a { border-bottom: 0; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(28px, 2.5vw, 34px); padding-bottom: clamp(56px, 6vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.hero-head { min-width: 0; }
h1 { font-weight: 600; font-size: var(--fs-display); line-height: 1.05; letter-spacing: -0.04em; }
/* Original bitmap lettering: the terminal character of the reference, in MacCrab's palette. */
.hero-wordmark { width: min(100%, 650px); height: auto; aspect-ratio: 65 / 7; overflow: visible; }
.wordmark-0 { fill: var(--accent-ink); }
.wordmark-1 { fill: color-mix(in srgb, var(--accent-ink) 75%, var(--text)); }
.wordmark-2 { fill: color-mix(in srgb, var(--accent-ink) 82%, var(--accent-fill)); }
.hero-wordmark-stage { display: block; position: relative; width: min(100%, 650px); aspect-ratio: 65 / 7; }
.hero-wordmark-stage .hero-wordmark { width: 100%; }
.hero-rain { position: absolute; inset: 0; width: 100%; height: 100%; display: none; pointer-events: none; }
.rain-running .hero-rain { display: block; }
.hero-tagline { display: block; margin-top: 14px; }
/* Original proportional bitmap lettering, at whole-pixel scales like classic Mac menus. */
.hero-macintosh { display: block; width: 258px; max-width: 100%; height: auto; aspect-ratio: 86 / 11; }
@media (prefers-reduced-motion: reduce) {
  .hero-rain { display: none !important; }
}
.lede { font-size: var(--fs-lede); line-height: 1.45; color: var(--text-2); max-width: 42ch; text-wrap: pretty; }
/* Two deliberate actions, with release evidence kept on one quiet baseline. */
.hero-cta { display: grid; width: 380px; max-width: 100%; gap: 4px; padding-bottom: 1px; }
.hero-release-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.hero-release { display: flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--text-3); font-size: 0.6875rem; line-height: 1.4; }
.hero-release > span { color: var(--text-3); }
.hero-release a { display: inline-flex; align-items: center; min-height: 32px; color: var(--text-2); font: 400 0.625rem/1.4 var(--mono); text-decoration: none; }
.hero-verify { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; white-space: nowrap; color: var(--text-3); font-size: 0.6875rem; line-height: 1.4; text-decoration: none; }
.hero-verify span { color: var(--accent-ink); }
@media (hover: hover) { .hero-release a:hover, .hero-verify:hover { color: var(--text); text-decoration: underline; text-underline-offset: 0.2em; } }
.release-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 20px; font: 400 0.8125rem/1.4 var(--mono); color: var(--text-3); }
.release-line [data-release="version"] { color: var(--text); font-weight: 500; }
.release-line a { padding-block: 4px; color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.25em; }
@media (hover: hover) { .release-line a:hover { color: var(--text); text-decoration-color: currentColor; } }
.sep { color: var(--line-2); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }

.cmd { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 540px; padding: 7px 7px 7px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--raise); font: 400 0.875rem/1.45 var(--mono); }
.cmd-prompt { color: var(--accent-ink); user-select: none; }
.cmd-text { flex: 1 1 auto; min-width: 0; color: var(--text); }
.nw { white-space: nowrap; }
.copy-btn { flex: none; min-width: 80px; height: 40px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--accent-fill); color: var(--on-accent); font: 500 0.875rem/1 var(--mono); cursor: pointer; transition: box-shadow 120ms var(--ease); }
@media (hover: hover) { .copy-btn:hover { box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.12); } }
.copy-btn.copied { background: var(--live); color: var(--on-live); }
.hero-links { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 8px; }
.hero-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; border: 1px solid transparent; border-radius: 4px; padding: 10px 16px; font-size: 0.9375rem; font-weight: 500; line-height: 1.2; white-space: nowrap; text-decoration: none; transition: background-color 140ms var(--ease), border-color 140ms var(--ease); }
.hero-links .download-btn { background: var(--accent); border-color: color-mix(in srgb, var(--accent) 75%, #fff); color: #24130d; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 0 color-mix(in srgb, var(--accent) 35%, var(--bg)); }
.download-label { display: grid; gap: 5px; }
.download-label strong { font-size: inherit; font-weight: 600; }
.download-label > span { font: 500 0.625rem/1 var(--mono); letter-spacing: 0.01em; }
.hero-links svg { flex: none; width: 20px; height: 20px; }
.hero-links .demo-btn { background: var(--raise); border-color: var(--line-2); color: var(--text); box-shadow: 0 2px 0 var(--line); }
.demo-btn svg { color: var(--accent-ink); }
@media (hover: hover) {
  .hero-links .download-btn:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); border-color: var(--accent-ink); }
  .hero-links .demo-btn:hover { background: var(--raise-2); border-color: var(--text-3); }
}
.hero-links a:active { box-shadow: none; }
.caveat { margin-top: 16px; font-size: var(--fs-small); color: var(--text-3); max-width: 52ch; text-wrap: pretty; }

/* ---------- Workspace tour ---------- */
.tour { margin-top: clamp(40px, 5vw, 64px); }
.tour-tabs { display: flex; gap: 2px; width: max-content; max-width: 100%; margin-bottom: 20px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.tour-tabs::-webkit-scrollbar { display: none; }
.tour-tabs[hidden] { display: none; }
/* keep the tab row's space until site.js shows it, so the screenshot doesn't move down */
.js .tour-tabs[hidden] { display: flex; visibility: hidden; }
.tour-tabs button { flex: none; min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--text-3); font: 500 0.875rem/1 var(--sans); cursor: pointer; transition: color 120ms var(--ease), background-color 120ms var(--ease); }
@media (hover: hover) { .tour-tabs button:hover { color: var(--text); } }
.tour-tabs button[aria-selected="true"] { background: var(--raise-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.tour-panel[hidden] { display: none; }
.tour-panel + .tour-panel { margin-top: 64px; }
.tour.is-tabbed .tour-panel + .tour-panel { margin-top: 0; }
.tour.is-switched .tour-panel:not([hidden]) { animation: fade 200ms var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
/* until the tabs are built, show only the first panel (the .js class is set in <head>) */
.js .tour:not(.is-tabbed) .tour-panel + .tour-panel { display: none; }
.shot picture { display: block; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--shot-ring), var(--shot-shadow); background: #151111; }
.shot img { width: 100%; border-radius: var(--radius); }
.shot-link { display: block; border-radius: var(--radius); cursor: zoom-in; }
.shot figcaption { margin-top: 20px; font-size: 0.9375rem; color: var(--text-2); }
.shot figcaption strong { color: var(--text); font-weight: 600; }
.shots-note { margin-top: 6px; font-size: var(--fs-small); color: var(--text-3); }
#screenshots { padding-block: 24px; }
.screenshot-archive > summary { padding-block: 18px; font-weight: 500; cursor: pointer; }
.screenshot-archive > summary::marker { color: var(--accent-ink); }
.screenshot-archive > summary span { display: inline-block; margin-left: 12px; color: var(--text-3); font-size: var(--fs-small); font-weight: 400; }
.screenshot-archive .tour { margin-top: 12px; }

/* ---------- Sections ---------- */
.sec { padding-block: var(--sec-pad); border-top: 1px solid var(--line); }
.sec-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
h2 { font-weight: 600; font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; }
.sec-sub { margin-top: 20px; max-width: 64ch; font-size: 1.125rem; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px clamp(48px, 7vw, 112px); align-items: start; }

/* what it catches */
.features { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px clamp(32px, 4vw, 56px); }
.features li { padding-top: 20px; border-top: 1px solid var(--line-2); }
.features h3 { margin-bottom: 10px; }
.features p { color: var(--text-2); font-size: 0.9375rem; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px clamp(32px, 4vw, 56px); margin-top: clamp(56px, 7vw, 88px); padding-top: 32px; border-top: 1px solid var(--line-2); }
.stats div { display: flex; flex-direction: column; gap: 4px; }
.stats dd { order: -1; font-size: clamp(2.5rem, 1.9rem + 2vw, 3.75rem); font-weight: 600; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stats dt { color: var(--text-3); font-size: 0.9375rem; }
.stats-note { margin-top: 24px; font-size: var(--fs-small); color: var(--text-3); text-wrap: pretty; }
.stats-note a { color: var(--text-2); }
.forensics-note { max-width: 76ch; margin-top: 32px; color: var(--text-2); text-wrap: pretty; }
.forensics-note strong { color: var(--text); }

/* privacy: a raised band */
.sec-band { background: var(--raise); border-bottom: 1px solid var(--line); }
.sec-band + .sec { border-top: 0; }
.checks { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 40px; padding-top: 8px; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 14px; }
.checks svg { width: 20px; height: 20px; margin-top: 2px; color: var(--accent-ink); }
.checks p { color: var(--text-2); }
.checks strong { display: block; margin-bottom: 4px; color: var(--text); font-weight: 600; }

/* install */
.methods { border-top: 1px solid var(--line-2); }
.method { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px clamp(48px, 7vw, 112px); align-items: center; padding-block: 28px; border-bottom: 1px solid var(--line); }
.method .cmd { max-width: none; }
.method-text p { margin-top: 6px; color: var(--text-2); font-size: 0.9375rem; max-width: 44ch; }
.badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 0.75rem/1.4 var(--mono); color: var(--text-2); vertical-align: 2px; }
.btn { display: inline-flex; align-items: center; gap: 0.4em; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--raise-2); color: var(--text); font-weight: 500; font-size: 0.9375rem; text-decoration: none; transition: border-color 120ms var(--ease); }
@media (hover: hover) { .btn:hover { border-color: var(--text-3); } }
.code { padding: 14px 18px; border-radius: 10px; background: var(--inset); box-shadow: 0 0 0 1px var(--line); color: #f4ede9; font-size: 0.875rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

/* questions */
.faq-list { border-top: 1px solid var(--line-2); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 20px 0; cursor: pointer; list-style: none; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 1.25rem/1 var(--mono); color: var(--text-3); transition: transform 160ms var(--ease); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq-body { max-width: 66ch; padding-bottom: 24px; color: var(--text-2); }

/* Release confidence and support links live beside installation. */
.install-guides { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 20px; }
.install-guides a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text-2); font-size: 0.875rem; text-underline-offset: 0.25em; }
.install-guides span, .release-proof > a span { color: var(--accent-ink); }
.release-proof { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px 40px; margin: -8px 0 32px; padding: 22px 24px; border: 1px solid var(--line-2); border-radius: 10px; }
.release-proof-label { color: var(--text-3); font: 400 0.6875rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: 0.07em; }
.release-proof h3 { margin-top: 6px; font-size: 1.125rem; }
.release-proof p { margin-top: 8px; max-width: 70ch; color: var(--text-2); font-size: 0.875rem; }
.release-proof > a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 0.875rem; white-space: nowrap; text-underline-offset: 0.25em; }
.install-aftercare { margin-top: 24px; max-width: 82ch; color: var(--text-2); font-size: 0.875rem; }
@media (max-width: 720px) { .release-proof { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px; } .install-guides { gap: 0 20px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 32px; }
.foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; }
.foot-brand { display: grid; gap: 14px; max-width: 360px; }
.foot-brand p { color: var(--text-2); font-size: 0.9375rem; }
.foot-cols { display: grid; grid-template-columns: repeat(3, auto); gap: 64px; }
.foot-h { margin-bottom: 12px; font-size: 0.8125rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.foot-cols ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.foot-cols a { font-size: 0.9375rem; color: var(--text-2); text-decoration: none; }
@media (hover: hover) { .foot-cols a:hover { color: var(--text); } }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 64px; padding-top: 24px; background: linear-gradient(var(--line), var(--line)) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px; font-size: 0.8125rem; color: var(--text-3); }
.foot-bottom a { color: var(--text-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
}
@media (max-width: 960px) {
  .nav { display: none; }
  .mnav-btn { display: inline-grid; }
  .header-actions { margin-left: auto; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .method { grid-template-columns: minmax(0, 1fr); }
  .foot { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .header-inner { min-height: 56px; }
  .theme-toggle button { width: 36px; height: 36px; }
  .tour-tabs { width: auto; max-width: none; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; border: 0; border-radius: 0; }
  .tour-tabs button { border: 1px solid var(--line); }
  .tour-tabs button:focus-visible { outline-offset: -3px; }
  .features, .checks { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .stats { gap: 16px; }
  .stats dt { font-size: 0.8125rem; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .foot-bottom { flex-direction: column; }
}
@media (pointer: coarse) { .tour-tabs button { min-height: 44px; } }
@media (max-width: 420px) {
  .cmd { flex-wrap: wrap; padding: 12px; row-gap: 10px; }
  .cmd .cmd-text { flex: 1 1 0; }
  .cmd .copy-btn { flex-basis: 100%; }
}

/* ---------- Preference floors ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-contrast: more) {
  :root:not([data-theme="light"]) { --text-2: #e2d8d3; --text-3: #c4b8b2; --line: #4a3f3c; --line-2: #6a5c58; }
  [data-theme="light"] { --text-2: #2c2421; --text-3: #3f3531; --line: #b9ada4; --line-2: #8f8279; }
}
@media (scripting: none) {
  .theme-toggle, .copy-btn, .mnav-btn { display: none; }
  .mnav[hidden] { display: block; }
  @media (min-width: 961px) { .mnav[hidden] { display: none; } }
  @media (max-width: 960px) { .site-header { position: static; } } /* the open menu must not stay pinned over the page */
}
@media (forced-colors: active) {
  .tour-tabs button[aria-selected="true"], .theme-toggle button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .copy-btn { border: 1px solid ButtonText; }
  .crab-shell { fill: CanvasText; }
}

/* ==========================================================================
   Inner pages: blog index, posts, 404. Same tokens and type scale as the homepage.
   ========================================================================== */
.nav a[aria-current] { color: var(--text); }
.page-top { padding-top: clamp(48px, 6vw, 88px); border-top: 0; }
.page-title { font-weight: 600; font-size: clamp(2.5rem, 1.6rem + 3vw, 4rem); line-height: 1; letter-spacing: -0.04em; }
.dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* blog index */
.posts { list-style: none; padding: 0; max-width: 820px; border-top: 1px solid var(--line-2); }
.posts a { display: grid; gap: 8px; padding-block: 28px; border-bottom: 1px solid var(--line); text-decoration: none; }
.post-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font: 400 0.8125rem/1.4 var(--mono); color: var(--text-3); }
.post-row-title { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.post-row-excerpt { max-width: 66ch; color: var(--text-2); }
@media (hover: hover) { .posts a:hover .post-row-title { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 0.2em; } }

/* posts */
.post { max-width: 720px; margin-inline: auto; padding-block: clamp(48px, 6vw, 88px) var(--sec-pad); }
.post-title { font-weight: 600; font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem); line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 20px; font: 400 0.8125rem/1.4 var(--mono); color: var(--text-3); }
.prose { margin-top: 40px; font-size: 1.0625rem; line-height: 1.7; color: var(--text-2); }
.prose > * + * { margin-top: 1.15em; }
.prose .lede { font-size: 1.25rem; line-height: 1.55; color: var(--text); }
.prose h2 { margin-top: 2.2em; color: var(--text); font-size: 1.625rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; text-wrap: balance; }
.prose h3 { margin-top: 1.8em; color: var(--text); font-size: 1.25rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
@media (hover: hover) { .prose a:hover { text-decoration-color: currentColor; } }
.prose p code { white-space: normal; overflow-wrap: anywhere; }
.prose figure { margin-block: 2em; }
.prose figure img { width: 100%; border-radius: 10px; box-shadow: 0 0 0 1px var(--shot-ring); }
.prose figcaption { margin-top: 12px; font-size: var(--fs-small); color: var(--text-3); }
.prose .cmd { padding: 12px 16px; }
.prose .cmd code { color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.crab-end { margin-top: 2.5em; text-align: center; font-size: 1.5rem; }

/* 404 */
.nf { padding-block: clamp(40px, 6vw, 80px) var(--sec-pad); }
.nf-hero { text-align: center; }
.nf-code { font: 500 clamp(4rem, 2.5rem + 6vw, 7rem)/1 var(--mono); letter-spacing: -0.04em; color: var(--text); }
.nf-hero h1 { margin-top: 16px; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; text-wrap: balance; }
.nf-sub { margin: 10px auto 0; max-width: 52ch; color: var(--text-2); text-wrap: pretty; }
.game-wrap { max-width: 760px; margin: 32px auto 0; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--raise); }
.game-wrap canvas { display: block; width: 100%; height: auto; aspect-ratio: 7 / 4; background: #0b0909; border-radius: 8px; cursor: crosshair; touch-action: manipulation; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.hint { margin-top: 10px; font: 400 0.75rem/1.6 var(--mono); color: var(--text-3); text-align: center; }
.hint kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--raise-2); color: var(--text-2); font: inherit; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.btn-primary { background: var(--accent-fill); border-color: transparent; color: var(--on-accent); }
@media (hover: hover) { .btn-primary:hover { border-color: transparent; box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.12); } }

/* ==========================================================================
   Homepage extras (assets/play.js): the header crab
   ========================================================================== */
.header-inner { position: relative; }
/* The 44px target stays in the free header gap. Its feet meet the bottom rule. */
.hcrab { position: absolute; left: 0; bottom: 0; display: grid; place-items: end center; width: 44px; height: 44px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; opacity: 0; transition: opacity 300ms var(--ease); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.hcrab[hidden], .hcrab-bubble[hidden], .hcrab-pause[hidden] { display: none; }
.hcrab.in { opacity: 1; }
.hcrab.moving { will-change: transform; }
.hcrab svg { display: block; width: 32px; height: 32px; transform: translateY(6px); overflow: visible; shape-rendering: crispEdges; }
.hcrab-shell { fill: var(--accent); }
.hcrab-legs-b, .hcrab.step .hcrab-legs-a { display: none; }
.hcrab.step .hcrab-legs-b { display: inline; }
.hcrab.hello .hcrab-claws { transform: translateY(-1px); }
.hcrab:focus-visible { outline-offset: -3px; }
.hcrab-bubble { position: absolute; z-index: 2; top: calc(100% + 12px); width: min(288px, calc(100vw - 24px)); padding: 18px 16px 6px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--raise); color: var(--text); box-shadow: var(--shot-shadow); }
.hcrab-bubble::before { content: ''; position: absolute; left: calc(var(--crab-tail, 50%) - 6px); top: -6px; width: 10px; height: 10px; transform: rotate(45deg); border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); background: var(--raise); }
.hcrab-quote { padding-right: 24px; font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.hcrab-close { position: absolute; top: 1px; right: 1px; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--text-2); font: 400 1.5rem/1 var(--sans); cursor: pointer; border-radius: 10px; }
.hcrab-download { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 8px; min-height: 44px; margin-top: 14px; padding: 8px 12px; border-radius: 8px; background: var(--accent-fill); color: var(--on-accent); text-decoration: none; font-size: 0.875rem; font-weight: 600; }
.hcrab-download span { font-size: 0.75rem; font-weight: 400; }
.hcrab-options { display: flex; justify-content: space-between; gap: 4px; margin-top: 4px; }
.hcrab-options button { min-height: 44px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font: 500 0.75rem/1.3 var(--sans); cursor: pointer; }
@media (hover: hover) {
  .hcrab-close:hover, .hcrab-options button:hover { color: var(--text); background: var(--raise-2); }
  .hcrab-download:hover { box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.12); }
}
@media (forced-colors: active) { .hcrab-shell { fill: CanvasText; } .hcrab-download { border: 1px solid LinkText; } }

/* ---------- Homepage extras: simulated detections ----------
   The panel depicts the app, so it uses the app's own dark V2Theme colours in either page theme. */
:root {
  --app-canvas: #1b1616; --app-inspector: #1f1a1a; --app-line: rgba(255, 255, 255, 0.07); --app-panel: rgba(255, 255, 255, 0.04);
  --app-text: #ffffff; --app-neutral: #c7bdbd; --app-muted: #a69999; --app-tertiary: #9e9494; --app-brand: #ff5e3a;
  --sev-critical: #f56345; --sev-high: #fc9e4d; --sev-medium: #fac763; --sev-low: #8ca6c7; --sev-info: #338ceb;
}
.sim { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(32px, 5vw, 72px); align-items: start; }
.sim-list { list-style: none; padding: 0; display: grid; gap: 4px; }
.sim-item { padding: 14px 16px; border-radius: 10px; }
.sim-item h3 { font-size: 1.0625rem; }
.sim-d { margin-top: 6px; color: var(--text-2); font-size: 0.9375rem; }
.is-live .sim-item { cursor: pointer; transition: background-color 160ms var(--ease); }
@media (hover: hover) { .is-live .sim-item:hover { background: var(--raise); } }
.is-live .sim-item[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.is-live .sim-item[aria-selected="false"] h3 { color: var(--text-2); }
.is-live .sim-item[aria-selected="false"] .sim-d { display: none; }

.sim-col { min-width: 0; }
.sim-panel { min-width: 0; border-radius: var(--radius); background: var(--app-canvas); box-shadow: 0 0 0 1px var(--shot-ring), var(--shot-shadow); overflow: hidden; color: var(--app-text); }
.sim-bar { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--app-line); font: 500 0.75rem/1.4 var(--sans); color: var(--app-muted); }
.sim-bar .live-dot { background: #38b866; }
.sim-panel.in-view .live-dot { animation: live-pulse 2.4s var(--ease) infinite; }
@keyframes live-pulse { 50% { opacity: 0.35; } }
.sim-pause { margin-left: auto; padding: 2px 8px; border: 1px solid var(--app-line); border-radius: 6px; background: transparent; color: var(--app-muted); font: 500 0.75rem/1.4 var(--mono); cursor: pointer; }
@media (hover: hover) { .sim-pause:hover { color: var(--app-text); } }
.sim-bar-note { margin-left: auto; font-family: var(--mono); }
.sim-pause:not([hidden]) + .sim-bar-note { margin-left: 4px; }
.sim-lede { display: none; margin-bottom: 16px; color: var(--text-2); font-size: 0.9375rem; text-wrap: pretty; }
.sim-events { list-style: none; margin: 0; padding: 14px 16px 6px; display: grid; gap: 7px; min-height: 8.6em; font: 400 0.75rem/1.5 var(--mono); }
.sim-ev { display: grid; grid-template-columns: 5.4em 4.6em minmax(0, 7em) minmax(0, 1fr); gap: 12px; }
.is-live .sim-ev { opacity: 0.28; transition: opacity 300ms var(--ease); }
.is-live .sim-ev.on { opacity: 1; }
.sim-ev-t { color: var(--app-tertiary); }
.sim-ev-k { color: var(--app-brand); }
.sim-ev-p { color: var(--app-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-ev-d { color: var(--app-neutral); overflow-wrap: anywhere; }
.sim-alert { --sev: var(--sev-medium); margin: 8px 16px 16px; padding: 14px 16px 16px; border-radius: 10px; background: var(--app-inspector); box-shadow: inset 0 0 0 1px var(--app-line); }
.is-live .sim-alert { opacity: 0.35; transition: opacity 300ms var(--ease), box-shadow 700ms var(--ease); }
.is-live .sim-alert.on { opacity: 1; }
.is-live .sim-alert.fire { box-shadow: inset 0 0 0 1px var(--app-line), 0 0 0 1px color-mix(in srgb, var(--sev) 55%, transparent), 0 0 28px -6px color-mix(in srgb, var(--sev) 60%, transparent); }
.sim-panel *, .term * { --focus: #ff6a3d; }
.sim-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sev, .chip { display: inline-block; padding: 3px 7px; border-radius: 4px; font-size: 0.6875rem; line-height: 1.3; }
.sev { font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sev); background: color-mix(in srgb, var(--sev) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sev) 25%, transparent); }
.sev-critical { --sev: var(--sev-critical); } .sev-high { --sev: var(--sev-high); } .sev-medium { --sev: var(--sev-medium); } .sev-low { --sev: var(--sev-low); } .sev-info { --sev: var(--sev-info); }
.chip { font-family: var(--mono); color: var(--app-neutral); background: var(--app-panel); box-shadow: inset 0 0 0 1px var(--app-line); }
.sim-alert-title { margin-top: 12px; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; color: var(--app-text); }
.sim-alert-id { margin-top: 2px; font: 400 0.6875rem/1.4 var(--mono); color: var(--app-muted); overflow-wrap: anywhere; }
.sim-k { margin-top: 14px; font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--app-tertiary); }
.sim-alert-what { margin-top: 4px; font: 400 0.75rem/1.5 var(--mono); color: var(--app-text); white-space: pre-wrap; overflow-wrap: anywhere; }
.sim-alert-rule { display: inline-block; margin-top: 14px; font: 500 0.75rem/1.4 var(--mono); color: #ff8a63; text-decoration: underline; text-decoration-color: rgba(255, 138, 99, 0.4); text-underline-offset: 0.2em; overflow-wrap: anywhere; }
@media (hover: hover) { .sim-alert-rule:hover { text-decoration-color: currentColor; } }
.sim-note { margin-top: 16px; font-size: var(--fs-small); color: var(--text-3); overflow-wrap: anywhere; text-wrap: pretty; }

/* ---------- Homepage extras: the maccrabctl terminal ---------- */
.term-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px clamp(48px, 7vw, 112px); align-items: start; }
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.term-chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--raise); color: var(--text); font: 500 0.8125rem/1 var(--mono); cursor: pointer; transition: border-color 120ms var(--ease); }
@media (hover: hover) { .term-chip:hover { border-color: var(--text-3); } }
.term-col { min-width: 0; }
.cli-disclosure { min-width: 0; }
.cli-disclosure > summary { display: none; }
.cli-disclosure .term-chips { margin: 0 0 20px; }
.cli-disclosure .term-chips .term-chip { font-size: 0.75rem; }
.term { border-radius: var(--radius); background: #0b0909; box-shadow: 0 0 0 1px var(--shot-ring), var(--shot-shadow); overflow: hidden; color: #c4b8b2; }
.term:focus-within { box-shadow: 0 0 0 2px var(--focus), var(--shot-shadow); }
.term-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; border-bottom: 1px solid #241e1d; background: #151111; font: 500 0.75rem/1 var(--mono); color: #9a8d87; }
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3d3432; }
.term-bar-note { margin-left: auto; }
/* the scrollback, with the live prompt as its last line: 19 whole rows, its padding outside the scroller */
.term-body { height: calc(19 * 1.6em); margin-block: 14px 12px; overflow: auto; padding: 0 16px; font: 400 0.8125rem/1.6 var(--mono); scrollbar-width: thin; scrollbar-color: #3d3432 transparent; }
.term-body:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 0; }
/* lines wrap at the column, mid-word too, as a terminal wraps them; separator runs clip instead.
   The completion listing sits under the prompt line. */
.term-out, .term-list { margin: 0; font: inherit; white-space: break-spaces; word-break: break-all; line-break: anywhere; color: #c4b8b2; }
.tl-rule { display: inline-block; max-width: 100%; overflow: hidden; white-space: pre; vertical-align: top; }
.tl-ps, .term-prompt { color: #9a8d87; white-space: pre; }
.tl-cmd { color: #f4ede9; }
.tl-crit { color: #ff6b5b; } .tl-high { color: #e3b341; } .tl-med { color: #f5dc6e; } .tl-low { color: #6ea8ff; } .tl-dim { color: #8a7d77; }
.tl-err { color: #ff7a6b; } .tl-note { color: #9a8d87; font-style: italic; }
.term-input { display: flex; align-items: baseline; margin: 0; font: inherit; }
.term-input[hidden] { display: none; }
.term-input.is-busy .term-prompt { display: none; }
.term-input input { flex: 1; min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #f4ede9; font: inherit; caret-color: #ff8a63; }
.term-input input:focus { outline: none; }
.term-input input::placeholder { color: #6f625d; }
/* touch: what Tab would offer, as a row to tap (shown while the terminal has focus) */
.term-suggest { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px 10px; border-top: 1px solid #241e1d; background: #151111; }
.term-suggest[hidden] { display: none; }
.term-suggest::-webkit-scrollbar { display: none; }
.term-sug { flex: none; min-height: 40px; padding: 0 12px; border: 1px solid #3d3432; border-radius: 8px; background: #191514; color: #f4ede9; font: 500 0.8125rem/1 var(--mono); white-space: pre; cursor: pointer; }
.term-sug:focus-visible { outline-offset: -3px; }
.term-sug-hint { align-self: center; padding: 0 4px; color: #9a8d87; font: 400 0.75rem/1.4 var(--mono); white-space: nowrap; }

@media (max-width: 1180px) { .term-wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 960px) {
  .sim { grid-template-columns: minmax(0, 1fr); }
  /* the topics wrap as pills, so all six are in view without a sideways swipe */
  .is-live .sim-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .is-live .sim-item { display: flex; align-items: center; flex: none; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; }
  .is-live .sim-item h3 { font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
  .is-live .sim-item .sim-d { display: none; }
  .is-live .sim-item:focus-visible { outline-offset: -3px; }
  .is-live .sim-lede { display: block; }
}
/* touch: a larger Pause, and a taller hit area for the rule link that keeps the card's layout */
@media (pointer: coarse) { .sim-pause { min-height: 32px; padding: 4px 12px; } .sim-alert-rule { margin-block: 4px -10px; padding-block: 10px; } }
@media (pointer: coarse) { .term-input { font-size: 16px; } .term-chip { min-height: 44px; } .term-suggest { min-height: 53px; } }
@media (forced-colors: active) {
  .is-live .sim-item[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .term:focus-within { outline: 2px solid Highlight; }
  .sev, .chip { border: 1px solid CanvasText; }
}
@media (max-width: 600px) {
  .sim-ev { grid-template-columns: 10ch minmax(0, 1fr); gap: 0 10px; }
  .sim-ev-d { grid-column: 2; }
  .sim-ev-p { white-space: normal; }
  .term-body { font-size: 0.75rem; height: calc(19 * 1.6em); height: min(calc(19 * 1.6em), round(down, 60svh - 26px, 1.6em)); padding-inline: 12px; }
  .tl-uh { display: none; }
  .term-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter); }
  .term-chips::-webkit-scrollbar { display: none; }
  .term-chip { flex: none; }
  .term-chip:focus-visible { outline-offset: -3px; }
}
@media (max-width: 400px) { .is-live .sim-item { padding: 0 12px; } }
@media (scripting: none) { .term-try, .term-chips, .term-input, [data-appsim-note] { display: none; } }

/* the simulated app window reserves its height before it loads, so nothing below it moves */
.js .appsim { min-height: 742px; }
@media (max-width: 960px) { .js .appsim { min-height: 810px; } }
@media (max-width: 600px) { .js .appsim { min-height: 600px; min-height: min(600px, calc(100svh - 152px)); } }
.appsim:not(.is-live) { border-radius: var(--radius); background: #1b1616; color: #c7bdbd; box-shadow: 0 0 0 1px var(--shot-ring); }
.appsim-static { padding: 24px; display: grid; gap: 14px; align-content: start; }
.appsim-static h3 { font-size: 0.9375rem; color: #f4ede9; }
.appsim-static ul { padding: 0; list-style: none; display: grid; gap: 10px; font-size: 0.9375rem; }
.appsim-static b { color: #f4ede9; }
.js .appsim:not(.is-live) + [data-appsim-note] { visibility: hidden; }

/* The interactive tour leads; native screenshots follow the feature section. */
.hero-app { margin-top: 24px; scroll-margin-top: 96px; }
.demo-mobile-summary, .demo-window-tools, .mobile-detections { display: none; }
.demo-launch-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.demo-launch-row .case-guide { flex: 1; min-width: 0; margin: 0; }
.is-investigating .demo-paths, .is-investigating .demo-window-tools { display: none !important; }
.is-investigating .demo-launch-row { padding-top: 0; border-top: 0; }
@media (max-width: 960px) { .demo-launch-row .case-badge { display: none; } }
.demo-intro h2 { font-size: 1rem; line-height: 1.3; letter-spacing: -0.01em; }
.demo-intro p { margin-top: 3px; color: var(--text-3); font: 400 0.6875rem/1.5 var(--mono); }
.demo-paths { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-paths[hidden], .demo-guide[hidden] { display: none; }
.demo-paths button { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--raise); color: var(--text); font: 500 0.8125rem/1.4 var(--sans); cursor: pointer; }
.demo-paths button span { color: var(--accent-ink); }
.demo-paths button[aria-busy="true"] { cursor: progress; }
@media (hover: hover) { .demo-paths button:hover { background: var(--raise-2); border-color: var(--accent-ink); } }
.demo-guide { max-width: 78ch; margin: -4px 0 20px; color: var(--text-2); font-size: var(--fs-small); }
#app-preview { scroll-margin-top: 96px; }
@media (max-width: 600px) {
  :root { --sec-pad: 52px; }
  .hero { padding-top: 28px; }
  .hero-grid { gap: 18px; }
  .hero-wordmark { width: 100%; }
  .hero-tagline { margin-top: 12px; }
  .hero-macintosh { width: 172px; }
  .hero-cta { width: 100%; max-width: 380px; gap: 3px; }
  .hero-links a { min-height: 58px; padding-inline: 12px; gap: 8px; font-size: 0.875rem; }
  .hero-links svg { width: 16px; height: 16px; }
  .hero-release-row { gap: 8px; }
  .hero-release, .hero-verify { font-size: 0.625rem; }
  .hero-release a { font-size: 0.5625rem; }
  .hero-app { margin-top: 18px; }
  .demo-launch-row { padding-top: 14px; }
  .js .demo-mobile-summary { display: block; margin-bottom: 14px; }
  .mobile-alert-example { padding: 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--raise); }
  .mobile-alert-kicker { display: flex; gap: 8px; align-items: center; font: 400 0.625rem/1.5 var(--mono); color: var(--text-3); }
  .mobile-alert-kicker > span { padding: 2px 6px; border: 1px solid var(--accent-ink); border-radius: 4px; color: var(--accent-ink); }
  .mobile-alert-example h3 { margin-top: 12px; font-size: 1rem; max-width: 26ch; }
  .mobile-alert-chain { margin-top: 12px; font: 400 0.6875rem/1.6 var(--mono); }
  .mobile-alert-chain span { color: var(--text-3); }
  .mobile-alert-example > code { color: var(--text-2); font-size: 0.75rem; }
  .mobile-alert-limit { margin-top: 8px; color: var(--text-3); font-size: 0.6875rem; }
  .demo-mobile-summary .btn { width: 100%; min-height: 44px; margin-top: 14px; justify-content: space-between; gap: 12px; border-color: var(--line-2); background: var(--raise-2); font-size: 0.8125rem; }
  .js .hero-app:not(.is-expanded) .demo-paths, .js .hero-app:not(.is-expanded) .demo-guide, .js .hero-app:not(.is-expanded) .demo-window,
  .hero-app.is-expanded .demo-mobile-summary { display: none; }
  .demo-window { scroll-margin-top: 20px; }
  .js .hero-app.is-investigating .appsim { min-height: min(600px, calc(100svh - 194px)); }
  .hero-app.is-investigating .appsim.is-live { height: min(600px, calc(100svh - 194px)); }
  .js .demo-window-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 0.8125rem; color: var(--text-3); }
  .demo-window-tools button { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--raise); color: var(--text); font: inherit; cursor: pointer; }
  .demo-paths { display: flex; width: 100%; }
  .demo-paths button { flex: 1; gap: 6px; padding-inline: 10px; font-size: 0.6875rem; }
  .cli-disclosure > summary { display: list-item; min-height: 48px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--text); font-size: 0.9375rem; cursor: pointer; }
  .cli-disclosure[open] > summary { margin-bottom: 20px; }
  .cli-disclosure .term-chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; }
  .term-wrap { gap: 24px; }
  .sim.has-mobile-topics { display: none; }
  .mobile-detections { display: block; }
  .mobile-detections details { border-bottom: 1px solid var(--line); }
  .mobile-detections summary { min-height: 52px; padding: 15px 0; font-weight: 500; cursor: pointer; }
  .mobile-detections summary::marker, .cli-disclosure > summary::marker { color: var(--accent-ink); }
  .mobile-detections p { padding-bottom: 20px; color: var(--text-2); font-size: 0.9375rem; }
  .stats { margin-top: 32px; padding-top: 24px; }
  .sec-head { margin-bottom: 28px; }
  .sec-sub { font-size: 1rem; }
  .screenshot-archive > summary span { display: block; margin: 6px 0 0 18px; }
}
