/* Calm by design: a white page, near-black type, hairline rules and one accent (the glacier blue of arian-shafa.xyz).
   The seven layers no longer get seven hues: position, number and name already carry their order. */
:root {
  --paper: #ffffff; --panel: #f5f6f8; --panel-2: #eceef2; --line: #e5e7eb; --line-2: #d1d5db;
  --ink: #111418; --ink-2: #4b5260; --ink-3: #636a76; --link: #2f6596;
  --accent: #2f6596; --accent-t: #edf3f9; --accent-i: #2f6596; --on-accent: #ffffff;
  --warm: #b08a4f; --warm-t: #f7f1e7;
  --good: #2e7d4f; --good-t: #eef6f1; --bad: #b23b3b; --bad-t: #fbefee;
  --c-you: var(--accent); --c-you-t: var(--accent-t); --c-you-i: var(--accent-i);
  --c-model: var(--accent); --c-model-t: var(--accent-t); --c-model-i: var(--accent-i);
  --c-practice: var(--accent); --c-practice-t: var(--accent-t); --c-practice-i: var(--accent-i);
  --c-training: var(--accent); --c-training-t: var(--accent-t); --c-training-i: var(--accent-i);
  --c-chips: var(--accent); --c-chips-t: var(--accent-t); --c-chips-i: var(--accent-i);
  --c-dc: var(--accent); --c-dc-t: var(--accent-t); --c-dc-i: var(--accent-i);
  --c-energy: var(--accent); --c-energy-t: var(--accent-t); --c-energy-i: var(--accent-i);
  --slab: #ffffff; --slab-l: #e3e6eb; --slab-r: #eef0f3; --slab-line: #c9ced6; --slab-ico: #636a76;
  --sc-card: #ffffff; --sc-line: #cdd2da; --sc-soft: #f1f3f5; --cold: var(--accent-t); --hot: var(--warm-t);
  --stage: #fafbfc;
  --shadow-1: 0 1px 2px rgb(17 20 24 / .05), 0 6px 18px rgb(17 20 24 / .05);
  --shadow-2: 0 2px 8px rgb(17 20 24 / .06), 0 24px 60px rgb(17 20 24 / .12);
  --scrim: rgb(17 20 24 / .3);
  --f-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --f-body: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  --hh: 112px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1115; --panel: #161a20; --panel-2: #1d222a; --line: #262c35; --line-2: #343b46;
    --ink: #eceef2; --ink-2: #b4bac5; --ink-3: #8a919e; --link: #8fb8de;
    --accent: #8fb8de; --accent-t: #172331; --accent-i: #9cc3e6; --on-accent: #0f1115;
    --warm: #d8c19c; --warm-t: #2a2620;
    --good: #7fcf9f; --good-t: #13261b; --bad: #f0908a; --bad-t: #2e1a1a;
    --slab: #1b2028; --slab-l: #11151b; --slab-r: #161b22; --slab-line: #3a424e; --slab-ico: #8a919e;
    --sc-card: #171b22; --sc-line: #343b46; --sc-soft: #1c2129;
    --stage: #12151a;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 6px 18px rgb(0 0 0 / .25);
    --shadow-2: 0 2px 8px rgb(0 0 0 / .35), 0 24px 60px rgb(0 0 0 / .5);
    --scrim: rgb(4 6 10 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1115; --panel: #161a20; --panel-2: #1d222a; --line: #262c35; --line-2: #343b46;
  --ink: #eceef2; --ink-2: #b4bac5; --ink-3: #8a919e; --link: #8fb8de;
  --accent: #8fb8de; --accent-t: #172331; --accent-i: #9cc3e6; --on-accent: #0f1115;
  --warm: #d8c19c; --warm-t: #2a2620;
  --good: #7fcf9f; --good-t: #13261b; --bad: #f0908a; --bad-t: #2e1a1a;
  --slab: #1b2028; --slab-l: #11151b; --slab-r: #161b22; --slab-line: #3a424e; --slab-ico: #8a919e;
  --sc-card: #171b22; --sc-line: #343b46; --sc-soft: #1c2129;
  --stage: #12151a;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 6px 18px rgb(0 0 0 / .25);
  --shadow-2: 0 2px 8px rgb(0 0 0 / .35), 0 24px 60px rgb(0 0 0 / .5);
  --scrim: rgb(4 6 10 / .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 45; background: var(--paper); }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; letter-spacing: -.012em; text-wrap: balance; margin: 0; }
p { margin: 0; }
.L-you { --L: var(--c-you); --Lt: var(--c-you-t); --Li: var(--c-you-i); }
.L-model { --L: var(--c-model); --Lt: var(--c-model-t); --Li: var(--c-model-i); }
.L-practice { --L: var(--c-practice); --Lt: var(--c-practice-t); --Li: var(--c-practice-i); }
.L-training { --L: var(--c-training); --Lt: var(--c-training-t); --Li: var(--c-training-i); }
.L-chips { --L: var(--c-chips); --Lt: var(--c-chips-t); --Li: var(--c-chips-i); }
.L-dc { --L: var(--c-dc); --Lt: var(--c-dc-t); --Li: var(--c-dc-i); }
.L-energy { --L: var(--c-energy); --Lt: var(--c-energy-t); --Li: var(--c-energy-i); }
.eyebrow { font: 600 13px var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.muted { color: var(--ink-2); }

/* ---------- header ---------- */
.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site .row { display: flex; align-items: center; gap: 16px; padding-block: 10px; padding-left: var(--gut-l); padding-right: var(--gut-r); }
.site .row2 { padding-block: 0; border-top: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); }
.brand .logo svg { width: 20px; height: 20px; fill: none; stroke: var(--paper); stroke-width: 1.8; stroke-linejoin: round; }
.brand .nm { font: 500 22px var(--f-display); letter-spacing: -.01em; line-height: 1; display: block; }
.brand .dm { font: 400 12px var(--f-body); color: var(--ink-3); display: block; margin-top: 3px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar, .subtabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 8px 15px; border-radius: 999px; font: 600 15px var(--f-body); color: var(--ink-2); text-decoration: none; border: 0; background: none; }
.tab.on { color: var(--ink); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.tab.locked { color: var(--ink-3); opacity: .7; cursor: not-allowed; }
.tab.locked:hover { opacity: 1; }
.tab .lk { width: 14px; height: 14px; }
.wn-slot { display: inline-flex; align-items: center; flex: none; }
.wn-slot:empty { display: none; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); flex: none; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.subtabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.subtab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 11px 0 12px; font: 500 15px var(--f-body); color: var(--ink-3); white-space: nowrap; text-decoration: none; }
.subtab.on { color: var(--ink); font-weight: 600; }
.subtab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px; background: var(--ink); }
.soon { font: 600 10.5px var(--f-body); letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 2px 7px; color: var(--ink-3); background: var(--panel); }
.vtabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--panel); border-radius: 999px; flex: none; margin-block: 5px; }
.vtabs a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; color: var(--ink-2); font: 600 14.5px var(--f-body); text-decoration: none; white-space: nowrap; }
.vtabs a svg { width: 17px; height: 17px; }
.vtabs a:hover { color: var(--ink); }
.vtabs a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
@media (max-width: 900px) {
  .brand .dm { display: none; }
  .site { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
  .vtabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; margin: 0; border-radius: 0; justify-content: space-around; background: var(--paper); border-top: 1px solid var(--line); padding-block: 6px calc(6px + env(safe-area-inset-bottom, 0px)); padding-left: var(--gut-l); padding-right: var(--gut-r); }
  .vtabs a { flex-direction: column; gap: 3px; font-size: 12.5px; padding: 6px 10px; }
  .vtabs a[aria-current="page"] { box-shadow: none; background: var(--panel); }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- shared controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--paper); color: var(--ink); font: 600 15px var(--f-body); text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary:hover { opacity: .9; }
.btn.ghost { border-color: transparent; background: none; }
.btn.sm { padding: 6px 13px; font-size: 14px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font: 600 13.5px var(--f-body); padding: 5px 12px 5px 8px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); background: var(--paper); text-decoration: none; white-space: nowrap; }
button.chip:hover { border-color: var(--L, var(--line-2)); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.seg { display: inline-flex; flex-wrap: wrap; border-radius: 999px; padding: 4px; background: var(--panel); gap: 2px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 7px 14px; font: 600 14px var(--f-body); color: var(--ink-2); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
input[type="range"] { accent-color: var(--ink); width: 100%; }
.switch { display: inline-flex; align-items: center; gap: 9px; font: 600 14px var(--f-body); color: var(--ink-2); background: none; border: 0; padding: 4px; }
.switch i { width: 36px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .2s; }
.switch[aria-checked="true"] i { background: var(--good); }
.switch[aria-checked="true"] i::after { transform: translateX(14px); }
.toast { position: fixed; left: 50%; top: calc(130px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -8px); z-index: 90; background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 14px; font-size: 15px; box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- explore ---------- */
.explore { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 32vw, 470px); height: calc(100dvh - var(--hh)); min-height: 560px; }
.stage { position: relative; overflow: hidden; background-color: var(--stage); transition: background-color .7s; touch-action: pan-y; outline: none; }
.stage::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1.4px); background-size: 28px 28px; opacity: .45; pointer-events: none; }
.frame { position: absolute; left: 50%; top: 50%; aspect-ratio: 1000 / 640; width: var(--fw, 90%); transform: translate(-50%, -50%); }
.sc { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; will-change: transform, opacity; }
.lnav { position: absolute; left: var(--gut-l); top: 50%; transform: translateY(-50%); z-index: 5; display: grid; gap: 3px; }
.lnav button { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); font: 600 14px var(--f-body); text-align: left; white-space: nowrap; }
.lnav button:hover { background: color-mix(in srgb, var(--paper) 70%, transparent); color: var(--ink); }
.lnav .sq { width: 26px; height: 26px; border-radius: 8px; background: var(--paper); display: grid; place-items: center; color: var(--ink-2); font: 600 13px var(--f-body); flex: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.lnav button[aria-current="true"] .sq { background: var(--ink); color: var(--paper); box-shadow: none; }
.lnav .ov .sq { color: var(--ink); }
.lnav button[aria-current="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
.lnav .prog { font: 500 12px var(--f-body); color: var(--ink-3); }
.zctl { position: absolute; right: var(--gut-r); bottom: 18px; z-index: 5; display: grid; gap: 6px; }
.zctl button { width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); font-size: 21px; line-height: 1; color: var(--ink); box-shadow: var(--shadow-1); }
.hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 4; background: var(--paper); border-radius: 999px; padding: 8px 16px; font-size: 14px; color: var(--ink-2); box-shadow: var(--shadow-1); white-space: nowrap; transition: opacity .4s; pointer-events: none; }
.panel { background: var(--paper); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.panel .scroll { flex: 1; overflow-y: auto; padding: 26px 30px 26px; display: flex; flex-direction: column; gap: 18px; }
.panel .scroll > * { flex-shrink: 0; }
.panel .foot { border-top: 1px solid var(--line); padding: 12px 30px; display: flex; gap: 10px; justify-content: space-between; align-items: center; background: var(--paper); }
.panel .foot .btn.primary { flex: 1; max-width: 300px; justify-content: space-between; }
.panel .foot .btn.primary span { overflow: hidden; text-overflow: ellipsis; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--panel); color: var(--ink-2); font: 600 14px var(--f-body); box-shadow: inset 0 0 0 1px var(--line); }
.lchip .sq { width: 24px; height: 24px; border-radius: 999px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 600 12px var(--f-body); }
.dots { display: flex; gap: 6px; align-items: center; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink-3); background: transparent; padding: 0; }
.dots button.seen { background: var(--line-2); border-color: var(--line-2); }
.dots button[aria-current="true"] { background: var(--accent); border-color: var(--accent); width: 26px; border-radius: 999px; }
.dots span { font: 500 13px var(--f-body); color: var(--ink-3); margin-left: 4px; }
.panel h1 { font-size: clamp(30px, 2.5vw, 38px); line-height: 1.08; }
.plain { font-size: 18.5px; line-height: 1.62; color: var(--ink); }
.numcard { display: grid; gap: 2px; padding: 4px 0 4px 18px; border-left: 1px solid var(--line-2); }
.numcard b { font: 500 34px/1.05 var(--f-display); color: var(--ink); letter-spacing: -.015em; }
.numcard span { color: var(--ink-2); font-size: 15.5px; }
.playbtn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--paper); text-align: left; color: var(--ink); }
.playbtn:hover { background: var(--panel); border-color: var(--ink-3); }
.playbtn .pi { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; flex: none; }
.playbtn .pi svg { width: 16px; height: 16px; fill: var(--on-accent); margin-left: 2px; }
.playbtn b { display: block; font: 600 15.5px var(--f-body); }
.playbtn span { font-size: 14.5px; color: var(--ink-2); }
.qcard { border-radius: 16px; background: var(--panel); padding: 16px; display: grid; gap: 12px; }
.qcard .qh { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.qcard .qh b { display: inline-flex; align-items: center; gap: 8px; font: 600 14.5px var(--f-body); color: var(--ink-2); }
.qcard .qh b svg { width: 20px; height: 20px; }
.qcard .q { font: 600 17.5px/1.4 var(--f-body); }
.qcard .opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1.5px solid var(--line-2); background: var(--paper); border-radius: 14px; padding: 11px 14px; font-size: 16px; line-height: 1.35; color: var(--ink); }
.opt:hover:not([disabled]) { border-color: var(--ink-3); }
.opt .mk { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center; }
.opt .mk svg { width: 14px; height: 14px; }
.opt.right { border-color: var(--good); background: var(--good-t); }
.opt.right .mk { background: var(--good); border-color: var(--good); color: var(--paper); }
.opt.wrong { border-color: var(--bad); background: var(--bad-t); }
.opt.wrong .mk { background: var(--bad); border-color: var(--bad); color: var(--paper); }
.opt[disabled] { cursor: default; }
.fb { font-size: 15.5px; line-height: 1.5; }
.fb b { font-weight: 700; }
.fb.good b { color: var(--good); }
.fb.bad b { color: var(--bad); }
.others { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.others button { width: 26px; height: 26px; border-radius: 8px; border: 0; background: var(--paper); color: var(--ink-2); font: 600 12px var(--f-body); padding: 0; box-shadow: inset 0 0 0 1px var(--line-2); }
.others button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); font: 600 14px var(--f-body); text-decoration: underline; text-underline-offset: 3px; }
details.tech { border-radius: 16px; border: 1px solid var(--line); }
details.tech summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; cursor: pointer; font: 600 15.5px var(--f-body); }
details.tech summary::-webkit-details-marker { display: none; }
details.tech summary .sub { font: 400 14px var(--f-body); color: var(--ink-3); display: block; margin-top: 2px; }
details.tech summary svg { width: 20px; height: 20px; transition: transform .2s; flex: none; }
details.tech[open] summary svg { transform: rotate(180deg); }
details.tech .tb { padding: 0 16px 16px; display: grid; gap: 12px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); margin: 0; }
.facts div { background: var(--paper); padding: 10px 12px; }
.facts div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.facts dt { font: 600 12px var(--f-body); color: var(--ink-3); }
.facts dd { margin: 2px 0 0; font: 500 20px/1.2 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.topics { display: flex; flex-wrap: wrap; gap: 6px; }
.endcard { display: grid; gap: 12px; padding: 18px; border-radius: 16px; background: var(--panel); }
.endcard .row { display: flex; flex-wrap: wrap; gap: 8px; }
.overview-list { display: grid; gap: 6px; }
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.ways a { display: grid; gap: 2px; padding: 12px 14px; background: var(--paper); text-decoration: none; color: var(--ink); }
.ways a:hover { background: var(--panel); }
.ways a[aria-current="page"] { background: var(--panel); }
.ways b { font: 600 15px var(--f-body); }
.ways a:not([aria-current]) b::after { content: " \2192"; color: var(--accent); }
.ways span { font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.overview-list { gap: 0 !important; border-top: 1px solid var(--line); }
.overview-list button { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: var(--paper); border-radius: 0; padding: 11px 4px; color: var(--ink); }
.overview-list button:hover { background: var(--panel); }
.overview-list .sq { width: 30px; height: 30px; border-radius: 999px; background: var(--paper); display: grid; place-items: center; color: var(--ink-2); font: 600 13px var(--f-body); box-shadow: inset 0 0 0 1px var(--line-2); }
.overview-list b { display: block; font: 600 16px var(--f-body); }
.overview-list span { font-size: 14px; color: var(--ink-2); }
.overview-list em { font-style: normal; font-size: 13px; color: var(--ink-3); }

/* ---------- scene drawing vocabulary ---------- */
.sc .w { fill: var(--sc-card); stroke: var(--sc-line); stroke-width: 2; }
.sc .p { fill: var(--sc-soft); }
.sc .L { fill: var(--L); }
.sc .Lt { fill: var(--Lt); stroke: color-mix(in srgb, var(--L) 55%, transparent); stroke-width: 2; }
.sc .Li { fill: var(--Li); }
.sc .Ls { fill: none; stroke: var(--L); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.sc .Ls.thick { stroke-width: 6; }
.sc .o { fill: none; stroke: var(--sc-line); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sc .o.thick { stroke-width: 4; }
.sc .arr { fill: none; stroke: var(--ink-3); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sc .arr.thick { stroke-width: 4; }
.sc .arr.L { stroke: var(--L); }
.sc .grid { fill: none; stroke: var(--line); stroke-width: 1.5; }
.sc .gridw { stroke: rgb(255 255 255 / .35); stroke-width: 1.5; }
.sc .lab { fill: var(--ink); font: 600 23px var(--f-body); }
.sc .lab.sm { font-size: 20px; }
.sc .lab.on { fill: var(--on-accent); }
.sc .cap { fill: var(--ink-2); font: 400 18px var(--f-body); }
.sc .cap.sm { font-size: 15.5px; }
.sc .tok { fill: var(--ink); font: 500 18px var(--f-body); }
.sc .big-tok { font-size: 22px; font-weight: 700; }
.sc .tok.dim { fill: var(--ink-3); }
.sc .mono { fill: var(--ink-2); font: 500 16px var(--f-mono); }
.sc .big { fill: var(--ink); font: 500 54px var(--f-display); letter-spacing: -.015em; }
.sc .ico { fill: none; stroke: var(--Li); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sc .ico.big { stroke-width: 2.6; }
.sc .ico.on { stroke: var(--on-accent); }
.sc .ico.good { stroke: var(--good); stroke-width: 3; }
.sc .ico.bad { stroke: var(--bad); stroke-width: 3; }
.sc .ico.house { fill: var(--Lt); stroke: var(--L); stroke-width: 1.5; }
.sc .ico.dropf { fill: var(--Lt); stroke: var(--Li); }
.sc .shadow { filter: url(#soft); }
.sc .slot { fill: var(--sc-card); stroke: var(--Li); stroke-width: 2.5; stroke-dasharray: 8 7; }
.sc .best { stroke: var(--L); stroke-width: 3; }
.sc .pick { fill: var(--Lt); stroke: var(--L); stroke-width: 2; }
.sc .needle { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.sc .needle.thick { stroke-width: 4.5; }
.sc .gauge { fill: none; stroke: var(--Lt); stroke-width: 24; stroke-linecap: round; }
.sc .dashed { stroke-dasharray: 10 12; stroke-width: 3; }
.sc .loop { stroke-width: 10; opacity: .85; }
.sc .badge { fill: var(--paper); stroke: var(--line-2); stroke-width: 1.5; }
.sc .badge-n { fill: var(--ink-2); font: 600 15px var(--f-body); }
.sc .lead { stroke: var(--line-2); stroke-width: 2; }
.sc .chan { fill: var(--sc-soft); stroke: var(--sc-line); stroke-width: 2; transition: fill .3s; }
.sc.gate-on .chan { fill: color-mix(in srgb, var(--L) 35%, var(--sc-soft)); }
.sc .e { fill: var(--Li); opacity: 0; }
.sc.gate-on .e { opacity: 1; animation: drift 1.5s linear infinite; }
.sc .bit { font: 800 96px var(--f-display); fill: var(--ink); }
.sc .bit.on, .sc .cap.on { display: none; }
.sc.gate-on .bit.off, .sc.gate-on .cap.off { display: none; }
.sc.gate-on .bit.on, .sc.gate-on .cap.on { display: inline; }
.sc .gate { cursor: pointer; }
.sc .gate:focus { outline: none; }
.sc .core { animation: wave 2.8s ease-in-out infinite; }
.sc .turb { animation: spin 5s linear infinite; }
.sc .flow { stroke-dasharray: 8 14; animation: flow 1.3s linear infinite; }
.sc .pipeH { fill: none; stroke: var(--warm); stroke-width: 9; stroke-linecap: round; }
.sc .pipeC { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; }
.sc .Wf { fill: var(--warm); }
.sc .Ws { fill: none; stroke: var(--warm); stroke-width: 4; stroke-linecap: round; }
.sc .pipeH.flow, .sc .pipeC.flow { stroke-dasharray: 18 10; }
.sc .cold { fill: var(--cold); }
.sc .hot { fill: var(--hot); }
.sc .hatch { stroke: var(--L); stroke-width: 2.5; stroke-dasharray: 7 6; }
.sc .beam { fill: none; stroke: var(--L); stroke-width: 5; stroke-dasharray: 3 6; stroke-linecap: round; }
.sc .blink { animation: blink 1s steps(2) infinite; }
.sc .rt { transition: opacity .15s; }
.sc .qt { cursor: pointer; }
.sc .qt:focus { outline: none; }
.sc .qt.sel rect, .sc .qt:focus-visible rect { fill: var(--Lt); stroke: var(--L); stroke-width: 3; }
.sc .arc { fill: none; stroke: var(--L); stroke-linecap: round; }
.sc .dice { animation: wobble 3s ease-in-out infinite; transform-origin: 845px 418px; }
/* the stack has no selected layer: the layer under the pointer (or tapped, or focused) is lifted, and zooming goes into it */
.sc .slab .hit { fill: transparent; stroke: none; }
.sc .slab .lift { transition: transform .25s; pointer-events: none; }
.sc .slab .st { fill: var(--slab); stroke: var(--slab-line); stroke-width: 1.5; transition: stroke .2s; }
.sc .slab .sl { fill: var(--slab-l); stroke: var(--slab-line); stroke-width: 1; }
.sc .slab .sr { fill: var(--slab-r); stroke: var(--slab-line); stroke-width: 1; }
.sc .slab .sico { fill: none; stroke: var(--slab-ico); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sc .slab.hov .lift, .sc .slab:focus-visible .lift { transform: translateY(-7px); }
.sc .slab:focus { outline: none; }
.sc .slab.hov .st, .sc .slab:focus-visible .st { stroke: var(--accent); }
.sc .slabel .badge { transition: stroke .2s; }
.sc .slabel.hov .badge { stroke: var(--accent); }
.sc .slabel.hov .badge-n { fill: var(--accent); }
.sc .hotring { cursor: pointer; }
.sc .hotring rect { fill: color-mix(in srgb, var(--L) 10%, transparent); stroke: var(--Li); stroke-width: 3; stroke-dasharray: 10 8; animation: ring 2.4s ease-in-out infinite; }
.sc .hotring:hover rect, .sc .hotring:focus rect { fill: color-mix(in srgb, var(--L) 20%, transparent); stroke-dasharray: none; }
.sc .hotring text { fill: var(--accent-i); font: 600 16px var(--f-body); }
.sc .hotring:focus { outline: none; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(220px); } }
@keyframes wave { 0%, 100% { fill: var(--Lt); } 45% { fill: var(--L); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { to { stroke-dashoffset: -44; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes ring { 50% { stroke-opacity: .45; } }
@keyframes wobble { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-12deg); } 86% { transform: rotate(10deg); } 94% { transform: rotate(-4deg); } }

/* ---------- views ---------- */
.view-pad { max-width: 1240px; margin: 0 auto; padding-block: 34px 90px; padding-left: var(--gut-l); padding-right: var(--gut-r); display: grid; gap: 22px; }
.vhead { display: grid; gap: 8px; max-width: 760px; }
.vhead h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.04; }
.vhead p { font-size: 19px; color: var(--ink-2); line-height: 1.5; }
.labpick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.labcard { text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 18px; padding: 16px; display: grid; gap: 8px; align-content: start; color: var(--ink); }
.labcard:hover { border-color: var(--ink-3); }
.labcard[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.labcard .li { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); display: grid; place-items: center; }
.labcard .li svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.labcard b { font: 500 20px var(--f-display); }
.labcard span { font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.labcard em { font-style: normal; font: 600 12.5px var(--f-body); color: var(--ink-3); }
.labhost { border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: var(--paper); min-height: 400px; }
@media (max-width: 960px) { .labpick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .labhost { padding: 16px; } }

/* quiz page */
.quizwrap { max-width: 880px; margin: 0 auto; padding-block: 34px 90px; padding-left: var(--gut-l); padding-right: var(--gut-r); display: grid; gap: 22px; }
.qprog { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.qprog button { border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 10px; text-align: left; display: grid; gap: 6px; color: var(--ink); }
.qprog button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.qprog b { font: 600 14px var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qprog .bar { height: 6px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.qprog .bar i { display: block; height: 100%; background: var(--accent); }
.qprog span { font: 500 12.5px var(--f-body); color: var(--ink-3); }
.qbig { border-radius: 20px; border: 1px solid var(--line); padding: 26px; display: grid; gap: 16px; background: var(--paper); }
.qbig .q { font: 500 clamp(24px, 2.5vw, 30px)/1.25 var(--f-display); }
.qbig .opt { font-size: 17px; padding: 14px 16px; }
.qbig .meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.qbig .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.score { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; color: var(--ink-2); }
.score b { font: 500 24px var(--f-display); color: var(--ink); margin-right: 4px; }
@media (max-width: 760px) { .qprog { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* big picture */
.mapv { display: grid; grid-template-columns: minmax(0, 1fr) 370px; height: calc(100dvh - var(--hh)); min-height: 560px; }
.mapmain { position: relative; overflow: auto; background: var(--stage); }
.mapmain .mhead { position: sticky; left: 0; padding: 22px var(--gut-r) 0 var(--gut-l); display: grid; gap: 6px; max-width: 760px; }
.mapmain .mhead h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.05; }
.mapmain .mhead p { color: var(--ink-2); font-size: 16.5px; }
#mapsvg { display: block; width: 100%; height: auto; }
.band rect { fill: var(--paper); stroke: var(--line); stroke-width: 1; }
.band text.bn { font: 600 15px var(--f-body); fill: var(--ink); }
.band text.bt { font: 400 13px var(--f-body); fill: var(--ink-3); }
.medge { fill: none; stroke: color-mix(in srgb, var(--ink) 16%, transparent); stroke-width: 1.5; transition: opacity .2s, stroke .2s; }
.mapsvg.hov .medge { opacity: .25; }
.mapsvg.hov .medge.nb { opacity: 1; stroke: color-mix(in srgb, var(--ink) 55%, transparent); stroke-width: 2.5; }
.mroute { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 12 9; animation: flow 1.4s linear infinite; }
.mnode { cursor: pointer; }
.mnode circle.ring { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.8; transition: r .15s; }
.mnode.learned circle.ring { stroke: var(--ink); }
.mnode .core { fill: var(--ink); opacity: 0; pointer-events: none; }
.mnode.learned .core { opacity: 1; }
.mnode.inroute .core { opacity: 0; }
.mnode circle.halo { fill: var(--accent); opacity: 0; transition: opacity .2s; }
.mnode:hover circle.halo, .mnode:focus-visible circle.halo { opacity: .22; }
.mnode:focus { outline: none; }
.mnode text { font: 600 13.5px var(--f-body); fill: var(--ink); paint-order: stroke; stroke: var(--stage); stroke-width: 5px; stroke-linejoin: round; pointer-events: none; }
.mnode .num { font: 600 12px var(--f-body); fill: var(--accent-i); stroke: none; }
.mnode.learned .num { fill: var(--paper); }
.mapsvg.hov .mnode:not(.nb):not(.cur) { opacity: .35; }
.mnode.inroute circle.ring { stroke: var(--accent); stroke-width: 3; }
.mnode.inroute.learned circle.ring { fill: var(--accent); stroke: var(--accent); }
.mnode.inroute.learned .num { fill: var(--on-accent); }
.mnode.via circle.ring { stroke-dasharray: 3 3; }
.rpanel { border-left: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; min-height: 0; }
.rpanel .scroll { flex: 1; overflow-y: auto; padding: 22px 24px; display: grid; gap: 14px; align-content: start; }
.rpanel h2 { font-size: 22px; }
.rpanel .learned { display: grid; gap: 6px; }
.rpanel .learned .bar { height: 8px; border-radius: 8px; background: var(--panel-2); overflow: hidden; }
.rpanel .learned .bar i { display: block; height: 100%; background: var(--good); }
.rlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
.rlist li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 8px 0; position: relative; }
.rlist li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: -8px; width: 2px; background: var(--line); }
.rlist li:last-child::before { display: none; }
.rlist .n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 600 13px var(--f-body); z-index: 1; }
.rlist li.via .n { background: var(--paper); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.rlist b { font: 600 15.5px var(--f-body); display: block; }
.rlist span { font-size: 14px; color: var(--ink-2); display: block; line-height: 1.45; }
.rlist button { margin-top: 4px; }
.rpanel .foot { border-top: 1px solid var(--line); padding: 12px 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.mtip { position: absolute; z-index: 6; pointer-events: none; background: var(--paper); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-2); max-width: 260px; font-size: 14px; line-height: 1.45; opacity: 0; transition: opacity .12s; }
.mtip b { display: block; font: 600 15.5px var(--f-body); margin-bottom: 2px; }
.mtip.show { opacity: 1; }

/* ---------- sheet (labs over the explorer) and drawer ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 70; opacity: 0; transition: opacity .25s; }
.scrim.open { opacity: 1; }
.sheet { position: fixed; z-index: 75; left: 50%; top: 50%; width: min(1180px, calc(100% - 48px)); height: min(900px, calc(100dvh - 48px)); transform: translate(-50%, -46%); opacity: 0; transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .25s; background: var(--paper); border-radius: 22px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; overflow: hidden; }
.sheet.open { transform: translate(-50%, -50%); opacity: 1; }
.sheet .sh { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 16px 24px; border-bottom: 1px solid var(--line); }
.sheet .sh h2 { font-size: 22px; }
.sheet .sb { flex: 1; overflow-y: auto; padding: 24px; }
@media (max-width: 700px) { .sheet { width: 100%; height: 100%; border-radius: 0; top: 0; left: 0; transform: translateY(4%); } .sheet.open { transform: none; } .sheet .sb { padding: 16px var(--gut-r) 40px var(--gut-l); } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--paper); z-index: 80; transform: translateX(104%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; overscroll-behavior: contain; box-shadow: var(--shadow-2); padding: calc(20px + env(safe-area-inset-top, 0px)) max(26px, env(safe-area-inset-right, 0px)) 60px 26px; }
.drawer.open { transform: none; }
.drawer .x { position: sticky; top: 0; float: right; margin: -4px -6px 0 12px; }
@media (max-width: 700px) { .drawer { top: auto; height: 84%; width: 100%; border-radius: 22px 22px 0 0; transform: translateY(104%); padding-left: var(--gut-l); padding-right: var(--gut-r); } }
.node .ghd { display: inline-flex; align-items: center; gap: 8px; font: 600 13px var(--f-body); color: var(--ink-2); background: var(--panel); padding: 4px 12px 4px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.node h2 { font-size: 30px; line-height: 1.1; margin-top: 14px; }
.node .kick { font-size: 18px; line-height: 1.45; color: var(--ink-2); margin-top: 8px; }
.node .body { display: grid; gap: 12px; margin-top: 16px; font-size: 16px; line-height: 1.62; }
.node .facts { margin-top: 18px; }
.node h3 { font: 700 13px var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-top: 22px; }
.node .links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.srcs { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.srcs a { color: var(--ink-2); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.srcs a:hover { color: var(--link); }
.node .goto { margin-top: 18px; }

/* ---------- labs ---------- */
.lab { display: grid; gap: 18px; }
.lab .lh { display: grid; gap: 6px; }
.lab .lh h3 { font-size: 28px; line-height: 1.12; }
.lab .lh p { color: var(--ink-2); font-size: 16.5px; max-width: 68ch; }
.lab .card { border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; gap: 14px; background: var(--paper); min-width: 0; }
.lab .note { font-size: 14px; color: var(--ink-3); line-height: 1.5; }
.lab .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lab .two { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.lab .ctl { display: grid; grid-template-columns: 130px minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: 15px; }
.lab .ctl output { font: 600 14px var(--f-mono); color: var(--ink-2); text-align: right; }
.lab textarea { width: 100%; min-height: 80px; resize: vertical; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--paper); padding: 12px 14px; font-size: 16px; line-height: 1.5; }
.lab .toks { display: flex; flex-wrap: wrap; gap: 4px; }
.lab .toks span { display: inline-grid; padding: 7px 7px 6px; border-radius: 8px; font: 500 15px var(--f-mono); white-space: pre; gap: 3px; background: var(--Lt); }
.lab .toks span:nth-child(3n+2) { background: color-mix(in srgb, var(--L) 34%, var(--paper)); }
.lab .toks span:nth-child(3n) { background: color-mix(in srgb, var(--L) 18%, var(--paper)); }
.lab .toks span i { font-style: normal; font-size: 11px; color: var(--ink-3); }
.lab .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0; }
.lab .stats div { background: var(--paper); padding: 10px 12px; }
.lab .stats dt { font: 600 12px var(--f-body); color: var(--ink-3); }
.lab .stats dd { margin: 2px 0 0; font: 500 24px var(--f-display); font-variant-numeric: tabular-nums; }
.lab svg.plot { width: 100%; display: block; background: var(--panel); border-radius: 16px; }
.lab .plot .pt { cursor: pointer; }
.lab .plot .pt circle { fill: var(--g); stroke: var(--paper); stroke-width: 2; }
.lab .plot .pt text { font: 500 13px var(--f-body); fill: var(--ink-2); }
.lab .plot.focus .pt { opacity: .3; }
.lab .plot.focus .pt.on { opacity: 1; }
.lab .plot .pt.on text { fill: var(--ink); font-weight: 700; }
.lab .plot .nb { stroke: var(--ink-3); stroke-dasharray: 3 4; }
.lab .plot .vec { stroke-width: 3; fill: none; }
.lab .plot .res { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.lab .plot .clabel { font: 600 14px var(--f-display); fill: var(--ink-3); }
.lab .att-wrap { overflow-x: auto; }
.lab svg.att { display: block; min-width: 640px; width: 100%; }
.lab .att .tk { cursor: pointer; }
.lab .att .tk rect { fill: var(--paper); stroke: var(--line-2); stroke-width: 1.5; }
.lab .att .tk text { font: 500 15px var(--f-body); fill: var(--ink); }
.lab .att .tk.q rect { fill: var(--Lt); stroke: var(--L); stroke-width: 2.5; }
.lab .att .arc { fill: none; stroke: var(--L); stroke-linecap: round; }
.lab .att .w { font: 600 12px var(--f-mono); fill: var(--Li); }
.lab .bars { display: grid; gap: 7px; }
.lab .bar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 58px 44px; gap: 10px; align-items: center; font-size: 15px; }
.lab .bar .w { font: 500 14px var(--f-mono); white-space: pre; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.lab .bar .track { height: 18px; background: var(--panel); border-radius: 6px; overflow: hidden; }
.lab .bar .track i { display: block; height: 100%; background: var(--L); transition: width .25s; border-radius: 6px; }
.lab .bar.out { opacity: .35; }
.lab .bar.picked .track i { background: var(--Li); }
.lab .bar .p, .lab .bar .c { font: 500 13px var(--f-mono); color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.lab .prompt { font: 500 23px/1.35 var(--f-display); background: var(--panel); border-radius: 14px; padding: 12px 16px; }
.lab .prompt b { color: var(--Li); }
.lab .stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; }
.lab .stepper button { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 9px 12px; display: grid; gap: 1px; color: var(--ink-2); }
.lab .stepper button b { font: 600 12px var(--f-body); color: var(--ink-3); }
.lab .stepper button span { font: 600 14.5px var(--f-body); }
.lab .stepper button[aria-current="step"] { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.lab .stepper button.done b { color: var(--good); }
.lab canvas.chart { width: 100%; height: 210px; display: block; background: var(--panel); border-radius: 14px; }
.lab .log { display: grid; gap: 6px; font: 500 14px var(--f-mono); }
.lab .log div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--panel); overflow-wrap: anywhere; }
.lab .log div b { font-weight: 600; color: var(--ink-3); }
.lab .ab { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lab .ab button { text-align: left; border: 1px solid var(--line-2); background: var(--paper); border-radius: 18px; padding: 16px; display: grid; gap: 10px; min-height: 110px; color: var(--ink); }
.lab .ab button:hover { border-color: var(--L); background: var(--Lt); }
.lab .ab .lbl { font: 700 12px var(--f-body); color: var(--ink-3); letter-spacing: .08em; }
.lab .ab .smp { font: 500 17px/1.5 var(--f-mono); overflow-wrap: anywhere; }
.lab .meter { height: 10px; background: var(--panel); border-radius: 999px; overflow: hidden; }
.lab .meter i { display: block; height: 100%; width: 0; background: var(--L); transition: width .3s; }
.lab .alert { border: 2px solid var(--bad); background: var(--bad-t); border-radius: 16px; padding: 12px 14px; font-size: 15.5px; }
.lab .alert b { color: var(--bad); }
.lab .scale { display: grid; gap: 14px; }
.lab .srow { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; align-items: center; }
.lab .srow .k { font-size: 15px; color: var(--ink-2); }
.lab .sbars { display: grid; gap: 4px; }
.lab .sbar { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 10px; align-items: center; font: 500 13px var(--f-mono); }
.lab .sbar i { display: block; height: 12px; border-radius: 5px; background: var(--L); min-width: 3px; }
.lab .sbar.big i { background: var(--ink-3); }
.lab .side { display: grid; gap: 12px; position: sticky; top: 0; }
.lab .heat { width: 100%; aspect-ratio: 1; display: block; border-radius: 12px; cursor: crosshair; background: var(--panel); }
.lab .tip { font: 500 13px var(--f-mono); color: var(--ink-2); min-height: 18px; }
.lab .live { font: 500 15px var(--f-mono); background: var(--panel); border-radius: 12px; padding: 10px 12px; min-height: 48px; overflow-wrap: anywhere; }
.lab .ro { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 0; }
.lab .ro div { background: var(--paper); padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.lab .ro dt { font: 600 12.5px var(--f-body); color: var(--ink-3); }
.lab .ro dd { margin: 0; font: 500 28px/1.1 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.lab .ro dd sup { font-size: .55em; }
.lab .ro span { font-size: 13px; color: var(--ink-2); }
.lab .status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--panel); font-size: 15px; }
.lab .status i { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--good); }
.lab .status.warn i { background: var(--warm); }
.lab canvas.plane { width: 100%; aspect-ratio: 4 / 3; display: block; border-radius: 14px; background: var(--panel); cursor: crosshair; }
.lab canvas.lossc { width: 100%; height: 200px; display: block; border-radius: 14px; background: var(--panel); }
.lab .console { font: 500 13.5px/1.6 var(--f-mono); background: var(--panel); border-radius: 12px; padding: 10px 12px; height: 160px; overflow-y: auto; color: var(--ink-2); }
.lab .console .ev { color: var(--warm); }
.lab .console .ok { color: var(--good); }
.lab .hbar { height: 8px; background: var(--panel); border-radius: 999px; overflow: hidden; }
.lab .hbar i { display: block; height: 100%; width: 0; background: var(--L); }
.lab .eq { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.lab .eq div { border-radius: 16px; background: var(--panel); padding: 16px; display: grid; gap: 4px; }
.lab .eq b { font: 500 30px/1.05 var(--f-display); color: var(--ink); }
.lab .eq span { font-size: 14.5px; color: var(--ink-2); }
.lab .bigtoggle { width: 140px; height: 140px; border-radius: 32px; border: 0; background: var(--panel); display: grid; place-items: center; font: 800 64px var(--f-display); color: var(--ink-3); transition: background .2s, color .2s; }
.lab .bigtoggle[aria-pressed="true"] { background: var(--L); color: var(--ink); }
.lab details.more summary { cursor: pointer; font: 700 15px var(--f-display); padding: 6px 0; }
@media (max-width: 900px) { .lab .two { grid-template-columns: 1fr; } .lab .side { position: static; } .lab .ro { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .lab .stepper { grid-template-columns: repeat(5, minmax(118px, 1fr)); overflow-x: auto; }
  .lab .ab { grid-template-columns: 1fr; }
  .lab .srow { grid-template-columns: 1fr; gap: 4px; }
  .lab .sbar { grid-template-columns: minmax(0, 1fr) 130px; }
  .lab .bar { grid-template-columns: 84px minmax(0, 1fr) 50px 36px; }
  .lab .ctl { grid-template-columns: 96px minmax(0, 1fr) 56px; }
}

/* ---------- responsive explore ---------- */
@media (max-width: 1499px) { .lnav .nm, .lnav .prog { display: none; } .lnav button { padding: 5px; } .lnav .sq { width: 30px; height: 30px; } }
@media (max-width: 900px) {
  .explore { grid-template-columns: 1fr; grid-template-rows: 54vh auto; height: auto; min-height: 0; }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .panel .scroll { overflow: visible; padding: 20px var(--gut-r) 20px var(--gut-l); }
  .panel .foot { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); padding: 10px var(--gut-r) 10px var(--gut-l); }
  .lnav { top: 12px; left: 0; right: 0; transform: none; display: flex; justify-content: center; gap: 2px; padding-left: var(--gut-l); padding-right: var(--gut-r); }
  .lnav .sq { width: 24px; height: 24px; }
  .zctl { bottom: 12px; }
  .zctl button { width: 38px; height: 38px; }
  .hint { bottom: 14px; font-size: 13px; }
  .sc .lab { font-size: 30px; }
  .sc .lab.sm { font-size: 25px; }
  .sc .cap { font-size: 23px; }
  .sc .cap.sm, .sc .hotring text { display: none; }
  .sc .mono { font-size: 20px; }
  .mapv { grid-template-columns: 1fr; height: auto; }
  .mapmain { overflow: visible; }
  .rpanel { border-left: 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
