/* Deskhand MCP site. Hand-written, no build step, system fonts only.
   Dark first. Colors are tokens on :root: the dark set is the default, and the
   light set applies when the visitor's system asks for light (unless they chose
   dark) or when they chose light with the toggle. */

:root {
  color-scheme: dark;
  --brand-a: #2563eb;
  --brand-b: #7c3aed;
  --brand: linear-gradient(115deg, var(--brand-a), var(--brand-b));

  --bg: #07080d;
  --bg-2: #0b0d14;
  --panel: #0e1119;
  --panel-2: #141824;
  --glass: rgb(14 17 25 / 0.72);
  --fg: #eef0f6;
  --muted: #a1a7ba;
  --faint: #7d849a;
  --line: rgb(255 255 255 / 0.075);
  --line-2: rgb(255 255 255 / 0.14);
  --link: #a5b4fc;
  --label: #9aa8ff;
  --code-bg: rgb(255 255 255 / 0.06);
  --code-fg: #dfe3ff;
  --key-bg: linear-gradient(180deg, #1b2030, #12151f);
  --key-edge: rgb(255 255 255 / 0.16);
  --ok: #4ade80;
  --warn: #f5b84a;
  --h1-top: #ffffff;
  --h1-bottom: #b9bfd6;
  --grid-line: rgb(255 255 255 / 0.045);
  --glow-1: rgb(37 99 235 / 0.55);
  --glow-2: rgb(124 58 237 / 0.5);
  --glow-op: 1;
  --shadow-lg: 0 40px 120px -40px rgb(76 70 255 / 0.45), 0 20px 50px -20px rgb(0 0 0 / 0.8);
  --shadow-md: 0 18px 40px -24px rgb(0 0 0 / 0.9);
  --wallpaper:
    radial-gradient(60% 90% at 12% 0%, rgb(37 99 235 / 0.55), transparent 70%),
    radial-gradient(55% 80% at 92% 100%, rgb(124 58 237 / 0.6), transparent 70%),
    linear-gradient(160deg, #0d1430, #150c2e);
  --scroll-shadow: rgb(165 180 252 / 0.28);
  --cmd-bg: #0c0f17;

  --area-see: #60a5fa;
  --area-act: #a78bfa;
  --area-clipboard: #22d3ee;
  --area-browser: #f472b6;
  --area-file: #f5b84a;

  --term-bg: #090b11;
  --term-fg: #e4e7f1;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: 16px;
  --max: 1160px;
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 8px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Light unless the system asks for dark (or the visitor chose dark). */
@media not all and (prefers-color-scheme: dark) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f7fb;
    --bg-2: #eef0f7;
    --panel: #ffffff;
    --panel-2: #f1f3f9;
    --glass: rgb(255 255 255 / 0.78);
    --fg: #0a0e1a;
    --muted: #4c5368;
    --faint: #5f6680;
    --line: rgb(10 14 26 / 0.085);
    --line-2: rgb(10 14 26 / 0.15);
    --link: #1d4ed8;
    --label: #3b46d6;
    --code-bg: rgb(37 52 120 / 0.07);
    --code-fg: #26206e;
    --key-bg: linear-gradient(180deg, #ffffff, #eef0f7);
    --key-edge: rgb(10 14 26 / 0.18);
    --ok: #047857;
    --warn: #b45309;
    --h1-top: #070a14;
    --h1-bottom: #3a4170;
    --grid-line: rgb(37 72 180 / 0.07);
    --glow-1: rgb(59 130 246 / 0.32);
    --glow-2: rgb(139 92 246 / 0.28);
    --shadow-lg: 0 40px 100px -40px rgb(60 70 200 / 0.35), 0 16px 40px -20px rgb(10 14 26 / 0.28);
    --shadow-md: 0 1px 2px rgb(10 14 26 / 0.05), 0 14px 32px -22px rgb(10 14 26 / 0.3);
    --wallpaper:
      radial-gradient(60% 90% at 12% 0%, rgb(96 165 250 / 0.75), transparent 70%),
      radial-gradient(55% 80% at 92% 100%, rgb(167 139 250 / 0.8), transparent 70%),
      linear-gradient(160deg, #dfe8ff, #ece3ff);
    --scroll-shadow: rgb(10 14 26 / 0.18);
    --cmd-bg: #ffffff;
    --area-see: #2563eb;
    --area-act: #7c3aed;
    --area-clipboard: #0e7490;
    --area-browser: #be185d;
    --area-file: #b45309;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7fb;
  --bg-2: #eef0f7;
  --panel: #ffffff;
  --panel-2: #f1f3f9;
  --glass: rgb(255 255 255 / 0.78);
  --fg: #0a0e1a;
  --muted: #4c5368;
  --faint: #5f6680;
  --line: rgb(10 14 26 / 0.085);
  --line-2: rgb(10 14 26 / 0.15);
  --link: #1d4ed8;
  --label: #3b46d6;
  --code-bg: rgb(37 52 120 / 0.07);
  --code-fg: #26206e;
  --key-bg: linear-gradient(180deg, #ffffff, #eef0f7);
  --key-edge: rgb(10 14 26 / 0.18);
  --ok: #047857;
  --warn: #b45309;
  --h1-top: #070a14;
  --h1-bottom: #3a4170;
  --grid-line: rgb(37 72 180 / 0.07);
  --glow-1: rgb(59 130 246 / 0.32);
  --glow-2: rgb(139 92 246 / 0.28);
  --shadow-lg: 0 40px 100px -40px rgb(60 70 200 / 0.35), 0 16px 40px -20px rgb(10 14 26 / 0.28);
  --shadow-md: 0 1px 2px rgb(10 14 26 / 0.05), 0 14px 32px -22px rgb(10 14 26 / 0.3);
  --wallpaper:
    radial-gradient(60% 90% at 12% 0%, rgb(96 165 250 / 0.75), transparent 70%),
    radial-gradient(55% 80% at 92% 100%, rgb(167 139 250 / 0.8), transparent 70%),
    linear-gradient(160deg, #dfe8ff, #ece3ff);
  --scroll-shadow: rgb(10 14 26 / 0.18);
  --cmd-bg: #ffffff;
  --area-see: #2563eb;
  --area-act: #7c3aed;
  --area-clipboard: #0e7490;
  --area-browser: #be185d;
  --area-file: #b45309;
}

/* The dark values again for an explicit dark choice on a light system
   (the default set above is already dark). */
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, pre, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 650; }
img { max-width: 100%; height: auto; display: block; }

code, pre, kbd { font-family: var(--font-mono); }
code, pre { font-size: 0.875em; }

:not(pre) > code {
  padding: 0.08em 0.36em;
  border-radius: 5px;
  background: var(--code-bg);
  color: var(--code-fg);
  overflow-wrap: anywhere;
}

kbd {
  display: inline-flex;
  align-items: center;
  min-height: 1.7em;
  padding: 0 0.5em;
  border: 1px solid var(--key-edge);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--key-bg);
  color: var(--fg);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgb(124 58 237 / 0.35); }

.ic {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 40;
  padding: 0.6rem 1rem;
  border-radius: var(--r-sm);
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
  vertical-align: 0.15em;
  white-space: nowrap;
}

/* ---------- floating pill nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 10px var(--gutter) 0;
  pointer-events: none;
}

.nav-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 920px;
  margin: 0 auto;
  padding: 5px 5px 5px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.5) blur(18px);
  backdrop-filter: saturate(1.5) blur(18px);
  box-shadow: var(--shadow-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: none;
  min-height: 44px;
  color: var(--fg);
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-mark { flex: none; }

.site-header nav {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 0.75rem, #000 calc(100% - 1.5rem), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 0.75rem, #000 calc(100% - 1.5rem), transparent);
}
.site-header nav::-webkit-scrollbar { display: none; }

.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.1rem;
  width: max-content;
  min-width: 100%;
  padding: 0 0.75rem;
  white-space: nowrap;
}
.nav-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
}
.nav-links a:hover { color: var(--fg); background: var(--code-bg); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}
.icon-btn:hover { color: var(--fg); background: var(--code-bg); }
.i-sun { display: none; }
#theme-toggle[aria-pressed="false"] .i-moon { display: none; }
#theme-toggle[aria-pressed="false"] .i-sun { display: block; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-cta:hover { opacity: 0.9; }

@media (max-width: 560px) {
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-pill { padding-left: 10px; }
  .nav-cta { display: none; }
  .nav-links { justify-content: flex-start; }
  .nav-links a { padding: 0 0.55rem; }
}

/* ---------- buttons and commands ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.3rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--glass);
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}
.btn:hover { border-color: var(--faint); transform: translateY(-1px); }
.btn-primary {
  border-color: transparent;
  background: var(--brand);
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 10px 30px -10px rgb(99 102 241 / 0.75);
}
.btn-primary:hover { border-color: transparent; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 14px 36px -10px rgb(99 102 241 / 0.9); }

.command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--cmd-bg);
}
.command pre {
  min-width: 0;
  overflow-x: auto;
  padding: 0.85rem 0 0.85rem 1rem;
  text-align: left;
  color: var(--fg);
  font-size: 0.84rem;
  line-height: 1.65;
  scrollbar-width: thin;
  /* Scroll cue with no script: edge shadows (attachment scroll) are covered by
     patches in the block's own color (attachment local) while the content is at that
     end, so a shadow shows only on a side that has more to scroll to. */
  --cover: var(--cmd-bg);
  background:
    linear-gradient(90deg, var(--cover) 60%, transparent) 0 0 / 1.5rem 100% no-repeat local,
    linear-gradient(270deg, var(--cover) 60%, transparent) 100% 0 / 1.5rem 100% no-repeat local,
    linear-gradient(90deg, var(--scroll-shadow), transparent) 0 0 / 0.9rem 100% no-repeat scroll,
    linear-gradient(270deg, var(--scroll-shadow), transparent) 100% 0 / 0.9rem 100% no-repeat scroll;
}
.command pre:focus-visible { outline-offset: -2px; }
.command pre code { font-size: 1em; }
.command + .command { margin-top: 0.6rem; }

.copy {
  align-self: center;
  min-width: 4.5rem;
  min-height: 44px;
  margin: 0.3rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  color: var(--fg);
  font-size: 0.8125rem;
  font-weight: 600;
}
.copy:hover { border-color: var(--faint); }
.copy:active { transform: translateY(1px); }

.command-hero {
  grid-template-columns: auto minmax(0, 1fr) auto;
  max-width: 560px;
  margin-inline: auto;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}
.command-hero pre { padding-left: 0.5rem; font-size: 0.9rem; }
.cmd-sign {
  padding-left: 1rem;
  color: var(--label);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.command-hero .copy { min-height: 44px; background: var(--brand); border-color: transparent; color: #fff; }
.command-hero .copy:hover { opacity: 0.9; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(3rem, 6vw, 5rem) var(--gutter) clamp(4rem, 8vw, 6rem);
  margin-top: -56px;
  padding-top: calc(56px + clamp(3rem, 6vw, 5rem));
  text-align: center;
  isolation: isolate;
}

/* blueprint grid fading out from the top centre */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: radial-gradient(70% 55% at 50% 22%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 55% at 50% 22%, #000 20%, transparent 75%);
  background-position: center top;
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  opacity: var(--glow-op);
}
.hero-glow::before,
.hero-glow::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 900px;
  height: 620px;
  border-radius: 50%;
}
.hero-glow::before {
  top: -260px;
  margin-left: -620px;
  background: radial-gradient(closest-side, var(--glow-1), transparent);
  animation: drift-a 22s ease-in-out infinite alternate;
}
.hero-glow::after {
  top: -200px;
  margin-left: -260px;
  background: radial-gradient(closest-side, var(--glow-2), transparent);
  animation: drift-b 26s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(90px, 50px, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(-80px, 70px, 0) scale(0.94); } }

.hero-copy { max-width: 1120px; margin: 0 auto; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 100%;
  margin-bottom: 1.75rem;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--glass);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
}
.status-pill:hover { color: var(--fg); border-color: var(--faint); }
.status-dot {
  flex: none;
  width: 7px;
  height: 7px;
  margin-left: 0.4rem;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 25%, transparent);
}
.status-tag {
  flex: none;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.4rem, 1rem + 5vw, 5.1rem);
  font-weight: 680;
  line-height: 0.98;
  letter-spacing: -0.052em;
  text-wrap: balance;
  background: linear-gradient(180deg, var(--h1-top) 25%, var(--h1-bottom));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}
.h1-line { display: block; }

.lede {
  max-width: 34rem;
  margin: 1.5rem auto 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.lede a { color: var(--fg); }

.keys {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.1rem;
  margin: 1.75rem auto 0;
  max-width: 44rem;
  color: var(--muted);
  font-size: 0.8125rem;
}
.keys li { display: inline-flex; align-items: center; gap: 0.35rem; }

.hero .actions { margin-top: 2rem; }
.hero .command-hero { margin-top: 1.5rem; }

.fineprint {
  max-width: 34rem;
  margin: 0.85rem auto 0;
  color: var(--faint);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* product frame: the real captures on a desktop stage */

.product {
  position: relative;
  max-width: 1120px;
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
}
.product::before {
  content: "";
  position: absolute;
  inset: 8% 4% -6%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow-2), transparent);
  filter: blur(10px);
  opacity: 0.7;
}

.window {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.window-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.71875rem;
}
.dots { display: inline-flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.window-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window-tag {
  justify-self: end;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  white-space: nowrap;
}

.stage {
  position: relative;
  aspect-ratio: 2 / 1;
  background: var(--wallpaper);
  overflow: hidden;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgb(255 255 255 / 0.06) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgb(255 255 255 / 0.06) 1px, transparent 1px) 0 0 / 48px 48px;
}
.stage-shot { position: absolute; }
.stage-shot img {
  width: 100%;
  border-radius: 12px;
  filter: drop-shadow(0 24px 34px rgb(5 8 25 / 0.55));
}
.stage-textedit { left: 4.5%; top: 24%; width: 67%; }
.stage-calc { right: 6%; top: 7%; width: 24%; z-index: 1; }

.float-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem 0.35rem 0.55rem;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 999px;
  background: rgb(9 11 18 / 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #c9cee0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.7);
  animation: float 6s ease-in-out infinite alternate;
}
.float-chip b { color: #fff; font-weight: 600; }
.float-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a5b4fc;
}
.chip-ok::before { background: #4ade80; box-shadow: 0 0 10px #4ade80; }
.chip-act::before { background: #a78bfa; box-shadow: 0 0 10px #a78bfa; }
@keyframes float { to { transform: translate3d(0, -6px, 0); } }

.stage-textedit .float-chip { left: 6%; bottom: -16px; }
.stage-calc .float-chip { right: calc(100% + 10px); top: 62%; animation-delay: -3s; }

.fig {
  max-width: 64ch;
  margin: 1.1rem auto 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: center;
}
.fig-n {
  margin-right: 0.4rem;
  color: var(--label);
  white-space: nowrap;
}
.fig-n::before { content: "[ "; color: var(--faint); }
.fig-n::after { content: " ]"; color: var(--faint); }

@media (max-width: 700px) {
  .stage { aspect-ratio: 4 / 3.3; }
  .stage-textedit { left: 4%; top: 9%; width: 78%; }
  .stage-calc { right: 5%; top: auto; bottom: 7%; width: 33%; }
  .stage-textedit .float-chip { left: 4%; bottom: auto; top: calc(100% + 10px); }
  .stage-calc .float-chip { right: 108%; top: auto; bottom: 14%; }
  .float-chip { font-size: 0.6875rem; }
  .window-tag { display: none; }
  .window-bar { grid-template-columns: auto 1fr; }
}

/* ---------- sections on blueprint rails ---------- */

.section {
  position: relative;
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(4.5rem, 9vw, 7.5rem) clamp(1.25rem, 4.5vw, 3.5rem);
  border-inline: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.section::before,
.section::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 11px;
  height: 11px;
  background:
    linear-gradient(var(--faint), var(--faint)) center / 1px 100% no-repeat,
    linear-gradient(var(--faint), var(--faint)) center / 100% 1px no-repeat;
  opacity: 0.7;
}
.section::before { left: -6px; }
.section::after { right: -6px; }

@media (max-width: 640px) {
  .section {
    width: 100%;
    padding-inline: var(--gutter);
    border-inline: 0;
  }
  .section::before,
  .section::after { display: none; }
}

.section-head { max-width: 42rem; margin-bottom: clamp(2.25rem, 4vw, 3.25rem); }
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--label);
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--brand);
}
.section h2,
.cta h2 {
  font-size: clamp(2rem, 1.1rem + 3.6vw, 3.6rem);
  font-weight: 660;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.sub {
  margin-top: 1rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-wrap: pretty;
}
.note {
  margin-top: 1rem;
  color: var(--faint);
  font-size: 0.875rem;
  line-height: 1.55;
}
.mono-dim { color: var(--faint); font-family: var(--font-mono); font-size: 0.75rem; }

/* ---------- look / act / verify ---------- */

.loop {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  overflow: hidden;
}
.loop li {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.9rem;
  padding: 1.75rem 1.6rem 2rem;
}
.loop li + li { border-left: 1px solid var(--line); }
.loop li + li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 2.05rem;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
  background: var(--bg-2);
  transform: rotate(45deg);
}
.loop-n {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tool-key { font-size: 0.9375rem; min-height: 2.1em; padding: 0 0.7em; }
.loop p { color: var(--muted); font-size: 0.975rem; }
@media (max-width: 760px) {
  .loop { grid-template-columns: 1fr; }
  .loop li + li { border-left: 0; border-top: 1px solid var(--line); }
  .loop li + li::before { left: 1.6rem; top: -7px; transform: rotate(135deg); }
}

/* ---------- how it connects (inline SVG; a wide and a tall drawing) ---------- */

.diagram-fig { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.diagram {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--bg-2);
}
.dg { display: block; width: 100%; height: auto; overflow: visible; }
.dg-tall { display: none; max-width: 400px; margin-inline: auto; }
@media (max-width: 700px) {
  .dg-wide { display: none; }
  .dg-tall { display: block; }
  .diagram { padding: 1rem 0.6rem; }
  .dg-tall .dg-t { font-size: 14px; }
  .dg-tall .dg-s { font-size: 12px; }
  .dg-tall .dg-k { font-size: 12px; }
}
.dg text { font-family: var(--font-mono); }
.dg-t { fill: var(--fg); font-size: 13px; }
.dg-s { fill: var(--faint); font-size: 11px; }
.dg-k { fill: var(--label); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.dg-dim { fill: var(--muted); }
.dg-on { fill: #fff; }
.dg-n { fill: var(--panel); stroke: var(--line-2); stroke-width: 1; }
.dg-dash { stroke-dasharray: 4 4; fill: transparent; }
.dg-hi { stroke: #7c83ff; stroke-width: 1.5; }
.dg-app { stroke: color-mix(in srgb, var(--area-act) 60%, var(--line-2)); }
.dg-web { stroke: color-mix(in srgb, var(--area-browser) 60%, var(--line-2)); }
.dg-box { fill: color-mix(in srgb, var(--panel) 50%, transparent); stroke: var(--line-2); stroke-dasharray: 2 5; }
.dg-badge { fill: #4f46e5; }
.dg-line { fill: none; stroke: var(--line-2); stroke-width: 1.2; }
.dg-f { fill: none; stroke: var(--label); stroke-opacity: 0.65; stroke-width: 1.4; stroke-dasharray: 3 5; }
.dg-head { fill: var(--label); }
@media (prefers-reduced-motion: no-preference) {
  .dg-f { animation: dg-flow 1.4s linear infinite; }
}
@keyframes dg-flow { to { stroke-dashoffset: -16; } }

/* ---------- terminal ---------- */

.term-window {
  overflow: hidden;
  border: 1px solid #23283a;
  border-radius: var(--r-lg);
  background: var(--term-bg);
  box-shadow: var(--shadow-lg);
}
.term-window .window-bar {
  background: #10131c;
  border-bottom-color: #1d2232;
  color: #8a91a8;
}
.term-window .dots i:nth-child(1) { background: #ff5f57; }
.term-window .dots i:nth-child(2) { background: #febc2e; }
.term-window .dots i:nth-child(3) { background: #28c840; }
.term-window .window-tag { border-color: #2a3045; }

.terminal {
  overflow-x: auto;
  min-height: 15rem;
  padding: 1.4rem 1.5rem 1.6rem;
  color: var(--term-fg);
  font-size: clamp(0.8125rem, 0.77rem + 0.25vw, 0.9375rem);
  line-height: 1.85;
  scrollbar-width: thin;
  scrollbar-color: #2e3550 transparent;
  /* same overflow-only scroll cue as .command pre, in the terminal's own colors */
  background:
    linear-gradient(90deg, var(--term-bg) 60%, transparent) 0 0 / 1.5rem 100% no-repeat local,
    linear-gradient(270deg, var(--term-bg) 60%, transparent) 100% 0 / 1.5rem 100% no-repeat local,
    linear-gradient(90deg, rgb(165 180 252 / 0.3), transparent) 0 0 / 0.9rem 100% no-repeat scroll,
    linear-gradient(270deg, rgb(165 180 252 / 0.3), transparent) 100% 0 / 0.9rem 100% no-repeat scroll,
    var(--term-bg);
}
.terminal:focus-visible { outline-offset: -3px; }
.terminal .prompt { color: #a78bfa; margin-right: 0.25rem; }
.terminal .out { color: #86efac; }
.terminal .err { color: #fca5a5; }
.terminal .dim { color: #7b839b; }
.term-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: #a5b4fc;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- feature explorer (tabs once site.js runs; stacked without it) ---------- */

.explorer { display: grid; gap: 3rem; }
.explorer:not(.is-enhanced) > .ex-side { display: none; }
.ex-side { display: flex; flex-direction: column; min-width: 0; }
.ex-keys {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding: 1.25rem 1.5rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.71875rem;
}
.ex-keys kbd { min-width: 1.9em; justify-content: center; }
.ex-panel-title {
  font-size: 1.375rem;
  font-weight: 640;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.ex-panel-desc { margin: 0.5rem 0 1.25rem; max-width: 40rem; color: var(--muted); }
.ex-vis { max-width: 760px; }
.explorer:not(.is-enhanced) .ex-vis .fig { text-align: left; margin-left: 0; }

.ex-stage {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--wallpaper);
  box-shadow: var(--shadow-md);
}
.ex-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgb(255 255 255 / 0.06) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgb(255 255 255 / 0.06) 1px, transparent 1px) 0 0 / 40px 40px;
}
.ex-shot { position: absolute; }
.ex-shot img { width: 100%; height: 100%; border-radius: 12px; filter: drop-shadow(0 24px 34px rgb(5 8 25 / 0.55)); }
.ex-shot-wide { left: 5%; right: 5%; top: 50%; transform: translateY(-58%); }
.ex-shot-wide .float-chip { left: 4%; top: calc(100% + 14px); }
.ex-shot-tall { top: 7%; bottom: 7%; left: 50%; aspect-ratio: 460 / 816; transform: translateX(-50%); }
/* chips sit beside the Calculator so they never cover its display or buttons */
.ex-shot-tall .float-chip { right: calc(100% + 10px); top: 60%; }
.ex-shot-tall .chip-low { right: auto; left: calc(100% + 10px); top: 20%; animation-delay: -2.5s; }
@media (max-width: 600px) {
  .ex-shot-tall .float-chip { right: calc(100% - 28px); top: auto; bottom: 4%; font-size: 0.65rem; }
  .ex-shot-tall .chip-low { left: calc(100% - 18px); right: auto; top: 3%; bottom: auto; }
}
@media (max-width: 400px) { .ex-shot-tall .chip-low { display: none; } }

.policy {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(86%, 26rem);
  transform: translate(-50%, -50%);
  overflow: hidden;
  border: 1px solid #262c40;
  border-radius: var(--r);
  background: var(--term-bg);
  color: var(--term-fg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  box-shadow: 0 30px 60px -20px rgb(5 8 25 / 0.7);
}
.policy-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #1d2232;
  background: #10131c;
  color: #8a91a8;
  font-size: 0.71875rem;
}
.policy-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.8rem 1rem;
}
.policy-row + .policy-row { border-top: 1px solid #1a1f2d; }
.policy-row code { background: none; padding: 0; color: #e4e7f1; font-size: 1em; }
.policy-row i { color: #fca5a5; font-style: normal; }
.policy-row i::before { content: "\25CF  "; font-size: 0.7em; vertical-align: 0.15em; }

.evidence { margin-top: 0.75rem; }
.evidence summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  border-radius: 6px;
}
.evidence summary::-webkit-details-marker { display: none; }
.evidence summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  font-size: 0.8125rem;
  letter-spacing: 0;
  transition: transform 200ms var(--ease);
}
.evidence[open] summary::before { content: "\2212"; }
.evidence summary:hover { color: var(--fg); }
.evidence > p {
  margin: 0.15rem 0 0.6rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--line-2);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

@media (min-width: 900px) {
  .explorer.is-enhanced {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--bg-2);
  }
  .explorer.is-enhanced > .ex-side { border-right: 1px solid var(--line); }
  .explorer.is-enhanced .ex-panels { padding: 1.75rem; }
}

.explorer.is-enhanced .tab-list { display: flex; flex-direction: column; }
.explorer.is-enhanced .ex-panel-title,
.explorer.is-enhanced .ex-panel-desc {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.explorer.is-enhanced .ex-vis .fig { text-align: left; margin-left: 0; }
.explorer.is-enhanced .ex-panel { position: relative; }

.ex-tab {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  min-height: 64px;
  padding: 1.15rem 1.5rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.ex-tab:hover { color: var(--fg); }
.ex-tab[aria-selected="true"] {
  color: var(--fg);
  background: var(--panel);
  box-shadow: inset 2px 0 0 #7c83ff;
}
.ex-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; }
.ex-tab:focus-visible { outline-offset: -3px; border-radius: 0; }

@media (max-width: 899px) {
  .explorer.is-enhanced { gap: 1.5rem; }
  .explorer.is-enhanced .tab-list { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); }
  .explorer.is-enhanced .tab-list .ex-tab:last-child { border-bottom: 0; }
  .ex-keys { display: none; }
}

.is-enhanced > .tab-panel:not([hidden]),
.is-enhanced .ex-panel:not([hidden]) { animation: panel-in 360ms var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } }

/* ---------- bento ---------- */

.bento-title {
  margin: clamp(4rem, 8vw, 6rem) 0 1.25rem;
  color: var(--label);
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
}
.card-wide { grid-column: span 2; }
.card > .ic {
  box-sizing: content-box;
  width: 1.2rem;
  height: 1.2rem;
  margin-bottom: 0.35rem;
  padding: 0.5rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--label);
}
.card h4 { font-size: 1.0625rem; font-weight: 640; letter-spacing: -0.02em; line-height: 1.3; }
.card > p { color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }
.card .evidence { margin-top: auto; padding-top: 0.25rem; }
.card-code {
  align-self: flex-start;
  max-width: 100%;
  font-size: 0.78rem !important;
}
.card-codes { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: auto; }
.card-codes code { font-size: 0.78rem; }

.mini-table {
  display: grid;
  gap: 0.4rem;
  margin: 0.4rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--term-bg);
  color: #9aa1b8;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.mini-table span { display: flex; gap: 0.75rem; align-items: center; white-space: nowrap; }
.mini-table .mini-date { color: #8b90a8; font-size: 0.75rem; }
.mini-table b { min-width: 4.5rem; color: #e4e7f1; font-weight: 500; }
.mini-table i { color: #86efac; font-style: normal; margin-left: auto; }
.mini-table b + i { margin-left: auto; }
.mini-table i::before { content: "\25CF  "; font-size: 0.7em; vertical-align: 0.15em; }

.parity { display: grid; gap: 0.55rem; margin-top: 0.4rem; font-family: var(--font-mono); font-size: 0.75rem; }
.parity-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 2rem; align-items: center; gap: 0.75rem; }
.parity-row b { color: var(--muted); font-weight: 500; }
.parity-row i { color: var(--fg); font-style: normal; text-align: right; }
.bar { position: relative; height: 8px; border-radius: 99px; background: var(--code-bg); overflow: hidden; }
.bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--n) / 50 * 100%);
  border-radius: inherit;
  background: var(--brand);
}

@media (max-width: 899px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .card-wide { grid-column: auto; }
}

/* ---------- tools: a command palette (search, area tiles, results, detail) ----------
   Without script only the window bar, the grouped list of all 50 (#tool-grid) and
   the legend show; .pal-js parts appear once site.js adds .is-enhanced. */

[data-area="All"] { --area: var(--label); }
[data-area="See"] { --area: var(--area-see); }
[data-area="Act"] { --area: var(--area-act); }
[data-area="Clipboard"] { --area: var(--area-clipboard); }
[data-area="Browser"] { --area: var(--area-browser); }
[data-area="File picker"] { --area: var(--area-file); }

.palette {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}
.palette:not(.is-enhanced) .pal-js { display: none !important; }
.palette .window-bar { background: var(--panel-2); }

.pal-search {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 64px;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--line);
}
.pal-search:focus-within { box-shadow: inset 0 -2px 0 #7c83ff; }
.pal-search .ic { width: 1.3rem; height: 1.3rem; color: var(--faint); }
.pal-search input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.pal-search input::placeholder { color: var(--faint); opacity: 1; }
.pal-search input::-webkit-search-cancel-button,
.pal-search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.pal-count {
  flex: none;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pal-cats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.cat {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "icon name n" "eg eg eg";
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  min-height: 44px;
  padding: 0.7rem 0.8rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.cat .ic { grid-area: icon; width: 1.15rem; height: 1.15rem; color: var(--area); }
.cat button {
  grid-area: name;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* the whole tile is the button's hit area */
.cat button::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.cat button:focus-visible { outline: none; }
.cat button:focus-visible::after { outline: 2px solid #818cf8; outline-offset: 2px; }
.cat-n { grid-area: n; color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; }
.cat-eg {
  grid-area: eg;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 2.8em;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.65625rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.cat:hover { border-color: var(--line-2); }
.cat.is-on {
  border-color: color-mix(in srgb, var(--area) 60%, transparent);
  background: color-mix(in srgb, var(--area) 11%, var(--panel));
}

.pal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  min-height: 23.5rem;
}
.pal-list {
  min-width: 0;
  max-height: 27rem;
  overflow-y: auto;
  padding: 0.5rem;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
  overscroll-behavior: contain;
  position: relative;
}
.pal-results li {
  display: grid;
  grid-template-columns: 8px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  scroll-margin: 0.5rem;
}
.pal-results li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--area);
}
.pal-results li:hover { background: color-mix(in srgb, var(--fg) 4%, transparent); }
.pal-results li[aria-selected="true"] {
  background: color-mix(in srgb, var(--area) 13%, var(--panel-2));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--area) 35%, transparent);
  color: var(--fg);
}
.row-name { color: var(--fg); font-family: var(--font-mono); font-size: 0.84rem; white-space: nowrap; }
.row-desc { min-width: 0; overflow: hidden; font-size: 0.875rem; white-space: nowrap; text-overflow: ellipsis; }
.row-name mark { background: color-mix(in srgb, #7c83ff 30%, transparent); color: inherit; border-radius: 3px; }
.pal-results .mac-key { justify-self: end; }

.pal-empty {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  color: var(--muted);
}
.pal-empty q { color: var(--fg); font-family: var(--font-mono); }
.pal-empty-area { color: var(--faint); }
.pal-clear,
.pal-more {
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--panel);
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
}
.pal-clear:hover,
.pal-more:hover { border-color: var(--faint); }

.pal-detail {
  min-width: 0;
  padding: 1.6rem 1.6rem 1.4rem;
  background:
    radial-gradient(120% 70% at 100% 0%, color-mix(in srgb, var(--area, #7c83ff) 12%, transparent), transparent 70%);
}
.pal-detail > * { animation: panel-in 240ms var(--ease) both; }
.pal-detail.is-picked { animation: picked 700ms var(--ease); }
@keyframes picked { 0% { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--area, #7c83ff) 70%, transparent); } 100% { box-shadow: inset 0 0 0 2px transparent; } }
.det-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.det-area::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--area); }
.det-name {
  margin-top: 0.6rem;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.det-desc { margin-top: 0.4rem; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.det-plat { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 1.1rem; }
.det-plat .tag { vertical-align: baseline; }
.det-plat .tag.off { opacity: 0.55; text-decoration: line-through; }
.det-plat .tag.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }
.det-call { margin-top: 1.25rem; }
.det-call-label { color: var(--faint); font-family: var(--font-mono); font-size: 0.71875rem; }
.det-call pre {
  margin-top: 0.4rem;
  padding: 0.8rem 1rem;
  border: 1px solid #23283a;
  border-radius: 10px;
  background: var(--term-bg);
  color: var(--term-fg);
  font-size: 0.8125rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.det-call .tool { color: #a78bfa; }
.det-note { margin-top: 0.5rem; color: var(--faint); font-size: 0.8125rem; }

.pal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}
.pal-keys { display: flex; align-items: center; gap: 0.3rem; color: var(--faint); font-family: var(--font-mono); font-size: 0.71875rem; white-space: nowrap; }
.pal-keys kbd { min-width: 1.8em; justify-content: center; }
.pal-keys kbd + kbd { margin-left: -0.1rem; }
.pal-keys kbd:not(:first-child):not(:nth-child(2)) { margin-left: 0.6rem; }
.pal-legend { flex: 1 1 20rem; color: var(--faint); font-size: 0.8125rem; line-height: 1.55; }
.pal-more { margin-left: auto; }
.pal-ev { flex: 1 1 100%; order: 3; margin-top: -0.5rem; }
.pal-ev > p { margin-bottom: 0.25rem; }
.evidence-center { text-align: center; }
.evidence-center > p { max-width: 46rem; margin-inline: auto; text-align: left; }

.chip[data-macos]::after,
.mac-key {
  content: "mac";
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0 0.3rem;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1.5;
  vertical-align: 0.1em;
}
.pal-legend .mac-key { margin-left: 0; }

/* every tool, grouped by area: the no-script view, and "Show all 50" */
.pal-all { padding: 1.25rem 1.5rem 1.5rem; border-top: 1px solid var(--line); }
.palette:not(.is-enhanced) .pal-all { border-top: 0; }
.tool-grid { columns: 3 12.5rem; column-gap: 2rem; }
.chip {
  display: block;
  break-inside: avoid;
  padding: 0.18rem 0 0.18rem 1rem;
  --dot-y: calc(100% - 0.88rem);
  background: radial-gradient(circle at 3px var(--dot-y), var(--area) 2.6px, transparent 3.2px) no-repeat;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.chip:first-child::before,
.chip:not([data-area="Act"]) + .chip[data-area="Act"]::before,
.chip:not([data-area="Clipboard"]) + .chip[data-area="Clipboard"]::before,
.chip:not([data-area="Browser"]) + .chip[data-area="Browser"]::before,
.chip:not([data-area="File picker"]) + .chip[data-area="File picker"]::before {
  content: attr(data-area);
  display: block;
  margin: 1.1rem 0 0.35rem -1rem;
  color: var(--area);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 650;
}
.chip:first-child::before { margin-top: 0; }
.palette.is-enhanced .chip { --dot-y: calc(100% - 15px); padding-top: 0; padding-bottom: 0; }
.chip-btn {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  overflow-wrap: anywhere;
}
.chip-btn:hover { color: var(--link); text-decoration: underline; text-underline-offset: 0.2em; }
@media (pointer: coarse) {
  .chip-btn { min-height: 44px; }
  .palette.is-enhanced .chip { --dot-y: calc(100% - 22px); }
}

@media (max-width: 899px) {
  .pal-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pal-body { grid-template-columns: 1fr; min-height: 0; }
  .pal-list { max-height: 22rem; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .pal-search { padding: 0 0.9rem; gap: 0.6rem; }
  .pal-search input { font-size: 1rem; }
  .pal-cats { gap: 0.4rem; padding: 0.7rem; }
  .cat { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon n" "name name"; gap: 0.3rem; padding: 0.55rem 0.65rem; }
  .cat-n { justify-self: end; }
  .cat-eg { display: none; }
  .cat button { font-size: 0.8125rem; }
  .pal-list { max-height: none; overflow: visible; }
  .pal-results li { grid-template-columns: 8px minmax(0, 1fr) auto; row-gap: 0.1rem; padding: 0.55rem 0.6rem; }
  .row-name { grid-column: 2; white-space: normal; overflow-wrap: anywhere; }
  .pal-results .mac-key { grid-column: 3; grid-row: 1; }
  .row-desc { grid-column: 2 / -1; white-space: normal; font-size: 0.8125rem; line-height: 1.4; }
  .pal-detail { padding: 1.25rem 1rem; }
  .pal-keys { display: none; }
  .pal-foot { padding: 0.75rem 1rem; }
  .pal-more { margin-left: 0; width: 100%; }
  .pal-all { padding: 1rem; }
}
@media (max-width: 360px) {
  .pal-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- measurements ---------- */

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.stat {
  position: relative;
  padding: 1.75rem 1.6rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #7c83ff, transparent);
}
.stat-value {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  font-size: clamp(3rem, 1.8rem + 3.6vw, 4.75rem);
  font-weight: 640;
  line-height: 1;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}
.stat-value small { color: var(--faint); font-size: 0.4em; font-weight: 500; letter-spacing: 0; }
.stat-tool { margin-top: 1.1rem; }
.stat-tool code { font-size: 0.8125rem; }
.stat-label { margin-top: 0.45rem; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.method { margin-top: 1rem; }

.not-measured {
  margin-top: 1.5rem;
  padding: 1.25rem 1.4rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line));
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--warn) 5%, transparent);
}
.not-measured h3,
.limits-col > h3,
.browsers > h3 {
  margin-bottom: 0.9rem;
  font-size: 1rem;
  font-weight: 640;
  letter-spacing: -0.01em;
}
.nm-list { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.nm-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 36px;
  padding: 0.3rem 0.85rem 0.3rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
  border-radius: 999px;
  background: var(--panel);
  color: var(--fg);
  font-size: 0.875rem;
  line-height: 1.35;
}
.nm-list li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.not-measured .evidence { margin-top: 0.5rem; }

@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr; }
}

/* ---------- install ---------- */

.callout {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-top: 1.1rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line));
  border-radius: var(--r);
  background: color-mix(in srgb, var(--warn) 6%, transparent);
  color: var(--fg);
  font-size: 0.9375rem;
  line-height: 1.55;
}
.callout .ic { margin-top: 0.15em; color: var(--warn); }

.stepper { counter-reset: step; display: grid; max-width: 52rem; }
.stepper-step {
  counter-increment: step;
  position: relative;
  min-width: 0;
  padding: 0 0 2rem 2.5rem;
}
.stepper-step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.stepper-step::after {
  content: "";
  position: absolute;
  left: calc(0.8rem - 0.5px);
  top: 2rem;
  bottom: 0.5rem;
  border-left: 1px dashed var(--line-2);
}
.stepper-step:last-child { padding-bottom: 0; }
.stepper-step:last-child::after { display: none; }
.stepper-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; min-height: 1.6rem; margin-bottom: 0.75rem; }
.stepper-head h3 { font-size: 1rem; font-weight: 640; letter-spacing: -0.015em; line-height: 1.3; }
.hint { color: var(--faint); font-family: var(--font-mono); font-size: 0.75rem; }
@media (max-width: 600px) {
  .stepper-step { padding-left: 0; }
  .stepper-step::after { display: none; }
  .stepper-head { padding-left: 2.3rem; }
  .command pre { font-size: 0.78rem; padding-left: 0.8rem; }
  .copy { min-width: 3.9rem; padding: 0 0.6rem; }
}

.tabs .tab-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 0.75rem;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}
.tabs:not(.is-enhanced) > .tab-list { display: none; }
.tabs .tab {
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 550;
}
.tabs .tab:hover { color: var(--fg); }
.tabs .tab[aria-selected="true"] {
  color: var(--fg);
  background: var(--panel-2);
  border-color: var(--line-2);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
}
.tabs .tab-panel + .tab-panel { margin-top: 1.25rem; }
.tabs.is-enhanced .tab-panel + .tab-panel { margin-top: 0; }
.tab-panel > p { margin-bottom: 0.5rem; color: var(--muted); font-size: 0.875rem; }
.tab-panel:focus-visible { outline-offset: 4px; }
.tab-panel-title { margin-bottom: 0.3rem; font-size: 0.9375rem; font-weight: 640; }
.tabs.is-enhanced .tab-panel-title { display: none; }

.browsers { margin-top: 2.75rem; max-width: 52rem; }
.browser-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.browser-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.1rem 1.2rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.browser-card h4 { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.6rem; font-size: 1rem; font-weight: 640; }
.browser-card h4 .ic { color: var(--area); }
.mini-steps { counter-reset: mini; display: grid; gap: 0.45rem; }
.mini-steps li {
  counter-increment: mini;
  position: relative;
  min-width: 0;
  padding-left: 1.85rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}
.mini-steps li::before {
  content: counter(mini);
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--code-bg);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}
.caveat {
  margin: 0.8rem 0 0.6rem;
  padding: 0.55rem 0.75rem;
  border-left: 2px solid var(--warn);
  border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--warn) 6%, transparent);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.browser-card .evidence { margin-top: auto; padding-top: 0.4rem; }
@media (max-width: 700px) { .browser-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ: a native <details> accordion ---------- */

.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
}
.qa { min-width: 0; border-top: 1px solid var(--line); }
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  padding: 0.85rem 0;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:focus-visible { outline-offset: 2px; }
.qa h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.35; }
.qa summary:hover h3 { color: var(--link); }
.qa-icon {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
}
.qa-icon::before,
.qa-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 1.5px;
  margin: -0.75px 0 0 -5.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 220ms var(--ease);
}
.qa-icon::after { transform: rotate(90deg); }
.qa[open] .qa-icon::after { transform: rotate(0deg); }
.qa[open] .qa-icon { border-color: #7c83ff; color: #7c83ff; }
.qa p { padding: 0 2.75rem 1.25rem 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }
.qa[open] p { animation: panel-in 260ms var(--ease) both; }
@media (max-width: 760px) { .faq { grid-template-columns: 1fr; } }

/* ---------- limits ---------- */

.limit-lead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 0.9rem;
  padding: 1.4rem 1.5rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line));
  border-radius: var(--r-lg);
  background:
    radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--warn) 12%, transparent), transparent 70%),
    var(--bg-2);
}
.limit-lead > .ic { width: 1.6rem; height: 1.6rem; color: var(--warn); }
.limit-kind { color: var(--warn); font-family: var(--font-mono); font-size: 0.71875rem; letter-spacing: 0.08em; text-transform: uppercase; }
.limit-lead h3 { margin-top: 0.3rem; font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.3; }
.limit-lead h3 + p { margin-top: 0.4rem; max-width: 44rem; color: var(--muted); font-size: 0.9375rem; }

.limits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.limits-col {
  min-width: 0;
  padding: 1.35rem 1.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.limit-list li {
  position: relative;
  padding: 0.75rem 0 0.4rem 1.15rem;
}
.limit-list li + li { border-top: 1px solid var(--line); }
.limit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
}
.limit-list h4 { color: var(--fg); font-size: 0.9375rem; font-weight: 620; line-height: 1.4; }
.limit-list h4:only-child { padding-bottom: 0.35rem; }
.limit-list h4 + .evidence { margin-top: 0.1rem; }
.limit-list p { margin-top: 0.15rem; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.limit-list .evidence,
.limit-lead .evidence { margin-top: 0; }
@media (max-width: 860px) { .limits-grid { grid-template-columns: 1fr; } }

/* ---------- closing call to action ---------- */

.cta {
  position: relative;
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(5rem, 11vw, 8.5rem) var(--gutter);
  border-inline: 1px solid var(--line);
  border-top: 1px solid var(--line);
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50% 60% at 50% 100%, var(--glow-1), transparent 70%),
    radial-gradient(40% 50% at 70% 90%, var(--glow-2), transparent 70%);
}
.cta h2 { font-size: clamp(2.25rem, 1.2rem + 4.6vw, 4.5rem); }
.cta .sub { margin-inline: auto; }
.cta .command-hero { margin-top: 2rem; }
.cta .actions { margin-top: 1.5rem; }
@media (max-width: 640px) { .cta { width: 100%; border-inline: 0; } }

/* ---------- footer ---------- */

.site-footer {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: 2.5rem 0 3.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0 0.25rem; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem;
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--fg); }
.credits { display: grid; gap: 0.75rem; max-width: 46rem; line-height: 1.65; }
.credits strong { color: var(--fg); }

/* ---------- scroll reveals ----------
   Hidden only under html.reveal-ready, which site.js adds after it has shown
   everything already on screen. Without script, or if it fails, nothing hides. */

html.reveal-ready .reveal {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
html.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html.reveal-ready .reveal { opacity: 1; transform: none; }
}

/* ---------- print ---------- */

@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; overflow: visible; }
  .site-header,
  .skip-link,
  .hero-glow,
  .cta-glow,
  .float-chip,
  .copy,
  .tab-list,
  .pal-js { display: none !important; }
  .pal-all[hidden] { display: block !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation: none !important; }
  .tab-panel[hidden],
  .ex-panel[hidden] { display: block !important; }
  .tabs.is-enhanced .tab-panel-title,
  .explorer.is-enhanced .ex-panel-title,
  .explorer.is-enhanced .ex-panel-desc { position: static; width: auto; height: auto; clip: auto; white-space: normal; display: block; }
  .chip[hidden] { display: block !important; }
  .palette { box-shadow: none; }
  details::details-content { content-visibility: visible; display: block; }
  .section, .cta { border: 0; width: 100%; padding: 1.5rem 0; }
  .hero h1 { color: #000; background: none; }
  .stage { aspect-ratio: auto; display: grid; gap: 1rem; padding: 1rem; }
  .stage-shot, .ex-shot { position: static; transform: none; width: auto; }
  .ex-stage { aspect-ratio: auto; padding: 1rem; }
  .policy { position: static; transform: none; width: auto; }
  .terminal, .command pre { white-space: pre-wrap; overflow: visible; }
  a { color: #000; }
}

/* the one command everyone copies: wrap it on a phone instead of hiding half of it */
#hero-cmd { white-space: pre-wrap; overflow-wrap: anywhere; }

#availability { margin-bottom: 2.25rem; }
