/* Claude Mods: site styles. Tokens mirror docs/DESIGN.md. Dark first. */

/* ---------- Tokens ---------- */
:root {
  --font-display: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-sans: 'Host Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Martian Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Ink (dark) */
  --bg: #0e0d0b;
  --bg-2: #121110;
  --surface: #171613;
  --surface-2: #1e1c19;
  --surface-3: #282622;
  --code-bg: #0a0908;
  --cell: #1a1916;
  --line: rgba(240, 232, 218, 0.08);
  --line-2: rgba(240, 232, 218, 0.14);
  --line-3: rgba(240, 232, 218, 0.24);
  --text: #eee7db;
  --text-2: #aba496;
  --text-3: #878073;
  --accent: #ee8a4f;          /* Ember */
  --accent-2: #ffc27a;        /* Phosphor */
  --accent-text: #f19a64;     /* Ember tuned for small text */
  --accent-ink: #1b0f06;
  --accent-soft: rgba(238, 138, 79, 0.12);
  --accent-line: rgba(238, 138, 79, 0.42);
  --ok: #a3d18f;
  --deny: #f47b6e;
  --warn: #f0c35a;
  --glow: rgba(238, 138, 79, 0.55);
  --tk-k: #e9a477;
  --tk-s: #b7d38d;
  --tk-f: #f2d6a8;
  --tk-r: #f39b78;
  --grain-opacity: 0.055;
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 0 0 1px rgba(0, 0, 0, 0.35), 0 40px 90px -40px rgba(0, 0, 0, 0.85), 0 18px 40px -24px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.035) inset, 0 16px 40px -24px rgba(0, 0, 0, 0.7);

  /* Space, radius, motion */
  --gutter: 16px;
  --maxw: 1200px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 140ms;
  --dur-2: 260ms;
  --dur-3: 700ms;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4efe6;
    --bg-2: #efe9de;
    --surface: #fbf8f2;
    --surface-2: #f3eee5;
    --surface-3: #e9e2d5;
    --code-bg: #fffdf9;
    --cell: #ebe5da;
    --line: rgba(48, 36, 20, 0.1);
    --line-2: rgba(48, 36, 20, 0.16);
    --line-3: rgba(48, 36, 20, 0.28);
    --text: #1a1814;
    --text-2: #56504a;
    --text-3: #6b645a;
    --accent: #b9531f;
    --accent-2: #e07434;
    --accent-text: #a84a1a;
    --accent-ink: #fff8f1;
    --accent-soft: rgba(185, 83, 31, 0.1);
    --accent-line: rgba(185, 83, 31, 0.45);
    --ok: #3e7a33;
    --deny: #b4382b;
    --warn: #93680e;
    --glow: rgba(224, 116, 52, 0.45);
    --tk-k: #9a4317;
    --tk-s: #4a7a2a;
    --tk-f: #6e4c12;
    --tk-r: #ae4628;
    --grain-opacity: 0.045;
    --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 0 0 1px rgba(48, 36, 20, 0.06), 0 40px 80px -40px rgba(60, 40, 15, 0.35), 0 14px 30px -20px rgba(60, 40, 15, 0.25);
    --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 14px 32px -22px rgba(60, 40, 15, 0.3);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4efe6;
  --bg-2: #efe9de;
  --surface: #fbf8f2;
  --surface-2: #f3eee5;
  --surface-3: #e9e2d5;
  --code-bg: #fffdf9;
  --cell: #ebe5da;
  --line: rgba(48, 36, 20, 0.1);
  --line-2: rgba(48, 36, 20, 0.16);
  --line-3: rgba(48, 36, 20, 0.28);
  --text: #1a1814;
  --text-2: #56504a;
  --text-3: #6b645a;
  --accent: #b9531f;
  --accent-2: #e07434;
  --accent-text: #a84a1a;
  --accent-ink: #fff8f1;
  --accent-soft: rgba(185, 83, 31, 0.1);
  --accent-line: rgba(185, 83, 31, 0.45);
  --ok: #3e7a33;
  --deny: #b4382b;
  --warn: #93680e;
  --glow: rgba(224, 116, 52, 0.45);
  --tk-k: #9a4317;
  --tk-s: #4a7a2a;
  --tk-f: #6e4c12;
  --tk-r: #ae4628;
  --grain-opacity: 0.045;
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 0 0 1px rgba(48, 36, 20, 0.06), 0 40px 80px -40px rgba(60, 40, 15, 0.35), 0 14px 30px -20px rgba(60, 40, 15, 0.25);
  --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 14px 32px -22px rgba(60, 40, 15, 0.3);
  color-scheme: light;
}

@media (min-width: 640px) { :root { --gutter: 28px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
html.reduced-motion { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
body::after {
  /* Film grain: a fixed, non-interactive overlay. */
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.6 -.35'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
code, kbd, pre { font-family: var(--font-mono); font-stretch: 87.5%; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.6em;
  height: 1.6em;
  padding: 0 0.4em;
  font-size: 0.72em;
  line-height: 1;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  vertical-align: 0.12em;
}
::selection { background: rgba(238, 138, 79, 0.32); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
/* [hidden] always wins: layout rules (e.g. the compact card grid on phones) must never resurrect a filtered-out element. */
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  --icon-lit: var(--accent);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -0.022em;
  line-height: 1.02;
  text-wrap: balance;
  margin: 0;
}
.display em { font-style: italic; color: var(--accent); letter-spacing: -0.03em; padding-right: 0.04em; }
.h2 { font-size: clamp(2.15rem, 1.45rem + 2.6vw, 3.6rem); }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font: 400 0.7rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--glow);
}
.kicker:has(.kicker__dot)::before { display: none; }
.kicker__dot { width: 7px; height: 7px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px var(--glow); }
.sub { margin: 20px 0 0; max-width: 58ch; color: var(--text-2); font-size: clamp(1rem, 0.96rem + 0.22vw, 1.13rem); text-wrap: pretty; }
.lede { margin: 26px 0 0; max-width: 34em; color: var(--text-2); font-size: clamp(1.05rem, 0.98rem + 0.32vw, 1.25rem); line-height: 1.55; text-wrap: pretty; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
  view-transition-name: site-header;
}
/* Once content scrolls underneath, the header is a solid surface: nothing may read through it. */
.site-header.is-scrolled { border-bottom-color: var(--line); background: var(--bg); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.lockup__mark {
  width: 26px;
  height: 26px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2);
  fill: color-mix(in oklab, var(--text) 16%, transparent);
  stroke: color-mix(in oklab, var(--text) 40%, transparent);
  stroke-width: 1.4;
  --icon-lit: var(--accent);
}
.lockup__word { font: 500 1.28rem/1 var(--font-display); letter-spacing: -0.015em; }
.lockup__word em { font-style: italic; color: var(--accent); }
.site-nav { display: none; gap: 4px; margin-left: 12px; }
.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
@media (min-width: 860px) { .site-nav { display: flex; } }
.site-header__actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--line-2); }
.icon-btn .icon { width: 18px; height: 18px; }
.theme-toggle .icon--moon { display: none; }
:root[data-effective-theme="light"] .theme-toggle .icon--sun { display: none; }
:root[data-effective-theme="light"] .theme-toggle .icon--moon { display: block; }

/* ---------- Buttons & commands ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: 500 0.98rem/1 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-1) var(--ease);
}
.btn .icon { width: 18px; height: 18px; transition: transform var(--dur-2) var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 10px 30px -12px var(--glow);
}
.btn--primary:hover { background: color-mix(in oklab, var(--accent) 88%, white); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 16px 36px -12px var(--glow); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: color-mix(in oklab, var(--surface) 60%, transparent); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--line-3); }

.cmd {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 7px 7px 7px 16px;
  border-radius: 12px;
  background: var(--code-bg);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}
.cmd__prompt { font: 500 0.82rem/1 var(--font-mono); color: var(--accent); }
.cmd__text {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 0.8rem;
  line-height: 2.4;
  color: var(--text);
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.cmd__text::-webkit-scrollbar { display: none; }
.cmd__slot { color: var(--accent-text); transition: color var(--dur-2) var(--ease); }
.cmd__copy {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.cmd__copy:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-3); }
.cmd__copy .icon { width: 17px; height: 17px; grid-area: 1 / 1; transition: opacity var(--dur-1) var(--ease), transform var(--dur-2) var(--ease-out); }
.icon--check { opacity: 0; transform: scale(0.6); color: var(--ok); }
.is-copied .icon--copy { opacity: 0; transform: scale(0.6); }
.is-copied .icon--check { opacity: 1; transform: none; }

.pill {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font: 400 0.72rem/1 var(--font-mono);
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.pill:hover, .pill[aria-pressed="true"] { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }

.led { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 10px var(--glow); }
.led--ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 18%, transparent); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 40px 0 8px; isolation: isolate; }
@media (min-width: 1024px) { .hero { padding: 64px 0 16px; } }
.hero__backdrop { position: absolute; inset: -64px 0 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(42rem 30rem at 78% 34%, color-mix(in oklab, var(--accent) 17%, transparent), transparent 68%),
    radial-gradient(30rem 22rem at 12% 8%, color-mix(in oklab, var(--accent-2) 6%, transparent), transparent 70%);
}
.hero__glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line-2) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 60% at 70% 35%, #000 10%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 70% 35%, #000 10%, transparent 75%);
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.hero.has-video .hero__video { opacity: 0.42; }
:root[data-effective-theme="light"] .hero.has-video .hero__video { opacity: 0.22; mix-blend-mode: multiply; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
.hero__copy { min-width: 0; }
@media (min-width: 1180px) { .hero__inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 56px; } .hero .hero__title { font-size: clamp(2.6rem, 1.5rem + 3.4vw, 4.4rem); } }
@media (min-width: 720px) and (max-width: 1179px) { .hero .rack { max-width: 760px; } }
.hero__title { font-size: clamp(2.6rem, 1.5rem + 4vw, 4.6rem); line-height: 0.99; max-width: 12em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.cmd--hero { margin-top: 22px; width: fit-content; max-width: 100%; }
.hero__fine { margin: 14px 0 0; font: 400 0.68rem/1.6 var(--font-mono); letter-spacing: 0.04em; color: var(--text-3); }

html.js:not(.reduced-motion) .hero__copy > * { animation: rise 0.9s var(--ease-out) both; }
html.js:not(.reduced-motion) .hero__copy > :nth-child(2) { animation-delay: 60ms; }
html.js:not(.reduced-motion) .hero__copy > :nth-child(3) { animation-delay: 140ms; }
html.js:not(.reduced-motion) .hero__copy > :nth-child(4) { animation-delay: 220ms; }
html.js:not(.reduced-motion) .hero__copy > :nth-child(5) { animation-delay: 290ms; }
html.js:not(.reduced-motion) .hero__copy > :nth-child(6) { animation-delay: 350ms; }
html.js:not(.reduced-motion) .rack { animation: rise 1.1s var(--ease-out) 180ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Rack (hero visual) ---------- */
.rack {
  --gap: 3px;
  --seam: 5px;
  position: relative;
  margin: 0;
  padding: 12px;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, color-mix(in oklab, var(--surface) 92%, transparent), color-mix(in oklab, var(--bg-2) 92%, transparent));
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  min-width: 0;
}
@media (min-width: 480px) { .rack { --gap: 4px; --seam: 10px; padding: 16px; } }
.rack::before {
  /* hairline highlight along the top edge */
  content: '';
  position: absolute;
  inset: 0 18% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--accent-2) 55%, transparent), transparent);
  opacity: 0.6;
}
.rack__bar { display: flex; align-items: center; gap: 10px; padding: 2px 4px 12px; font: 400 0.66rem/1 var(--font-mono); letter-spacing: 0.06em; color: var(--text-3); }
.rack__title { color: var(--text-2); }
.rack__meta { margin-left: auto; }
html.js:not(.reduced-motion) .rack__bar .led { animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.45; box-shadow: 0 0 0 3px transparent, 0 0 4px var(--glow); } }

.rack__store {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 8px 0 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(90deg, var(--accent-soft), transparent 70%), var(--surface-2);
  text-align: left;
  font: 500 0.78rem/1 var(--font-mono);
  color: var(--text);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 5%, transparent), 0 10px 28px -16px var(--glow);
  transition: border-color var(--dur-1) var(--ease), transform var(--dur-2) var(--ease);
}
.rack__store:hover { border-color: var(--accent); }
.rack__store .icon { width: 18px; height: 18px; color: var(--text-3); }
.rack__store-hint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-sans); font-weight: 400; font-size: 0.8rem; color: var(--text-3); }
.rack__store kbd { height: 30px; padding: 0 10px; font-size: 0.7rem; color: var(--accent-text); border-color: var(--accent-line); background: var(--code-bg); }
@media (max-width: 420px) { .rack__store-hint { display: none; } .rack__store-name { flex: 1; } }

.rack__deck { display: grid; grid-template-columns: var(--tpl, repeat(10, minmax(0, 1fr)) var(--seam) repeat(10, minmax(0, 1fr))); gap: var(--gap); }
.rack__label { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 0 8px; margin-bottom: 2px; border-bottom: 1px solid var(--line); font: 400 0.6rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.rack__label b { font-weight: 500; letter-spacing: 0.02em; text-transform: none; color: var(--text-2); }
.rack__label.is-new::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px var(--glow); }
.rack__label.is-new b { color: var(--accent-text); }
.rack__head { display: grid; place-items: center; padding: 3px 0 5px; color: var(--text-3); transition: color var(--dur-2) var(--ease); }
.rack__head.is-active { color: var(--text); }
.rack__head .icon { width: 100%; max-width: 17px; height: auto; aspect-ratio: 1; }
.rack__seam { justify-self: center; width: 1px; background: linear-gradient(180deg, transparent, var(--line-2) 8%, var(--line-2) 92%, transparent); }
.rack__ver { margin-left: 6px; color: var(--text-3); }
.rack__bar > * { white-space: nowrap; }
@media (max-width: 519px) { .rack__ver { display: none; } }
@media (max-width: 519px) { .rack__head { display: none; } .rack__label { padding-bottom: 7px; margin-bottom: 3px; } }

.cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 22%;
  background: var(--cell);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 -6px 12px -8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: background-color 900ms var(--ease), box-shadow 900ms var(--ease), transform 300ms var(--ease);
}
.cell::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(2.5px, 19%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--line-3);
  transition: background-color 900ms var(--ease), box-shadow 900ms var(--ease), transform 300ms var(--ease);
}
.cell.is-empty { visibility: hidden; }
.cell.is-on {
  background: color-mix(in oklab, var(--accent) 9%, var(--cell));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 30%, transparent), inset 0 -6px 12px -8px rgba(0, 0, 0, 0.3);
}
.cell.is-on::after { background: var(--accent); box-shadow: 0 0 6px var(--glow); }
.cell.is-hot {
  background: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent-2) 70%, transparent), 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent), 0 0 22px 2px var(--glow);
  transition-duration: 120ms;
  transform: scale(1.06);
  z-index: 1;
}
.cell.is-hot::after { background: #fff4e6; box-shadow: 0 0 6px #fff4e6; transform: translate(-50%, -50%) scale(1.3); transition-duration: 120ms; }
.cell:hover { box-shadow: inset 0 0 0 1px var(--line-3); }
.cell.is-on:hover { box-shadow: inset 0 0 0 1px var(--accent); }
html.js:not(.reduced-motion) .rack.is-booting .cell { animation: boot 1100ms var(--ease) both; animation-delay: calc(var(--d, 0) * 1ms); }
@keyframes boot {
  0% { background-color: var(--cell); }
  22% { background-color: var(--accent); box-shadow: 0 0 18px var(--glow); }
  100% { }
}

.rack__status {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin-top: 14px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  font: 400 0.7rem/1 var(--font-mono);
  font-stretch: 87.5%;
  white-space: nowrap;
  overflow: hidden;
}
.rack__status-icon { color: var(--text-3); display: grid; }
.rack__status-icon .icon { width: 15px; height: 15px; }
.rack__status-name { color: var(--accent-text); }
.rack__status-msg { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.rack__status-msg::after { content: ''; display: inline-block; width: 6px; height: 12px; margin-left: 2px; vertical-align: -2px; background: var(--accent); opacity: 0.8; }
html.js:not(.reduced-motion) .rack__status-msg::after { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Specs ---------- */
.specs { display: grid; grid-template-columns: repeat(2, 1fr); margin: 64px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.specs > div { padding: 22px 0 22px 18px; border-left: 1px solid var(--line); }
.specs > div:nth-child(odd) { border-left: 0; padding-left: 0; }
.specs > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
@media (min-width: 760px) {
  .specs { grid-template-columns: repeat(4, 1fr); }
  .specs > div, .specs > div:nth-child(odd) { border-left: 1px solid var(--line); padding-left: 24px; border-bottom: 0; }
  .specs > div:first-child { border-left: 0; padding-left: 0; }
}
.specs dt { font: 400 0.64rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.specs dd { margin: 12px 0 0; font: 400 clamp(2.2rem, 1.8rem + 1.6vw, 3.1rem)/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 9vw, 128px) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--store { max-width: none; display: grid; gap: 8px; align-items: end; }
@media (min-width: 900px) { .section-head--store { grid-template-columns: 1fr minmax(0, 26rem); } .section-head--store .sub { margin: 0 0 6px; } }

html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-3) var(--ease), transform 900ms var(--ease-out); transition-delay: calc(var(--stagger, 0) * 70ms); }
html.js .reveal.is-in { opacity: 1; transform: none; }
html.js.reduced-motion .reveal { opacity: 1; transform: none; transition: none; }

/* ---------- Install ---------- */
.install { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), var(--bg) 60%); }
.install__grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1024px) { .install__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; } }
.install__copy { min-width: 0; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 26px; }
.step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
.step__num { font: 500 0.7rem/1 var(--font-mono); color: var(--accent-text); padding-top: 4px; letter-spacing: 0.06em; }
.step + .step::before { content: ''; position: absolute; left: 8px; top: -22px; width: 1px; height: 18px; background: var(--line-2); }
.step__title { margin: 0 0 12px; font: 500 1.02rem/1.3 var(--font-sans); }
.step__body { min-width: 0; }
.step__note { margin: 10px 0 0; font-size: 0.9rem; color: var(--text-3); }
.single { margin-top: 38px; padding-top: 30px; border-top: 1px dashed var(--line-2); min-width: 0; }
.single__title { margin: 0 0 12px; font: 500 1.02rem/1.3 var(--font-sans); }
.single__try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.85rem; color: var(--text-3); }
.single__try > span { margin-right: 4px; }

/* TUI preview */
.tui {
  min-width: 0;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background: var(--code-bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font: 400 0.74rem/1.5 var(--font-mono);
  font-stretch: 87.5%;
}
.tui__chrome { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--text-3); }
.tui__cmd { color: var(--accent-text); }
.tui__body { position: relative; padding: 18px 18px 20px; display: grid; gap: 12px; }
.tui__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tui__brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.tui__brand .icon { width: 15px; height: 15px; color: var(--text-3); }
.tui__dim { color: var(--text-3); }
.tui__search { padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--text); }
.caret { display: inline-block; width: 7px; height: 13px; margin-left: 1px; vertical-align: -2px; background: var(--accent); }
html.js:not(.reduced-motion) .caret { animation: blink 1.1s steps(1) infinite; }
.tui__tabs { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-3); }
.tui__tabs .is-active { color: var(--accent-ink); background: var(--accent); padding: 0 7px; border-radius: 4px; }
.tui__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tui__list li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; padding: 5px 8px; border-radius: 6px; color: var(--text-2); transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.tui__sel { color: transparent; }
.tui__list li.is-sel { background: var(--surface-2); color: var(--text); }
.tui__list li.is-sel .tui__sel { color: var(--accent); }
.tui__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tui__state { color: var(--text-3); }
.tui__state::before { content: '\25CB  '; }
.tui__state.is-installed { color: var(--ok); }
.tui__state.is-installed::before { content: '\25CF  '; }
.tui__state.is-update { color: var(--accent-text); }
.tui__state.is-update::before { content: '\2191  '; }
.tui__detail { margin-top: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tui__detail-name { color: var(--text); font-weight: 500; }
.tui__detail p { margin: 6px 0 12px; color: var(--text-2); font-family: var(--font-sans); font-size: 0.85rem; line-height: 1.45; font-stretch: normal; }
.tui__buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.tui__btn { padding: 5px 12px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-2); transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
.tui__btn.is-primary { border-color: var(--accent-line); color: var(--accent-text); }
.tui__btn.is-pressed { background: var(--accent); color: var(--accent-ink); transform: scale(0.96); }
.tui__toast {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease-out);
}
.tui__toast .icon { width: 14px; height: 14px; color: var(--ok); }
.tui__toast.is-shown { opacity: 1; transform: none; }

/* ---------- Features ---------- */
.features { border-top: 1px solid var(--line); }
.bento { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat--guard { grid-column: span 2; }
  .feat--memory { grid-column: span 2; }
}
@media (min-width: 1080px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(0, auto); }
  .feat--guard { grid-column: 1 / span 2; grid-row: span 2; }
  .feat--cost { grid-column: 3 / span 2; }
  .feat--panes { grid-column: 3 / span 2; }
  .feat--cmds { grid-column: 1 / span 2; }
  .feat--notify { grid-column: 3; }
  .feat--memory { grid-column: 4; }
}
.feat {
  --mx: -999px;
  --my: -999px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  padding: 22px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(28rem 18rem at var(--mx) var(--my), color-mix(in oklab, var(--accent) 7%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transition: border-color var(--dur-2) var(--ease);
}
.feat:hover { border-color: var(--line-2); }
.feat__art {
  position: relative;
  flex: 1;
  min-height: 150px;
  display: grid;
  align-content: center;
  padding: 18px;
  border-radius: 14px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  overflow: hidden;
  font: 400 0.74rem/1.7 var(--font-mono);
  font-stretch: 87.5%;
  color: var(--text-2);
}
.feat__text h3 { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 1.08rem/1.3 var(--font-sans); letter-spacing: -0.005em; }
.feat__text h3 .icon { width: 20px; height: 20px; color: var(--text-3); }
.feat__text p { margin: 8px 0 0; color: var(--text-2); font-size: 0.95rem; line-height: 1.55; text-wrap: pretty; }
.feat__text code { font-size: 0.85em; color: var(--text); }
.t-dim { color: var(--text-3); }
.t-ok { color: var(--ok); }
.t-deny { color: var(--deny); }
.term p { margin: 0; }
.term .gap { margin-top: 14px; }
.feat--guard .feat__art { min-height: 260px; padding: 24px; font-size: 0.8rem; }
.feat--guard .term p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.js:not(.reduced-motion) .feat--guard.is-in .t-deny { animation: deny 1.4s var(--ease) both; }
html.js:not(.reduced-motion) .feat--guard.is-in .t-deny:last-child { animation-delay: 600ms; }
@keyframes deny { 0%, 30% { opacity: 0; transform: translateX(-6px); } 100% { opacity: 1; transform: none; } }

.statusline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.statusline b { color: var(--text); font-weight: 500; }
.meter { position: relative; width: 70px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; width: calc(var(--v) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.budget { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 14px; padding: 0 2px; }
.budget__bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.budget__bar i { display: block; height: 100%; width: 84%; background: var(--accent); border-radius: inherit; transform-origin: left; }
html.js:not(.reduced-motion) .feat--cost.is-in .budget__bar i { animation: fill 2.4s var(--ease-out) both 200ms; }
html.js:not(.reduced-motion) .feat--cost.is-in .meter i { animation: fill 1.8s var(--ease-out) both; }
@keyframes fill { from { transform: scaleX(0); } }

.pane { border-radius: 10px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.pane__head { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--text); }
.pane__row { display: grid; grid-template-columns: 14px 38px minmax(0, 1fr) 70px 34px; align-items: center; gap: 8px; padding: 5px 12px; }
.pane__row > span:nth-child(3) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane__bar { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--line-3) calc(var(--w) * 100%), transparent 0); }
.pane__row.is-live .pane__bar { background: linear-gradient(90deg, var(--accent) calc(var(--w) * 100%), transparent 0); }
.spinner { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line-3); border-top-color: var(--accent); }
html.js:not(.reduced-motion) .spinner { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); transition: border-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease); }
.chips li.is-lit { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); }

.wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 64px; }
.wave i { width: 4px; height: 100%; border-radius: 2px; background: var(--accent); transform: scaleY(0.18); opacity: 0.85; }
html.js:not(.reduced-motion) .feat--notify.is-in .wave i { animation: eq 1.6s var(--ease) infinite; }
.wave i:nth-child(2n) { animation-delay: -0.4s !important; }
.wave i:nth-child(3n) { animation-delay: -0.9s !important; }
.wave i:nth-child(5n) { animation-delay: -1.2s !important; }
html.reduced-motion .wave i:nth-child(odd) { transform: scaleY(0.5); }
@keyframes eq { 0%, 100% { transform: scaleY(0.18); } 30% { transform: scaleY(0.95); } 60% { transform: scaleY(0.4); } }
.toast-mock { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; color: var(--text); }
.toast-mock .icon { width: 15px; height: 15px; color: var(--text-3); }

.files { display: grid; gap: 8px; }
.files span { padding: 7px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files b { font-weight: 500; color: var(--text); }
.files b.t-ok { color: var(--ok); }

/* ---------- Store ---------- */
.store { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), var(--bg) 420px); }
.toolbar { position: sticky; top: 64px; z-index: 20; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 0; margin: -12px 0 6px; transition: background-color var(--dur-2) var(--ease); view-transition-name: store-toolbar; }
.toolbar::before { content: ''; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 14px 24px -22px rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity var(--dur-1) var(--ease); }
.toolbar.is-stuck::before { opacity: 1; }
.search {
  position: relative;
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 12px 0 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-md);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.search:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md); }
.search .icon { width: 19px; height: 19px; color: var(--text-3); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 1rem; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search__kbd { height: 26px; min-width: 26px; }
.search:focus-within .search__kbd { opacity: 0; }
.segmented { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); }
.segmented button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font-size: 0.9rem; transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.segmented button:hover { color: var(--text); }
.segmented button[aria-checked="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
@media (max-width: 520px) { .segmented { width: 100%; } .segmented button { flex: 1; justify-content: center; padding: 0 8px; } }

.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.bars i { width: 3px; border-radius: 1px; background: var(--line-3); }
.bars i:nth-child(1) { height: 5px; }
.bars i:nth-child(2) { height: 8px; }
.bars i:nth-child(3) { height: 11px; }
.bars--1 i:nth-child(1), .bars--3 i { background: var(--accent); }

.chips-row { display: flex; flex-wrap: wrap; gap: 8px 6px; margin: 14px 0 0; }
@media (max-width: 760px) {
  .chips-row { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 36px), transparent); }
  .chips-row::-webkit-scrollbar { display: none; }
  .chip { scroll-snap-align: start; }
}
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 6px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font-size: 0.86rem;
  white-space: nowrap;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), opacity var(--dur-2) var(--ease);
}
.chip .icon { width: 17px; height: 17px; color: var(--text-3); }
.chip__count { font: 400 0.66rem/1 var(--font-mono); color: var(--text-3); padding: 4px 6px; border-radius: 999px; background: var(--surface-2); min-width: 2.2em; text-align: center; font-variant-numeric: tabular-nums; }
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip[aria-pressed="true"] .icon { color: var(--bg); }
.chip[aria-pressed="true"] .chip__count { background: color-mix(in oklab, var(--bg) 14%, transparent); color: var(--bg); }
.chip.is-zero { opacity: 0.45; }

.cat-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(90deg, var(--accent-soft), transparent 55%), var(--surface);
  background-size: cover;
  background-position: right center;
}
.cat-banner[hidden] { display: none; }
.cat-banner.has-art { background-image: linear-gradient(90deg, var(--surface) 40%, color-mix(in oklab, var(--surface) 30%, transparent)), var(--art); }
.cat-banner__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--code-bg); border: 1px solid var(--line-2); color: var(--text-2); }
.cat-banner__icon .icon { width: 26px; height: 26px; }
.cat-banner h3 { margin: 0; font: 400 1.65rem/1.1 var(--font-display); letter-spacing: -0.015em; }
.cat-banner p { margin: 4px 0 0; color: var(--text-2); font-size: 0.95rem; }

.store__status { margin: 22px 0 14px; font: 400 0.68rem/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 214px), 1fr)); }

.card {
  --mx: -999px;
  --my: -999px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px 16px 12px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(20rem 14rem at var(--mx) var(--my), color-mix(in oklab, var(--accent) 6%, transparent), transparent 70%),
    var(--surface);
  transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card[hidden] { display: none; }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.card__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--code-bg); border: 1px solid var(--line); color: var(--text-2); }
.card__icon .icon { width: 20px; height: 20px; }
.card__title { margin: 0; min-width: 0; }
.card__open {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font: 500 0.86rem/1.35 var(--font-mono);
  font-stretch: 87.5%;
  color: var(--text);
  overflow-wrap: break-word;
}
.card__open::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.card__open:focus-visible { outline: none; }
.card:has(.card__open:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0 0; font-size: 0.8rem; color: var(--text-3); }
.card__meta > * + *::before { content: '\00B7'; margin-right: 8px; color: var(--line-3); }
.tier { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px; border: 1px solid var(--line); font: 400 0.58rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.tier .bars { height: 9px; }
.tier .bars i:nth-child(1) { height: 4px; }
.tier .bars i:nth-child(2) { height: 6.5px; }
.tier .bars i:nth-child(3) { height: 9px; }
.card__desc { margin: 0; color: var(--text-2); font-size: 0.9rem; line-height: 1.52; text-wrap: pretty; }
.card__cmds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.card__cmds code, .sheet__cmds code { display: inline-block; padding: 3px 7px; border-radius: 6px; font-size: 0.72rem; color: var(--accent-text); background: var(--accent-soft); border: 1px solid color-mix(in oklab, var(--accent) 22%, transparent); }
.card__foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.card__copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font: 400 0.7rem/1 var(--font-mono);
  font-stretch: 87.5%;
  transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.card__copy:hover { color: var(--text); background: var(--surface-2); border-color: var(--line-3); }
.card__copy .icon { width: 15px; height: 15px; grid-area: 1 / 1; transition: opacity var(--dur-1) var(--ease), transform var(--dur-2) var(--ease-out); }
.card__copy .swap { display: grid; }
.card__ver { font: 400 0.66rem/1 var(--font-mono); color: var(--text-3); }
.card__link { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-3); transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease); }
.card__link:hover { color: var(--text); background: var(--surface-2); }
.card__link .icon { width: 16px; height: 16px; }
.card mark, .sheet mark { background: color-mix(in oklab, var(--accent) 26%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.card.is-target { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-md); }
html.js:not(.reduced-motion) .card.is-target { animation: target 1.6s var(--ease) 2; }
@keyframes target { 50% { box-shadow: 0 0 0 9px transparent, 0 0 30px -4px var(--glow); } }

.card--skeleton { min-height: 220px; background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; }
html.js:not(.reduced-motion) .card--skeleton { animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

.empty { padding: 56px 0 24px; text-align: center; color: var(--text-2); }
.empty__title { font-size: 1.8rem; color: var(--text); margin: 0 0 8px; }
.empty a { color: var(--accent-text); }

/* ---------- Sheet (mod detail dialog) ---------- */
.sheet {
  width: min(100% - 24px, 640px);
  max-height: min(88vh, 860px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.2);
  overflow: auto;
  overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(8, 6, 4, 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
:root[data-effective-theme="light"] .sheet::backdrop { background: rgba(40, 30, 18, 0.32); }
html:not(.reduced-motion) .sheet[open] { animation: sheet-in 420ms var(--ease-out); }
html:not(.reduced-motion) .sheet[open]::backdrop { animation: fade-in 300ms var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
@media (max-width: 640px) {
  .sheet { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; border-bottom: 0; }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
}
.sheet__inner { padding: 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.sheet__inner:focus { outline: none; }
.sheet__inner > * { min-width: 0; }
@media (min-width: 640px) { .sheet__inner { padding: 32px; } }
.sheet__close { position: absolute; top: 16px; right: 16px; }
.sheet__head { display: flex; gap: 16px; align-items: center; padding-right: 44px; }
.sheet__icon { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 16px; background: var(--code-bg); border: 1px solid var(--line-2); color: var(--text-2); box-shadow: 0 0 0 5px var(--accent-soft); }
.sheet__icon .icon { width: 28px; height: 28px; }
.sheet__title { margin: 0; font: 500 1.3rem/1.2 var(--font-mono); font-stretch: 87.5%; overflow-wrap: anywhere; }
.sheet__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; color: var(--text-3); font-size: 0.86rem; }
.sheet__desc { margin: 0; font: 400 1.28rem/1.4 var(--font-display); letter-spacing: -0.008em; text-wrap: pretty; }
.sheet__label { margin: 0 0 10px; font: 400 0.64rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.sheet__cmds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sheet__kw { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sheet__kw li { padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); font: 400 0.68rem/1.5 var(--font-mono); color: var(--text-2); }
.sheet__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sheet__actions .btn { height: 44px; }
.sheet__related { display: grid; gap: 8px; }
.sheet__related a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease); }
.sheet__related a:hover { border-color: var(--line-2); background: var(--surface-2); }
.sheet__related .icon { width: 18px; height: 18px; color: var(--text-3); }
.sheet__related b { display: block; font: 500 0.8rem/1.3 var(--font-mono); font-stretch: 87.5%; }
.sheet__related span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: 0.84rem; }

/* ---------- How it works ---------- */
.how { border-top: 1px solid var(--line); }
.flow { position: relative; display: grid; gap: 36px; }
@media (min-width: 960px) { .flow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(56px, 7vw, 110px); align-items: stretch; } .flow__col { display: flex; flex-direction: column; } .hookcard { margin-block: auto; } }
.flow__wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; display: none; }
@media (min-width: 960px) { .flow__wires { display: block; } }
.flow__wires .wire { fill: none; stroke: var(--line-2); stroke-width: 1.2; }
.flow__wires .pulse { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 10 400; stroke-dashoffset: 410; filter: drop-shadow(0 0 4px var(--glow)); opacity: 0; }
html.js:not(.reduced-motion) .flow.is-in .pulse { animation: pulse 3.6s var(--ease) infinite; animation-delay: calc(var(--i) * 420ms); }
@keyframes pulse { 0% { stroke-dashoffset: 410; opacity: 0; } 8% { opacity: 1; } 60% { stroke-dashoffset: 0; opacity: 1; } 70%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.flow__col { position: relative; z-index: 1; min-width: 0; }
.flow__label { margin: 0 0 16px; font: 400 0.66rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.flow__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.flow__list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.flow__list code { font-size: 0.78rem; color: var(--accent-text); }
.flow__list span { font-size: 0.84rem; color: var(--text-3); text-align: right; }
.flow__list--out li { justify-content: flex-start; align-items: center; color: var(--text); font-size: 0.93rem; }
.flow__list--out .icon { width: 18px; height: 18px; color: var(--text-3); }
.hookcard { padding: 22px; border-radius: var(--r-xl); border: 1px solid var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--code-bg); box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 5%, transparent), var(--shadow-lg); }
.hookcard__sig { display: block; padding-bottom: 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 0.95rem; color: var(--text); }
.hookcard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.92rem; color: var(--text-2); }
.hookcard b { display: inline-block; min-width: 4.8em; font-weight: 500; color: var(--text); }
.hookcard code { font-size: 0.76rem; color: var(--accent-text); }
.how__note { margin: 40px 0 0; max-width: 64ch; color: var(--text-3); font-size: 0.92rem; }
.how__note code { color: var(--text-2); font-size: 0.85em; }
@media (max-width: 959px) {
  .flow__col + .flow__col::before { content: ''; display: block; width: 1px; height: 26px; margin: -26px auto 10px; background: linear-gradient(var(--line-2), var(--accent)); }
}

/* ---------- Build ---------- */
.build { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), var(--bg) 70%); }
.build__grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1024px) { .build__grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 72px; } }
.build__copy { min-width: 0; }
.build__steps { list-style: none; counter-reset: s; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.build__steps li { counter-increment: s; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; color: var(--text-2); font-size: 0.97rem; }
.build__steps li::before { content: counter(s, decimal-leading-zero); font: 500 0.7rem/1.9 var(--font-mono); color: var(--accent-text); }
.build__steps code { font-size: 0.8em; color: var(--text); padding: 1px 5px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.build__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.editor { min-width: 0; border-radius: var(--r-xl); border: 1px solid var(--line-2); background: var(--code-bg); box-shadow: var(--shadow-lg); overflow: hidden; }
.editor__tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); background: var(--surface); font: 400 0.7rem/1 var(--font-mono); font-stretch: 87.5%; color: var(--text-3); }
.editor__tabs span { padding: 10px 14px; border-radius: 8px 8px 0 0; }
.editor__tabs .is-active { color: var(--text); background: var(--code-bg); box-shadow: inset 0 1px 0 var(--accent); }
.editor__code { margin: 0; padding: 22px 22px 24px; overflow-x: auto; font-size: 0.78rem; line-height: 1.85; color: var(--text); tab-size: 2; }
.editor__code code { font-family: inherit; }
.tk-k { color: var(--tk-k); }
.tk-s { color: var(--tk-s); }
.tk-f { color: var(--tk-f); }
.tk-r { color: var(--tk-r); }
.tk-v { color: var(--text); }
.tk-c { color: var(--text-3); font-style: italic; }
.editor__foot { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font: 400 0.66rem/1 var(--font-mono); color: var(--text-3); }
.editor__foot .led { width: 6px; height: 6px; margin-right: 6px; vertical-align: 1px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 40px; background: var(--bg-2); }
.site-footer__top { display: grid; gap: 40px; }
@media (min-width: 860px) { .site-footer__top { grid-template-columns: minmax(0, 1fr) auto; } }
.lockup--lg .lockup__word { font-size: 1.6rem; }
.lockup--lg .lockup__mark { width: 32px; height: 32px; }
.site-footer__brand p { margin: 16px 0 0; max-width: 36ch; color: var(--text-2); font-size: 0.95rem; }
.site-footer__brand p a { color: var(--text); }
.site-footer__nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 32px 48px; }
@media (min-width: 860px) { .site-footer__nav { grid-template-columns: repeat(3, auto); } }
.site-footer__nav h2 { margin: 0 0 14px; font: 400 0.64rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.site-footer__nav a { display: block; padding: 5px 0; color: var(--text-2); text-decoration: none; font-size: 0.94rem; transition: color var(--dur-1) var(--ease); }
.site-footer__nav a:hover { color: var(--text); }
.site-footer__fine { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; margin: 56px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--text-3); }
.site-footer__fine p { margin: 0; max-width: 78ch; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 95;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font: 400 0.74rem/1.4 var(--font-mono);
  font-stretch: 87.5%;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease-out);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- View transitions ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; }
::view-transition-group(*) { animation-duration: 380ms; animation-timing-function: cubic-bezier(0.2, 0.7, 0.1, 1); }

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

/* ---------- Late additions ---------- */
html:has(dialog[open]) { overflow: hidden; }
.bars--2 i:nth-child(-n + 2) { background: var(--accent); }
.sheet--video { width: min(100% - 24px, 960px); padding: 0; overflow: hidden; background: #000; }
.sheet--video video { width: 100%; aspect-ratio: 16 / 9; }
.sheet--video .sheet__close { z-index: 2; background: rgba(0, 0, 0, 0.5); color: #fff; }

/* Guard transcript */
.feat--guard .feat__art { align-content: stretch; }
.feat--guard .term { display: flex; flex-direction: column; }
.term p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term b { font-weight: 500; }
.t-acc { color: var(--accent); }
.t-prompt { margin-bottom: 12px !important; color: var(--text); }
.t-dot { color: var(--text-3); margin-right: 6px; }
.t-dot.is-ok { color: var(--ok); }
.t-indent { padding-left: 1.3em; }
.t-indent2 { padding-left: 2.6em; margin-bottom: 6px !important; }
.t-foot { display: flex; gap: 10px; margin-top: 16px !important; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.t-right { margin-left: auto; }
html.js:not(.reduced-motion) .feat--guard.is-in .t-deny { animation: deny 1.2s var(--ease) both; }
html.js:not(.reduced-motion) .feat--guard.is-in .t-deny:nth-of-type(7) { animation-delay: 450ms; }
html.js:not(.reduced-motion) .feat--guard.is-in .t-deny:nth-of-type(10) { animation-delay: 900ms; }

/* Slash menu mock */
.slash { display: grid; gap: 8px; }
.slash__input { padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--text); }
.slash__menu { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.slash__menu li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 6px 8px; border-radius: 6px; transition: background-color var(--dur-2) var(--ease); }
.slash__menu li.is-sel { background: var(--surface-3); }
.slash__menu code { color: var(--text); font-size: 1em; }
.slash__menu li.is-sel code { color: var(--accent-text); }
.slash__menu span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-family: var(--font-sans); font-stretch: normal; font-size: 0.82rem; }
.slash__menu em { font-style: normal; color: var(--text-3); font-size: 0.66rem; }
@media (max-width: 520px) { .slash__menu li { grid-template-columns: 7em minmax(0, 1fr); } .slash__menu em { display: none; } }

/* Grouped catalog headings */
.grid__group { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 6px 16px; padding: 30px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.grid__group:first-child { padding-top: 6px; }
.grid__group[hidden] { display: none; }
.grid__group-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--line-2); color: var(--text-2); align-self: center; }
.grid__group-icon .icon { width: 21px; height: 21px; }
.grid__group h3 { margin: 0; font: 400 1.6rem/1.1 var(--font-display); letter-spacing: -0.015em; }
.grid__group p { margin: 4px 0 0; color: var(--text-2); font-size: 0.92rem; }
.grid__group-count { font: 400 0.64rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); padding-bottom: 6px; white-space: nowrap; }
@media (max-width: 520px) { .grid__group { grid-template-columns: auto minmax(0, 1fr); } .grid__group-count { display: none; } .grid__group h3 { font-size: 1.35rem; } }

/* Featured card: the mod store itself */
.card--featured { border-color: var(--accent-line); background: radial-gradient(20rem 14rem at var(--mx) var(--my), color-mix(in oklab, var(--accent) 8%, transparent), transparent 70%), linear-gradient(135deg, var(--accent-soft), transparent 55%), var(--surface); }
.card--featured .card__icon { color: var(--text-2); border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.card--featured .card__desc { color: var(--text); font: 400 1.2rem/1.4 var(--font-display); letter-spacing: -0.005em; }
.card--featured { grid-column: 1 / -1; padding: 22px; gap: 22px; }
.card--featured .card__open { font-size: 1.05rem; }
.card__side { position: relative; z-index: 1; min-width: 0; display: grid; gap: 10px; }
.card__side-label { margin: 0; font: 400 0.62rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); }
.card__side-note { margin: 0; font-size: 0.86rem; color: var(--text-3); }
.card__side-note code { color: var(--text); font-size: 0.85em; }
.card__main { min-width: 0; display: grid; gap: 8px; }
@media (min-width: 900px) { .card--featured { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; padding: 28px 30px; } }

/* Closing CTA */
.outro { position: relative; padding: clamp(96px, 11vw, 160px) 0; border-top: 1px solid var(--line); overflow: hidden; isolation: isolate; text-align: center; }
.outro::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40rem 22rem at 50% 100%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%); }
.outro__inner { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.outro__tiles { position: absolute; inset: auto 0 0; z-index: -1; height: 60%; display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); grid-auto-rows: 34px; gap: 8px; padding: 0 8px; align-content: end; -webkit-mask-image: radial-gradient(60% 90% at 50% 100%, #000 10%, transparent 80%); mask-image: radial-gradient(60% 90% at 50% 100%, #000 10%, transparent 80%); opacity: 0.8; }
.outro__tiles i { border-radius: 7px; background: var(--cell); box-shadow: inset 0 0 0 1px var(--line); transition: background-color 1.2s var(--ease), box-shadow 1.2s var(--ease); }
.outro__tiles i.is-on { background: color-mix(in oklab, var(--accent) 22%, var(--cell)); box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 18px -4px var(--glow); }
.outro__title { font-size: clamp(3rem, 1.6rem + 6vw, 7rem); line-height: 0.95; }
.outro .sub { margin-inline: auto; text-align: center; }
.outro__cmd { margin-top: 36px; text-align: left; background: color-mix(in oklab, var(--code-bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.outro__actions { justify-content: center; margin-top: 22px; }
.btn > span { display: inline; }
.nowrap { white-space: nowrap; }
.term, .slash, .files, .pane, .statusline { min-width: 0; }

/* Compact store rows on phones */
@media (max-width: 639px) {
  .card:not(.card--featured) {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-areas: "icon title copy" "icon desc desc" "icon cmds cmds";
    column-gap: 14px;
    row-gap: 6px;
    padding: 14px 14px 16px;
  }
  .card:not(.card--featured) .card__top,
  .card:not(.card--featured) .card__foot { display: contents; }
  .card:not(.card--featured) .card__icon { grid-area: icon; align-self: start; }
  .card:not(.card--featured) .tier,
  .card:not(.card--featured) .card__link { display: none; }
  .card:not(.card--featured) .card__id { grid-area: title; min-width: 0; }
  .card:not(.card--featured) .card__desc { grid-area: desc; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .card:not(.card--featured) .card__cmds { grid-area: cmds; }
  .card:not(.card--featured) .card__copy { grid-area: copy; position: relative; z-index: 1; align-self: start; width: 36px; height: 36px; padding: 0; justify-content: center; }
  .card__copy-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .card:not(.card--featured):hover { transform: none; }
  .hero__actions .btn { flex: 1 1 auto; }
}
@media (min-width: 640px) { .card__copy-label { display: inline; } }
.armed { margin-top: auto; padding-top: 18px; }
.armed__label { margin: 0 0 10px !important; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.armed__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.armed__list li { padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--text-2); font-size: 0.7rem; }
.armed__list li::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: var(--ok); vertical-align: 1px; opacity: 0.8; }
.armed__list li.is-hit { border-color: color-mix(in oklab, var(--deny) 35%, transparent); color: var(--text); }
.armed__list li.is-hit::before { background: var(--deny); opacity: 1; }
.feat--guard .t-foot { margin-top: 16px !important; }

/* Generated media slots (docs/media/media.json) */
.hero__backdrop.has-still::before { content: ''; position: absolute; inset: 0; background: var(--still) center / cover no-repeat; opacity: 0.36; -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent); mask-image: linear-gradient(180deg, #000 50%, transparent); }
:root[data-effective-theme="light"] .hero__backdrop.has-still::before { opacity: 0.18; mix-blend-mode: multiply; }
.cat-banner.has-art { min-height: 150px; }

/* ---------- v2: release pill ---------- */
.release {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  height: 34px;
  margin: 0 0 24px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(90deg, var(--accent-soft), transparent 85%), var(--surface);
  color: var(--text-2);
  font: 400 0.72rem/1 var(--font-mono);
  font-stretch: 87.5%;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.release[hidden] { display: none; }
.release:hover { border-color: var(--accent); color: var(--text); }
.release__tag { display: inline-grid; place-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 500 0.6rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.release__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.release__sep::before { content: '\00B7'; margin: 0 8px; color: var(--text-3); }
.release .icon { width: 14px; height: 14px; color: var(--accent-text); transition: transform var(--dur-2) var(--ease); }
.release:hover .icon { transform: translateX(3px); }
@media (max-width: 400px) { .release__more { display: none; } }

/* ---------- v2: "new" marks ---------- */
.badge-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 20px;
  padding: 0 7px 0 6px;
  border-radius: 6px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 500 0.58rem/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-new i { width: 5px; height: 5px; border-radius: 1.5px; background: var(--accent); box-shadow: 0 0 6px var(--glow); }
.card__meta > .badge-new::before { content: none; }
.card__meta > .badge-new { margin-left: 2px; }

.chip__dot { flex: none; width: 8px; height: 8px; margin: 0 4px; border-radius: 2.5px; background: var(--accent); box-shadow: 0 0 8px var(--glow); }
.chip--new { border-color: var(--accent-line); color: var(--text); }
.chip--new:hover { border-color: var(--accent); }
.chip--new[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip--new[aria-pressed="true"] .chip__dot { background: var(--accent-ink); box-shadow: none; }
.chip--new[aria-pressed="true"] .chip__count { background: rgba(0, 0, 0, 0.16); color: var(--accent-ink); }
.chips-row__rule { flex: none; width: 1px; height: 22px; align-self: center; margin: 0 6px; background: var(--line-2); }
/* Two shelves, the second one lit: the release in one glyph. */
.shelves-glyph { display: grid; grid-template-columns: 5px 5px 2px 5px 5px; grid-auto-rows: 5px; gap: 2px; }
.shelves-glyph i { border-radius: 1.5px; background: var(--line-3); }
.shelves-glyph i.is-lit { background: var(--accent); box-shadow: 0 0 6px var(--glow); }

/* ---------- v2: What's new ---------- */
.whatsnew { border-top: 1px solid var(--line); overflow: hidden; }
.whatsnew::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(48rem 24rem at 88% 0%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 70%); }
.whatsnew[hidden] { display: none; }
.whatsnew { isolation: isolate; }
.section-head--split { max-width: none; display: grid; gap: 8px; align-items: end; }
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1fr minmax(0, 30rem); } .section-head--split .sub { margin: 0 0 6px; } }

.shelf { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1000px) { .shelf { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; } }
.shelf li { display: flex; min-width: 0; }
.shelf__item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon count" "title title" "tag tag";
  align-content: start;
  width: 100%;
  padding: 16px 16px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.shelf__item:hover { border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.shelf__icon { grid-area: icon; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--line-2); color: var(--text-2); }
.shelf__icon .icon { width: 21px; height: 21px; }
.shelf__count { grid-area: count; justify-self: end; align-self: start; font: 400 0.64rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.shelf__title { grid-area: title; margin-top: 16px; font: 400 1.16rem/1.15 var(--font-display); letter-spacing: -0.01em; text-wrap: balance; }
.shelf__tag { grid-area: tag; margin-top: 6px; color: var(--text-2); font-size: 0.86rem; line-height: 1.45; text-wrap: pretty; }
@media (max-width: 639px) {
  .shelf__item { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon title" "icon count"; column-gap: 12px; row-gap: 4px; align-items: center; padding: 12px; }
  .shelf__icon { width: 36px; height: 36px; border-radius: 10px; }
  .shelf__icon .icon { width: 19px; height: 19px; }
  .shelf__title { margin: 0; font-size: 1rem; align-self: end; }
  .shelf__count { justify-self: start; align-self: start; }
  .shelf__tag { display: none; }
}

.picks-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin: clamp(48px, 6vw, 72px) 0 20px; }
.picks-head__title { margin: 0; font: 400 clamp(1.5rem, 1.25rem + 0.8vw, 1.9rem)/1.1 var(--font-display); letter-spacing: -0.015em; }
.picks-head .btn { height: 42px; }
.picks { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
@media (min-width: 1000px) { .picks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pick {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 18px 18px 14px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.pick:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pick:has(.pick__open:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick__top { display: flex; align-items: center; gap: 10px; }
.pick__cat { font-size: 0.84rem; color: var(--text-3); }
.pick__top .badge-new { margin-left: auto; }
.pick__name { margin: 2px 0 0; }
.pick__open { padding: 0; border: 0; background: none; color: var(--text); text-align: left; font: 500 1.02rem/1.3 var(--font-mono); font-stretch: 87.5%; overflow-wrap: anywhere; }
.pick__open::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.pick__open:focus-visible { outline: none; }
.pick__term { padding: 11px 14px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--line); font: 400 0.74rem/1.8 var(--font-mono); font-stretch: 87.5%; color: var(--text-2); }
.pick__term p { margin: 0; padding-left: 1.25em; text-indent: -1.25em; overflow-wrap: anywhere; }
.pick__term .is-cmd { color: var(--text); }
.pick__term .t-dot { margin-right: 6px; }
.pick__desc { margin: 0; color: var(--text-2); font-size: 0.93rem; line-height: 1.55; text-wrap: pretty; }
.pick__foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.pick__cmd { padding: 3px 7px; border-radius: 6px; font-size: 0.72rem; color: var(--accent-text); background: var(--accent-soft); border: 1px solid color-mix(in oklab, var(--accent) 22%, transparent); }
@media (max-width: 639px) {
  .picks { display: flex; overflow-x: auto; gap: 12px; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 14px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .picks::-webkit-scrollbar { display: none; }
  .pick { flex: 0 0 86%; scroll-snap-align: start; }
  .pick:hover { transform: none; }
}
