/* Peek site. The page borrows the app's own palette (crates/peek-app/src/theme.rs):
   quiet neutrals and one blue accent, so the mocked remote screens are the brightest
   thing on the page. Dark by default; a light variant follows the system setting. */

:root {
  --bg: #111418;
  --panel: #161a20;
  --faint: #1e232b;
  --line: #262d37;
  --text: #dce2e9;
  --muted: #929eae;
  --accent: #6aa4ff;
  --accent-ink: #0d1a33;
  --btn: #2a6fdb;
  --ok: #4cc38a;
  --warn: #f0b04a;
  --danger: #e85454;
  --glow: rgba(106, 164, 255, .16);

  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "Cascadia Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 34rem;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f5f7;
    --panel: #fafbfc;
    --faint: #e8ecf1;
    --line: #d9dfe6;
    --text: #17202b;
    --muted: #4f5d6e;
    --accent: #2a6fdb;
    --accent-ink: #ffffff;
    --glow: rgba(42, 111, 219, .14);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

h1, h2, h3 { line-height: 1.08; margin: 0; font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); letter-spacing: -0.025em; }
h3 { font-size: 1.375rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code { font-family: var(--f-mono); font-size: .88em; background: var(--faint); padding: .1em .35em; border-radius: 5px; }
pre code { background: none; padding: 0; font-size: inherit; }
kbd {
  font-family: var(--f-mono); font-size: .8em;
  display: inline-block; padding: .05em .45em; border-radius: 5px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--panel);
  line-height: 1.5;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--btn); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.sub { color: var(--muted); max-width: var(--measure); font-size: 1.125rem; margin-top: .9rem; }

/* ---------------------------------------------------------------- Top bar */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.125rem; }
.top nav { display: flex; align-items: center; gap: clamp(10px, 2.5vw, 28px); }
.top nav a { color: var(--muted); text-decoration: none; font-size: .975rem; }
.top nav a:hover { color: var(--text); }
.top nav .gh { display: inline-flex; align-items: center; gap: 6px; color: var(--text); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; }
@media (max-width: 560px) { .top nav a:not(.gh) { display: none; } }

/* ---------------------------------------------------------------- Hero */
.hero { padding: clamp(48px, 9vw, 112px) var(--gutter) 40px; max-width: 1280px; margin: 0 auto; }
.hero-copy { max-width: 46rem; margin: 0 auto; text-align: center; }
.eye { width: clamp(76px, 11vw, 112px); height: auto; display: block; margin: 0 auto 28px; border-radius: 24%; box-shadow: 0 18px 50px -12px rgba(34, 96, 214, .55); }
.pupil { transition: transform .18s ease-out; }
.lid { transform-origin: 50px 50px; transform-box: view-box; }
.js .eye .lid { animation: open 1.1s .15s cubic-bezier(.3, .7, .2, 1) both; }
@keyframes open { 0% { transform: scaleY(.06); } 55% { transform: scaleY(1.04); } 100% { transform: scaleY(1); } }
.eye .lid.blink { animation: blink .22s ease-in-out; }
@keyframes blink { 50% { transform: scaleY(.08); } }

h1 {
  font-size: clamp(2.9rem, 8vw, 6rem);
  letter-spacing: -0.028em;
  font-weight: 600;
}
.lede { font-size: clamp(1.125rem, 1.8vw, 1.3rem); color: var(--muted); max-width: 36rem; margin: 1.4rem auto 2rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 500; text-decoration: none;
  color: var(--text); border: 1px solid var(--line); background: var(--panel);
  transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--btn); border-color: var(--btn); color: #fff; }
.btn.primary:hover { background: #3a7ce6; }
.fine { color: var(--muted); font-size: .925rem; margin-top: 1.4rem; }

.hero-shot { margin: clamp(48px, 7vw, 88px) auto 0; max-width: 1180px; }
.hero-shot figcaption { text-align: center; color: var(--muted); font-size: .875rem; margin-top: 22px; }
.js .hero-shot .win { animation: rise 1.1s .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Window mock-up
   Everything inside .ui is sized in em, and .ui's font size follows the window
   width (container units), so the mock scales like a screenshot. The mock keeps
   the app's dark theme in both page themes, like a real screenshot would. */
.win {
  container-type: inline-size;
  border-radius: 12px;
  border: 1px solid #2b323d;
  background: #111418;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  aspect-ratio: 16 / 10;
}
.win.glow { box-shadow: 0 0 0 1px rgba(255,255,255,.02), 0 40px 120px -20px rgba(64, 120, 220, .38), 0 30px 80px -30px rgba(0, 0, 0, .8); }
.ui {
  --u-bg: #111418; --u-panel: #161a20; --u-faint: #1e232b; --u-line: #262d37; --u-text: #dce2e9; --u-weak: #8792a1;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: calc(100cqw / 82);
  line-height: 1.35;
  color: var(--u-text);
  height: 100%;
  display: flex; flex-direction: column;
  position: relative;
  user-select: none;
}
.ui .ico { width: 1.35em; height: 1.35em; color: var(--u-weak); }
.ui .ico.s { width: 1.15em; height: 1.15em; }
.ui .ico.xs { width: .9em; height: .9em; }
.ui small { font-size: .82em; color: var(--u-weak); }
.ui kbd { font-family: inherit; font-size: .8em; background: var(--u-faint); border: 1px solid var(--u-line); border-bottom-width: 1px; color: var(--u-weak); padding: 0 .4em; border-radius: .3em; margin-left: .2em; }
.ui .grow { flex: 1; }
.ui .group { display: block; text-transform: none; font-size: .78em; color: var(--u-weak); margin: 1.2em 0 .5em; letter-spacing: .02em; }

.titlebar { display: flex; align-items: center; gap: .7em; height: 2.6em; padding: 0 .6em; border-bottom: 1px solid var(--u-line); background: var(--u-bg); flex: none; position: relative; z-index: 3; }
.tile { width: 1.5em; height: 1.5em; border-radius: .38em; background: url(peek.svg) center / cover; }
.tab { display: inline-flex; align-items: center; gap: .45em; padding: .3em .7em; border-radius: .45em; color: var(--u-weak); white-space: nowrap; }
.tab.on { background: var(--u-faint); color: var(--u-text); box-shadow: inset 0 -2px 0 #6aa4ff; }
.tab .spk { color: #6aa4ff; }
.dot { width: .5em; height: .5em; border-radius: 50%; display: inline-block; }
.dot.ok { background: #4cc38a; }
.quick { display: inline-flex; align-items: center; gap: .5em; border: 1px solid var(--u-line); background: #0c0e12; border-radius: .45em; padding: .25em .6em; color: var(--u-weak); font-size: .92em; min-width: 14em; }
.quick kbd { margin-left: auto; }
.wc { display: inline-flex; gap: 1.6em; color: var(--u-weak); font-size: .9em; padding: 0 .6em; }
.wc i { font-style: normal; }

.body { flex: 1; position: relative; min-height: 0; overflow: hidden; }
.canvas { background: #0a0c0f; }

/* Floating session toolbar */
.toolbar {
  position: absolute; top: 1em; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: .75em; white-space: nowrap;
  background: rgba(22, 26, 32, .94); border: 1px solid var(--u-line); border-radius: 2em;
  padding: .35em .5em .35em 1em; box-shadow: 0 .4em 1.4em rgba(0, 0, 0, .45);
}
.toolbar small { margin-left: -.3em; }
.toolbar .sep { width: 1px; height: 1.4em; background: var(--u-line); }
.chip { display: inline-flex; align-items: center; gap: .4em; background: var(--u-faint); border-radius: .45em; padding: .25em .65em; white-space: nowrap; }
.chip.accent { background: #2a6fdb; color: #fff; }
.chip.accent .ico { color: #fff; }
.danger { color: #e85454; padding: .25em .8em; border-radius: 1.4em; background: rgba(232, 84, 84, .1); }

/* The remote computer: the only bright thing in the window */
.remote {
  position: absolute; inset: 4.2em 0 0;
  background:
    radial-gradient(60% 80% at 78% 18%, #ffb37a 0%, transparent 60%),
    radial-gradient(70% 90% at 15% 100%, #6c3fd4 0%, transparent 60%),
    linear-gradient(160deg, #2c7be5 0%, #8a4fd8 55%, #e0704d 100%);
}
.remote.dim { inset: 0 0 3.6em; }
.rwin { position: absolute; border-radius: .6em; overflow: hidden; box-shadow: 0 1.2em 3em rgba(10, 10, 40, .45); }
.rbar { display: flex; align-items: center; gap: .4em; height: 2em; padding: 0 .8em; background: #f2f2f5; color: #555; font-size: .85em; }
.rbar i { width: .7em; height: .7em; border-radius: 50%; background: #d0d0d6; }
.rbar i:first-child { background: #ff6159; }
.rbar i:nth-child(2) { background: #ffbd2e; }
.rbar i:nth-child(3) { background: #28c941; }
.rbar span { margin-left: .8em; }
.term { left: 6%; top: 9%; width: 48%; background: #14161c; }
.term .rbar { background: #23262e; color: #aab; }
.term pre { font-variant-ligatures: none; margin: 0; padding: 1em 1.2em 1.4em; font-family: "Cascadia Mono", ui-monospace, Menlo, Consolas, monospace; font-size: .92em; line-height: 1.55; color: #e9ecf2; white-space: pre; }
.term .p { color: #7cb2ff; }
.term .g { color: #5fd49a; }
.cur { display: inline-block; width: .55em; height: 1.1em; background: #e9ecf2; vertical-align: -.2em; }
.js .cur { animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.photo { right: 7%; top: 17%; width: 33%; background: #fff; }
.pic { aspect-ratio: 4 / 3; background:
  radial-gradient(40% 30% at 70% 30%, #fff4d6, transparent 70%),
  linear-gradient(180deg, #ffcf8a 0%, #f59a5a 45%, #c8643c 46%, #e3965f 60%, #b4502f 100%); }
.files { right: 18%; top: 62%; width: 24%; background: #fff; color: #222; }
.files ul { list-style: none; margin: 0; padding: .5em .8em .8em; }
.files li { display: flex; align-items: center; gap: .5em; padding: .3em .2em; font-size: .9em; }
.files li .ico { color: #2a6fdb; }
.files li:nth-child(-n+3) { background: rgba(42, 111, 219, .12); border-radius: .3em; margin-bottom: .15em; }
.taskbar { position: absolute; left: 50%; bottom: 1em; transform: translateX(-50%); display: flex; gap: .6em; padding: .5em .8em; border-radius: .8em; background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.taskbar i { width: 1.8em; height: 1.8em; border-radius: .45em; background: rgba(255, 255, 255, .75); }
.taskbar i:first-child { background: #2a6fdb; }

/* Library / home screen */
.scene-home { display: flex; background: var(--u-bg); }
.side { width: 17em; flex: none; border-right: 1px solid var(--u-line); padding: .9em .8em; display: flex; flex-direction: column; }
.side-head { display: flex; align-items: center; gap: .5em; }
.search { display: flex; align-items: center; gap: .5em; margin-top: .8em; background: #0c0e12; border-radius: .45em; padding: .4em .6em; color: var(--u-weak); }
.row { display: flex; align-items: center; gap: .7em; padding: .45em .4em; border-radius: .45em; }
.row:nth-of-type(1) { background: var(--u-faint); }
.row b, .card b, .pal-row b { display: block; font-weight: 500; }
.row small, .card small { display: block; }
.row .fav { margin-left: auto; color: #f5be46; }
.side-foot { margin-top: auto; display: flex; padding-top: .8em; border-top: 1px solid var(--u-line); color: var(--u-weak); }
.side-foot span { display: inline-flex; align-items: center; gap: .4em; }
.badge { display: inline-grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: .45em; flex: none; }
.badge.rdp { background: rgba(106, 164, 255, .14); }
.badge.rdp .ico { color: #6aa4ff; }
.badge.vnc { background: rgba(76, 195, 138, .14); }
.badge.vnc .ico { color: #4cc38a; }
.center { flex: 1; padding: 4.5em 0 0 7%; max-width: 46em; transition: opacity .3s; }
.center h4 { margin: 0; font-size: 2em; font-weight: 400; }
.center > p { color: var(--u-weak); margin: .2em 0 1.4em; }
.connect { display: flex; gap: .6em; }
.field { flex: 1; display: flex; align-items: center; gap: .5em; padding: .65em .8em; background: #0c0e12; border: 1px solid #6aa4ff; border-radius: .5em; box-shadow: 0 0 0 .2em rgba(106, 164, 255, .15); }
.field .ico { color: #6aa4ff; }
.caret { display: inline-block; width: 1px; height: 1.1em; background: var(--u-text); margin-left: -.3em; }
.js .caret { animation: caret 1s steps(1) infinite; }
.go { background: #2a6fdb; color: #fff; padding: .65em 1.6em; border-radius: .5em; }
.recent { display: flex; gap: .8em; }
.card { display: flex; align-items: center; gap: .7em; width: 15em; padding: .8em; border: 1px solid var(--u-line); border-radius: .6em; background: var(--u-panel); }
.actions { display: flex; gap: .5em; margin-top: 1.6em; }
.hint { color: var(--u-weak); font-size: .8em; margin-top: 1.2em; }

/* Command palette */
.palette {
  position: absolute; left: 50%; top: 2.4em; width: 30em; transform: translateX(-50%) translateY(-.8em);
  background: var(--u-panel); border: 1px solid var(--u-line); border-radius: .8em;
  box-shadow: 0 1.4em 3.5em rgba(0, 0, 0, .6); padding: .6em; z-index: 2;
  opacity: 0; transition: opacity .3s, transform .3s;
}
.pal-in { display: flex; align-items: center; gap: .6em; padding: .55em .6em .75em; border-bottom: 1px solid var(--u-line); margin-bottom: .4em; font-size: 1.1em; }
.pal-in .ph { color: var(--u-weak); }
.pal-in .caret { margin-left: -.2em; order: -1; }
.pal-row { display: flex; align-items: center; gap: .7em; padding: .45em .6em; border-radius: .45em; }
.pal-row .badge { width: 1.7em; height: 1.7em; }
.pal-row.on { background: rgba(106, 164, 255, .18); }
.pal-row kbd { margin-left: auto; }

/* Volume popover and clipboard toast */
.vol {
  position: absolute; top: calc(100% + .6em); right: 7em;
  display: flex; align-items: center; gap: .7em;
  background: var(--u-panel); border: 1px solid var(--u-line); border-radius: .6em; padding: .55em .8em;
  box-shadow: 0 .8em 2em rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(-.4em); transition: opacity .3s, transform .3s;
}
.vol .ico { color: #6aa4ff; }
.slider { width: 9em; height: .3em; border-radius: 1em; background: var(--u-line); position: relative; }
.slider i { position: absolute; inset: 0 28% 0 0; border-radius: inherit; background: #6aa4ff; }
.slider i::after { content: ""; position: absolute; right: -.45em; top: 50%; width: .9em; height: .9em; margin-top: -.45em; border-radius: 50%; background: #fff; }
.vol-btn { color: #6aa4ff !important; }
.toast {
  position: absolute; right: 1.2em; bottom: 1.2em; z-index: 2;
  display: flex; align-items: center; gap: .6em;
  background: var(--u-panel); border: 1px solid var(--u-line); border-left: .25em solid #4cc38a; border-radius: .5em;
  padding: .7em 1em; box-shadow: 0 .8em 2em rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(.6em); transition: opacity .3s .15s, transform .3s .15s;
}
.toast .ico { color: #4cc38a; }

/* Recording player */
.player {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3.6em;
  display: flex; align-items: center; gap: .9em; padding: 0 1.2em;
  background: var(--u-panel); border-top: 1px solid var(--u-line);
}
.player > .ico:first-child { color: var(--u-text); }
.track { flex: 1; height: .35em; border-radius: 1em; background: var(--u-line); position: relative; }
.track .done { position: absolute; inset: 0 61% 0 0; border-radius: inherit; background: #e85454; }
.track .knob { position: absolute; left: 39%; top: 50%; width: 1em; height: 1em; margin: -.5em 0 0 -.5em; border-radius: 50%; background: #fff; }

/* Scenes: one window, its content switched by data-scene */
.scene { position: absolute; inset: 2.6em 0 0; opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.when-home, .when-sess, .when-rec, .when-sound { display: none; }

.win[data-scene="home"] .scene-home,
.win[data-scene="palette"] .scene-home,
.win[data-scene="session"] .scene-sess,
.win[data-scene="sound"] .scene-sess,
.win[data-scene="rec"] .scene-rec { opacity: 1; visibility: visible; transition: opacity .4s; }

.win[data-scene="home"] .when-home,
.win[data-scene="palette"] .when-home,
.win[data-scene="session"] .when-sess,
.win[data-scene="sound"] .when-sess,
.win[data-scene="sound"] .when-sound,
.win[data-scene="rec"] .when-rec { display: inline-flex; }

.win[data-scene="palette"] .palette { opacity: 1; transform: translateX(-50%); }
.win[data-scene="palette"] .center,
.win[data-scene="palette"] .side { opacity: .35; }
.side { transition: opacity .3s; }
.win[data-scene="sound"] .vol { opacity: 1; transform: none; }
.win[data-scene="sound"] .toast { opacity: 1; transform: none; }
.win:not([data-scene="sound"]) .files { opacity: 0; }
.files { transition: opacity .4s; }
.win:not([data-scene="sound"]) .vol-btn { color: var(--u-weak) !important; }

/* ---------------------------------------------------------------- Tour (pinned window) */
.tour { padding: clamp(72px, 10vw, 140px) 0 40px; }
.tour > h2 { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.tour-grid {
  max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 72px);
}
.stage { grid-column: 2; grid-row: 1; position: sticky; top: max(72px, calc(50vh - 24vw)); align-self: start; padding-top: 12vh; margin-top: -12vh; }
.chapters { grid-column: 1; grid-row: 1; }
.chapter { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; max-width: 30rem; }
.chapter h3 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); letter-spacing: -0.02em; margin-bottom: 1rem; }
.chapter p { color: var(--muted); }
.chapter p:last-child { margin-bottom: 0; }
.js .chapter { opacity: .28; transition: opacity .45s; }
.js .chapter.active { opacity: 1; }

@media (max-width: 899px) {
  .tour-grid { display: block; }
  .stage {
    position: sticky; top: 60px; z-index: 5; margin: 0 calc(var(--gutter) * -1); padding: 14px var(--gutter);
    background: linear-gradient(var(--bg) 80%, transparent);
    padding-bottom: 28px;
  }
  .chapter { min-height: 64vh; justify-content: flex-start; padding-top: 6vh; }
  .chapter:last-child { min-height: 50vh; }
}

/* ---------------------------------------------------------------- Inside */
.inside { padding: clamp(80px, 11vw, 150px) 0 clamp(60px, 8vw, 110px); }
.protos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(28px, 5vw, 64px); margin-top: 56px; }
.proto { border-top: 1px solid var(--line); padding-top: 28px; }
.proto h3 { display: flex; align-items: center; gap: 14px; font-size: 1.75rem; margin-bottom: .8rem; }
.proto > p { color: var(--muted); }
.proto ul { list-style: none; padding: 0; margin: 0; }
.proto li { padding: .55rem 0 .55rem 1.6rem; position: relative; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.proto li::before { content: ""; position: absolute; left: .15rem; top: 1.05rem; width: .5rem; height: .5rem; border-radius: 50%; border: 2px solid var(--accent); }
.badge.lg { width: 2.6rem; height: 2.6rem; border-radius: 10px; }
.badge.lg .ico { width: 1.4rem; height: 1.4rem; }
.badge.rdp .ico { color: #6aa4ff; }
.badge.vnc .ico { color: #4cc38a; }
.status { margin-top: 64px; padding: 24px 28px; border-radius: 14px; border: 1px dashed var(--line); max-width: 44rem; }
.status h3 { font-size: 1.125rem; margin-bottom: .4rem; }
.status p { margin: 0; color: var(--muted); }

/* ---------------------------------------------------------------- Command line */
.cli { padding: clamp(60px, 8vw, 110px) 0; background: var(--panel); border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(36px, 6vw, 80px); align-items: center; }
.keys { margin: 36px 0 0; display: grid; gap: 0; }
.keys div { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.keys dt { white-space: nowrap; }
.keys dd { margin: 0; color: var(--muted); }
.term-card { background: #0c0e12; color: #e4e8ee; border: 1px solid #262d37; border-radius: 14px; padding: 8px; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .6); }
.term-card pre { font-variant-ligatures: none; margin: 0; padding: 22px 24px; font-family: var(--f-mono); font-size: .95rem; line-height: 1.7; overflow-x: auto; }
.term-card .c { color: #7d8898; }

/* ---------------------------------------------------------------- Download */
.download { padding: clamp(80px, 11vw, 150px) 0 0; }
.dl { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.dl li { border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: var(--panel); display: grid; grid-row: span 4; grid-template-rows: subgrid; gap: 14px; align-content: start; }
.dl li.mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 24px 60px -30px var(--glow); }
.dl h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dl p { margin: 0; color: var(--muted); }
.dl .get { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; align-self: start; }
.dl .btn { font-size: .95rem; }
.dl li.mine .btn { background: var(--btn); border-color: var(--btn); color: #fff; }
.dl .alt { font-size: .925rem; }
.dl .note { font-size: .875rem; }
.tag, .mine-tag { font-size: .75rem; font-weight: 500; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); letter-spacing: 0; }
.mine-tag { border-color: var(--accent); color: var(--accent); }
.dl-more { margin-top: 24px; color: var(--muted); }

/* ---------------------------------------------------------------- Build */
.build { padding: clamp(80px, 11vw, 150px) 0; }
.download + .build { padding-top: clamp(72px, 9vw, 120px); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 48px 0 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.steps li { counter-increment: s; border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 18px; background: var(--panel); display: flex; flex-direction: column; }
.steps h3 { font-size: 1.125rem; margin-bottom: 14px; display: flex; gap: 10px; align-items: baseline; }
.steps h3::before { content: counter(s); font-size: .85rem; color: var(--accent-ink); background: var(--accent); border-radius: 999px; width: 1.6rem; height: 1.6rem; display: inline-grid; place-items: center; flex: none; transform: translateY(-2px); }
.steps pre { margin: auto 0 0; font-family: var(--f-mono); font-size: .875rem; line-height: 1.65; background: var(--faint); padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
.crates { width: 100%; border-collapse: collapse; margin-top: 64px; font-size: 1rem; }
.crates caption { text-align: left; font-weight: 600; font-size: 1.375rem; padding-bottom: 14px; }
.crates th { text-align: left; color: var(--muted); font-weight: 500; font-size: .875rem; padding: 8px 16px 8px 0; border-bottom: 1px solid var(--line); }
.crates td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.crates td:first-child { white-space: nowrap; width: 1%; }
.crates td:last-child { color: var(--muted); }

/* ---------------------------------------------------------------- Footer */
.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: .925rem; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot p { margin: 0; }
.foot p:last-child { margin-left: auto; }

/* ---------------------------------------------------------------- Scroll reveal
   Only hidden when JavaScript runs and motion is allowed, so content never
   depends on the script. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .steps .reveal:nth-child(2) { transition-delay: .08s; }
  .js .steps .reveal:nth-child(3) { transition-delay: .16s; }
  .js .protos .reveal:nth-child(2) { transition-delay: .08s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
}
