/* =========================================================
   CLI Lab page (site/ccna/cli-lab/). Uses the tokens and parts in site.css.
   A header band with your record, then a topics band: every topic as a card
   (status, commands solid, configs closed, the next step). Opening one swaps the
   cards for that topic's three steps (Commands, Configs, Cheat sheet) as tabs;
   a config task (#task=...) opens inside the Configs step.
   ========================================================= */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
code.c { font-family: var(--f-mono); font-size: .88em; background: var(--bg-2); color: var(--blue-ink); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.btn-s { min-height: 44px; padding: 9px 16px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.btn-s:active { box-shadow: 1px 1px 0 var(--ink); }
button:disabled { cursor: default; }
[hidden] { display: none !important; }

/* how solid a command is, as five LEDs: blue while learning, green once solid (box 3+) */
.leds { display: inline-flex; gap: 3px; flex: none; }
.leds i { width: 7px; height: 7px; border-radius: 2px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--hair); }
.leds i.b { background: var(--blue); box-shadow: none; }
.leds i.g { background: var(--led); box-shadow: none; }

/* shared controls */
.seg-l { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); margin-bottom: 8px; }
.seg-row { display: flex; border: 2px solid var(--ink); border-radius: var(--r-s); overflow: hidden; background: var(--card); width: max-content; max-width: 100%; }
.seg-b { min-height: 44px; min-width: 52px; padding: 8px 14px; border: 0; border-left: 2px solid var(--ink); background: none; color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: 15px; white-space: nowrap; }
.seg-b:first-child { border-left: 0; }
.seg-b:hover { background: var(--bg-2); }
.seg-b[aria-checked="true"] { background: var(--blue); color: #fff; }
.seg-b:focus-visible { outline-offset: -5px; outline-color: var(--ink); }
.seg-b[aria-checked="true"]:focus-visible { outline-color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 44px; min-width: 48px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink);
  font-family: var(--f-mono); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.chip:hover { background: var(--bg); }
.chip[aria-checked="true"] { background: var(--ink); color: #fff; }
.chip-n { font-weight: 500; opacity: .7; margin-left: 2px; }
@media (max-width: 420px) { .chip { min-width: 44px; padding: 8px 9px; font-size: 12.5px; } }
.tool {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: var(--r-s);
  background: var(--card); color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: 14.5px; box-shadow: 3px 3px 0 var(--ink); white-space: nowrap; cursor: pointer;
}
.tool:hover { background: var(--bg); }
.tool:active { box-shadow: 1px 1px 0 var(--ink); }
.tool.arm { background: var(--miss); color: #fff; }

@media (min-width: 1360px) { main > .band > .wrap { padding-right: max(var(--gutter), calc(200px - (calc(100 * var(--vw)) - var(--max)) / 2)); } }

/* ---------- header: what the page is, and your record ---------- */
.cl-head { display: grid; gap: 36px; }
@media (min-width: 1000px) { .cl-head { grid-template-columns: minmax(0, 6fr) minmax(360px, 5fr); gap: 56px; align-items: center; } }
.cl-title { font-size: clamp(36px, min(calc(8 * var(--vw)), calc(7 * var(--svh))), 62px); line-height: 1.03; letter-spacing: -.035em; max-width: 12em; text-wrap: balance; }
.cl-sub { margin-top: 16px; font-size: 17.5px; color: var(--ink-2); max-width: 36em; }
.cl-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (min-width: 1000px) { .cl-wrap { padding-top: clamp(32px, calc(6 * var(--svh)), 80px); padding-bottom: clamp(40px, calc(7 * var(--svh)), 88px); } }

/* the record reads like a show command's output */
.rec { display: block; padding: 0; background: #050D2E; color: #D8E0F7; border: 2px solid var(--ink); border-radius: var(--r-m); box-shadow: 6px 6px 0 var(--blue); overflow: hidden; }
.rec-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--navy-2); }
.rec-t { grid-column: auto; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; }
.rec-host { font-size: 12px; color: var(--led); }
.rec-body { padding: 14px 16px; }
.rec-stat { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rs { min-width: 0; padding: 8px 10px 9px; border: 1px solid #22356F; border-radius: 10px; }
.rs-n { display: block; font-family: var(--f-display); font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -.03em; color: #fff; }
.rs-l { display: block; margin-top: 4px; font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; color: #8C9AC4; }
.rs-done .rs-n { color: var(--led); }
.rs-flag .rs-n { color: #8FA5F0; }
.rec-list { list-style: none; margin: 0; padding: 0; }
.rec-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #22356F; font-size: 14px; }
.rec-d { font-family: var(--f-display); font-weight: 700; color: #fff; }
.rec-seg { display: inline-flex; gap: 2px; }
.rec-seg i { width: 6px; height: 12px; border-radius: 1.5px; background: #1A2B66; }
.rec-seg i.on { background: var(--led); }
.rec-t2 { font-size: 12.5px; color: #C3CEEE; text-align: right; }
.rec-t2.full { color: var(--led); font-weight: 700; }
.rec-foot { margin-top: 10px; font-size: 12px; line-height: 1.6; color: #8C9AC4; }
@media (max-width: 420px) { .rec-seg { display: none; } .rec-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) and (max-height: 700px) { .rec-row { padding: 5px 0; } .rs-n { font-size: 22px; } }

/* ---------- flags: a small pennant, filled blue when on (green stays for done, red for misses) ---------- */
.flag-b { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: var(--r-s); background: var(--card); color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: 14.5px; box-shadow: 3px 3px 0 var(--ink); white-space: nowrap; }
.flag-b:hover { background: var(--bg); }
.flag-b:active { box-shadow: 1px 1px 0 var(--ink); }
.flag-b i, .flag-mini i { width: 12px; height: 14px; flex: none; border-left: 2px solid currentColor; position: relative; }
.flag-b i::after, .flag-mini i::after { content: ""; position: absolute; left: 0; top: 0; width: 10px; height: 8px; background: transparent; border: 1.5px solid currentColor; border-left: 0; clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%); }
.flag-b[aria-pressed="true"] { background: var(--blue-wash); color: var(--blue-ink); }
.flag-b[aria-pressed="true"] i::after, .flag-mini[aria-pressed="true"] i::after { background: var(--blue); border-color: var(--blue); }
.flag-dark { background: transparent; color: #fff; border-color: #fff; box-shadow: 3px 3px 0 var(--blue); margin-left: auto; }
.flag-dark:hover { background: #13287A; }
.flag-dark[aria-pressed="true"] { background: #13287A; color: #fff; border-color: #8FA5F0; }
.flag-dark[aria-pressed="true"] i::after { background: #8FA5F0; border-color: #8FA5F0; }
.flag-dark:focus-visible { outline-color: var(--led); }
.tc-flag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 5px; background: var(--blue-wash); color: var(--blue-ink); font-size: 10.5px; font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- topics: every topic as a card, grouped by domain ---------- */
.hub-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin: 4px 0 22px; }
.hub-flag { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 26px; padding: 14px 18px; border: 2px solid var(--ink); border-radius: var(--r-m); background: var(--blue-wash); box-shadow: 4px 4px 0 var(--ink); }
.hub-fk { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); }
.hub-ft { margin-top: 2px; font-size: 16px; color: var(--ink); }
.hub-dom + .hub-dom { margin-top: 30px; }
.hd-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--ink); }
.hd-t { display: flex; align-items: baseline; gap: 10px; font-size: 22px; letter-spacing: -.02em; }
.hd-n { font-size: 13px; font-weight: 700; color: #fff; background: var(--navy); padding: 2px 7px; border-radius: 5px; }
.hd-c { font-size: 12px; color: var(--ink-3); }
.hd-head .link-btn { margin-left: auto; min-height: 36px; font-size: 14.5px; }
.hub-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.tc {
  width: 100%; height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 12px; text-align: left; color: var(--ink); font: inherit;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-m); box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
}
.tc:hover { background-color: var(--bg); }
.tc:active { box-shadow: 1px 1px 0 var(--ink); }
.tc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tc-n { font-size: 12px; font-weight: 700; color: #fff; background: var(--blue); padding: 2px 7px; border-radius: 5px; }
.tc-st { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.tc-st i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.tc-prac .tc-st, .tc-st.tc-prac { color: var(--blue-ink); }
.tc-prac .tc-st i, .tc-st.tc-prac i { background: var(--blue); box-shadow: none; }
.tc-done .tc-st, .tc-st.tc-done { color: #0A8A4A; }
.tc-done .tc-st i, .tc-st.tc-done i { background: var(--led); box-shadow: 0 0 0 2px var(--led-wash); }
.tc-t { font-family: var(--f-display); font-weight: 800; font-size: 19px; line-height: 1.12; letter-spacing: -.02em; }
.tc-rows { display: grid; gap: 7px; margin-top: auto; }
.tc-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.tc-k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.tc-v { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.tc-none { grid-column: 2 / -1; font-size: 13px; color: var(--ink-3); }
/* commands: blue for tried, green for solid */
.tc-bar { position: relative; height: 8px; border-radius: 4px; background: var(--bg-2); overflow: hidden; }
.tc-bar i, .tc-bar b { position: absolute; inset: 0; border-radius: 4px; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.tc-bar b { background: #B9C8F3; }
.tc-bar i { background: var(--led); z-index: 1; }
/* configs: one dot per work order */
.tc-dots { display: flex; gap: 5px; }
.tc-dots i { width: 14px; height: 8px; border-radius: 3px; background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--hair); }
.tc-dots i.wip { background: #B9C8F3; box-shadow: none; }
.tc-dots i.on { background: var(--led); box-shadow: none; }
.tc-next { display: flex; gap: 8px; align-items: baseline; padding-top: 9px; border-top: 1px dashed var(--hair); font-size: 14.5px; color: var(--ink); }
.tc-next .mono { flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); }
.tc-done .tc-next .mono { color: #0A8A4A; }
.tc-done { background: #F4FBF7; }
.hub-none { padding: 18px 0; color: var(--ink-2); font-size: 16px; }

/* ---------- one topic: back, name, state, flag; then the steps ---------- */
.topic { scroll-margin-top: calc(var(--tb, 64px) + 14px); }
.tv-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 16px; }
.tv-name { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column-reverse; gap: 2px; }
.st { container: st / inline-size; min-width: 0; }
.st-k { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); }
.st-t { font-size: clamp(26px, calc(4.2 * var(--svh)), 36px); line-height: 1.06; letter-spacing: -.03em; }
.st-t:focus { outline: none; }
.tv-state:empty { display: none; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--ink); border-radius: var(--r-s); overflow: hidden; background: var(--card); margin-bottom: 14px; }
.step { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; border: 0; border-left: 2px solid var(--ink); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.step:first-child { border-left: 0; }
.step:hover { background: var(--bg); }
.step-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); font-size: 12.5px; font-weight: 700; }
.step-l { flex: 1; min-width: 0; font-family: var(--f-display); font-weight: 800; font-size: 16.5px; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-c { flex: none; font-size: 11.5px; color: var(--ink-3); }
.step.empty .step-l, .step.empty .step-c { color: var(--ink-3); }
.step[aria-selected="true"] { background: var(--navy); color: #fff; }
.step[aria-selected="true"] .step-n { background: var(--led); border-color: var(--led); color: var(--ink); }
.step[aria-selected="true"] .step-c { color: #C3CEEE; }
.step[aria-selected="true"]:focus-visible { outline-color: var(--led); outline-offset: -5px; }
@container st (max-width: 520px) { .step { flex-direction: column; gap: 2px; padding: 8px 6px; text-align: center; } .step-c { display: none; } .step-l { font-size: 14.5px; } }

/* step 1: the prompt and its keys share a row; idle and round-over hide them */
.con-row { display: flex; flex-wrap: wrap; align-items: center; border-top: 1px solid #22356F; }
.con-row .con-in { flex: 1 1 320px; border-top: 0; }
.con-row .con-keys { padding: 8px 16px; }
.con[data-state="idle"] .con-row, .con[data-state="sum"] .con-row { display: none; }
.con[data-state="idle"] .con-out:empty + .con-row { display: none; }
/* step 1: the setup sits inside the console while it's idle */
.con-setup { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 0 16px 16px; }
@media (min-width: 760px) { .con-setup { padding: 0 22px 18px; } }
.con-setup .seg-row { border-color: #fff; background: transparent; }
.con-setup .seg-b { border-left-color: #fff; color: #fff; }
.con-setup .seg-b:hover { background: #13287A; }
.con-setup .seg-b[aria-checked="true"] { background: var(--led); color: var(--ink); }
.con-setup .btn { box-shadow: 3px 3px 0 var(--led); border-color: #fff; }
.con-setup :focus-visible { outline-color: var(--led); }
.cq-idle { margin-top: 8px; }

/* step 2: work orders as rows */
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tk {
  width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 12px 16px; text-align: left; color: var(--ink);
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-m); box-shadow: 4px 4px 0 var(--ink); font: inherit;
}
.tk:hover { background: var(--bg); }
.tk:active { box-shadow: 1px 1px 0 var(--ink); }
.tk-no { font-size: 12px; font-weight: 700; color: #fff; background: var(--navy); padding: 3px 7px; border-radius: 5px; }
.tk-main { display: grid; gap: 3px; min-width: 0; }
.tk-title { font-family: var(--f-display); font-weight: 800; font-size: 18px; line-height: 1.15; letter-spacing: -.02em; }
.tk-obj { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-st { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.tk-st i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.tk-wip i { background: var(--blue); box-shadow: none; }
.tk-wip { color: var(--blue-ink); }
.tk-done i, .tk-hint i { background: var(--led); box-shadow: 0 0 0 2px var(--led-wash); }
.tk-done, .tk-hint { color: #0A8A4A; }
@container st (max-width: 560px) { .tk { grid-template-columns: auto minmax(0, 1fr); } .tk-st { grid-column: 2; } }
.tk-none { padding: 18px 20px; border: 2px dashed var(--hair); border-radius: var(--r-m); color: var(--ink-2); font-size: 16px; max-width: 40em; }

/* how it checks: a small fold under the station */
.how { margin-top: 18px; border-top: 1px solid var(--hair); }
.how summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); cursor: pointer; list-style: none; }
.how summary::-webkit-details-marker { display: none; }
.how summary::before { content: "+"; display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid currentColor; border-radius: 5px; font-size: 14px; }
.how[open] summary::before { content: "−"; }
.how ul { list-style: none; margin: 0; padding: 0 0 6px; display: grid; max-width: 62em; }
.how li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--hair); font-size: 15px; color: var(--ink-2); }
.how-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); }
@media (max-width: 480px) { .how li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- the console (drill and bench) ---------- */
.con, .bt { border: 2px solid #fff; border-radius: var(--r-m); background: #050D2E; color: #D8E0F7; overflow: hidden; box-shadow: 6px 6px 0 var(--blue); transition: box-shadow .3s, border-color .3s; }
.con:focus-within, .bt:focus-within { box-shadow: 6px 6px 0 var(--led); }
.con.ok { box-shadow: 6px 6px 0 var(--led); }
.con.no { border-color: var(--miss); }
.con-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--navy-2); font-size: 12px; color: #C3CEEE; }
.con-dots { display: flex; gap: 6px; flex: none; }
.con-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3A4F99; }
.con-dots i:first-child { background: var(--led); }
.con-dev { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.con-count { flex: none; color: #fff; font-weight: 700; }
.con-pips { display: flex; gap: 2px; height: 4px; background: #050D2E; }
.con-pips:empty { display: none; }
.con-pips i { flex: 1; background: #1A2B66; transition: background-color .3s; }
.con-pips i.hit { background: var(--led); }
.con-pips i.bad { background: var(--miss); }
.con-pips i.cur { background: #fff; }
.con-q { padding: 16px 16px 14px; border-bottom: 1px solid #22356F; }
@media (min-width: 760px) { .con-q { padding: 20px 22px 16px; } }
.cq-tag { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--led); }
.cq-text { margin-top: 8px; font-family: var(--f-display); font-weight: 800; font-size: clamp(21px, calc(5.4 * var(--vw)), 28px); line-height: 1.15; letter-spacing: -.02em; color: #fff; text-wrap: balance; overflow-wrap: anywhere; }
.cq-ctx { margin-top: 10px; font-size: 12.5px; color: #C3CEEE; }
.cq-ctx span { color: #8C9AC4; text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; margin-right: 6px; }
.cq-idle { font-size: 16px; color: #C9D4F4; max-width: 40em; }
.cq-idle strong { color: #fff; }
.con-out, .bt-out { margin: 0; padding: 12px 16px; overflow: auto; font-size: 12.5px; line-height: 1.55; white-space: pre; --sb-thumb: #2A3D80; }
.con-out::-webkit-scrollbar, .bt-out::-webkit-scrollbar { width: 8px; height: 8px; }
.con-out::-webkit-scrollbar-thumb, .bt-out::-webkit-scrollbar-thumb { background: #2A3D80; border-radius: 4px; }
.con-out::-webkit-scrollbar-track, .bt-out::-webkit-scrollbar-track { background: transparent; }
.con-out { min-height: 64px; max-height: 190px; }
.con-out:empty { display: none; }
.t-cmd { color: #fff; font-weight: 700; }
.t-err { color: #FFB4AA; }
.t-dim { color: #8C9AC4; white-space: pre-wrap; }
.t-ok { color: var(--led); font-weight: 700; }
.con-in { display: flex; align-items: center; gap: 4px; padding: 8px 16px; border-top: 1px solid #22356F; }
.con-p { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--led); font-weight: 700; font-size: 14px; }
.con-in input { flex: 1; min-width: 0; min-height: 44px; background: transparent; border: 0; color: #fff; font-size: 16px; caret-color: var(--led); }
.con-in input:focus { outline: none; }
.con-in input::placeholder { color: #5A6B9E; }
.con-in input:disabled { opacity: .5; }
.con-keys { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px; }
.key { min-height: 44px; min-width: 52px; padding: 8px 12px; border: 1.5px solid #3A4F99; border-radius: 8px; background: #0C1A4A; color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 3px 0 #22356F; }
.key:hover { background: #13287A; }
.key:active { box-shadow: 0 1px 0 #22356F; transform: translateY(2px); }
.key-wide { font-family: var(--f-display); font-size: 14px; margin-left: auto; }
.con :focus-visible, .bt :focus-visible { outline-color: var(--led); }
.con-fb { padding: 14px 16px 18px; border-top: 1px solid #22356F; background: #0A1640; display: grid; gap: 8px; }
@media (min-width: 760px) { .con-fb { padding: 16px 22px 20px; } }
.fb-v { font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.fb-ok { color: var(--led); }
.fb-no { color: #FFB4AA; }
.fb-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 15px; }
.fb-k { flex: none; width: 104px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #8C9AC4; }
.con-fb code.c { background: #13287A; color: #fff; font-size: 14px; padding: 2px 7px; }
.fb-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 6px; }
.fb-hint { font-size: 11.5px; color: #8C9AC4; }
.con-fb .btn-ghost { background: transparent; color: #fff; border-color: #fff; box-shadow: 3px 3px 0 var(--blue); }
@media (max-width: 480px) { .fb-k { width: 100%; } .fb-btns .btn { flex: 1 1 100%; } .fb-hint { display: none; } }

/* ---------- step 2, one task: the work order beside its console ---------- */
.b-strip { display: flex; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.run-exit { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px 0 8px; border-radius: var(--r-s); border: 2px solid var(--ink); background: var(--card); color: var(--ink); font-family: var(--f-display); font-weight: 700; font-size: 14px; white-space: nowrap; box-shadow: 3px 3px 0 var(--ink); }
.run-exit:hover { background: var(--bg); }
.run-exit:active { box-shadow: 1px 1px 0 var(--ink); }
.run-exit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.b-name { flex: 1; min-width: 0; font-family: var(--f-display); font-weight: 800; font-size: 18px; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-count { font-size: 13px; color: var(--ink-2); font-weight: 700; white-space: nowrap; }
.b-grid { display: grid; gap: 18px; }
@container st (min-width: 720px) { .b-grid { grid-template-columns: minmax(270px, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; } }
.wo { position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-m); box-shadow: 5px 5px 0 var(--ink); overflow: hidden; }
.wo-body { padding: 16px 18px 18px; }
.wo-dev { font-size: 12.5px; color: var(--ink-2); }
.wo-dev span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); margin-right: 4px; }
.wo-brief { margin-top: 8px; font-size: 16px; color: var(--ink); }
.wo-h { margin-top: 18px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); }
.wo-reqs { list-style: none; margin: 0; padding: 0; }
.wo-reqs li, .wo-ver { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 15px; color: var(--ink-2); }
.wo-reqs i, .wo-ver i { width: 12px; height: 12px; border-radius: 50%; background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--ink-3); transform: translateY(1px); transition: background-color .3s, box-shadow .3s; }
.wo-reqs li.on { color: var(--ink); }
.wo-reqs li.on i, .wo-ver.on i { background: var(--led); box-shadow: 0 0 0 3px var(--led-wash); }
.wo-ver { border-bottom: 0; margin-top: 4px; padding: 12px; border: 2px dashed var(--hair); border-radius: var(--r-s); }
.wo-ver.open { border-color: var(--blue); background: var(--blue-wash); color: var(--ink); }
.wo-ver.open i { background: var(--blue); box-shadow: none; }
.wo-ver.on { border-style: solid; border-color: var(--led); background: var(--led-wash); color: var(--ink); }
.wo-vk { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); margin-bottom: 2px; }
.wo-vlock { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.wo-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
@media (max-width: 420px) { .wo-tools .tool { flex: 1 1 40%; } }
.wo-help { margin-top: 14px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: var(--r-s); background: var(--bg); }
.wo-hk { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-ink); margin-bottom: 6px; }
.wo-help pre { margin: 0; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.wo-hn { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.wo-stamp { position: absolute; right: 18px; bottom: 18px; padding: 6px 12px; border: 3px solid #0A8A4A; border-radius: 8px; color: #0A8A4A; font-size: 18px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; transform: rotate(-8deg); opacity: 0; pointer-events: none; background: rgba(255, 255, 255, .85); }
.wo.closed .wo-stamp { opacity: 1; }
.wo-next { margin-top: 14px; }
.wo-next .btn { max-width: 100%; white-space: normal; text-align: left; }
.wo.closed .wo-body { padding-bottom: 18px; }
.wo.closed .wo-tools { padding-right: 120px; }

.bt { display: flex; flex-direction: column; }
@media (min-width: 1000px) { .bt { position: sticky; top: calc(var(--tb, 64px) + 14px); } }
.bt-out { height: clamp(260px, calc(calc(100 * var(--svh)) - var(--tb, 64px) - 300px), 560px); }

/* ---------- command book ---------- */
.finder { display: grid; gap: 12px; margin-bottom: 10px; }
@media (min-width: 1000px) { .finder { grid-template-columns: minmax(240px, 340px) 1fr auto; align-items: center; gap: 18px; } }
.find { position: relative; display: block; }
.find svg { position: absolute; left: 13px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); fill: none; stroke: var(--ink-2); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.find input { width: 100%; min-height: 48px; padding: 10px 14px 10px 40px; border: 2px solid var(--ink); border-radius: var(--r-s); background: var(--card); font-family: var(--f-body); font-size: 16px; box-shadow: 3px 3px 0 var(--ink); }
.find input:focus-visible { outline-offset: 2px; }
.cover { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--f-display); font-weight: 700; font-size: 15px; cursor: pointer; user-select: none; }
.cover input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cover-sw { position: relative; width: 44px; height: 26px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); transition: background-color .2s; }
.cover-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: transform .2s var(--ease-spring), background-color .2s; }
.cover input:checked + .cover-sw { background: var(--blue); }
.cover input:checked + .cover-sw::after { transform: translateX(18px); background: #fff; }
.cover input:focus-visible + .cover-sw { outline: 3px solid var(--blue); outline-offset: 3px; }
.find-n { font-size: 12px; color: var(--ink-3); margin-bottom: 18px; min-height: 18px; }
.book { display: grid; }
.bg:last-child { border-bottom: 2px solid var(--ink); }
.bg { border-top: 1.5px solid var(--ink); }
.bg-list { padding-bottom: 12px; }
.bg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 6px 0; }
.bg-tog { flex: 1 1 260px; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t chev" "c chev"; gap: 2px 12px; align-items: center; min-height: 52px; padding: 6px 4px; border: 0; background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.bg-tog:hover .bg-t { color: var(--blue-ink); }
.bg-tog .bg-t { grid-area: t; } .bg-tog .bg-c { grid-area: c; }
.bg-chev { grid-area: chev; width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease-out); }
.bg-tog[aria-expanded="true"] .bg-chev { transform: rotate(180deg); }
.bg-t { min-width: 0; min-width: 0; font-size: 20px; letter-spacing: -.02em; line-height: 1.15; display: flex; align-items: baseline; gap: 10px; }
.bg-n { flex: none; font-size: 13px; font-weight: 700; color: #fff; background: var(--blue); padding: 2px 7px; border-radius: 5px; }
.bg-c { font-size: 12px; color: var(--ink-3); }
.bg-list { list-style: none; margin: 0; padding: 0; }
.bk {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "q leds" "a a"; gap: 6px 14px; align-items: start;
  padding: 11px 4px; min-height: 44px; border: 0; border-bottom: 1px solid var(--hair); background: none; color: var(--ink); text-align: left; font: inherit;
}
.bk:hover { background: var(--bg); }
.bk-li { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; border-bottom: 1px solid var(--hair); }
.bk-li .bk { border-bottom: 0; }
.flag-mini { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: none; color: var(--ink-3); }
.flag-mini:hover { background: var(--bg-2); color: var(--ink); }
.flag-mini[aria-pressed="true"] { color: var(--blue-ink); }
@media (min-width: 900px) { .bk { grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) auto; grid-template-areas: "q a leds"; align-items: baseline; padding: 10px 8px; } }
.bk-q { grid-area: q; font-size: 15px; color: var(--ink); }
.bk-ctx { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-3); }
.bk-a { grid-area: a; display: grid; gap: 2px; font-size: 13.5px; transition: filter .25s, opacity .25s; }
.bk-full { color: var(--blue-ink); font-weight: 700; overflow-wrap: anywhere; }
.bk-short { color: var(--ink-3); font-size: 12px; }
.bk-short::before { content: "short: "; text-transform: uppercase; font-size: 10px; letter-spacing: .06em; }
.bk .leds { grid-area: leds; margin-top: 5px; }
.bk.covered .bk-a { filter: blur(5px); opacity: .55; user-select: none; }
.bk-none { padding: 18px 0; color: var(--ink-2); }

/* =========================================================
   Motion. Each part has its own entrance, so nothing repeats:
     header     the copy types itself out, left to right in steps; the record's rows print one by one
     topics     cards slot in like line cards into a chassis, row by row, and their bars charge up
     a topic    opening one, or switching its step, slides it in from the right; the console's LED blinks
     configs    work orders print out of a slot, top edge first (first showing only)
     a task     the requirement LED that turns green pulses once; a closed order gets stamped
   Only transform and opacity on anything large. Nothing moves under prefers-reduced-motion.
   Re-rendered lists carry .settled so they don't replay.
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .fx-typed .cl-head.in .cl-copy > * { animation: typed .7s steps(18, end) backwards; }
  .fx-typed .cl-head.in .cl-copy > :nth-child(2) { animation-delay: .12s; }
  .fx-typed .cl-head.in .cl-copy > :nth-child(3) { animation-delay: .3s; }
  .fx-typed .cl-head.in .cl-copy > :nth-child(4) { animation-delay: .45s; }
  @keyframes typed { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  .fx-typed .cl-head.in .rec { animation: recon .5s var(--ease-out) .1s backwards; }
  @keyframes recon { from { opacity: 0; } }
  .fx-typed .cl-head.in .rec-row, .fx-typed .cl-head.in .rs { animation: printrow .3s steps(3, end) backwards; animation-delay: calc(.35s + var(--r, 0) * .09s); }
  @keyframes printrow { from { opacity: 0; transform: translateY(8px); } }

  .tphub.in .hub-grid:not(.settled) .hub-cards li { animation: slotin .5s var(--ease-out) backwards; animation-delay: calc(min(var(--k, 0), 14) * .035s); }
  @keyframes slotin { from { opacity: 0; transform: translateY(18px) scale(.97); } }
  .tphub.in .hub-grid:not(.settled) .tc-bar i, .tphub.in .hub-grid:not(.settled) .tc-bar b { animation: charge .7s var(--ease-out) backwards; animation-delay: calc(.25s + min(var(--k, 0), 14) * .035s); }
  @keyframes charge { from { transform: scaleX(0); } }

  .topic.swap .tv-strip { animation: fadein .3s ease; }
  .topic.swap .pane:not([hidden]) { animation: swapin .34s var(--ease-out); }
  @keyframes swapin { from { opacity: 0; transform: translateX(18px); } }
  .topic.swap .con-dots i:first-child { animation: linkblink .9s steps(1) .2s 1 backwards; }
  @keyframes linkblink { 0% { background: #3A4F99; } 20% { background: var(--led); } 40% { background: #3A4F99; } 60% { background: var(--led); } 80% { background: #3A4F99; } 100% { background: var(--led); } }

  .tk-list:not(.settled) li { animation: printout .55s var(--ease-out) backwards; animation-delay: calc(min(var(--k, 0), 9) * .06s); }
  @keyframes printout { from { clip-path: inset(0 0 100% 0); transform: translateY(-12px); } to { clip-path: inset(0 0 -10px -10px); } }

  .con.ok .fb-v { animation: fbpop .35s var(--ease-spring); }
  @keyframes fbpop { from { transform: scale(.8); opacity: 0; } }
  .wo-reqs li.lit i { animation: ledpulse .7s var(--ease-out); }
  @keyframes ledpulse { 0% { box-shadow: 0 0 0 0 var(--led); } 100% { box-shadow: 0 0 0 10px transparent; } }
  .wo.stamp-now .wo-stamp { animation: stamp .45s var(--ease-spring); }
  @keyframes stamp { from { opacity: 0; transform: rotate(-8deg) scale(2.2); } }
}

/* short laptop screens: keep the drill console within one screen */
@media (min-width: 1000px) and (max-height: 760px) {
  .cq-text { font-size: clamp(18px, calc(3.4 * var(--svh)), 24px); }
  .con-q { padding: 12px 18px 10px; }
  .cq-ctx { margin-top: 6px; }
  .con-out { max-height: 110px; }
  .con-keys { padding-bottom: 10px; }
  .step { min-height: 46px; }
}
