/* cpb home: a shelf of playbook notebooks. Deep greens with warm and cool
   complements; plain CSS, no images. Dark by default, light by system
   preference or the toggle. */

:root {
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --bg: #06110d;
  --bg-2: #0a1a14;
  --surface: #0f2119;
  --surface-2: #14291f;
  --line: #21402f;
  --line-strong: #31604a;
  --fg: #e9f4ee;
  --fg-dim: #a9c3b5;
  --fg-faint: #85a494;
  --brand: #41d6a2;
  --brand-ink: #04100b;
  --focus: #8ff5d0;
  --ok: #55d6a0;
  --no: #f08d73;
  --glow-a: rgba(65, 214, 162, 0.16);
  --glow-b: rgba(147, 172, 240, 0.09);
  --grid: rgba(120, 200, 160, 0.06);
  --shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.65), 0 2px 0 rgba(255, 255, 255, 0.03) inset;
  --term: #050c09;
  --ink: #04100b;
  --grad: linear-gradient(100deg, #41d6a2, #bfe36b 55%, #f0bd60);
  --pr: #41d6a2;
  --inset: rgba(0, 0, 0, 0.35);
}

:root[data-theme="light"] {
  --bg: #f1f7f2;
  --bg-2: #e8f1ea;
  --surface: #ffffff;
  --surface-2: #eef5f0;
  --line: #cddfd3;
  --line-strong: #9dbaa8;
  --fg: #0d2118;
  --fg-dim: #3b5646;
  --fg-faint: #52705f;
  --brand: #0a6e4e;
  --brand-ink: #ffffff;
  --focus: #0b5f44;
  --ok: #0d7a4f;
  --no: #b04a31;
  --glow-a: rgba(11, 122, 86, 0.12);
  --glow-b: rgba(79, 110, 200, 0.08);
  --grid: rgba(13, 80, 50, 0.07);
  --shadow: 0 22px 50px -20px rgba(13, 60, 40, 0.35), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  --term: #0b1511;
  --grad: linear-gradient(100deg, #0a6e4e, #5b7d12 55%, #8a5a0d);
  --pr: #5fe0b4;
  --inset: rgba(13, 60, 40, 0.14);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f1f7f2;
    --bg-2: #e8f1ea;
    --surface: #ffffff;
    --surface-2: #eef5f0;
    --line: #cddfd3;
    --line-strong: #9dbaa8;
    --fg: #0d2118;
    --fg-dim: #3b5646;
    --fg-faint: #52705f;
    --brand: #0a6e4e;
    --brand-ink: #ffffff;
    --focus: #0b5f44;
    --ok: #0d7a4f;
    --no: #b04a31;
    --glow-a: rgba(11, 122, 86, 0.12);
    --glow-b: rgba(79, 110, 200, 0.08);
    --grid: rgba(13, 80, 50, 0.07);
    --shadow: 0 22px 50px -20px rgba(13, 60, 40, 0.35), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    --term: #0b1511;
    --grad: linear-gradient(100deg, #0a6e4e, #5b7d12 55%, #8a5a0d);
    --pr: #5fe0b4;
    --inset: rgba(13, 60, 40, 0.14);
  }
}

/* the notebook colours: two greens, then the complements */
.c0 { --c: #41d6a2; }
.c1 { --c: #bfe36b; }
.c2 { --c: #f0bd60; }
.c3 { --c: #f08d73; }
.c4 { --c: #93acf0; }
.c5 { --c: #a9c2b5; }
.c0, .c1, .c2, .c3, .c4, .c5 { --c-text: var(--c); }
:root[data-theme="light"] :is(.c0, .c1, .c2, .c3, .c4, .c5) { --c-text: color-mix(in srgb, var(--c) 50%, #000); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) :is(.c0, .c1, .c2, .c3, .c4, .c5) { --c-text: color-mix(in srgb, var(--c) 50%, #000); }
}

* { box-sizing: border-box; }
html { color-scheme: dark light; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--brand); }
a:hover { text-decoration: underline; }
h1, h2, h3, .mono { font-family: var(--font-mono); letter-spacing: -0.015em; }
code, pre { font-family: var(--font-mono); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* ---------- atmosphere ---------- */
.atmos { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.atmos::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.blob.a { width: 640px; height: 640px; left: -160px; top: -200px; background: var(--glow-a); animation: drift 34s ease-in-out infinite alternate; }
.blob.b { width: 560px; height: 560px; right: -140px; top: 180px; background: var(--glow-b); animation: drift 41s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate3d(70px, 50px, 0) scale(1.12); } }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .row { max-width: 1180px; margin: 0 auto; padding: 0.7rem 1.25rem; display: flex; align-items: center; gap: 1.1rem; }
.brand { font-family: var(--font-mono); font-weight: 700; color: var(--fg); text-decoration: none; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 0.55rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 26px; height: 26px; }
.brand .us { color: var(--brand); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.top nav { display: flex; gap: 1.1rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { color: var(--fg-dim); text-decoration: none; font-size: 0.88rem; padding: 0.25rem 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.top nav a:hover, .top nav a.active { color: var(--fg); border-bottom-color: var(--brand); text-decoration: none; }
.top .acts { display: flex; align-items: center; gap: 0.6rem; }
.pill-link, .theme {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: var(--surface); border: 1px solid var(--line); color: var(--fg-dim);
  border-radius: 8px; font-size: 0.85rem; text-decoration: none; cursor: pointer;
}
.pill-link { padding: 0.3rem 0.65rem; }
.theme { width: 2.1rem; height: 2.1rem; font-size: 1rem; color: var(--fg); }
.pill-link:hover, .theme:hover { border-color: var(--brand); color: var(--fg); text-decoration: none; }

/* ---------- hero ---------- */
.hero { padding: 2.6rem 0 1rem; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0.4rem 3rem; align-items: start; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono);
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand);
  padding: 0.3rem 0.7rem; border: 1px solid var(--line-strong); border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 var(--brand); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
.hero-top { grid-column: 1 / -1; }
.hero-sub { display: flex; align-items: flex-start; gap: 1.6rem; min-width: 0; }
.hero .lede { font-size: 1.08rem; color: var(--fg-dim); max-width: 62ch; margin: 0.3rem 0 1.4rem; }
.hero .lede b { color: var(--fg); font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.65rem 1.1rem; border-radius: 10px;
  font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--brand); text-decoration: none; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.install-pill {
  display: inline-flex; align-items: center; gap: 0.7rem; max-width: 100%;
  background: var(--term); color: #cfe9dc; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.55rem 0.55rem 0.55rem 0.9rem; font-family: var(--font-mono); font-size: 0.82rem;
}
.install-pill code { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.install-pill .pr { color: var(--pr); }
.copy {
  font-family: var(--font-mono); font-size: 0.72rem; background: transparent; color: #a9c3b5;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 6px; padding: 0.22rem 0.55rem; cursor: pointer; flex: none;
}
.copy:hover { color: #fff; border-color: var(--brand); }
.copy.done { color: #55d6a0; border-color: #55d6a0; }


/* ---------- the headline slot machine ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.slot-h1 { margin: 1.1rem 0 0.9rem; font-size: clamp(1.75rem, 5.2vw, 3.5rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; max-width: none; }
.slot { display: block; cursor: pointer; }
.slot-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2em 0.42em; }
.slot-line.tail { display: block; margin-top: 0.12em; }
.wanna { color: var(--fg); }
.slot-line em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reel {
  position: relative; display: inline-block; padding: 0 0.3em; border-radius: 0.26em; background: var(--surface);
  border: 2px solid var(--line-strong); overflow: hidden; transition: border-color 0.4s, box-shadow 0.5s;
  box-shadow: inset 0 0.45em 0.5em -0.3em var(--inset), inset 0 -0.45em 0.5em -0.3em var(--inset);
}
.reel.lit { border-color: var(--c-text); box-shadow: inset 0 0.45em 0.5em -0.3em var(--inset), inset 0 -0.45em 0.5em -0.3em var(--inset), 0 0 0 0.12em color-mix(in srgb, var(--c-text) 22%, transparent); }
.reel .win { display: block; height: 1.3em; overflow: hidden; -webkit-mask-image: linear-gradient(#0000, #000 18%, #000 82%, #0000); mask-image: linear-gradient(#0000, #000 18%, #000 82%, #0000); }
.reel .strip { display: block; will-change: transform; }
.reel .w { display: block; height: 1.3em; line-height: 1.3em; text-align: center; white-space: nowrap; color: var(--c-text); }
.reel.spinning .w { color: var(--fg-faint); }
.reel.spinning .strip { filter: blur(1.4px); }
.reel .w.land { animation: land 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
@keyframes land { 0% { transform: translateY(-14%); } 55% { transform: translateY(6%); } 100% { transform: none; } }
.slot-sub { margin: 0; font-size: 1.12rem; line-height: 1.5; color: var(--fg); max-width: 46ch; min-height: 5.1em; }
.slot-sub.in { animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.slot-sub a { color: var(--brand); font-family: var(--font-mono); font-size: 0.86em; white-space: nowrap; }
.lever { flex: none; display: inline-flex; flex-direction: column; align-items: center; gap: 0.2rem; background: transparent; border: 0; cursor: pointer; padding: 0.1rem 0.2rem; color: var(--fg-dim); }
.lever svg { width: 2.6rem; height: 3.5rem; overflow: visible; }
.lever .base { fill: var(--line-strong); }
.lever .stick { fill: var(--fg-faint); transform-origin: 50% 100%; transform-box: fill-box; transition: transform 0.18s ease-in; }
.lever .knob { fill: var(--c-text, var(--brand)); transition: transform 0.18s ease-in, filter 0.3s; }
.lever:hover .knob { filter: brightness(1.15); }
.lever.pulled .stick { transform: scaleY(0.35); }
.lever.pulled .knob { transform: translateY(20px); }
.lever-t { display: flex; flex-direction: column; align-items: center; line-height: 1.2; font-family: var(--font-mono); }
.lever-t b { color: var(--fg); font-size: 0.85rem; }
.lever-t small { font-size: 0.66rem; color: var(--fg-faint); }

/* ---------- the shelf (stage) ---------- */
.shelf { padding: 1rem 0 3.5rem; }
.shelf-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.shelf-head h2 { margin: 0; font-size: 1.05rem; font-weight: 500; color: var(--fg-dim); }
.shelf-head h2 b { color: var(--fg); font-weight: 600; }
.hint { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-faint); display: inline-flex; align-items: center; gap: 0.5rem; }
.hint kbd { font-family: var(--font-mono); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 0.35rem; color: var(--fg-dim); background: var(--surface); }
.hint .ptr { width: 14px; height: 14px; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translate(5px, 4px); } }

.stage { --rail: 10.6rem; position: relative; padding: 1.1rem var(--rail) 3.8rem 7.8rem; perspective: 1600px; }
.stage-glow {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.9;
  background: radial-gradient(520px 340px at var(--sx, 50%) var(--sy, 40%), color-mix(in srgb, var(--cc, var(--brand)) 14%, transparent), transparent 70%);
  transition: background 0.4s;
}
.books { display: grid; position: relative; }
.nb {
  --rank: 0; --sx-step: 9px; --sy-step: 7px; --rx: 0deg; --ry: 0deg;
  grid-area: 1 / 1; position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr);
  min-height: 25.5rem; border-radius: 6px 16px 16px 6px;
  background: var(--surface); border: 1px solid var(--line); border-bottom: 6px solid var(--c);
  box-shadow: var(--shadow);
  transform-origin: 0 100%;
  transform: translate3d(calc(var(--rank) * var(--sx-step) * -1), calc(var(--rank) * var(--sy-step)), 0) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.7s cubic-bezier(0.2, 0.9, 0.25, 1), box-shadow 0.4s;
  z-index: calc(10 - var(--rank));
}
.nb:not(.is-active) { cursor: pointer; }
.stage.fan .nb, .stage:focus-within .nb { --sx-step: 31px; --sy-step: 15px; }
.nb.is-active { transition: transform 0.7s cubic-bezier(0.2, 0.9, 0.25, 1), box-shadow 0.4s; }
.nb.is-active.lift { animation: lift 0.75s cubic-bezier(0.2, 0.9, 0.25, 1); }
@keyframes lift { 0% { transform: translate3d(-34px, 24px, 0); } 38% { transform: translate3d(-10px, -14px, 0) scale(1.012); } 100% { transform: translate3d(0, 0, 0); } }
.nb::after { /* a soft highlight that follows the pointer */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(420px 260px at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.07), transparent 70%);
}
.nb.is-active:hover::after { opacity: 1; }

.spine {
  position: relative; display: flex; align-items: center; justify-content: center;
  background: var(--c); color: var(--ink); border-radius: 5px 0 0 5px; overflow: hidden;
}
.spine::before { /* binding holes */
  content: ""; position: absolute; left: 50%; top: 42px; bottom: 14px; width: 6px; transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.32) 2.6px, transparent 3px) 0 0 / 6px 22px repeat-y;
  opacity: 0.5;
}
.spine > span:not(.plogo) {
  position: relative; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-mono);
  font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; background: var(--c); padding: 0.55rem 0.1rem;
}
.sheet { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); min-width: 0; }
.nb:not(.is-active) .sheet { visibility: hidden; transition: visibility 0s 0.5s; }

.side { padding: 1.5rem 1.4rem 1.3rem; border-right: 1px dashed var(--line-strong); display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.id { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.id h3 { margin: 0; font-size: 1.9rem; line-height: 1; font-weight: 700; display: inline-flex; align-items: center; gap: 0.55rem; }
.id h3 i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 22%, transparent); }
.launch { font-family: var(--font-mono); font-size: 0.78rem; padding: 0.15rem 0.5rem; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg-dim); }
.launch b { color: var(--c-text, var(--c)); font-weight: 600; }
.tag { margin: 0; color: var(--fg-dim); font-size: 0.97rem; line-height: 1.45; }
.cfg label { display: block; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 0.35rem; }
.path {
  display: flex; align-items: center; gap: 0.5rem; background: var(--term); color: #cfe9dc; border-radius: 8px; padding: 0.55rem 0.7rem;
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.35; overflow-wrap: anywhere; border: 1px solid var(--line);
}
.path svg { width: 16px; height: 16px; flex: none; color: var(--c); }
.path .pr { color: var(--pr); }
.cap { margin: 0.45rem 0 0; font-size: 0.8rem; line-height: 1.4; color: var(--fg-dim); }
.path b { color: var(--c); font-weight: 700; }
.layers { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 0.35rem; }
.layers li { display: grid; grid-template-columns: 1.1rem 1fr auto; align-items: center; gap: 0.55rem; font-size: 0.82rem; color: var(--fg-faint); }
.layers .pip { width: 0.78rem; height: 0.78rem; border-radius: 50%; border: 2px solid var(--fg-faint); transition: background 0.4s 0.15s, border-color 0.4s 0.15s, box-shadow 0.4s 0.15s; }
.layers li.on { color: var(--fg); }
.layers li.on .pip { background: var(--c); border-color: var(--c-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.layers .v { font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-dim); }
.layers li:not(.on) .v { color: var(--fg-faint); }

.main { padding: 1.1rem 1.4rem 1.3rem; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.seg { display: inline-flex; align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button {
  background: transparent; border: 0; border-radius: 7px; padding: 0.3rem 0.85rem; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-dim);
}
.seg button:hover { color: var(--fg); }
.seg button[aria-selected="true"] { background: var(--c); color: var(--ink); font-weight: 700; }
.pane { min-width: 0; min-height: 21rem; }
.pane[hidden] { display: none; }

.bays { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.bay { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.65rem 0.8rem 0.75rem; min-width: 0; }
.bay.wide { grid-column: 1 / -1; }
.bay h4 { margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); font-weight: 600; }
.bay h4 svg { width: 14px; height: 14px; color: var(--c-text, var(--c)); flex: none; }
.bay h4 .n { margin-left: auto; font-size: 0.68rem; color: var(--fg-dim); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 0.45rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  font-family: var(--font-mono); font-size: 0.76rem; line-height: 1.5; padding: 0.1rem 0.5rem; border-radius: 6px; color: var(--fg);
  background: color-mix(in srgb, var(--c) 15%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 38%, var(--line));
}
.chip small { color: var(--fg-dim); font-size: 0.9em; }
.via { margin: 0.45rem 0 0; font-family: var(--font-mono); font-size: 0.66rem; color: var(--fg-faint); }
.none { color: var(--fg-faint); font-family: var(--font-mono); font-size: 0.78rem; }
.rows { display: grid; gap: 0.3rem; font-family: var(--font-mono); font-size: 0.76rem; }
.rows .r { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.5rem; min-width: 0; }
.rows .r .t { flex-basis: 100%; min-width: 0; color: var(--fg-dim); overflow-wrap: anywhere; }
.badge { font-size: 0.64rem; padding: 0 0.4rem; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.06em; flex: none; }
.allow, .deny { display: flex; gap: 0.45rem; align-items: baseline; font-family: var(--font-mono); font-size: 0.76rem; overflow-wrap: anywhere; }
.allow::before { content: "✓"; color: var(--ok); font-weight: 700; flex: none; }
.deny::before { content: "✕"; color: var(--no); font-weight: 700; flex: none; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.6rem; align-items: baseline; font-family: var(--font-mono); font-size: 0.76rem; }
.kv .k { color: var(--fg); overflow-wrap: anywhere; }
.kv .eq { color: var(--fg-faint); }
.kv .val { color: var(--c-text, var(--c)); overflow-wrap: anywhere; }
.kv .blocked { color: var(--no); text-decoration: line-through; text-decoration-thickness: 2px; }
.kv .from { font-size: 0.62rem; color: var(--fg-faint); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }

.files { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: 0.8rem; height: 21rem; }
.tree { list-style: none; margin: 0; padding: 0.5rem; overflow: auto; min-height: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font-family: var(--font-mono); font-size: 0.77rem; display: flex; flex-direction: column; gap: 1px; align-content: start; }
.tree .root { color: var(--fg-faint); padding: 0.1rem 0.45rem 0.4rem; font-size: 0.68rem; overflow-wrap: anywhere; }
.tree button { width: 100%; text-align: left; background: transparent; border: 0; border-radius: 6px; padding: 0.22rem 0.45rem; cursor: pointer; display: flex; gap: 0.45rem; align-items: baseline; color: var(--fg-dim); }
.tree button:hover { background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--fg); }
.tree button[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--fg); }
.tree svg { width: 14px; height: 14px; flex: none; color: var(--c-text, var(--c)); align-self: center; }
.tree .kid { display: flex; gap: 0.4rem; padding: 0.12rem 0.45rem 0.12rem 1.7rem; color: var(--fg-dim); align-items: baseline; flex-wrap: wrap; }
.tree .kid .lk { color: var(--fg-faint); font-size: 0.68rem; overflow-wrap: anywhere; }
.viewer { margin: 0; background: var(--term); color: #cfe9dc; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.viewer .vh { font-family: var(--font-mono); font-size: 0.7rem; color: #85a494; padding: 0.45rem 0.8rem; border-bottom: 1px solid rgba(255, 255, 255, 0.07); overflow-wrap: anywhere; }
.viewer pre { margin: 0; padding: 0.75rem 0.9rem; overflow: auto; font-size: 0.74rem; line-height: 1.55; flex: 1; min-height: 0; }
.viewer .note { font-family: var(--font-mono); font-size: 0.66rem; color: #6f8f7e; padding: 0.3rem 0.8rem 0.5rem; }

.recipe { background: var(--term); border: 1px solid var(--line); border-radius: 10px; color: #cfe9dc; overflow: hidden; display: flex; flex-direction: column; height: 21rem; }
.recipe .vh { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-family: var(--font-mono); font-size: 0.7rem; color: #85a494; padding: 0.4rem 0.6rem 0.4rem 0.8rem; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.recipe pre { margin: 0; padding: 0.8rem 0.9rem; overflow: auto; font-size: 0.74rem; line-height: 1.6; flex: 1; min-height: 0; }
.recipe .foot { font-family: var(--font-mono); font-size: 0.68rem; color: #6f8f7e; padding: 0.3rem 0.8rem 0.55rem; }
.tk-kw { color: #7fe3bd; }
.tk-str { color: #f0c987; }
.tk-cm { color: #6f8f7e; font-style: italic; }

/* swap-in: the new notebook's contents arrive one by one */
.nb.is-active .rise { animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 55ms + 120ms); }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }

.pane.swap { animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* ---------- tabs on the right edge ---------- */
.tabs { position: absolute; right: 0; top: 3.2rem; z-index: 20; display: flex; flex-direction: column; gap: 0.62rem; width: var(--rail); }
.tab {
  position: relative; display: flex; align-items: center; gap: 0.55rem; height: 2.75rem; width: calc(var(--rail) - 2.3rem); border: 0; border-radius: 0 12px 12px 0; cursor: pointer;
  background: var(--c); color: var(--ink); font-family: var(--font-mono); font-weight: 700; font-size: 0.86rem; text-align: left; padding: 0 0.8rem 0 0.65rem;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.7);
  transition: width 0.35s cubic-bezier(0.2, 0.9, 0.25, 1), filter 0.25s, box-shadow 0.35s;
  filter: saturate(0.82) brightness(0.92);
}
.tab:hover { width: calc(var(--rail) - 1.5rem); filter: none; }
.tab[aria-selected="true"] { width: calc(var(--rail) - 0.3rem); filter: none; z-index: 2; box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.8), 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }

/* ---------- sections ---------- */
section.block { padding: 4.2rem 0; border-top: 1px solid var(--line); }
.sh { max-width: 52rem; margin-bottom: 2.2rem; }
.sh .eyebrow2 { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); margin: 0 0 0.6rem; }
.sh h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); line-height: 1.15; margin: 0 0 0.8rem; font-weight: 700; }
.sh p { margin: 0; color: var(--fg-dim); font-size: 1.05rem; }
.sh p code, .inl { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 0.04rem 0.35rem; color: var(--fg); }

.layer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.lcard {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem 1.2rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.75rem; transition: transform 0.3s, border-color 0.3s;
  overflow: hidden;
}
.lcard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--brand), transparent); opacity: 0.8; }
.lcard:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.lcard .ic { width: 38px; height: 38px; color: var(--brand); }
.lcard h3 { margin: 0; font-size: 1.05rem; }
.lcard p { margin: 0; color: var(--fg-dim); font-size: 0.92rem; line-height: 1.5; }
.lcard .kw { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.lcard .kw code { font-size: 0.72rem; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg); border-radius: 5px; padding: 0.05rem 0.4rem; }
.used { margin-top: auto; padding-top: 0.8rem; border-top: 1px dashed var(--line-strong); }
.used .lab { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 0.45rem; display: block; }
.dots { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dotb { display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 999px; padding: 0.1rem 0.55rem 0.1rem 0.4rem; cursor: pointer; font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-dim); transition: background 0.2s, color 0.2s, transform 0.2s; }
.dotb i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--c); }
.dotb:hover { color: var(--fg); background: color-mix(in srgb, var(--c) 18%, var(--surface-2)); transform: translateY(-1px); }

.demo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.2rem; align-items: stretch; }
.term { background: var(--term); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.term .bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.8rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.025); }
.term .bar i { width: 10px; height: 10px; border-radius: 50%; background: #3b4a43; }
.term .bar span { margin-left: auto; font-family: var(--font-mono); font-size: 0.72rem; color: #85a494; }
.term .out { padding: 0.9rem 1rem 1rem; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.7; color: #b9d3c6; min-height: 21rem; }
.term .ln { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.4s; }
.term .ln.show { opacity: 1; transform: none; }
.term .ln:hover { white-space: normal; overflow-wrap: anywhere; }
.term .pr { color: #55d6a0; }
.term .cmd { color: #f1f7f3; }
.term .ok { color: #55d6a0; }
.term .ch { color: #f0bd60; }
.term .cm { color: #6f8f7e; }
.shelf-tree { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.1rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.shelf-tree .t { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-dim); margin-bottom: 0.3rem; overflow-wrap: anywhere; }
.folder { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono); font-size: 0.85rem; padding: 0.45rem 0.7rem; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); opacity: 0.18; transform: translateX(-10px); transition: opacity 0.5s, transform 0.5s, border-color 0.5s; }
.folder svg { width: 18px; height: 18px; color: var(--c-text); flex: none; }
.folder.show { opacity: 1; transform: none; border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.folder small { margin-left: auto; color: var(--fg-faint); font-size: 0.7rem; }
.badge-ok { align-self: flex-start; margin-top: auto; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); border-radius: 8px; padding: 0.35rem 0.6rem; opacity: 0.2; transition: opacity 0.5s; }
.badge-ok.show { opacity: 1; }
.demo-foot { margin-top: 1.2rem; color: var(--fg-dim); font-size: 0.95rem; max-width: 52rem; }

.tour-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.tcard { display: flex; flex-direction: column; gap: 0.3rem; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; color: var(--fg); transition: transform 0.25s, border-color 0.25s, background 0.25s; }
.tcard:hover { transform: translateY(-3px); border-color: var(--brand); text-decoration: none; background: var(--surface-2); }
.tcard b { font-family: var(--font-mono); font-size: 0.95rem; display: flex; justify-content: space-between; gap: 0.5rem; }
.tcard b span { color: var(--brand); transition: transform 0.25s; }
.tcard:hover b span { transform: translateX(4px); }
.tcard small { color: var(--fg-dim); font-size: 0.88rem; line-height: 1.45; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.2rem 1.1rem; }
.stat .n { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--brand); display: block; margin-bottom: 0.3rem; }
.stat .d { color: var(--fg-dim); font-size: 0.93rem; }
.badges { margin-top: 1.4rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.badges img { height: 20px; display: block; }

footer { border-top: 1px solid var(--line); padding: 2.4rem 0 3rem; color: var(--fg-faint); font-size: 0.86rem; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
footer nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
footer a { color: var(--fg-dim); text-decoration: none; }
footer a:hover { color: var(--fg); text-decoration: underline; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--brand); color: var(--brand-ink); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
::selection { background: var(--brand); color: var(--brand-ink); }
.noscript { padding: 1rem; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--fg-dim); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }


/* ---------- logos: the tools' marks, and a mark per playbook ---------- */
.lg { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; flex: none; margin-right: 0.4rem; color: var(--fg); }
.lg svg { width: 0.95rem; height: 0.95rem; fill: currentColor; }
.lg.txt { width: auto; height: 1rem; padding: 0 0.28rem; font-family: var(--font-mono); font-size: 0.55rem; font-weight: 700; letter-spacing: 0.02em; border: 1px solid currentColor; border-radius: 4px; color: var(--c-text, var(--fg)); }
.chip { display: inline-flex; align-items: center; }
.chip .lg { margin-right: 0.35rem; margin-left: -0.15rem; }
.bay h4 .lg { display: none; }
.plogo { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.2rem; height: 2.2rem; border-radius: 10px; background: var(--c); color: var(--ink); font-family: var(--font-mono); font-weight: 700; }
.plogo svg { width: 64%; height: 64%; }
.plogo.lg { width: 2.7rem; height: 2.7rem; border-radius: 12px; margin: 0; }
.plogo.xs { width: 1.35rem; height: 1.35rem; border-radius: 6px; font-size: 0.7rem; }
.plogo.ghosty { background: transparent; color: var(--c-text); outline: 1.5px dashed var(--c-text); outline-offset: -1.5px; }
.tab .plogo { background: color-mix(in srgb, var(--ink) 14%, transparent); color: var(--ink); }
.tab .plogo.ghosty { background: transparent; color: var(--c-text); outline: 1.4px dashed currentColor; }
.spine .plogo { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); background: color-mix(in srgb, var(--ink) 14%, transparent); color: var(--ink); z-index: 1; }
.id .plogo.lg { align-self: center; }
.id h3 i { display: none; }
.dotb .plogo { margin-right: 0; }
.folder .plogo { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c-text); }

/* ---------- the ephemeral notebook: dashed, ghostly, here and gone ---------- */
.nb.ghost { border-style: dashed; border-color: color-mix(in srgb, var(--c-text) 55%, var(--line)); border-bottom: 6px dashed var(--c-text); background: color-mix(in srgb, var(--surface) 84%, transparent); }
.nb.ghost .spine { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 34%, transparent) 0 6px, transparent 6px 12px); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--c-text); border-radius: 5px 0 0 5px; }
.nb.ghost .spine::before { opacity: 0.4; }
.nb.ghost .spine > span:not(.plogo) { background: var(--surface); color: var(--fg); }
.nb.ghost .spine .plogo { background: transparent; color: var(--c-text); outline: 1.4px dashed var(--c-text); }
.nb.ghost.is-active .id .plogo { animation: bob 3.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.launch.eph { border-style: dashed; color: var(--c-text); }
.tab.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.6px var(--c-text); filter: none; border-left: 0; }
.tab.ghost:hover, .tab.ghost[aria-selected="true"] { background: color-mix(in srgb, var(--c) 20%, transparent); box-shadow: inset 0 0 0 1.6px var(--c-text), 0 10px 22px -10px rgba(0, 0, 0, 0.7); }
.life { display: flex; flex-direction: column; gap: 0.8rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.step { position: relative; display: flex; flex-direction: column; gap: 0.25rem; background: var(--surface-2); border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 0.7rem 0.75rem 0.8rem; font-size: 0.8rem; line-height: 1.4; color: var(--fg-dim); min-width: 0; }
.step:not(:last-child)::after { content: "\2192"; position: absolute; right: -0.82rem; top: 50%; transform: translateY(-50%); color: var(--fg-faint); font-family: var(--font-mono); }
.step .num { width: 1.4rem; height: 1.4rem; border-radius: 50%; outline: 1.5px dashed var(--c-text); outline-offset: -1.5px; color: var(--c-text); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; margin-bottom: 0.2rem; }
.step b { font-family: var(--font-mono); color: var(--fg); font-size: 0.9rem; }
.step code { font-family: var(--font-mono); font-size: 0.72rem; color: var(--c-text); overflow-wrap: anywhere; }
.nb.ghost.is-active .step:last-child { animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both, fade 4s 1.4s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * 55ms + 120ms), 1.4s; }
@keyframes fade { to { opacity: 0.55; } }
.bay code.inl { font-size: 0.78em; }


/* ---------- runtimes: where each agent runs, and what it reaches ---------- */
.rt { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(5rem, 0.42fr) minmax(0, 1fr); align-items: start; }
.rt-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.rt-zones { display: grid; gap: 1.1rem; min-width: 0; }
.rt-services { display: grid; gap: 1rem; min-width: 0; }
.rt .link { fill: none; stroke: var(--c-text); stroke-width: 1.4; opacity: 0.24; transition: opacity 0.3s, stroke-width 0.3s; }
.rt .link.sealed { stroke-dasharray: 6 5; }
.rt .link.ghost { stroke-dasharray: 2 6; }
.rt .pkt { fill: var(--c-text); opacity: 0.85; transition: opacity 0.3s; }
.rt.has-focus .link { opacity: 0.05; }
.rt.has-focus .pkt { opacity: 0; }
.rt.has-focus .link.on { opacity: 0.95; stroke-width: 2.4; }
.rt.has-focus .pkt.on { opacity: 1; }

.zone { position: relative; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 18px; padding: 0.55rem 0.9rem 0.9rem; transition: border-color 0.3s, box-shadow 0.3s, opacity 0.3s; }
.zone.hot { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.z-sbx { border-width: 2px; box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 5.5px var(--line-strong); }
.z-sbx.hot { box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 5.5px var(--brand), 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.z-openshell { background-image: repeating-linear-gradient(135deg, transparent 0 9px, color-mix(in srgb, var(--fg) 5%, transparent) 9px 10px); }
.z-remote { box-shadow: 9px 9px 0 -1px var(--surface-2), 9px 9px 0 0 var(--line-strong); margin-right: 9px; margin-bottom: 9px; }
.z-remote.hot { box-shadow: 9px 9px 0 -1px var(--surface-2), 9px 9px 0 0 var(--brand), 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.z-throwaway { border-style: dashed; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.zhead { display: flex; align-items: center; gap: 0.5rem; width: 100%; background: transparent; border: 0; padding: 0.35rem 0; cursor: pointer; text-align: left; font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg); }
.zhead b { font-weight: 700; }
.zhead .zi { width: 1.5rem; height: 1.5rem; margin: 0; }
.zhead .zi svg { width: 1.3rem; height: 1.3rem; }
.ztag { margin-left: auto; font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-dim); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.05rem 0.5rem; }
.z-openshell .ztag { color: var(--no); border-color: color-mix(in srgb, var(--no) 50%, transparent); }
.zbody { display: grid; gap: 0.55rem; padding-top: 0.3rem; }
.gate { position: absolute; right: -1.05rem; top: 50%; transform: translateY(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; width: 2.1rem; padding: 0.3rem 0 0.2rem; background: var(--bg); border: 1.5px solid var(--line-strong); border-radius: 999px; color: var(--fg-dim); }
.gate .lg { margin: 0; width: 1.1rem; height: 1.1rem; }
.gate .lg svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; }
.gate small { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.04em; text-transform: uppercase; }
.z-remote .gate { right: calc(-1.05rem - 9px); }

.agent { display: flex; align-items: center; gap: 0.7rem; width: min(100%, 21rem); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 0.5rem 0.7rem 0.5rem 0.5rem; cursor: pointer; text-align: left; min-width: 0; transition: opacity 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s; }
.agent .plogo.lg { width: 2.4rem; height: 2.4rem; }
.agent .an { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.agent .an b { font-family: var(--font-mono); font-size: 0.98rem; color: var(--fg); }
.agent .an code { font-size: 0.68rem; color: var(--fg-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent .reach { display: none; }
.agent:hover, .agent.hot { border-color: var(--c-text); transform: translateX(3px); }
.agent.hot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 24%, transparent); }
.agent.meet { border-style: dashed; border-color: var(--c-text); }
.agent.dim, .svc.dim { opacity: 0.4; }
.agent[aria-pressed="true"], .svc[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--brand); }

.sgroup h3 { margin: 0 0 0.5rem; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); font-weight: 600; }
.sgroup { display: grid; gap: 0.45rem; align-content: start; }
.svc { position: relative; display: flex; align-items: center; gap: 0.65rem; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.45rem 0.7rem 0.45rem 0.5rem; cursor: pointer; text-align: left; transition: opacity 0.3s, border-color 0.3s, box-shadow 0.3s; min-width: 0; }
.svc:hover, .svc.hot { border-color: var(--brand); }
.svc.hot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.svc.shared { border-color: var(--line-strong); }
.slogo { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 2rem; height: 2rem; padding: 0 0.15rem; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg); }
.slogo .lg { margin: 0 0.1rem; }
.slogo .lg svg { width: 1.15rem; height: 1.15rem; }
.slogo .lg.txt { font-size: 0.5rem; }
.slogo.big { width: 2.7rem; height: 2.7rem; }
.sn { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sn b { font-family: var(--font-mono); font-size: 0.84rem; color: var(--fg); }
.sn small { font-family: var(--font-mono); font-size: 0.66rem; color: var(--fg-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shr { position: absolute; top: -0.45rem; right: 0.5rem; font-family: var(--font-mono); font-size: 0.64rem; font-weight: 700; padding: 0 0.4rem; border-radius: 999px; background: var(--brand); color: var(--brand-ink); }

.rt-detail { margin-top: 1.4rem; min-height: 9.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem 1.1rem; display: grid; gap: 0.45rem; align-content: start; }
.rt-detail p { margin: 0; color: var(--fg-dim); font-size: 0.95rem; max-width: 80ch; }
.rt-detail p.idle { color: var(--fg-faint); font-family: var(--font-mono); font-size: 0.82rem; }
.rt-detail code { font-family: var(--font-mono); font-size: 0.85em; color: var(--fg); }
.rt-detail b { color: var(--fg); font-family: var(--font-mono); font-size: 0.78rem; margin-right: 0.35rem; }
.d-head { display: flex; align-items: center; gap: 0.8rem; }
.d-head > div { display: flex; flex-direction: column; line-height: 1.25; }
.d-head b { font-size: 1.1rem; margin: 0; }
.d-head span { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-dim); }
.d-head em { font-style: normal; color: var(--brand); }
.d-head .zi { width: 2.4rem; height: 2.4rem; margin: 0; }
.d-head .zi svg { width: 1.8rem; height: 1.8rem; }
.d-cmd { display: flex; align-items: center; gap: 0.6rem; background: var(--term); border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.5rem 0.4rem 0.7rem; max-width: 46rem; }
.d-cmd .pr { color: var(--pr); font-family: var(--font-mono); }
.d-cmd code { color: #e3f1e9; overflow-x: auto; white-space: nowrap; flex: 1; scrollbar-width: none; }
.d-reach .chip { margin-right: 0.3rem; }
.rt-note { margin: 1rem 0 0; color: var(--fg-dim); font-size: 0.92rem; max-width: 62rem; }
footer .legal { display: block; margin-top: 0.4rem; max-width: 46rem; line-height: 1.5; }

/* ---------- templates teaser ---------- */
.tpl-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.tmini {
  display: flex; align-items: center; gap: 0.75rem; min-width: 0; text-decoration: none; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 12px; padding: 0.8rem 0.9rem;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.tmini:hover { transform: translateY(-3px); border-color: var(--c); background: var(--surface-2); text-decoration: none; }
.tmini b { display: block; font-family: var(--font-mono); font-size: 0.92rem; line-height: 1.25; }
.tmini small { display: block; color: var(--c-text); font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.35; margin-top: 0.15rem; }
.tmini .plogo { width: 2.3rem; height: 2.3rem; }
.tmini.own { --c: var(--line-strong); --c-text: var(--brand); border-style: dashed; border-top-width: 1px; background: transparent; }
.tmini.own .plogo { background: transparent; outline: 1.5px dashed var(--brand); outline-offset: -1.5px; color: var(--brand); font-size: 1.3rem; font-weight: 400; }
.tmini.own:hover { border-color: var(--brand); background: var(--surface); }
.tpl-cta { margin-top: 1.4rem; }

/* ---------- narrower screens: no hover, no fan, tabs become a row ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .slot-sub { min-height: 0; }
}
@media (max-width: 1100px) {
  .rt { grid-template-columns: minmax(0, 1.25fr) minmax(2.5rem, 0.25fr) minmax(0, 1fr); }
  .stage { --rail: 9.6rem; padding: 1rem var(--rail) 3rem 3.4rem; }
  .sheet { grid-template-columns: 15rem minmax(0, 1fr); }
  .layer-grid, .tpl-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage.fan .nb, .stage:focus-within .nb { --sx-step: 20px; --sy-step: 12px; }
}
@media (max-width: 860px) {
  .stage { padding: 0; perspective: none; }
  .stage-glow { display: none; }
  .tabs { position: static; flex-direction: row; width: auto; overflow-x: auto; gap: 0.5rem; padding: 0.3rem 0 0.9rem; scrollbar-width: none; }
  .stage { --rail: 0rem; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab, .tab:hover, .tab[aria-selected="true"] { width: auto; flex: none; height: 2.4rem; border-radius: 10px; padding: 0 0.9rem; filter: saturate(0.8) brightness(0.9); }
  .tab[aria-selected="true"] { filter: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent); }
  .books { order: 2; }
  .stage { display: flex; flex-direction: column; }
  .nb { --sx-step: 0px; --sy-step: 0px; grid-template-columns: 1fr; border-radius: 14px; min-height: 0; transform: none !important; }
  .nb:not(.is-active) { display: none; }
  .spine { display: none; }
  .sheet { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px dashed var(--line-strong); }
  .layers { margin-top: 0; }
  .bays { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { content: "\2193"; right: auto; left: 50%; top: auto; bottom: -1rem; transform: translateX(-50%); }
  .files { grid-template-columns: 1fr; height: auto; }
  .tree { max-height: 11rem; }
  .viewer pre { max-height: 14rem; }
  .recipe { height: auto; }
  .recipe pre { max-height: 18rem; }
  .pane { min-height: 0; }
  .demo, .stats, .tour-grid { grid-template-columns: 1fr; }
  .rt { display: block; }
  .rt-lines, .rt-gap, .rt-services, .rt-detail { display: none; }
  .z-remote { margin-right: 0; }
  .gate { display: none; }
  .agent { width: 100%; flex-wrap: wrap; }
  .agent .reach { display: flex; flex-wrap: wrap; gap: 0.3rem; width: 100%; padding-top: 0.2rem; }
  .agent:hover { transform: none; }
  .layer-grid, .tpl-row { grid-template-columns: 1fr; }
  .hint { display: none; }
  .hero { padding-top: 2.4rem; }
}

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