/* VoxelPlanet documentation. Colours follow the game: dusk plum, sunset coral, the HUD's cyan. */

:root {
  --bg: #120b13;
  --bg-elev: #1a111c;
  --bg-card: #221726;
  --bg-hover: #2b1e31;
  --line: #34263b;
  --text: #f0e8f0;
  --soft: #c0afc3;
  --muted: #94829a;
  --accent: #ff8a5c;
  --accent-ink: #1d0d08;
  --cyan: #3cc8d8;
  --good: #5fd38a;
  --warn: #f0a33a;
  --bad: #f0605a;
  --code: #2a1d31;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --header: 60px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #fbf8fb;
  --bg-elev: #ffffff;
  --bg-card: #f5eff6;
  --bg-hover: #ece3ee;
  --line: #e4d8e7;
  --text: #22182a;
  --soft: #554860;
  --muted: #84778b;
  --accent: #e0602f;
  --accent-ink: #ffffff;
  --cyan: #0f8fa8;
  --code: #efe6f1;
  --shadow: 0 10px 30px rgba(60, 20, 60, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; }
p { margin: 0 0 14px; }
code, kbd { font-family: var(--mono); }
code { font-size: 0.86em; background: var(--code); border-radius: 6px; padding: 2px 6px; }
code.block { display: block; padding: 12px 14px; overflow-x: auto; white-space: nowrap; }
kbd {
  display: inline-block; min-width: 1.6em; text-align: center;
  font-size: 0.78em; font-weight: 600; line-height: 1.7;
  padding: 0 6px; border-radius: 6px;
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--line); border-bottom-width: 3px;
}
.ui { font-weight: 600; color: var(--text); }
.muted { color: var(--muted); font-size: 0.94em; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 15px var(--font); padding: 10px 18px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.12s, background 0.2s, border-color 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-hover); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: transparent; border: 1px solid var(--line); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-hover); }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* ------------------------------------------------------------ header */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--header);
  display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 18px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.pill { font-size: 12px; font-weight: 600; color: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.menu-btn { display: none; }
.top-actions { display: flex; gap: 10px; margin-left: auto; }
.theme-icon { display: none; }
[data-theme="dark"] .sun { display: block; } [data-theme="dark"] .moon { display: none; }
[data-theme="light"] .sun { display: none; } [data-theme="light"] .moon { display: block; }

.search { position: relative; flex: 1; max-width: 420px; margin-left: 18px; display: flex; align-items: center; }
.search > svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 40px; padding: 0 40px 0 38px; border-radius: 10px;
  background: var(--bg-card); color: var(--text); border: 1px solid var(--line); font: 15px var(--font);
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search-key { position: absolute; right: 10px; pointer-events: none; }
.search-results {
  position: absolute; top: 46px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  max-height: 70vh; overflow: auto;
}
.search-results li a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); }
.search-results li a:hover, .search-results li[aria-selected="true"] a { background: var(--bg-hover); text-decoration: none; }
.search-results .r-title { font-weight: 600; }
.search-results .r-where { font-size: 12px; color: var(--muted); }
.search-results .r-text { font-size: 13px; color: var(--soft); }
.search-results mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; }
.search-results .r-none { padding: 10px 12px; color: var(--muted); }

/* ------------------------------------------------------------ hero */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: center;
  padding: 56px max(24px, calc((100vw - 1240px) / 2)) 48px;
  background:
    radial-gradient(1200px 500px at 85% 10%, rgba(255, 120, 80, 0.20), transparent 60%),
    radial-gradient(900px 600px at 10% 100%, rgba(120, 40, 140, 0.35), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 62% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 84%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 40%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 78%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 8%, #fff 50%, transparent 51%);
}
[data-theme="light"] .hero::before { opacity: 0; }
[data-theme="light"] .hero {
  background:
    radial-gradient(1200px 500px at 85% 10%, rgba(255, 140, 90, 0.22), transparent 60%),
    radial-gradient(900px 600px at 10% 100%, rgba(170, 100, 190, 0.18), transparent 60%),
    var(--bg);
}
.hero-text { position: relative; }
.kicker { text-transform: uppercase; letter-spacing: 0.16em; font-size: 13px; color: var(--soft); margin-bottom: 10px; }
.hero h1 { font-size: clamp(44px, 7vw, 76px); font-weight: 800; letter-spacing: -0.02em; }
.tagline { font-size: clamp(19px, 2.3vw, 24px); color: var(--accent); font-weight: 600; margin: 8px 0 16px; }
.hero-lead { color: var(--soft); max-width: 560px; font-size: 17px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 26px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.facts li { font-size: 14px; color: var(--soft); border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-card) 70%, transparent); border-radius: 999px; padding: 5px 12px; }
.facts b { color: var(--text); }

.hero-planet { position: relative; display: flex; flex-direction: column; align-items: center; }
.planet-stage { position: relative; width: min(100%, 520px); aspect-ratio: 1; }
.planet-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.planet-stage canvas:active { cursor: grabbing; }
.planet-fallback { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: cover; border-radius: 50%; }
.planet-hint { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--muted); margin: 0; pointer-events: none; transition: opacity 0.6s; }
.planet-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.planet-pick button {
  display: inline-flex; align-items: center; gap: 7px; font: 600 13px var(--font);
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: var(--bg-card); color: var(--soft); border: 1px solid var(--line);
}
.planet-pick button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.planet-pick button[aria-checked="true"] { color: var(--text); border-color: var(--accent); }
.planet-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); min-height: 1.5em; text-align: center; }

/* ------------------------------------------------------------ layout */
.layout {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px;
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
}
.sidebar {
  position: sticky; top: var(--header); align-self: start;
  max-height: calc(100vh - var(--header)); overflow-y: auto; padding: 32px 0 40px;
}
.side-title { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; color: var(--muted); margin: 0 0 10px 12px; }
.toc, .toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 6px 12px; border-radius: 8px; color: var(--soft); font-size: 15px; border-left: 2px solid transparent; }
.toc a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.toc a.active { color: var(--text); background: var(--bg-card); border-left-color: var(--accent); }
.toc ol a { font-size: 14px; padding-left: 26px; }
.scrim { display: none; }

.content { padding: 24px 0 80px; max-width: 820px; outline: none; }
.doc { padding: 40px 0 8px; border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: 0; }
.doc h2 { font-size: 32px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 16px; display: flex; align-items: baseline; gap: 12px; }
.doc h2 .num { color: var(--accent); font-size: 20px; font-weight: 700; }
.doc h3 { font-size: 21px; font-weight: 700; margin: 32px 0 12px; }
.doc h4 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.lead { font-size: 18px; color: var(--soft); }

/* ------------------------------------------------------------ figures, cards */
figure { margin: 18px 0 22px; }
figure img { border-radius: var(--radius); border: 1px solid var(--line); cursor: zoom-in; width: 100%; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.shot-small { margin-top: 4px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; transition: transform 0.15s, border-color 0.2s; color: var(--text);
}
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.card.link:hover { text-decoration: none; }
.card h3 { font-size: 16px; margin: 8px 0 6px; }
.card p { font-size: 14px; color: var(--soft); margin: 0; }
.card-icon { display: inline-grid; color: var(--accent); }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { font-size: 13px; }

/* ------------------------------------------------------------ video (YouTube loads on click) */
.video { position: relative; aspect-ratio: 16 / 9; margin: 24px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe, .video-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { display: block; padding: 0; margin: 0; background: #000; color: #fff; font: inherit; cursor: pointer; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: opacity 0.2s, transform 0.4s; }
.video-poster:hover img, .video-poster:focus-visible img { opacity: 1; transform: scale(1.02); }
.video-poster:focus-visible { outline: 3px solid var(--cyan); outline-offset: -3px; border-radius: var(--radius); }
.video-play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; transform: translate(-50%, -50%);
  display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow); transition: transform 0.15s;
}
.video-play svg { margin-left: 4px; }
.video-poster:hover .video-play, .video-poster:focus-visible .video-play { transform: translate(-50%, -50%) scale(1.08); }
.video-label { position: absolute; left: 18px; right: 18px; bottom: 14px; text-align: left; font-weight: 600; font-size: 15px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.video-caption { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
@media (max-width: 760px) {
  .video-play { width: 56px; height: 56px; }
  .video-label { font-size: 13px; left: 12px; bottom: 10px; }
}

.req-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 18px 0; }
.req { background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.req span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.req b { font-size: 15px; }

.callout { border-radius: 10px; padding: 14px 16px; margin: 18px 0; border: 1px solid var(--line); border-left-width: 4px; background: var(--bg-card); }
.callout b { display: block; margin-bottom: 4px; }
.callout p { margin: 0; color: var(--soft); }
.callout.note { border-left-color: var(--cyan); }
.callout.warn { border-left-color: var(--warn); }

/* ------------------------------------------------------------ getting started checklist */
.progress { height: 6px; background: var(--bg-card); border-radius: 999px; overflow: hidden; margin: 18px 0 14px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--cyan)); transition: width 0.4s ease; }
.checklist { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; }
.checklist label {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s;
}
.checklist label:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.checklist input { position: absolute; opacity: 0; pointer-events: none; }
.tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; margin-top: 1px; transition: all 0.2s; }
.tick::after { content: "✓"; font-weight: 800; color: var(--accent-ink); opacity: 0; transform: scale(0.5); transition: all 0.2s; }
.checklist input:checked + .tick { background: var(--good); border-color: var(--good); }
.checklist input:checked + .tick::after { opacity: 1; transform: scale(1); color: #10301c; }
.checklist input:checked ~ span { opacity: 0.6; }
.checklist input:focus-visible + .tick { outline: 2px solid var(--cyan); outline-offset: 2px; }
.steps-done { color: var(--good); font-weight: 600; }

/* ------------------------------------------------------------ accordion */
.accordion { display: grid; gap: 8px; margin: 14px 0; }
.accordion details { background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; }
.accordion summary { cursor: pointer; padding: 11px 14px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 18px; transition: transform 0.2s; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion details p { padding: 0 14px 12px; margin: 0; color: var(--soft); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.bad { background: var(--bad); } .dot.warn { background: var(--warn); } .dot.good { background: var(--good); }

.filter {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 10px; margin: 6px 0 12px;
  background: var(--bg-card); color: var(--text); border: 1px solid var(--line); font: 15px var(--font);
}
.empty-note { color: var(--muted); }

/* ------------------------------------------------------------ segmented tabs */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.seg button {
  font: 600 14px var(--font); color: var(--soft); background: transparent; border: 0;
  padding: 8px 14px; border-radius: 9px; cursor: pointer;
}
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.seg.small button { padding: 6px 12px; font-size: 13px; }
.tabs { margin: 14px 0 20px; }
.tab-panel { margin-top: 14px; }
.tab-panel img { border-radius: var(--radius); border: 1px solid var(--line); cursor: zoom-in; margin-top: 10px; }
.groups { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.groups li { background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; color: var(--soft); }
.groups b { color: var(--text); margin-right: 6px; }
.tips { padding-left: 20px; color: var(--soft); }
.tips li { margin-bottom: 8px; }

/* ------------------------------------------------------------ controls explorer */
.controls { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 12px 0 14px; }
.controls .seg { background: var(--bg); }
.controls-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 18px; margin-top: 14px; }
.action-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.action-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: default; font-size: 14px; }
.action-list li span:last-child { color: var(--muted); text-align: right; font-size: 13px; }
.action-list li.hot { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.action-list li.hot span:last-child { color: var(--text); }
.device { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.kb { display: flex; flex-direction: column; gap: 6px; position: relative; padding-right: 64px; }
.kb-row { display: flex; gap: 5px; }
.key {
  min-width: 32px; height: 32px; padding: 0 7px; display: grid; place-items: center;
  font: 600 12px var(--mono); border-radius: 7px; background: var(--bg); border: 1px solid var(--line); border-bottom-width: 3px;
  color: var(--text); transition: all 0.15s; cursor: default;
}
.key.dim { opacity: 0.3; }
.key.wide { min-width: 52px; } .key.wider { min-width: 60px; } .key.widest { min-width: 78px; } .key.space { min-width: 150px; }
.key.arrow { min-width: 64px; font-size: 11px; }
.gap { width: 12px; }
.key.hot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: translateY(-2px); }
.mouse { position: absolute; right: 0; top: 54px; width: 54px; }
.m-body { fill: var(--bg); stroke: var(--muted); stroke-width: 3; }
.m-line { stroke: var(--muted); stroke-width: 2; fill: none; }
.m-btn, .m-wheel { fill: transparent; stroke: none; transition: fill 0.15s; }
.m-wheel { fill: var(--muted); }
.m-btn.hot, .m-wheel.hot { fill: var(--accent); }
.mouse.hot .m-body { stroke: var(--accent); }
.pad { width: 100%; max-width: 380px; }
.pad .p-body { fill: var(--bg); stroke: var(--line); stroke-width: 3; }
.pad .p-btn { fill: var(--bg-card); stroke: var(--line); stroke-width: 2; transition: fill 0.15s; }
.pad .p-cap { fill: var(--bg-hover); stroke: var(--line); stroke-width: 2; }
.pad text { font: 700 11px var(--font); fill: var(--soft); text-anchor: middle; pointer-events: none; }
.pad .hot { fill: var(--accent); stroke: var(--accent); }
.device-caption { font-size: 14px; color: var(--soft); text-align: center; min-height: 1.5em; margin: 0; }

/* ------------------------------------------------------------ terrain modes, brush */
.modes { margin: 18px 0; }
.mode-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.mode-art { width: 100%; }
.ground-before { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 5; }
.ground-after { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--accent); stroke-width: 3; transition: d 0.5s ease; }
.mode-brush { fill: none; stroke: var(--cyan); stroke-width: 2.5; opacity: 0.9; }

.brush-demo { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0 20px; }
.brush-demo svg { display: block; width: 100%; max-width: 560px; margin: 0 auto; }
.b-ground { fill: color-mix(in srgb, var(--accent) 20%, var(--bg)); }
.b-suit { fill: var(--soft); } .b-helmet { fill: var(--text); }
.b-ring { fill: color-mix(in srgb, var(--cyan) 25%, transparent); stroke: var(--cyan); stroke-width: 2.5; transition: rx 0.2s, ry 0.2s; }
.b-dome { fill: none; stroke: var(--cyan); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: 0.7; }
.b-label { font: 600 12px var(--font); fill: var(--soft); text-anchor: middle; }
.slider { display: grid; gap: 6px; margin: 8px 0 6px; }
.slider span { font-size: 14px; color: var(--soft); }
.slider b { color: var(--text); }
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ------------------------------------------------------------ saves */
.timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.timeline > div { background: var(--bg-card); border: 1px solid var(--line); border-top: 3px solid var(--good); border-radius: 10px; padding: 12px 14px; }
.timeline > div.bad { border-top-color: var(--bad); }
.timeline b { display: block; margin-bottom: 4px; }
.timeline span { font-size: 14px; color: var(--soft); }

/* ------------------------------------------------------------ hotspots */
.hs-frame { position: relative; }
.hs-frame img { cursor: default; }
.spot {
  position: absolute; transform: translate(-50%, -50%);
  width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: #f2a020; color: #1b1406; font: 800 13px var(--font);
  box-shadow: 0 0 0 2px #1b1406, 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s;
}
.spot::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #f2a020; opacity: 0; animation: ping 2.4s infinite; }
@keyframes ping { 0% { opacity: 0.7; transform: scale(0.8); } 80%, 100% { opacity: 0; transform: scale(1.5); } }
.spot.hot, .spot:hover, .spot:focus-visible { transform: translate(-50%, -50%) scale(1.25); z-index: 2; }
.spot-tip {
  position: absolute; z-index: 3; max-width: 260px; padding: 10px 12px; border-radius: 10px;
  background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; color: var(--soft);
  pointer-events: none;
}
.spot-tip b { color: var(--text); }
.hs-legend { columns: 2; column-gap: 28px; padding-left: 0; list-style: none; counter-reset: hs; font-size: 15px; color: var(--soft); }
.hs-legend li { break-inside: avoid; position: relative; padding: 6px 8px 6px 38px; border-radius: 8px; counter-increment: hs; cursor: default; }
.hs-legend li::before {
  content: counter(hs); position: absolute; left: 6px; top: 7px; width: 22px; height: 22px; border-radius: 50%;
  background: #f2a020; color: #1b1406; font: 800 12px/22px var(--font); text-align: center;
}
.hs-legend li.hot { background: var(--bg-card); }
.hs-legend b { color: var(--text); }

/* ------------------------------------------------------------ stepper */
.stepper { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 16px 0; }
.stepper-dots { display: flex; gap: 6px; margin-bottom: 16px; }
.stepper-dots button { flex: 1; height: 6px; border-radius: 999px; border: 0; background: var(--line); cursor: pointer; padding: 0; }
.stepper-dots button.done { background: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.stepper-dots button[aria-selected="true"] { background: var(--accent); }
.stepper-pages article { display: none; min-height: 120px; animation: fadein 0.3s ease; }
.stepper-pages article.show { display: block; }
.stepper-pages h4 { font-size: 19px; }
.stepper-pages p { color: var(--soft); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.stepper-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 14px; }
.stepper-nav button:disabled { opacity: 0.4; cursor: default; transform: none; }

/* ------------------------------------------------------------ tables */
.table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 15px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--soft); }
.table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.table tr.hidden { display: none; }
.shortcuts td:nth-child(3) { color: var(--text); font-weight: 600; white-space: nowrap; }
.shortcuts { margin-top: 12px; }

/* ------------------------------------------------------------ folder tree */
.tree { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 15px; }
.tree ul { list-style: none; margin: 4px 0 4px 10px; padding-left: 14px; border-left: 1px dashed var(--line); }
.tree li { padding: 3px 0; color: var(--muted); }
.tree summary { cursor: pointer; font-family: var(--mono); font-weight: 600; color: var(--cyan); }
.tree .f { font-family: var(--mono); font-weight: 600; color: var(--text); margin-right: 8px; }
.tree .f::before { content: ""; display: inline-block; width: 14px; height: 10px; margin-right: 7px; border-radius: 2px 3px 2px 2px; background: var(--warn); opacity: 0.85; }

/* ------------------------------------------------------------ copy, lightbox, footer */
code.copy { cursor: copy; position: relative; }
code.copy.copied::after {
  content: "Copied"; position: absolute; left: 50%; top: -28px; transform: translateX(-50%);
  font: 600 12px var(--font); background: var(--good); color: #10301c; padding: 2px 8px; border-radius: 6px; white-space: nowrap;
}
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(8, 4, 10, 0.88); display: grid; place-items: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1400px, 96vw); max-height: 90vh; border-radius: 10px; box-shadow: var(--shadow); }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 18px; cursor: pointer; }
.footer { display: flex; justify-content: space-between; gap: 16px; max-width: 1240px; margin: 0 auto; padding: 28px 24px 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--text); font-size: 18px; cursor: pointer; box-shadow: var(--shadow);
}

/* ------------------------------------------------------------ narrow screens */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .hero-planet { order: -1; }
  .planet-stage { width: min(100%, 420px); }
}
@media (max-width: 980px) {
  .menu-btn { display: inline-grid; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sidebar {
    position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; width: min(300px, 84vw); max-height: none;
    background: var(--bg-elev); border-right: 1px solid var(--line); padding: 24px 12px;
    transform: translateX(-102%); transition: transform 0.25s ease;
  }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.5); }
  .scrim[hidden] { display: none; }
  .content { max-width: none; }
}
@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .brand .pill, .hide-sm { display: none; }
  .search { margin-left: 4px; }
  .search-key { display: none; }
  .search input { padding-right: 10px; }
  .search-results { position: fixed; top: 64px; left: 12px; right: 12px; overflow-x: hidden; }
  .layout { padding: 0 16px; }
  .hero { padding: 28px 16px 36px; }
  .split, .controls-body, .mode-body { grid-template-columns: minmax(0, 1fr); }
  .cards, .cards.three { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: minmax(0, 1fr); }
  .hs-legend { columns: 1; }
  .doc h2 { font-size: 26px; }
  .kb { padding-right: 0; }
  .key { min-width: 26px; height: 28px; padding: 0 5px; font-size: 11px; }
  .key.wide { min-width: 44px; } .key.wider { min-width: 50px; } .key.widest { min-width: 64px; } .key.space { min-width: 118px; }
  .key.arrow { min-width: 54px; }
  .spot { width: 20px; height: 20px; font-size: 11px; }
  .spot::before { inset: -4px; }
  .mouse { display: none; }
  /* phones: stack each row, name first, so nothing has to squeeze into a column */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 2px 0; }
  .table td:first-child { white-space: normal; }
  .table:not(.shortcuts) td:nth-child(2):not(:last-child) { font-size: 13px; color: var(--muted); }
  .shortcuts tr { display: grid; grid-template-columns: 136px minmax(0, 1fr); column-gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .shortcuts td { border: 0; padding: 4px 2px; }
  .shortcuts td:nth-child(odd) { white-space: nowrap; }
  .shortcuts td:empty { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* search jump highlight */
.flash { animation: flash 1.8s ease; border-radius: 6px; }
@keyframes flash { 0%, 35% { background: color-mix(in srgb, var(--accent) 28%, transparent); } 100% { background: transparent; } }
