/* Infra Lab. One accent (link-LED green), cool neutrals, pill controls, 16px cards, 10px inputs. */
:root {
  --bg: #f2f4f3; --surface: #ffffff; --surface-2: #e8ecea; --ink: #101816; --muted: #52605b;
  --line: rgb(16 24 22 / 0.11); --accent: #0b7f41; --accent-ink: #ffffff; --accent-soft: rgb(11 127 65 / 0.1);
  --bad: #c62f34; --warn: #9a5b00; --glass: rgb(255 255 255 / 0.82); --shadow: 0 10px 34px rgb(22 40 34 / 0.12);
  --scene-bg: #e4e9e6; --scene-bench: #d3d9d5; --scene-mat: #25312e; --scene-dark: 0;
  --term-bg: #0c1210; --term-ink: #d5e6dc;
  --r-card: 16px; --r-in: 10px;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif; --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1211; --surface: #151c1a; --surface-2: #1c2523; --ink: #e8efec; --muted: #9babA5;
    --line: rgb(232 239 236 / 0.12); --accent: #3ddc84; --accent-ink: #05130c; --accent-soft: rgb(61 220 132 / 0.12);
    --bad: #ff6b6b; --warn: #f0b34a; --glass: rgb(21 28 26 / 0.84); --shadow: 0 10px 34px rgb(0 0 0 / 0.45);
    --scene-bg: #101615; --scene-bench: #1a2220; --scene-mat: #0b100f; --scene-dark: 1;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2 { letter-spacing: -0.035em; line-height: 1.05; font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 22ch; }
h3 { font-size: 1.25rem; letter-spacing: -0.015em; font-weight: 600; margin-top: 3.5rem; }
h4 { font-size: 0.95rem; font-weight: 600; }
p { text-wrap: pretty; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: 0.88em; background: var(--surface-2); padding: 0.1em 0.38em; border-radius: 6px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 999px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section.tint { background: var(--surface-2); }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 62ch; margin-top: 16px; }
.sub { color: var(--muted); margin-top: 6px; }
.note { color: var(--muted); font-size: 0.875rem; margin-top: 14px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; text-decoration: none; color: var(--ink); white-space: nowrap; transition: transform 0.15s, background 0.15s, border-color 0.15s; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { height: 34px; padding: 0 14px; font-size: 0.875rem; }
.btn.ghost { background: transparent; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-size: 18px; transition: transform 0.15s, border-color 0.15s; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:active { transform: scale(0.94); }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); gap: 2px; }
.seg button { border: 0; background: transparent; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.seg.small button { height: 30px; padding: 0 12px; font-size: 0.8125rem; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; flex: 1; min-width: 60px; }
.meter span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; height: 64px; z-index: 40; display: flex; align-items: center; gap: 24px; padding: 0 24px; transition: background 0.25s, box-shadow 0.25s; }
.nav.solid { background: var(--glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.02em; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.brand i { font-size: 22px; color: var(--accent); }
.nav nav { display: flex; gap: 4px; margin-left: auto; }
.nav nav a { padding: 7px 13px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; white-space: nowrap; }
.nav nav a:hover, .nav nav a.on { color: var(--ink); background: var(--surface-2); }
@media (max-width: 860px) { .nav nav { display: none; } .nav .icon-btn { margin-left: auto; } }

/* ---------- hero ---------- */
.hero { position: relative; height: 100dvh; min-height: 620px; overflow: hidden; background: var(--scene-bg); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.hero canvas:active { cursor: grabbing; }
.pins { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pins.off { display: none; }
.pin { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 999px; border: 1.5px solid var(--surface); background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 11px; font-weight: 600; display: grid; place-items: center; padding: 0; pointer-events: auto; transition: opacity 0.2s, background 0.15s, scale 0.15s; box-shadow: 0 2px 8px rgb(0 0 0 / 0.3); }
.pin:hover { background: var(--accent); color: var(--accent-ink); scale: 1.25; }
.tip { position: absolute; left: 0; top: 0; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 0.8125rem; padding: 5px 10px; border-radius: 8px; white-space: nowrap; z-index: 5; font-weight: 500; }
.hero-card, .hud, .part-note { position: absolute; left: 24px; background: var(--glass); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.hero-card { top: 88px; width: min(390px, calc(100% - 48px)); padding: 26px 26px 24px; }
.kicker { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.hero-card h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-top: 10px; }
.tagline { color: var(--muted); font-size: 1.05rem; margin-top: 8px; }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.part-note { top: 330px; width: min(390px, calc(100% - 48px)); padding: 16px 44px 16px 18px; font-size: 0.925rem; }
.part-note strong { display: block; margin-bottom: 4px; }
.part-note p { color: var(--muted); }
.part-note button { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border: 0; background: transparent; border-radius: 999px; font-size: 16px; }
.hud { top: 88px; width: min(390px, calc(100% - 48px)); padding: 20px 22px; }
.hud-top { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 10px; }
.hud-q { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.hud-msg { color: var(--muted); margin-top: 8px; min-height: 1.6em; transform-origin: left; }
.hud-msg.good { color: var(--accent); font-weight: 500; }
.hud-msg.bad { color: var(--bad); font-weight: 500; }
.hud .meter { margin: 4px 0 6px; }
.hud-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.hero-bottom { position: absolute; left: 0; right: 0; bottom: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; justify-items: center; padding: 0 16px; pointer-events: none; }
.hero-bottom > * { pointer-events: auto; }
.toolbar, .dock { background: var(--glass); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 100%; }
.toolbar { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.toolbar .seg { background: transparent; padding: 0; }
.tool { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 999px; border: 0; background: transparent; font-size: 0.875rem; font-weight: 500; color: var(--muted); white-space: nowrap; transition: transform 0.15s; }
.tool:hover { color: var(--ink); background: var(--surface-2); }
.tool:active { transform: scale(0.95); }
.tool[aria-pressed="true"] { color: var(--ink); background: var(--surface-2); }
.tool i { font-size: 17px; }
.tool.strong { background: var(--ink); color: var(--bg); }
.tool.strong:hover { background: var(--accent); color: var(--accent-ink); }
.dock { display: flex; gap: 4px; padding: 6px; border-radius: 22px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.dock button { flex: 0 0 auto; width: 118px; display: grid; justify-items: center; gap: 2px; padding: 6px 6px 8px; border-radius: 16px; border: 1.5px solid transparent; background: transparent; font-size: 0.75rem; font-weight: 500; color: var(--muted); scroll-snap-align: center; transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s; }
.dock button img { width: 100px; height: 64px; object-fit: contain; display: block; }
.dock button:hover { transform: translateY(-3px); color: var(--ink); }
.dock button[aria-selected="true"] { background: var(--surface); border-color: var(--accent); color: var(--ink); }
body.mode .dock { display: none; }
@media (max-width: 980px) {
  .hero-card, .hud { top: 76px; left: 16px; padding: 18px; }
  .hero-card h1 { font-size: 1.7rem; }
  .part-note { top: auto; bottom: 210px; left: 16px; }
  .toolbar { flex-wrap: wrap; justify-content: center; border-radius: 22px; }
  #t-zoom-in, #t-zoom-out { display: none; }
  .tool span { display: none; }
  .tool.strong span { display: inline; }
  .dock button { width: 96px; }
  .dock button img { width: 80px; height: 50px; }
}

/* ---------- lab ---------- */
.lab { max-width: 1400px; margin: 44px auto 0; width: calc(100% - 32px); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); display: grid; grid-template-rows: auto auto; }
.lab-stage { position: relative; height: clamp(340px, 54dvh, 600px); background: var(--scene-bg); }
.lab-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.lab-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 10px; pointer-events: none; }
.lab-top > * { pointer-events: auto; }
.lab-top .seg { background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.lab-top-right { display: flex; gap: 6px; }
.cable-dock { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: calc(100% - 24px); }
.cable-dock button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px 0 10px; border-radius: 999px; border: 1.5px solid transparent; background: transparent; font-size: 0.875rem; font-weight: 500; white-space: nowrap; transition: transform 0.15s; }
.cable-dock button:active { transform: scale(0.95); }
.cable-dock button[aria-pressed="true"] { background: var(--surface); border-color: var(--ink); }
.swatch { width: 18px; height: 18px; border-radius: 999px; background: var(--c); box-shadow: inset 0 0 0 2px rgb(0 0 0 / 0.15); }
#lab-status { font-size: 0.8125rem; color: var(--muted); padding: 0 12px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.toast { position: absolute; left: 50%; bottom: 70px; translate: -50% 0; max-width: min(560px, calc(100% - 32px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-size: 0.9rem; z-index: 6; box-shadow: var(--shadow); }
.toast.bad { background: var(--bad); color: #fff; }
.why { position: absolute; right: 12px; top: 62px; width: min(340px, calc(100% - 24px)); display: flex; gap: 10px; align-items: flex-start; background: var(--glass); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 10px 12px 14px; font-size: 0.875rem; box-shadow: var(--shadow); }
.why > i { font-size: 20px; color: var(--warn); margin-top: 1px; }
.why strong { display: block; }
.why span { color: var(--muted); }
.why button { border: 0; background: transparent; font-size: 16px; padding: 4px; border-radius: 999px; }
.lab-panels { display: grid; grid-template-columns: minmax(280px, 0.8fr) 1.2fr; border-top: 1px solid var(--line); height: 392px; }
.panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.missions { padding: 18px 20px; border-right: 1px solid var(--line); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; }
.panel-head label { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
select { height: 36px; border-radius: var(--r-in); border: 1px solid var(--line); background: var(--surface); padding: 0 10px; flex: 1; min-width: 0; font-weight: 500; }
.mission-intro { color: var(--muted); font-size: 0.9rem; margin: 10px 0 8px; }
.steps { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: grid; gap: 4px; align-content: start; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 8px 10px; border-radius: 12px; font-size: 0.9rem; line-height: 1.45; color: var(--muted); transform-origin: left center; }
.steps li.current { background: var(--accent-soft); color: var(--ink); }
.steps li.done { color: var(--muted); }
.steps .tick { width: 20px; height: 20px; border-radius: 999px; border: 1.5px solid var(--line); display: grid; place-items: center; margin-top: 1px; font-size: 12px; color: transparent; }
.steps li.current .tick { border-color: var(--accent); }
.steps li.done .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps:empty::after { content: "Free build has no steps. Pick a cable and start connecting."; color: var(--muted); font-size: 0.9rem; padding: 8px 2px; }
.mission-foot { display: flex; align-items: center; gap: 12px; padding-top: 12px; font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
.terminal { background: var(--term-bg); color: var(--term-ink); }
.tabs { display: flex; gap: 2px; padding: 8px 8px 0; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 0; border-radius: 10px 10px 0 0; background: transparent; color: #8ea399; font-size: 0.8125rem; font-weight: 500; font-family: var(--mono); }
.tabs button[aria-selected="true"] { background: #17201d; color: #e6f2ec; }
.tabs button.locked { opacity: 0.6; }
.pc-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: start; padding: 12px 14px; background: #17201d; }
.field { display: grid; gap: 4px; }
.field label { font-size: 0.72rem; color: #9db3a8; }
.field input { height: 34px; border-radius: var(--r-in); border: 1px solid #2c3a35; background: #0c1210; color: #e6f2ec; padding: 0 10px; font-family: var(--mono); font-size: 0.85rem; min-width: 0; width: 100%; }
.field input:focus-visible { outline-color: #3ddc84; }
.field .err { font-size: 0.72rem; color: #ff8a8a; min-height: 1em; }
.pc-form .btn { margin-top: 21px; background: #3ddc84; color: #05130c; border: 0; }
.term-out { flex: 1; overflow-y: auto; padding: 12px 16px 4px; font-family: var(--mono); font-size: 0.8125rem; line-height: 1.5; white-space: pre; background: #17201d; }
.term-line { display: flex; align-items: center; gap: 8px; padding: 8px 16px 12px; background: #17201d; font-family: var(--mono); font-size: 0.8125rem; }
.term-line label { color: #3ddc84; white-space: nowrap; }
.term-line input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #e6f2ec; font-family: var(--mono); font-size: 0.8125rem; caret-color: #3ddc84; height: 28px; }
.term-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; background: #17201d; color: #9db3a8; font-size: 0.9rem; }
.term-empty i { font-size: 34px; color: #3ddc84; }
.term-empty p { max-width: 46ch; }
.lab:fullscreen { width: 100%; max-width: none; margin: 0; border-radius: 0; grid-template-rows: 1fr auto; height: 100dvh; }
.lab:fullscreen .lab-stage { height: auto; }
.lab:fullscreen .lab-panels { height: 340px; }
@media (max-width: 860px) {
  .lab-panels { grid-template-columns: 1fr; height: auto; }
  .missions { border-right: 0; border-bottom: 1px solid var(--line); max-height: 340px; }
  .terminal { height: 400px; }
  .pc-form { grid-template-columns: 1fr 1fr; }
  .pc-form .btn { margin-top: 0; }
  #lab-status { display: none; }
  .lab-top-right #lab-zoom-in, .lab-top-right #lab-zoom-out { display: none; }
}

/* ---------- lesson ---------- */
.short { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; margin-top: 32px; align-items: start; }
.short > p { font-size: 1.2rem; line-height: 1.55; }
.stats { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.stats div { background: var(--surface); padding: 16px; }
.stats dt { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.stats dd { margin: 6px 0 0; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }
.parts { list-style: none; padding: 0; margin: 22px 0 0; columns: 2; column-gap: 14px; }
.parts li { break-inside: avoid; margin-bottom: 10px; }
.parts button { width: 100%; display: grid; grid-template-columns: 30px 1fr; gap: 14px; text-align: left; padding: 15px 16px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); font-size: 0.925rem; line-height: 1.5; color: var(--muted); transition: border-color 0.15s, transform 0.15s; }
.parts button:hover { border-color: var(--ink); transform: translateY(-1px); }
.parts button.on { border-color: var(--accent); background: var(--accent-soft); }
.parts strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.num { width: 28px; height: 28px; border-radius: 999px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-family: var(--mono); font-size: 0.75rem; font-weight: 600; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 3.5rem; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 24px; }
.list h3 { margin-top: 0; font-size: 1.05rem; }
.list ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.list li { position: relative; padding-left: 20px; color: var(--muted); font-size: 0.95rem; }
.list li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--muted); opacity: 0.5; }
.list.good li::before { background: var(--accent); opacity: 1; }
.list.warn li::before { background: var(--warn); opacity: 1; border-radius: 999px; }
.concepts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 36px; margin-top: 20px; }
.concepts p { color: var(--muted); font-size: 0.95rem; margin-top: 4px; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 20px; }
.spec-group { background: var(--surface-2); border-radius: var(--r-card); padding: 20px 22px; }
.spec-group h4 { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 500; }
.spec-group dl { margin: 12px 0 0; display: grid; gap: 12px; }
.spec-group dt { font-size: 0.8125rem; color: var(--muted); }
.spec-group dd { margin: 1px 0 0; font-weight: 500; }
.code { margin: 20px 0 0; border-radius: var(--r-card); overflow: hidden; background: var(--term-bg); color: var(--term-ink); }
.code figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; font-size: 0.9rem; background: #17201d; color: #c6d8ce; }
.code .btn { background: transparent; color: #e6f2ec; border-color: #33423c; flex: 0 0 auto; }
.code pre { margin: 0; padding: 20px; overflow-x: auto; font-size: 0.875rem; line-height: 1.6; }
.code code { background: none; padding: 0; font-size: inherit; }
@media (max-width: 860px) { .short, .two { grid-template-columns: 1fr; gap: 20px; } .parts { columns: 1; } .stats { grid-template-columns: repeat(2, 1fr); } .section { padding: 64px 0; } }

/* ---------- practice ---------- */
.practice { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; margin-top: 40px; }
.practice article { border-radius: 22px; padding: 32px; display: grid; gap: 14px; align-content: start; justify-items: start; }
.practice h3 { margin-top: 0; font-size: 1.5rem; }
.practice .big { font-size: 38px; }
.practice-a { background: var(--ink); color: var(--bg); }
.practice-a p { opacity: 0.78; max-width: 52ch; }
.practice-a .meta { opacity: 0.6; }
.practice-b { background: var(--surface); border: 1px solid var(--line); }
.practice-b p { color: var(--muted); }
.meta { font-size: 0.85rem; color: var(--muted); }
.practice-a .meta { color: inherit; }
@media (max-width: 860px) { .practice { grid-template-columns: 1fr; } }

/* ---------- topology ---------- */
.topo { margin-top: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; overflow-x: auto; }
.topo svg { display: block; width: 100%; min-width: 760px; height: auto; font-family: var(--sans); }
.topo .tiers text { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.topo .tiers line { stroke: var(--line); stroke-dasharray: 2 5; }
.topo .links path { fill: none; stroke: var(--muted); stroke-width: 1.6; }
.topo .links path.air { stroke-dasharray: 5 5; stroke: var(--accent); }
.topo .links path.wan { stroke-dasharray: 2 4; }
.topo .airlabel { font-size: 11px; fill: var(--muted); }
.topo .nodes rect { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.2; transition: fill 0.15s, stroke 0.15s; }
.topo .nodes .t { font-size: 13.5px; font-weight: 600; fill: var(--ink); text-anchor: middle; }
.topo .nodes .s { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.topo [data-dev] { cursor: pointer; }
.topo [data-dev]:hover rect { stroke: var(--ink); }
.topo [data-dev].on rect { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.topo .cloud rect { fill: transparent; stroke-dasharray: 4 4; stroke: var(--muted); }
.topo .legend text { font-size: 11px; fill: var(--muted); }
.topo .legend line { stroke-width: 1.6; }
.topo .l1 { stroke: var(--muted); } .topo .l2 { stroke: var(--accent); stroke-dasharray: 5 5; } .topo .l3 { stroke: var(--muted); stroke-dasharray: 2 4; }

/* ---------- compare ---------- */
.table-wrap { margin-top: 36px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 900px; font-size: 0.9rem; }
th, td { text-align: left; padding: 13px 16px; white-space: nowrap; }
thead th { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 500; background: var(--surface-2); }
tbody tr { cursor: pointer; transition: background 0.12s; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
tbody tr:hover { background: var(--surface-2); }
tbody tr.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
tbody th { font-weight: 600; }
td { color: var(--muted); }

.footer { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.footer p { max-width: 80ch; }

/* ---------- wireless lab ---------- */
.wlab .lab-panels { grid-template-columns: minmax(300px, 0.9fr) 1.1fr; height: 400px; }
.wlab.placing .lab-stage { outline: 2px dashed var(--accent); outline-offset: -6px; }
.wl-controls, .wl-results { padding: 18px 20px; overflow-y: auto; gap: 12px; }
.wl-controls { border-right: 1px solid var(--line); }
.wl-controls > div { display: grid; gap: 14px; align-content: start; }
.wlab .field label, .wlab .lbl { font-size: 0.78rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.wlab .field output { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.wlab select { width: 100%; }
.wlab input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; margin: 0; }
.wl-add { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.wl-ap { border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; display: grid; gap: 12px; }
.wl-ap-head { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.wl-ap-head span { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-empty, .wl-hint { color: var(--muted); font-size: 0.875rem; }
.wl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.wl-grid .wide { grid-column: 1 / -1; }
.wl-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; flex: 0 0 auto; }
.wl-tiles div { background: var(--surface); padding: 10px 12px; }
.wl-tiles dt { font-size: 0.72rem; color: var(--muted); }
.wl-tiles dd { margin: 2px 0 0; font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; }
.wl-results h4 { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 500; }
.wl-clients { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 0.875rem; }
.wl-clients li { display: grid; grid-template-columns: 1fr auto 104px; gap: 12px; align-items: center; padding: 5px 0; }
.wl-clients .mono { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.tier { display: inline-flex; justify-content: center; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.tier.t4, .tier.t3 { background: var(--accent-soft); color: var(--accent); }
.tier.t2 { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.tier.t1, .tier.t0 { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.wl-state { font-size: 0.925rem; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; }
.wl-state .tier { flex: 0 0 auto; margin-top: 1px; }
.wl-warn { display: flex; gap: 8px; align-items: flex-start; font-size: 0.85rem; color: var(--warn); }
.wl-warn i { font-size: 17px; margin-top: 1px; }
.wl-goals { flex: 0 0 auto; overflow: visible; }
.wl-goals li { padding: 5px 4px; }
.wpin { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; pointer-events: none; }
.wpin.ap { background: #101816; color: #f2f4f3; font-family: var(--mono); box-shadow: 0 2px 8px rgb(0 0 0 / 0.3); }
.wpin.ap.on { background: #3ddc84; color: #05130c; }
.wpin.client { background: rgb(255 255 255 / 0.92); color: #101816; font-family: var(--mono); }
.wpin.client[data-t="t0"], .wpin.client[data-t="t1"] { background: #c62f34; color: #fff; }
.wpin.client[data-t="t2"] { background: #f0b34a; color: #201400; }
.wpin.room { color: rgb(255 255 255 / 0.78); font-weight: 500; text-shadow: 0 1px 3px rgb(0 0 0 / 0.7); padding: 0; }
.wl-legend { position: absolute; left: 12px; bottom: 12px; display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--line); font-size: 0.7rem; color: var(--muted); max-width: calc(100% - 24px); }
.wl-legend .bar { height: 8px; width: 250px; max-width: 100%; border-radius: 999px; background: linear-gradient(90deg, #2d3e78, #267ca0 22%, #2ab07c 45%, #b0dc4a 75%, #fde725); }
.wl-legend .ticks { display: flex; justify-content: space-between; width: 250px; max-width: 100%; font-family: var(--mono); }
.wl-legend .walls { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 4px; }
.wl-legend .walls i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: -5px; }
.wl-scale { position: absolute; left: 12px; bottom: 12px; padding: 8px 12px; border-radius: 12px; background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); }
.wlab:fullscreen .lab-panels { height: 360px; }
@media (max-width: 860px) {
  .wlab .lab-panels { grid-template-columns: 1fr; height: auto; }
  .wl-controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .wl-legend .walls { display: none; }
  .wl-clients li { grid-template-columns: 1fr auto; }
  .wl-clients li .mono { display: none; }
}

.vendors { background: var(--glass); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border: 1px solid var(--line); }
body.mode .vendors { display: none; }
.dock button[hidden] { display: none; }

.vendors { max-width: 100%; overflow-x: auto; scrollbar-width: none; }

/* ---------- language switch and watermark ---------- */
.lang { margin-left: 0; background: var(--glass); border: 1px solid var(--line); }
.lang button { height: 28px; padding: 0 10px; font-family: var(--mono); font-size: 0.75rem; }
.nav nav + .lang { margin-left: 4px; }
@media (max-width: 860px) { .nav .lang { margin-left: auto; } .nav .lang + .icon-btn { margin-left: 0; } }
.mark { position: absolute; z-index: 3; pointer-events: none; user-select: none; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); opacity: 0.34; white-space: nowrap; }
.hero .mark { right: 24px; top: 78px; }
.lab-stage .mark { right: 14px; bottom: 14px; }
.credit { margin-top: 10px; color: var(--ink); }
html[lang="id"] .steps:empty::after { content: "Mode bebas tidak punya langkah. Pilih kabel dan mulai menyambung."; }

/* ---------- bench: add devices, device panel ---------- */
.lab-add { display: flex; gap: 6px; align-items: center; min-width: 0; }
.lab-add .btn { background: var(--glass); backdrop-filter: blur(12px); }
.lab-add .btn.primary { background: var(--accent); }
.lab-add select { height: 34px; max-width: 190px; background: var(--glass); backdrop-filter: blur(12px); border-radius: 999px; padding: 0 12px; flex: 0 1 auto; }
.tabs { overflow-x: auto; scrollbar-width: none; flex: 0 0 auto; }
.tabs button { flex: 0 0 auto; white-space: nowrap; }
.dev-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px 0; background: #17201d; font-size: 0.8125rem; }
.dev-bar strong { color: #e6f2ec; margin-right: 10px; }
.dev-bar span { color: #9db3a8; }
.dev-bar .btn { background: transparent; color: #e6f2ec; border-color: #33423c; flex: 0 0 auto; }
.pc-form { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); align-items: end; }
.pc-form .btn { margin-top: 0; justify-self: start; align-self: center; }
.pc-form select { height: 34px; border-radius: var(--r-in); border: 1px solid #2c3a35; background: #0c1210; color: #e6f2ec; font-family: var(--mono); font-size: 0.85rem; width: 100%; }
.pc-form .check { display: flex; align-items: center; gap: 8px; height: 34px; color: #c6d8ce; font-size: 0.8125rem; align-self: center; }
.pc-form .check input { accent-color: #3ddc84; width: 16px; height: 16px; }
@media (max-width: 860px) { .lab-add select { max-width: 120px; } #lab-home { display: none; } }
