/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #eef4f8;
  --bg-2: #e3edf4;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #ffffff;
  --surface-2: rgba(240, 246, 250, .9);
  --text: #0d1b26;
  --muted: #586a79;
  --line: rgba(13, 27, 38, .09);
  --line-strong: rgba(13, 27, 38, .16);
  --accent: #0891b2;
  --accent-text: #0e7490;
  --accent-2: #2563eb;
  --accent-ink: #ffffff;
  --accent-soft: rgba(8, 145, 178, .1);
  --grad: linear-gradient(135deg, #0e7490 0%, #1d4ed8 100%);
  --glow: 0 6px 16px rgba(14, 116, 144, .22);
  --pass: #15803d;
  --pass-soft: rgba(22, 163, 74, .1);
  --warn: #9a4a07;
  --warn-soft: rgba(217, 119, 6, .11);
  --fail: #b91c1c;
  --fail-soft: rgba(220, 38, 38, .09);
  --code-bg: #0b1620;
  --code-bar: #121f2b;
  --code-text: #d7e6f0;
  --blob-1: rgba(6, 182, 212, .28);
  --blob-2: rgba(59, 130, 246, .22);
  --blob-3: rgba(16, 185, 129, .16);
  --wave-1: rgba(8, 145, 178, .10);
  --wave-2: rgba(37, 99, 235, .08);
  --shadow: 0 1px 2px rgba(13, 27, 38, .05), 0 4px 14px rgba(13, 27, 38, .05);
  --shadow-lg: 0 16px 48px rgba(13, 27, 38, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #06111a; --bg-2: #0a1824; --surface: rgba(14, 28, 40, .72); --surface-solid: #0f1e2b; --surface-2: rgba(22, 38, 52, .8);
    --text: #e4eef5; --muted: #8ea3b4; --line: rgba(255, 255, 255, .07); --line-strong: rgba(255, 255, 255, .14);
    --accent: #22d3ee; --accent-text: #67e8f9; --accent-2: #60a5fa; --glow: 0 6px 16px rgba(0, 0, 0, .35); --accent-ink: #04121b; --accent-soft: rgba(34, 211, 238, .12);
    --pass: #4ade80; --pass-soft: rgba(74, 222, 128, .1); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .1);
    --fail: #f87171; --fail-soft: rgba(248, 113, 113, .1); --code-bg: #050d14; --code-bar: #0b1620;
    --blob-1: rgba(6, 182, 212, .18); --blob-2: rgba(59, 130, 246, .16); --blob-3: rgba(16, 185, 129, .09);
    --wave-1: rgba(34, 211, 238, .06); --wave-2: rgba(96, 165, 250, .05);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25); --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #06111a; --bg-2: #0a1824; --surface: rgba(14, 28, 40, .72); --surface-solid: #0f1e2b; --surface-2: rgba(22, 38, 52, .8);
  --text: #e4eef5; --muted: #8ea3b4; --line: rgba(255, 255, 255, .07); --line-strong: rgba(255, 255, 255, .14);
  --accent: #22d3ee; --accent-text: #67e8f9; --accent-2: #60a5fa; --glow: 0 6px 16px rgba(0, 0, 0, .35); --accent-ink: #04121b; --accent-soft: rgba(34, 211, 238, .12);
  --pass: #4ade80; --pass-soft: rgba(74, 222, 128, .1); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .1);
  --fail: #f87171; --fail-soft: rgba(248, 113, 113, .1); --code-bg: #050d14; --code-bar: #0b1620;
  --blob-1: rgba(6, 182, 212, .18); --blob-2: rgba(59, 130, 246, .16); --blob-3: rgba(16, 185, 129, .09);
  --wave-1: rgba(34, 211, 238, .06); --wave-2: rgba(96, 165, 250, .05);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25); --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15.5px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { letter-spacing: -.015em; line-height: 1.25; }
code, pre, kbd { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
:not(pre) > code { background: var(--accent-soft); color: var(--text); padding: .12em .4em; border-radius: 6px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); color: var(--code-text); padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; margin: .7em 0; line-height: 1.55; }
pre code { background: none; padding: 0; color: inherit; }
kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font-size: .78em; background: var(--surface-solid); }
button { font: inherit; color: inherit; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ animated background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform; }
.blob.b1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -16vmax; background: var(--blob-1); animation: drift1 26s ease-in-out infinite alternate; }
.blob.b2 { width: 40vmax; height: 40vmax; right: -14vmax; top: 10vh; background: var(--blob-2); animation: drift2 32s ease-in-out infinite alternate; }
.blob.b3 { width: 34vmax; height: 34vmax; left: 30vw; bottom: -18vmax; background: var(--blob-3); animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(12vw, 10vh) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-14vw, 16vh) scale(.92); } }
@keyframes drift3 { to { transform: translate(-10vw, -12vh) scale(1.15); } }
.waves { position: absolute; left: 0; right: 0; bottom: 0; height: 220px; }
.waves svg { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; }
.waves .w1 { fill: var(--wave-1); animation: wave 22s linear infinite; }
.waves .w2 { fill: var(--wave-2); animation: wave 34s linear infinite reverse; bottom: -18px; }
@keyframes wave { to { transform: translateX(-50%); } }
.grain { position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000 0%, transparent 70%); }

/* ------------------------------------------------------------------ header */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 28px; background: var(--surface); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); }
.brand-text strong { display: block; font-size: 1.02rem; letter-spacing: -.01em; }
.brand-text span { display: block; font-size: .78rem; color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 10px; }
.segmented { display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.seg {
  display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border: 0; border-radius: 10px; background: none; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: .9rem; transition: background .25s var(--ease), color .25s;
}
.seg:hover { color: var(--text); }
.seg[aria-current="true"] { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow); }
.ring { width: 30px; height: 30px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .track { stroke: var(--line-strong); }
.ring .fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.seg small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); line-height: 1.2; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); transition: color .2s, transform .2s var(--ease);
}
.icon-btn:hover { color: var(--text); transform: translateY(-1px); }

/* ------------------------------------------------------------------ layout */
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; max-width: 1240px; margin: 0 auto; padding: 28px; }
.sidebar { position: sticky; top: 86px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; scrollbar-width: thin; }
.panel { background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.side-head { padding: 16px 18px 6px; }
.side-progress { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-title { font-weight: 700; color: var(--text); font-size: .9rem; }
.bar { flex: 1; height: 5px; border-radius: 99px; background: var(--line-strong); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .8s var(--ease); }
.timeline { list-style: none; margin: 0; padding: 8px 8px 12px; position: relative; }
.timeline li { position: relative; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 24.5px; top: 39px; bottom: -1px; width: 1.5px; background: var(--line-strong); }
.timeline li.done:not(:last-child)::before { background: var(--accent); opacity: .45; }
.tl-btn {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 5px 8px; margin: 1px 0; border: 1px solid transparent;
  border-radius: 10px; background: none; cursor: pointer; text-align: left; color: var(--muted); transition: background .2s, color .2s;
}
.tl-btn:hover { background: var(--surface-2); color: var(--text); }
.tl-btn[aria-current="step"] { background: var(--accent-soft); color: var(--text); }
.tl-icon {
  position: relative; z-index: 1; flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-solid); border: 1px solid var(--line-strong); color: var(--muted); transition: all .3s var(--ease);
}
.tl-icon .ic { width: 17px; height: 17px; }
.tl-btn[aria-current="step"] .tl-icon { background: var(--grad); color: #fff; border-color: transparent; }
.done .tl-icon { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.tl-badge { position: absolute; right: -5px; bottom: -5px; width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; background: var(--pass); color: #fff; border: 2px solid var(--surface-solid); animation: pop .45s var(--ease); }
.tl-text { min-width: 0; font-size: .88rem; font-weight: 550; line-height: 1.3; }
.tl-btn[aria-current="step"] .tl-text { font-weight: 650; }

/* workspace popover */
.pop-wrap { position: relative; }
#ws-btn { position: relative; }
.ws-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); border: 2px solid var(--surface-solid); }
.ws-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; max-width: calc(100vw - 32px); padding: 16px; font-size: .84rem; color: var(--muted); background: var(--surface-solid); box-shadow: var(--shadow-lg); animation: fadeUp .25s var(--ease) both; }
.ws-pop[hidden] { display: none; }
.ws-row { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; overflow-wrap: anywhere; }
.ws-row .ic { margin-top: 2px; color: var(--accent-text); }
.ws-row b { color: var(--text); font-weight: 600; }
.ws-note { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .78rem; }

/* ------------------------------------------------------------------ content */
.content { min-width: 0; outline: none; }
.enter { animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card { padding: 26px 30px; margin-bottom: 18px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h3 { display: flex; align-items: center; gap: 10px; margin: 1.4em 0 .5em; font-size: 1.05rem; }
.card h3 .ic { color: var(--accent); }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--accent-text); }
.prose table, .card table { width: 100%; border-collapse: separate; border-spacing: 0; margin: .9em 0; font-size: .9rem; display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.card th, .card td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.card tr:last-child td { border-bottom: 0; }
.card th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.note { color: var(--muted); font-size: .92rem; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.warn-box { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }

/* step header */
.step-head { display: flex; gap: 18px; align-items: center; }
.step-tile {
  flex: none; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--grad);
  box-shadow: var(--glow);
}
.step-head h2 { margin: 2px 0 6px; font-size: 1.75rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.chip .ic { color: var(--accent); }
.chip.ok { color: var(--pass); background: var(--pass-soft); }
.chip.ok .ic { color: var(--pass); }
.step-progress { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: .8rem; color: var(--muted); }

/* in short */
.summary { position: relative; margin-top: 22px; padding: 18px 20px 18px 22px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.summary::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--grad); }
.summary .eyebrow { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.summary p { margin: .4em 0; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 46px 44px 40px; color: #fff; border: 0; background: linear-gradient(135deg, #0b3a53 0%, #0e5a7a 45%, #1d4ed8 100%); }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .18), transparent 45%); pointer-events: none; }
.hero .hero-waves { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; opacity: .35; pointer-events: none; }
.hero .hero-waves svg { position: absolute; bottom: 0; width: 200%; height: 100%; }
.hero .hero-waves .w1 { fill: rgba(255, 255, 255, .25); animation: wave 14s linear infinite; }
.hero .hero-waves .w2 { fill: rgba(255, 255, 255, .15); animation: wave 20s linear infinite reverse; }
.hero > :not(.hero-waves) { position: relative; z-index: 1; }
.hero .eyebrow { color: #a5f3fc; }
.hero h2 { font-size: clamp(2rem, 4vw, 2.9rem); margin: 8px 0 12px; line-height: 1.1; }
.hero h2 span { background: linear-gradient(90deg, #a5f3fc, #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.12rem; max-width: 40em; color: rgba(255, 255, 255, .85); margin: 0 0 24px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 0 0 28px; }
.stat strong { display: block; font-size: 1.7rem; line-height: 1.1; }
.stat span { font-size: .8rem; color: rgba(255, 255, 255, .7); }
.highlights { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
@media (max-width: 1180px) { .highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hl { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); backdrop-filter: blur(6px); transition: transform .3s var(--ease), background .3s; }
.hl:hover { background: rgba(255, 255, 255, .15); }
.hl .ic { color: #a5f3fc; }
.hl strong { display: block; margin: 8px 0 2px; }
.hl span { font-size: .85rem; color: rgba(255, 255, 255, .75); }
.hero .btn { background: #fff; color: #0b3a53; border-color: #fff; box-shadow: none; }
.hero .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 18px; border-radius: 12px; font-weight: 650; font-size: .92rem;
  border: 1px solid transparent; background: var(--grad); color: #fff; box-shadow: var(--glow);
  transition: transform .2s var(--ease), box-shadow .2s, opacity .2s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { filter: brightness(.95); }
.btn.ghost { background: var(--surface-solid); color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.btn:disabled { opacity: .7; cursor: progress; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.link-button { background: none; border: none; color: var(--accent-text); cursor: pointer; padding: 0; font-weight: 600; font-size: .88rem; display: inline-flex; align-items: center; gap: 6px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* terminal commands */
.commands { display: grid; gap: 14px; margin: 18px 0; }
.term { border-radius: 14px; overflow: hidden; background: var(--code-bg); border: 1px solid rgba(255, 255, 255, .06); box-shadow: var(--shadow); transition: box-shadow .3s; }
.term.ran { box-shadow: 0 0 0 2px color-mix(in srgb, var(--pass) 55%, transparent), var(--shadow); }
.term-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: var(--code-bar); color: #8fa6b8; font-size: .8rem; }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #2c3f4f; }
.term:hover .dots i:nth-child(1) { background: #ff5f57; } .term:hover .dots i:nth-child(2) { background: #febc2e; } .term:hover .dots i:nth-child(3) { background: #28c840; }
.dots i { transition: background .25s; }
.term-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-actions { display: flex; gap: 6px; }
.term-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; cursor: pointer; font-size: .76rem; font-weight: 600; color: #c4d6e3; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); transition: background .2s, color .2s; }
.term-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.term-btn.on { color: #052e16; background: #4ade80; border-color: #4ade80; }
.term-btn.copied { color: #04121b; background: #22d3ee; border-color: #22d3ee; }
.term pre { margin: 0; border-radius: 0; background: none; padding: 14px 16px 16px; white-space: pre-wrap; word-break: break-word; }
.prompt { color: #22d3ee; user-select: none; margin-right: 10px; }
.os-tag { font-size: .68rem; padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: #a5f3fc; }

/* checks */
.verify-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.verify-head h3 { margin: 0; }
.verify-head p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.groups { display: grid; gap: 12px; margin-top: 18px; }
.group { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-solid); animation: fadeUp .4s var(--ease) both; }
.group-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-weight: 650; font-size: .92rem; border-bottom: 1px solid var(--line); }
.group-head .name { flex: 1; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; }
.badge.pass { color: var(--pass); background: var(--pass-soft); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.fail { color: var(--fail); background: var(--fail-soft); }
.badge.info, .badge.run { color: var(--muted); background: var(--surface-2); }
.items { list-style: none; margin: 0; padding: 6px; }
.items li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; padding: 7px 8px; border-radius: 10px; animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.items li + li { margin-top: 2px; }
.status-dot { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; }
.status-dot.pass { color: var(--pass); background: var(--pass-soft); }
.status-dot.warn { color: var(--warn); background: var(--warn-soft); }
.status-dot.fail { color: var(--fail); background: var(--fail-soft); }
.status-dot.info { color: var(--muted); background: var(--surface-2); }
.item-label { font-weight: 600; font-size: .9rem; }
.item-detail { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.hint { display: flex; gap: 10px; margin: 0 6px 8px; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); font-size: .88rem; overflow-wrap: anywhere; }
.hint .ic { color: var(--warn); margin-top: 2px; }
.skeleton { height: 14px; margin: 12px 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--line-strong), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton.short { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.verdict { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: 14px; font-weight: 650; animation: fadeUp .4s var(--ease) both; }
.verdict.pass { background: var(--pass-soft); color: var(--pass); }
.verdict.warn { background: var(--warn-soft); color: var(--warn); }
.verdict.fail { background: var(--fail-soft); color: var(--fail); }
.verdict.info { background: var(--accent-soft); color: var(--accent-text); }

/* confirm */
.confirm { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; cursor: pointer; border: 1.5px dashed var(--line-strong); transition: all .3s var(--ease); }
.confirm:hover { border-color: var(--accent); }
.confirm input { position: absolute; opacity: 0; pointer-events: none; }
.tick { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; border: 2px solid var(--line-strong); color: transparent; transition: all .3s var(--ease); }
.confirm.on { border-style: solid; border-color: var(--pass); background: var(--pass-soft); }
.confirm.on .tick { background: var(--pass); border-color: var(--pass); color: #fff; animation: pop .45s var(--ease); }
.confirm input:focus-visible + .tick { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.confirm span { font-weight: 600; }

/* quiz */
.quiz-q { padding: 16px 0; border-top: 1px solid var(--line); }
.quiz-q:first-of-type { border-top: 0; padding-top: 4px; }
.quiz-q > p { font-weight: 650; margin: 0 0 10px; }
.options { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface-solid); transition: border-color .2s, transform .2s var(--ease), background .2s;
}
.opt:hover { border-color: var(--accent); background: var(--surface-2); }
.letter { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.opt.right { border-color: var(--pass); background: var(--pass-soft); }
.opt.right .letter { background: var(--pass); color: #fff; }
.opt.wrong { border-color: var(--fail); background: var(--fail-soft); }
.opt.wrong .letter { background: var(--fail); color: #fff; }
.pop { animation: pop .45s var(--ease); }
.shake { animation: shake .4s ease; }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.why { display: flex; gap: 8px; margin-top: 10px; font-size: .9rem; color: var(--muted); animation: fadeUp .35s var(--ease) both; }
.why .ic { margin-top: 3px; }
.why.right .ic { color: var(--pass); }

/* disclosure */
details { border: 1px solid var(--line); border-radius: 14px; margin: 12px 0; background: var(--surface-solid); overflow: hidden; }
summary { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; font-weight: 650; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary .ic:first-child { color: var(--accent); }
summary .chev { margin-left: auto; transition: transform .3s var(--ease); color: var(--muted); }
details[open] summary .chev { transform: rotate(90deg); }
details > div { padding: 0 18px 14px; animation: fadeUp .35s var(--ease) both; }
.stuck-item { padding: 10px 0; border-top: 1px solid var(--line); }
.stuck-item:first-child { border-top: 0; }
.stuck-item strong { display: block; margin-bottom: 2px; }

/* docs */
.doc-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.doc-link { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--text); background: var(--surface-solid); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; transition: all .25s var(--ease); }
.doc-link:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.doc-link .ic:first-child { color: var(--accent); }
.doc-link .ext { margin-left: auto; color: var(--muted); }

/* feature grid (content) */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 14px 0; }
.feature { display: block; padding: 14px 16px; border-radius: 14px; text-decoration: none; color: var(--text); background: var(--surface-solid); border: 1px solid var(--line); transition: all .25s var(--ease); }
.feature:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.feature strong { display: block; margin-bottom: 2px; }
.feature span { display: block; font-size: .85rem; color: var(--muted); }

/* architecture diagram */
.arch { display: grid; grid-template-columns: minmax(0, 1.6fr) 120px minmax(0, 1fr); gap: 0; margin: 22px 0 8px; align-items: stretch; }
.zone { padding: 14px; border-radius: 16px; border: 1.5px dashed var(--line-strong); background: var(--surface-2); }
.zone-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 12px; }
.zone-head strong { font-size: .95rem; }
.zone-head span { flex-basis: 100%; font-size: .74rem; color: var(--muted); }
.zone-head .ic { color: var(--accent); }
.nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.node {
  display: grid; justify-items: center; gap: 4px; padding: 12px 8px; border-radius: 12px; cursor: pointer; text-align: center;
  border: 1px solid var(--line); background: var(--surface-solid); transition: all .25s var(--ease);
}
.node .ic { color: var(--accent); transition: transform .3s var(--ease); }
.node strong { font-size: .84rem; line-height: 1.2; }
.node small { font-size: .7rem; color: var(--muted); line-height: 1.2; }
.node:hover { border-color: var(--accent); }
.node:hover .ic { transform: scale(1.12); }
.node[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.node[aria-pressed="true"] .ic, .node[aria-pressed="true"] small { color: #fff; }
.bus { position: relative; display: grid; place-items: center; }
.bus-line { position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px); opacity: .5; animation: dash 1s linear infinite; }
@keyframes dash { to { background-position: 12px 0; } }
.packet { position: absolute; top: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: out 2.6s var(--ease) infinite; }
.packet.back { background: #10b981; box-shadow: 0 0 12px #10b981; animation: back 2.6s var(--ease) infinite 1.3s; }
.packet.p2 { animation-delay: .9s; }
@keyframes out { 0% { left: 4px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 14px); opacity: 0; } }
@keyframes back { 0% { left: calc(100% - 14px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 4px; opacity: 0; } }
.bus-label { position: relative; margin-top: 54px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; line-height: 1.3; }
.detail { display: flex; gap: 16px; align-items: flex-start; margin-top: 14px; padding: 16px 18px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line); animation: fadeUp .35s var(--ease) both; }
.detail .tile { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.detail h4 { margin: 0 0 4px; font-size: 1rem; }
.detail p { margin: 0 0 6px; }
.detail .where { font-size: .82rem; color: var(--muted); }
.hint-line { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); margin-top: 6px; }

/* deployment flow */
.flow-wrap { margin: 22px 0 6px; }
.flow-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.flow-controls .count { margin-left: auto; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.flow-track { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(84px, 1fr)); gap: 6px; overflow-x: auto; padding: 14px 2px 12px; }
.flow-rail { position: absolute; left: 44px; right: 44px; top: 38px; height: 3px; border-radius: 3px; background: var(--line-strong); }
.flow-rail span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--grad); transition: width .6s var(--ease); }
.stage { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; text-align: center; }
.stage .orb { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-solid); border: 1.5px solid var(--line-strong); color: var(--muted); transition: all .4s var(--ease); }
.stage small { font-size: .74rem; font-weight: 600; color: var(--muted); line-height: 1.2; }
.stage.past .orb { color: var(--accent); border-color: var(--accent); }
.stage.now .orb { background: var(--grad); color: #fff; border-color: transparent; transform: scale(1.08); box-shadow: 0 0 0 5px var(--accent-soft); }
.stage.now small { color: var(--text); }
.flow-detail { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line); min-height: 86px; }
.flow-detail .num { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; background: var(--accent-soft); color: var(--accent-text); }
.flow-detail h4 { margin: 0 0 2px; }
.flow-detail p { margin: 0; color: var(--muted); }
.flow-detail.swap { animation: fadeUp .35s var(--ease) both; }

/* playground */
.pg label { display: block; font-weight: 650; font-size: .86rem; margin: 14px 0 6px; }
.pg textarea, .pg select {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--text);
  font: 13.5px/1.5 "JetBrains Mono", ui-monospace, Menlo, monospace; transition: border-color .2s, box-shadow .2s;
}
.pg textarea:focus, .pg select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pg .token { height: 70px; }
.pg .query { height: 150px; }
.pg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.pg-out { margin-top: 14px; }
.pg-out pre { min-height: 180px; max-height: 420px; overflow: auto; margin: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; margin-bottom: 8px; }
.j-key { color: #7dd3fc; } .j-str { color: #a7f3d0; } .j-num { color: #fcd34d; } .j-lit { color: #f9a8d4; }

/* nav */
.step-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.nav-btn { display: flex; flex-direction: column; gap: 2px; min-width: 200px; padding: 12px 16px; border-radius: 14px; cursor: pointer; text-align: left; border: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(12px); transition: all .25s var(--ease); }
.nav-btn:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.nav-btn small { display: flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.nav-btn strong { font-size: .98rem; }
.nav-btn.next { text-align: right; margin-left: auto; }
.nav-btn.next small { justify-content: flex-end; }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; font-weight: 600; }
.banner.done { background: var(--pass-soft); color: var(--pass); border: 1px solid color-mix(in srgb, var(--pass) 25%, transparent); }
.banner.info { background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.banner .ic { flex: none; }

/* footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: 1240px; margin: 0 auto; padding: 4px 28px 36px; color: var(--muted); font-size: .8rem; }
.foot span { display: inline-flex; align-items: center; gap: 8px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: .92rem; color: var(--text); background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translate(-50%, 140%); opacity: 0; transition: transform .45s var(--ease), opacity .3s; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .ic { color: var(--pass); }

/* celebration modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(4, 14, 22, .55); backdrop-filter: blur(6px); animation: fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-card { position: relative; width: min(460px, 100%); padding: 38px 30px 28px; text-align: center; border-radius: 24px; background: var(--surface-solid); box-shadow: var(--shadow-lg); animation: pop .55s var(--ease) both; overflow: hidden; }
.trophy { position: relative; width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 28px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: var(--glow); }
.trophy::before, .trophy::after { content: ""; position: absolute; inset: -10px; border-radius: 34px; border: 2px solid var(--accent); opacity: 0; animation: ripple 2.2s ease-out infinite; }
.trophy::after { animation-delay: 1.1s; }
@keyframes ripple { from { opacity: .6; transform: scale(.9); } to { opacity: 0; transform: scale(1.5); } }
.modal-card h2 { margin: 0 0 8px; font-size: 1.6rem; }
.modal-card p { color: var(--muted); margin: 0 0 22px; }
.modal-card .btn-row { justify-content: center; }
.confetti { position: fixed; top: -14px; z-index: 70; width: 8px; height: 13px; border-radius: 2px; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(760deg); opacity: .9; } }

/* responsive */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .sidebar { position: static; max-height: none; }
  .timeline { display: flex; overflow-x: auto; gap: 4px; padding: 6px 10px 12px; }
  .timeline li::before { display: none; }
  .tl-text { display: none; }
  .tl-btn[aria-current="step"] .tl-text { display: block; white-space: nowrap; }
  .tl-btn { width: auto; }
  .arch { grid-template-columns: 1fr; }
  .bus { height: 70px; }
  .bus-line { left: 50%; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--accent) 0 6px, transparent 6px 12px); }
  .packet { left: calc(50% - 5px) !important; animation-name: outV; }
  .packet.back { animation-name: backV; }
  @keyframes outV { 0% { top: 0; opacity: 0; } 20%, 80% { opacity: 1; } 100% { top: calc(100% - 10px); opacity: 0; } }
  @keyframes backV { 0% { top: calc(100% - 10px); opacity: 0; } 20%, 80% { opacity: 1; } 100% { top: 0; opacity: 0; } }
  .bus-label { margin: 0 0 0 110px; }
  .pg-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top { padding: 10px 16px; }
  .brand-text span, .seg small { display: none; }
  .seg { padding: 4px 10px 4px 4px; }
  .card { padding: 20px 18px; }
  .hero { padding: 32px 22px 28px; }
  .step-head { align-items: flex-start; }
  .step-tile { width: 52px; height: 52px; border-radius: 15px; }
  .step-head h2 { font-size: 1.4rem; }
  .nav-btn { min-width: 0; flex: 1; }
  .foot { padding: 4px 16px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .blob, .waves svg, .packet { animation: none !important; }
  .confetti { display: none; }
}

/* accessibility */
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--surface-solid); color: var(--text); font-weight: 650; box-shadow: var(--shadow-lg); transition: top .2s; }
.skip:focus { top: 12px; }
h2[tabindex="-1"]:focus { outline: none; }
@media (forced-colors: active) {
  .btn, .seg, .opt, .node, .stage .orb, .tl-icon, .term-btn, .confirm, .chip, .badge { border: 1px solid CanvasText; }
  .bg { display: none; }
}
@media (max-width: 640px) {
  .brand-text { display: none; }
  .top { gap: 8px; }
  .top-right { flex: 1; justify-content: flex-end; }
  .seg span { white-space: nowrap; }
  .stats { gap: 18px; }
  .highlights { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ polish pass: motion and delight */

/* steps slide in from the direction you're travelling */
.enter.slide { animation-name: slideIn; }
@keyframes slideIn { from { opacity: 0; transform: translateX(calc(var(--dx, 1) * 20px)); } to { opacity: 1; transform: none; } }

/* sparks */
.spark { position: fixed; z-index: 90; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; pointer-events: none; animation: spark .75s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes spark { to { transform: translate(var(--x), var(--y)) scale(.2); opacity: 0; } }

/* a small "bump" when a counter goes up */
.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.08); } 100% { transform: none; } }
.seg.bump .ring .fill { filter: drop-shadow(0 0 4px var(--accent)); }

/* toasts with an action */
.toast { padding: 10px 10px 10px 16px; }
.toast > span { padding-right: 6px; }
.toast-action { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 10px; cursor: pointer; font-weight: 650; font-size: .86rem; color: #fff; background: var(--grad); white-space: nowrap; }
.toast-action:hover { filter: brightness(1.1); }
.trophy-toast .ic { color: #d97706; }
:root[data-theme="dark"] .trophy-toast .ic { color: #fbbf24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .trophy-toast .ic { color: #fbbf24; } }

/* done banner with a next button */
.banner.done span { flex: 1; }
.banner-action { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; cursor: pointer; font-weight: 650; font-size: .86rem; color: var(--pass); background: var(--surface-solid); border: 1px solid color-mix(in srgb, var(--pass) 35%, transparent); transition: background .2s; }
.banner-action:hover { background: var(--pass-soft); }

/* step tile tick */
.step-tile { position: relative; }
.tile-badge { position: absolute; right: -6px; bottom: -6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--pass); border: 3px solid var(--surface-solid); animation: pop .5s var(--ease); }

/* terminal cursor */
.cursor { display: inline-block; width: .55em; height: 1.1em; margin-left: 4px; vertical-align: text-bottom; background: #22d3ee; opacity: .75; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term.ran .cursor { display: none; }

/* header popovers */
.pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 340px; max-width: calc(100vw - 32px); padding: 16px; font-size: .84rem; color: var(--muted); background: var(--surface-solid); box-shadow: var(--shadow-lg); animation: fadeUp .22s var(--ease) both; }
.pop[hidden] { display: none; }
.pop-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.pop-head .meta { font-size: .8rem; font-variant-numeric: tabular-nums; }
#badge-btn { position: relative; width: auto; padding: 0 10px; display: flex; gap: 6px; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
#badge-btn .ic { color: #d97706; }
.badge-pop { width: 380px; }
.badge-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; max-height: min(60vh, 520px); overflow: auto; }
.badge-list li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.badge-list li.got { background: var(--surface-2); }
.badge-list strong { display: block; color: var(--text); font-size: .88rem; }
.badge-list small { display: block; font-size: .78rem; line-height: 1.35; }
.badge-tile { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-strong); }
.got .badge-tile { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border: 0; box-shadow: 0 4px 12px rgba(217, 119, 6, .25); }
.locked strong { color: var(--muted); }

/* architecture: explored counter and seen marks */
.hint-line > span:first-of-type { flex: 1; }
.explored { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-weight: 600; font-size: .76rem; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.explored.all { color: var(--pass); background: var(--pass-soft); border-color: transparent; }
.node { position: relative; }
.node.seen::after { content: ""; position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--pass); }
.node[aria-pressed="true"].seen::after { background: #fff; }

/* shortcuts dialog */
.modal-card.keys { text-align: left; }
.key-list { list-style: none; padding: 0; margin: 14px 0 22px; display: grid; gap: 10px; }
.key-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); }
.key-list li > span:first-child { display: flex; gap: 6px; }
.key-list kbd { min-width: 28px; text-align: center; padding: 2px 7px; font-size: .82rem; color: var(--text); }
.keys-link kbd { margin-left: 2px; }
.modal-card.keys .btn-row { justify-content: flex-end; }

/* run-locally dialog (hosted copy) */
.modal-card.local { width: min(620px, 100%); text-align: left; padding: 30px 28px 24px; max-height: calc(100vh - 32px); overflow: auto; }
.modal-card.local h2 { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; }
.modal-card.local h2 .ic { color: var(--accent-text); flex: none; }
.modal-card.local .term { margin-bottom: 12px; }
.modal-card.local .note { margin: 14px 0 20px; font-size: .86rem; }
.modal-card.local .btn-row { justify-content: flex-end; }
.manual-check { margin: 18px 0; }
.manual-check h4 { margin: 0 0 10px; font-size: .95rem; }
.manual-cmd { margin-bottom: 14px; }
.manual-cmd .term { margin-bottom: 0; border-radius: 14px 14px 0 0; }
.expect { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 14px; border-radius: 0 0 14px 14px; font-size: .86rem; color: var(--text); background: var(--pass-soft); border: 1px solid color-mix(in srgb, var(--pass) 22%, transparent); border-top: 0; }
.expect .ic { flex: none; margin-top: 2px; color: var(--pass); }
.banner.hosted span { flex: 1; }
@media (max-width: 640px) {
  .banner.hosted { flex-wrap: wrap; }
  .banner.hosted span { flex: 1 1 calc(100% - 40px); }
  .banner.hosted .banner-action { margin-left: 32px; }
}
.banner.info .banner-action { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }

/* "When you're done" steps under the sidebar timeline */
.side-extra { border-top: 1px solid var(--line); padding-top: 4px; }
.side-label { padding: 10px 18px 0; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 640px) {
  .badge-pop, .ws-pop { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; }
  #badge-btn { padding: 0 8px; }
  .toast { left: 16px; right: 16px; transform: translate(0, 140%); }
  .toast.show { transform: translate(0, 0); }
  .keys-link { display: none; }
}
@media (prefers-reduced-motion: reduce) { .spark { display: none; } .cursor { animation: none; } }

/* ------------------------------------------------------------------ track tabs: bolder */
.segmented { padding: 5px; gap: 5px; border-radius: 16px; }
.seg { gap: 10px; padding: 6px 18px 6px 6px; border-radius: 12px; font-size: .94rem; color: var(--muted); }
.seg-ring { position: relative; flex: none; width: 36px; height: 36px; display: grid; place-items: center; }
.seg-ring .ring { position: absolute; inset: 0; width: 36px; height: 36px; }
.seg-ring .ic { position: relative; }
.seg-text { display: grid; text-align: left; line-height: 1.15; }
.seg-text b { font-weight: 700; }
.seg:hover:not([aria-current="true"]) { background: var(--surface-solid); }
.seg[aria-current="true"] { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.seg[aria-current="true"] small { color: rgba(255, 255, 255, .82); }
.seg[aria-current="true"] .ring .track { stroke: rgba(255, 255, 255, .28); }
.seg[aria-current="true"] .ring .fill { stroke: #fff; }
.seg[aria-current="true"] .seg-ring .ic { color: #fff; }

/* ------------------------------------------------------------------ explorer (nested map) */
.explorer { margin: 22px 0 8px; }
.ex-box { border: 1.5px dashed var(--line-strong); border-radius: 16px; padding: 10px; background: var(--surface-2); }
.ex-box.depth-1 { background: var(--surface-solid); border-style: solid; border-color: var(--line); }
.ex-children { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 8px; }
.ex-box.depth-0 > .ex-children { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; }
@media (max-width: 1100px) { .ex-box.depth-0 > .ex-children { grid-template-columns: 1fr; } }
.ex-head {
  width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 9px 11px; border-radius: 11px; cursor: pointer; text-align: left;
  border: 1px solid transparent; background: none; transition: background .2s, border-color .2s, color .2s;
}
.ex-leaf .ex-head { border-color: var(--line); background: var(--surface-solid); }
.ex-box.depth-1 .ex-leaf .ex-head { background: var(--surface-2); }
.ex-head .ic { color: var(--accent-text); }
.ex-title { font-weight: 650; font-size: .9rem; }
.ex-head small { flex-basis: 100%; padding-left: 25px; color: var(--muted); font-size: .76rem; line-height: 1.3; overflow-wrap: break-word; min-width: 0; }
.ex-head:hover { border-color: var(--accent); }
.ex-head[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.ex-head[aria-pressed="true"] .ic, .ex-head[aria-pressed="true"] small { color: #fff; }
.ex-head[aria-pressed="true"] .tag { background: rgba(255, 255, 255, .2); color: #fff; }
.tag { display: inline-block; margin-left: auto; padding: 1px 8px; border-radius: 99px; font-size: .7rem; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); white-space: nowrap; }
.detail h4 .detail-sub { margin-left: 8px; font-weight: 500; font-size: .82rem; color: var(--muted); }
.detail h4 .tag { margin-left: 8px; }

/* ------------------------------------------------------------------ annotated files */
.annotated { margin: 18px 0 22px; }
.file-tabs { display: flex; gap: 6px; margin-bottom: -1px; }
.file-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px 12px 0 0; cursor: pointer; font: 600 .84rem/1.2 "JetBrains Mono", ui-monospace, Menlo, monospace; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-bottom: 0; }
.file-tab[aria-selected="true"] { color: #d7e6f0; background: var(--code-bg); border-color: var(--code-bg); }
.anno-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.anno-code { margin: 0; padding: 12px 0; border-top-left-radius: 0; counter-reset: none; overflow-x: auto; }
.ln { position: relative; display: flex; align-items: baseline; padding: 0 40px 0 0; min-height: 1.55em; border-left: 3px solid transparent; transition: background .2s; }
.ln code { white-space: pre; }
.gutter { flex: none; width: 34px; padding-right: 12px; text-align: right; color: #4b6275; user-select: none; }
.ln.has-note { cursor: pointer; border-left-color: rgba(34, 211, 238, .25); }
.ln.has-note:hover { background: rgba(34, 211, 238, .07); }
.ln.active { background: rgba(34, 211, 238, .14); border-left-color: #22d3ee; }
.ln .marker { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.marker { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: 700 .7rem/1 system-ui, sans-serif; color: #04121b; background: #22d3ee; }
.anno-side { display: grid; gap: 12px; }
.note-card { padding: 16px 18px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); animation: fadeUp .3s var(--ease) both; }
.note-card h4 { margin: 4px 0 6px; }
.note-card p { margin: 0; }
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.note-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer; text-align: left; font-weight: 600; font-size: .86rem; border: 1px solid transparent; background: none; color: var(--muted); }
.note-btn:hover { background: var(--surface-2); color: var(--text); }
.note-btn.active { color: var(--text); background: var(--surface-solid); border-color: var(--line); }
.note-btn .marker { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-strong); }
.note-btn.active .marker { background: #22d3ee; color: #04121b; border-color: transparent; }

/* ------------------------------------------------------------------ permission simulator */
.sim { margin: 20px 0 8px; }
.sim-pick { display: grid; gap: 14px; }
.sim-pick .eyebrow { margin-bottom: 8px; }
.chip-row, .action-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { padding: 7px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--muted); background: var(--surface-solid); border: 1px solid var(--line-strong); transition: all .2s var(--ease); }
.pick:hover { border-color: var(--accent); color: var(--text); }
.pick.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.pipe { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr) 48px minmax(0, 1fr); align-items: center; margin: 22px 0 14px; }
.pipe-stage { display: grid; justify-items: center; gap: 6px; padding: 14px 10px; border-radius: 14px; text-align: center; background: var(--surface-solid); border: 1px solid var(--line); opacity: .45; transition: opacity .3s, border-color .3s, transform .3s var(--ease); }
.pipe-stage.lit { opacity: 1; border-color: var(--accent); transform: translateY(-2px); }
.pipe-orb { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.pipe-stage.lit .pipe-orb { background: var(--grad); color: #fff; }
.pipe-body { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.pipe-body code { font-size: .74rem; }
.pipe-link { position: relative; height: 2px; margin: 0 6px; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.pipe-link i { position: absolute; inset: 0; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.pipe-link.lit i { transform: scaleX(1); }
.sim-verdict { min-height: 54px; }
.sim-verdict .verdict { margin-top: 0; font-weight: 500; }
.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; font-size: .8rem; display: table !important; border: 0 !important; }
.matrix th, .matrix td { padding: 6px 8px !important; text-align: center !important; border-bottom: 1px solid var(--line); }
.matrix tbody th { text-align: left !important; font-weight: 600; text-transform: none !important; letter-spacing: 0 !important; color: var(--text) !important; background: none !important; font-size: .8rem !important; }
.matrix thead th { font-size: .7rem !important; }
.matrix td button { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; margin: 0 auto; cursor: pointer; border: 1px solid transparent; }
.matrix td.yes button { color: var(--pass); background: var(--pass-soft); }
.matrix td.no button { color: var(--fail); background: var(--fail-soft); opacity: .7; }
.matrix td.cell-on button { outline: 2.5px solid var(--accent); outline-offset: 1px; opacity: 1; }
.matrix .row-on th, .matrix .col-on { color: var(--accent-text) !important; }

/* ------------------------------------------------------------------ query builder */
.qb { margin: 20px 0 8px; }
.qb-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; }
.qb .eyebrow { margin-bottom: 8px; }
.qb-fields { padding: 12px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line); }
.qb-root { margin-bottom: 6px; font-weight: 700; }
.qb-field { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.qb-field:hover { background: var(--surface-2); }
.qb-field input { width: 16px; height: 16px; accent-color: var(--accent-text); }
.qb-field code { background: none !important; padding: 0 !important; white-space: nowrap; }
.qb-children { margin-left: 14px; padding-left: 10px; border-left: 1.5px solid var(--line-strong); }
.qb-pre { margin: 0; min-height: 260px; max-height: 360px; overflow: auto; font-size: .82rem; }
.flash { animation: flash .6s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .5); } 100% { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); } }
.qb-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }

@media (max-width: 1100px) {
  .qb-grid { grid-template-columns: 1fr 1fr; }
  .qb-grid > :first-child { grid-column: 1 / -1; }
  .anno-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .qb-grid { grid-template-columns: 1fr; }
  .pipe { grid-template-columns: 1fr; gap: 0; }
  .pipe-link { width: 2px; height: 18px; margin: 0 auto; }
  .pipe-link i { transform: scaleY(0); transform-origin: top; }
  .pipe-link.lit i { transform: scaleY(1); }
  .seg { padding: 4px 10px 4px 4px; }
  .seg-ring, .seg-ring .ring { width: 30px; height: 30px; }
}

/* ------------------------------------------------------------------ setup path choice */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 6px; }
.choice {
  position: relative; display: grid; align-content: start; gap: 8px; padding: 20px; border-radius: 18px; cursor: pointer; text-align: left;
  background: var(--surface-solid); border: 1.5px solid var(--line-strong); transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.choice:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.choice.on { border-color: transparent; box-shadow: 0 0 0 2.5px var(--accent), var(--shadow); }
.choice-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.choice-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); transition: all .3s var(--ease); }
.choice.on .choice-icon { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.choice-check { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-strong); color: transparent; transition: all .3s var(--ease); }
.choice.on .choice-check { background: var(--pass); border-color: var(--pass); color: #fff; animation: pop .45s var(--ease); }
.choice strong { font-size: 1.1rem; }
.choice-time { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.choice-time .ic { color: var(--accent-text); }
.choice-text { color: var(--muted); font-size: .9rem; }
.choice ul { margin: 4px 0 0; padding-left: 1.1em; font-size: .88rem; }
.choice li { margin: 3px 0; }
.choice li::marker { color: var(--accent-text); }
