
/* Layout: a security operations console. Two-row masthead (prompt + command bar, then numbered tabs), one 1120px working column split main/side,
   panels styled as terminal windows, and a tmux-style status bar pinned to the bottom on wide screens. Deliberately one dark world. */
:root {
  --seg0: #5AA9FF; --seg1: #FFB000; --seg2: #3DDC97; --seg3: #FF6FB5; --seg4: #B794F6; --seg5: #2DD4BF; --seg6: #FF8A4C; --seg7: #C3E85C;  /* one colour per broadcast domain (net/view.js) */
  --bg: #070A10;          /* console black, blue-biased */
  --surface: #0F1621;     /* panel */
  --surface-2: #142030;   /* raised / hover */
  --ink: #DCE6F2;
  --muted: #7F90A8;
  --line: #1E2A3A;
  --grid: rgba(63, 224, 232, 0.035);
  --brand: #3FE0E8;       /* cyan: links, interactive */
  --brand-ink: #03171B;
  --brand-soft: #0D2A33;
  --sun: #FFB000;         /* phosphor amber: prompts, XP, highlights */
  --sun-ink: #1F1400;
  --slab: #0A1018;
  --slab-ink: #DCE6F2;

  --good: #3DDC97;  --good-tint: #0D2A20;
  --bad: #FF5470;   --bad-tint: #2E1119;

  --exploited: #FF5470;  --exploited-tint: #2E1119;
  --likely:    #FF8C42;  --likely-tint:    #2E1A0D;
  --critical:  #B794FF;  --critical-tint:  #22183A;
  --high:      #5AA9FF;  --high-tint:      #0F2238;
  --other:     #8796AD;  --other-tint:     #161F2C;

  --font-display: "Chakra Petch", "Eurostile", "Bank Gothic", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 14px;      /* every box: panels, cards, stats, frames */
  --radius-sm: 9px;    /* controls inside boxes: buttons, chips, inputs, options */
  --brand-rgb: 63, 224, 232; --sun-rgb: 255, 176, 0; --good-rgb: 61, 220, 151; --bad-rgb: 255, 84, 112;
  --chrome: rgba(7, 10, 16, 0.92);
  --panel-bg: linear-gradient(180deg, rgba(20, 32, 48, 0.55), rgba(13, 19, 28, 0.9));
  --faint: #3A4A60; --statusbar: #04070B;
  --dg-line: #2B3D55; --dg-box: #24344A; --dg-strong: #4D6280;
  --hw-stroke: #4A6080; --hw-screen: #0A1A26; --hw-port: #0A1018; --hw-top: #22324A; --hw-bot: #101A28; --hw-face-top: #2E4262; --hw-face-side: #0B131E; --hw-shadow: rgba(0, 0, 0, 0.45);
  --card-line: #24334A;
  --elev: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.4), 0 14px 34px rgba(0, 0, 0, 0.55);
  --elev-hover: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 0 1px rgba(0, 0, 0, 0.4), 0 18px 44px rgba(0, 0, 0, 0.65), 0 0 28px rgba(63, 224, 232, 0.1);
  --sev-critical: #FFB000; --sev-high: #A8740F; --sev-other: #5E4614;
  color-scheme: dark;
}
/* Light theme: same identity, daylight palette. Set by the theme toggle (or the viewer) via data-theme. */
:root[data-theme="light"] {
  --seg0: #1F6FD1; --seg1: #A86E00; --seg2: #12855A; --seg3: #C2307A; --seg4: #7346C8; --seg5: #0B8478; --seg6: #C2530F; --seg7: #5F7D00;
  --bg: #EEF2F7; --surface: #FFFFFF; --surface-2: #E7EDF5; --ink: #0F1B2D; --muted: #4F5E77; --line: #CDD6E3;
  --grid: rgba(20, 80, 140, 0.05);
  --brand: #08717D; --brand-ink: #FFFFFF; --brand-soft: #DDF1F3; --brand-rgb: 8, 113, 125;
  --sun: #8A5000; --sun-ink: #FFFFFF; --sun-rgb: 138, 80, 0;
  --slab: #FFFFFF; --slab-ink: #0F1B2D;
  --good: #11784A; --good-tint: #DDF3E8; --good-rgb: 17, 120, 74;
  --bad: #BE1F36; --bad-tint: #FBE4E8; --bad-rgb: 190, 31, 54;
  --exploited: #BE1F36; --exploited-tint: #FBE4E8;
  --likely: #A84A08; --likely-tint: #FCEBDD;
  --critical: #6A36B8; --critical-tint: #EEE7FA;
  --high: #1B5FB0; --high-tint: #E1ECF9;
  --other: #5F6C82; --other-tint: #ECEFF4;
  --chrome: rgba(238, 242, 247, 0.92);
  --panel-bg: linear-gradient(180deg, #FFFFFF, #FAFBFD);
  --faint: #B3BFCF; --statusbar: #E2E8F0;
  --dg-line: #9FB1C7; --dg-box: #B9C6D7; --dg-strong: #7F93AE;
  --hw-stroke: #6F84A0; --hw-screen: #DCE7F2; --hw-port: #E7EDF5; --hw-top: #FFFFFF; --hw-bot: #D9E2EE; --hw-face-top: #F7FAFD; --hw-face-side: #BCCADB; --hw-shadow: rgba(15, 27, 45, 0.18);
  --card-line: #CDD6E3;
  --elev: 0 1px 2px rgba(15, 27, 45, 0.06), 0 10px 28px rgba(15, 27, 45, 0.1);
  --elev-hover: 0 2px 4px rgba(15, 27, 45, 0.08), 0 16px 40px rgba(15, 27, 45, 0.16);
  --sev-critical: #7A4300; --sev-high: #B87A12; --sev-other: #E0B866;
  color-scheme: light;
}
:root[data-theme="light"] .osi-layer b, :root[data-theme="light"] .osi-row b, :root[data-theme="light"] .osi-choice b,
:root[data-theme="light"] .pdu-h b, :root[data-theme="light"] .osi-card h3 { color: color-mix(in srgb, var(--c) 46%, #000); }
/* The terminal is always dark, in either theme. */
.term-shell { --ink: #DCE6F2; --muted: #7F90A8; --line: #1E2A3A; --surface: #0D131C; --good: #3DDC97; --exploited: #FF5470; --high: #5AA9FF; --sun: #FFB000; color-scheme: dark; }


* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); scrollbar-gutter: stable; }  /* the page doesn't shift sideways when the scrollbar comes and goes */
body {
  margin: 0; color: var(--ink); font: 16px/1.6 var(--font-body);
  background: var(--bg);
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); letter-spacing: 0.01em; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--brand); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
::selection { background: var(--sun); color: var(--sun-ink); }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
kbd { font: 500 0.72rem var(--font-mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; color: var(--muted); background: var(--surface); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.eyebrow { font: 500 0.7rem/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack { display: grid; gap: 14px; align-content: start; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.caret { display: inline-block; width: 0.6em; height: 1.05em; background: var(--sun); vertical-align: -0.15em; margin-left: 2px; }
@media (prefers-reduced-motion: no-preference) { .caret { animation: blink 1.1s steps(1) infinite; } @keyframes blink { 50% { opacity: 0; } } }

/* Masthead */
.masthead { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--chrome); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding-inline: 16px; }
.mast-inner { max-width: 1120px; margin: 0 auto; padding-block: 12px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.brand b { font: 700 1.3rem/1 var(--font-display); letter-spacing: 0.06em; }
.brand b i { font-style: normal; color: var(--sun); margin-inline: 1px; }
.brand span { font: 500 0.7rem var(--font-mono); color: var(--muted); }
.cwd { font: 0.82rem var(--font-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 0; }
.cwd .u { color: var(--good); }
.cwd #cwd { color: var(--brand); }
.cmd-btn { margin-left: auto; display: flex; align-items: center; gap: 12px; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 8px 7px 12px; font: 0.82rem var(--font-mono); color: var(--muted); min-width: 0; }
.cmd-btn::before { content: "$"; color: var(--sun); }
.cmd-btn:hover { border-color: var(--brand); color: var(--ink); }
nav.tabs { border-top: 1px solid var(--line); }
.tabs-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 4px 14px; padding-block: 6px; align-items: center; }
.tab-group { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.tab-group + .tab-group { border-left: 1px solid var(--line); padding-left: 12px; }
.tab-group.updates { margin-left: auto; }
.tab-label { font: 500 0.66rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
nav.tabs a { text-decoration: none; color: var(--muted); font: 500 0.88rem var(--font-mono); padding: 6px 12px; border-radius: var(--radius-sm); display: inline-flex; gap: 8px; align-items: center; border: 1px solid transparent; }
nav.tabs a kbd { font-size: 0.66rem; padding: 0 4px; }
nav.tabs a:hover { color: var(--ink); background: var(--surface); border-color: var(--line); }
nav.tabs a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); border-color: rgba(var(--brand-rgb), 0.35); }
nav.tabs a[aria-current="page"] kbd { color: var(--brand); border-color: rgba(var(--brand-rgb), 0.4); background: transparent; }
.xp { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 10px 5px 6px; font: 0.78rem var(--font-mono); }
.xp .lvl { background: var(--sun); color: var(--sun-ink); font: 600 0.7rem var(--font-mono); border-radius: 3px; padding: 3px 7px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.06em; }
.xp .bar { width: 64px; height: 6px; border-radius: 1px; background: var(--surface-2); overflow: hidden; }
.xp .bar i { display: block; height: 100%; background: var(--sun); }
.xp .pts { font-variant-numeric: tabular-nums; color: var(--muted); }

main { padding-inline: 16px; }
.view { max-width: 1120px; margin: 0 auto; padding-block: 28px 56px; display: grid; gap: 28px; }
.view-head { display: grid; gap: 8px; }
.view-head h1 { font-size: clamp(1.7rem, 4.6vw, 2.6rem); font-weight: 800; line-height: 1.08; }
.view-head p { color: var(--muted); max-width: 68ch; }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 28px; align-items: start; }

.panel { background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; min-width: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 32px rgba(0, 0, 0, 0.28); }  /* one column, never wider than the panel */
.panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; cursor: pointer; font-size: 0.9rem; text-decoration: none; }

/* Changelog hero */
.changelog { background: var(--slab); color: var(--slab-ink); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative;
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.06), 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 0 80px rgba(var(--brand-rgb), 0.04); }
.changelog::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px); }
.win-bar { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface); font: 0.74rem var(--font-mono); color: var(--muted); }
.win-bar b { color: var(--ink); font-weight: 500; }
.win-body { padding: clamp(18px, 4vw, 30px); display: grid; gap: 16px; }
.changelog .ver { font: 0.86rem var(--font-mono); color: var(--muted); }
.changelog .ver .ps { color: var(--good); }
.changelog .ver .ps i { font-style: normal; color: var(--sun); }
.changelog h1 { font-size: clamp(1.9rem, 5.4vw, 3.3rem); font-weight: 700; line-height: 1.02; text-transform: uppercase; letter-spacing: 0.02em; }
.changelog h1 em { font-style: normal; color: var(--brand); text-shadow: 0 0 24px rgba(var(--brand-rgb), 0.35); }
.changelog ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-family: var(--font-mono); }
.changelog li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 0.95rem; }
.changelog li a { color: var(--brand); }
.mk { font: 700 0.95rem/1.6 var(--font-mono); text-align: center; border-radius: var(--radius-sm); }
.mk.add { background: var(--brand-soft); color: var(--brand); border: 1px solid rgba(var(--brand-rgb), 0.4); }
.mk.warn { background: var(--exploited-tint); color: var(--exploited); border: 1px solid rgba(var(--bad-rgb), 0.45); }
.mk.trend { background: rgba(var(--sun-rgb), 0.1); color: var(--sun); border: 1px solid rgba(var(--sun-rgb), 0.4); }

/* Chips & pills */
.chip { font: 700 0.82rem var(--font-body); cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font-family: var(--font-mono); font-weight: 400; margin-left: 4px; }
.topic { font: 700 0.75rem var(--font-body); text-decoration: none; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 3px 10px; max-width: 100%; }  /* wraps only when a chip is wider than its line */
.topic:hover { text-decoration: underline; }
.cvetag { font: 600 0.72rem var(--font-mono); text-decoration: none; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 7px; cursor: pointer; background: none; }
.pill { font: 700 0.72rem/1 var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; color: var(--c); background: var(--t); }
.tag { font: 600 0.72rem/1 var(--font-mono); padding: 5px 8px; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--muted); }
.tag.new { color: var(--brand); border-color: var(--brand); }
.tag.watch { color: var(--ink); background: var(--brand-soft); border-color: transparent; }

input[type="search"], select, .inline-form input {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; min-width: 0;
}
input[type="search"] { flex: 1 1 240px; }
.pcode { font: 0.78rem/1.4 var(--font-mono); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; width: 100%; resize: vertical; word-break: break-all; }
.pcode:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.15); }

/* Stories */
.stories { display: grid; gap: 0; }
.story { display: grid; gap: 6px; padding-block: 14px; border-top: 1px solid var(--line); min-width: 0; }
.story:first-child { border-top: 0; padding-top: 0; }
.story .meta { font: 0.75rem var(--font-mono); color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.story h3 a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.story h3 a:hover { color: var(--brand); text-decoration: underline; }
.story .snip { color: var(--muted); font-size: 0.93rem; overflow-wrap: anywhere; max-width: 75ch; }

/* Trend bars */
.bars { display: grid; gap: 8px; }

/* Quiz blocks */
.q { font-weight: 700; font-size: 1.02rem; overflow-wrap: anywhere; }  /* long addresses (IPv6, hashes) have no spaces to break at */
.opts { display: grid; gap: 8px; }
.opt { overflow-wrap: anywhere; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.95rem; }
.opt:hover:not([disabled]) { border-color: var(--brand); }
.opt[disabled] { cursor: default; }
.opt.right { background: var(--good-tint); border-color: var(--good); }
.opt.wrong { background: var(--bad-tint); border-color: var(--bad); }
.feedback { font-size: 0.92rem; border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2); }
.feedback b.ok { color: var(--good); }
.feedback b.no { color: var(--bad); }
.btn { cursor: pointer; font-weight: 700; border-radius: 999px; padding: 10px 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); text-decoration: none; display: inline-block; font-size: 0.95rem; }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn.brand { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* KEV list */
.kev-list { display: grid; gap: 10px; }
.kev-item { display: grid; gap: 2px; border-left: 4px solid var(--exploited); padding-left: 10px; }
.kev-item b { font-size: 0.93rem; }
.kev-item span { font: 0.75rem var(--font-mono); color: var(--muted); }

/* CVE Radar */
.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 6px; align-content: start; border-top: 4px solid var(--tile); }
.tile[aria-pressed="true"] { background: var(--tile-tint); }
.tile .n { font: 800 1.8rem/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--tile); }
.tile .what { font-weight: 700; }
.tile .why { font-size: 0.84rem; color: var(--muted); }
.ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.rung { padding: 12px 14px; display: grid; gap: 4px; align-content: start; border-left: 1px solid var(--line); }
.rung:first-child { border-left: 0; }
.rung b { font-size: 0.92rem; color: var(--c); }
.rung span { font-size: 0.8rem; color: var(--muted); }
.controls { display: grid; gap: 10px; }
.watch { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.85rem; color: var(--muted); }
.wterm { display: inline-flex; gap: 2px; align-items: center; background: var(--brand-soft); color: var(--ink); border-radius: 999px; padding: 3px 4px 3px 10px; font-weight: 700; }
.wterm button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 6px; }
.inline-form { display: inline-flex; gap: 4px; }
.inline-form input { padding: 4px 10px; width: 9.5rem; font-size: 0.85rem; }
.inline-form button { font-weight: 700; font-size: 0.85rem; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 4px 10px; cursor: pointer; }
.cards { display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 10px; min-width: 0; }
.card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cid { font: 600 0.88rem var(--font-mono); color: var(--muted); margin-left: auto; }
.headline { font-size: 1.08rem; overflow-wrap: anywhere; }
.desc { color: var(--muted); font-size: 0.94rem; overflow-wrap: anywhere; max-width: 78ch; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.85rem; margin: 0; }
.facts div { display: grid; }
.facts dt { font: 600 0.66rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.meter { display: inline-block; width: 56px; height: 6px; border-radius: 3px; background: var(--surface-2); vertical-align: middle; margin-left: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--c); }
details.explain { border-top: 1px dashed var(--line); padding-top: 8px; }
details.explain summary { cursor: pointer; font-weight: 700; color: var(--brand); width: fit-content; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; }
.lesson-grid section { display: grid; gap: 6px; align-content: start; min-width: 0; }
.lesson-grid h4 { font: 600 0.7rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lesson-grid p, .lesson-grid li { font-size: 0.92rem; }
.lesson-grid ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.defend { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 0.9rem; }
.kevbox { background: var(--exploited-tint); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.9rem; grid-column: 1 / -1; }
.links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.88rem; grid-column: 1 / -1; }
.vector { font: 0.74rem var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.p1 { --c: var(--exploited); --t: var(--exploited-tint); }
.p2 { --c: var(--likely); --t: var(--likely-tint); }
.p3 { --c: var(--critical); --t: var(--critical-tint); }
.p4 { --c: var(--high); --t: var(--high-tint); }
.p5 { --c: var(--other); --t: var(--other-tint); }
.more { justify-self: center; }
.empty { text-align: center; color: var(--muted); padding: 28px; background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--line); }

/* Learn */
.lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.learn-list { display: grid; }
.learn-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.learn-row b { font-weight: 600; }
.learn-row span { font: 500 0.82rem var(--font-mono); color: var(--muted); white-space: nowrap; }
.learn-row .done-mark { color: var(--good); }
.learn-row:hover b { color: var(--brand); }
.learn-index .cat-h { margin: 22px 0 0; }
/* Cards / Compact view toggle on the Learn, Practise and Exams catalogues */
.view-toggle { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.view-toggle .vt { background: none; border: 0; color: var(--muted); font: 600 0.78rem var(--font-mono); padding: 5px 13px; cursor: pointer; }
.view-toggle .vt[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.view-toggle .vt:not([aria-pressed="true"]):hover { color: var(--ink); }
.view-toggle .vt:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.lcard { text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 8px; align-content: start; position: relative; }
.lcard:hover { border-color: var(--brand); }
/* Grid children may shrink below their content, so a long row wraps inside the card instead of pushing out of it. */
.lcard > * { min-width: 0; }
.lcard h3, .lcard h2 { font-size: 1.02rem; }
.lcard p { font-size: 0.9rem; color: var(--muted); }
.lcard .lmeta { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 0.72rem var(--font-mono); color: var(--muted); }
.lcard .lmeta span { white-space: nowrap; }
.lcard .done { position: absolute; top: 14px; right: 14px; font: 700 0.7rem var(--font-mono); color: var(--good); background: var(--good-tint); border-radius: var(--radius-sm); padding: 3px 8px; }
.progress { display: flex; align-items: center; gap: 12px; font-size: 0.88rem; color: var(--muted); min-width: 0; }
.progress > span:last-child:not(.mono) { white-space: nowrap; }  /* short counters only; the rank list must wrap */
.progress .trk { flex: 0 1 240px; min-width: 40px; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress .trk i { display: block; height: 100%; background: var(--good); }
.article { display: grid; gap: 22px; max-width: 760px; }
/* Lessons: reading width for prose; diagrams and card lists (.wide) use the full page width. */
.article.lesson { max-width: none; gap: 28px; }
.article.lesson > * { max-width: 760px; min-width: 0; }
.article.lesson > .wide { max-width: none; }
.article h1 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); font-weight: 800; line-height: 1.08; }
.article .hook { font-size: 1.15rem; color: var(--muted); }
.article section { display: grid; gap: 8px; }
.article section > p { max-width: 68ch; font-size: 1.02rem; }
.case { background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 32px rgba(0, 0, 0, 0.28); }
.case .eyebrow { color: var(--exploited); }
.case .case-h { font-size: 1.05rem; font-weight: 600; margin: 0; }  /* an h2 for the outline, sized as before */
.checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.checklist li { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: 8px; }
.checklist li::before { content: "✓"; font-weight: 700; color: var(--good); }
.glossary { display: grid; gap: 6px; }
.glossary details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.glossary summary { cursor: pointer; font-weight: 700; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.glossary summary .mono { font-size: 0.78rem; color: var(--muted); font-weight: 400; }
.glossary p { font-size: 0.92rem; margin-top: 8px; }

/* Play */
.game-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.game-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font: 0.82rem var(--font-mono); color: var(--muted); }
.verdict { display: flex; gap: 10px; flex-wrap: wrap; }
.verdict .btn { flex: 1 1 160px; text-align: center; }
.result { display: grid; gap: 8px; border-radius: var(--radius); padding: 14px 16px; }
.result.ok { background: var(--good-tint); }
.result.no { background: var(--bad-tint); }
.result ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 0.93rem; }
.score-big { font: 800 3rem/1 var(--font-display); color: var(--brand); }

/* Careers */
.paths { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.path { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; align-content: start; }
.path h3 { font-family: var(--font-display); font-size: 1.05rem; }
.path .tl { color: var(--brand); font-weight: 700; font-size: 0.92rem; }
.path p { font-size: 0.93rem; }
.path h4 { font: 600 0.68rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.path ul { margin: 0; padding-left: 18px; font-size: 0.9rem; display: grid; gap: 2px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { font-size: 0.78rem; font-weight: 700; background: var(--surface-2); border-radius: var(--radius-sm); padding: 3px 8px; }
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.dir ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dir li { display: grid; gap: 1px; }
.dir li a { font-weight: 700; text-decoration: none; }
.dir li a:hover { text-decoration: underline; }
.dir li span { font-size: 0.85rem; color: var(--muted); }

footer { padding-inline: 16px; border-top: 1px solid var(--line); }
.foot { max-width: 1120px; margin: 0 auto; padding-block: 22px 40px; display: grid; gap: 6px; font-size: 0.84rem; color: var(--muted); }

.celebrate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: start center; padding-top: 22vh; cursor: pointer; }
.celebrate canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cele-card { position: relative; display: grid; gap: 4px; text-align: center; background: var(--surface); border: 2px solid var(--sun); border-radius: var(--radius-sm); padding: 16px 26px; box-shadow: 0 0 60px rgba(var(--sun-rgb), 0.35), 0 20px 60px rgba(0, 0, 0, 0.6); }
.cele-card b { font: 700 1.6rem var(--font-display); text-transform: uppercase; color: var(--sun); letter-spacing: 0.03em; }
.cele-card span { color: var(--ink); font-family: var(--font-mono); font-size: 0.9rem; }
.cele-patch { margin: 0 auto 2px; width: 76px; }
@media (prefers-reduced-motion: no-preference) { .cele-card { animation: cele-pop 0.45s cubic-bezier(.2, 1.4, .4, 1); } @keyframes cele-pop { from { transform: scale(0.6); opacity: 0; } } }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--sun); color: var(--sun-ink); font-weight: 700; padding: 10px 18px; border-radius: 999px; box-shadow: 0 6px 24px rgb(0 0 0 / 0.18); z-index: 20; }

/* Glossary terms & popover */
.term { background: none; border: 0; padding: 0 1px; margin: 0; font: inherit; color: inherit; cursor: help; text-align: inherit;
  text-decoration: underline dotted var(--brand); text-decoration-thickness: 1.5px; text-underline-offset: 3px; border-radius: 3px; }
.term:hover, .term[aria-expanded="true"] { background: var(--brand-soft); text-decoration-style: solid; }
.pop { position: fixed; z-index: 30; width: min(360px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 14px 44px rgb(0 0 0 / 0.24); padding: 14px 16px 16px; display: grid; gap: 8px; }
.pop.sheet { left: 12px !important; right: 12px; top: auto !important; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; }
.pop .pk { font: 600 0.68rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); }
.pop h4 { font: 700 1.05rem var(--font-body); padding-right: 28px; }
.pop p { font-size: 0.93rem; line-height: 1.5; }
.pop .more-t { color: var(--muted); }
.pop .see { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.8rem; color: var(--muted); }
.pop .see button { font: 700 0.78rem var(--font-body); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 3px 9px; cursor: pointer; }
.pop .acts { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.88rem; font-weight: 700; padding-top: 2px; }
.pop .acts a { text-decoration: none; }
.pop .x { position: absolute; top: 8px; right: 8px; border: 0; background: none; color: var(--muted); font-size: 1.2rem; line-height: 1; padding: 6px 8px; cursor: pointer; border-radius: var(--radius-sm); }
.pop .x:hover { background: var(--surface-2); }
.hint { font-size: 0.85rem; color: var(--muted); }
.hint .term { cursor: default; }
.gl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.gl-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 6px; align-content: start; scroll-margin-top: 90px; }
.gl-item.flash { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.gl-item h3 { font-size: 1rem; }
.gl-item .pk { font: 600 0.66rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.gl-item p { font-size: 0.9rem; }
.gl-item .aka { font: 0.74rem var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.gl-letter { font: 800 1.4rem var(--font-display); color: var(--brand); grid-column: 1 / -1; padding-top: 8px; }
details.eli { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 12px; max-width: 75ch; }
details.eli summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: 0.9rem; }
details.eli p { font-size: 0.93rem; margin-top: 8px; }
details.eli .ai-note { font-size: 0.78rem; color: var(--muted); }
.story .read { margin-left: auto; font-family: var(--font-body); font-weight: 700; text-decoration: none; }

/* ---------- Console layer ---------- */
.view-head h1 { font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.view-head h1::before { content: "> "; color: var(--sun); }
.view-head .eyebrow::before { content: "// "; color: var(--brand); }
.panel { background: var(--panel-bg); border-color: var(--line); position: relative; }
.continue::before { content: ""; position: absolute; left: -1px; top: -1px; width: 14px; height: 14px; border-left: 2px solid var(--brand); border-top: 2px solid var(--brand); border-top-left-radius: var(--radius); opacity: 0.8; pointer-events: none; }
.panel-title h2, .panel > h2, .panel > h3, .dir h3 { font: 600 1.12rem/1.25 var(--font-display); letter-spacing: 0.01em; color: var(--ink); }
.panel-title h2::before, .panel > h2::before, .dir h3::before { content: "▸ "; color: var(--sun); }
.btn { font: 600 0.82rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; border-radius: var(--radius-sm); border-color: var(--line); background: var(--surface-2); color: var(--ink); }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.brand { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 18px rgba(var(--brand-rgb), 0.25); }
.btn.brand:hover { color: var(--brand-ink); filter: brightness(1.1); }
.btn.ghost { background: transparent; }
.link-btn { font-family: var(--font-mono); font-weight: 500; font-size: 0.82rem; }
.chip { font: 500 0.8rem var(--font-mono); border-radius: var(--radius-sm); background: var(--surface); }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); border-color: rgba(var(--brand-rgb), 0.5); }
/* Secondary "Level" filter on Learn: a quieter, smaller chip row under the topic tracks. */
.level-filter { gap: 6px; align-items: center; margin-top: -4px; }
.level-filter .level-lead { align-self: center; margin-right: 2px; }
.chip-sm { font-size: 0.74rem; padding: 4px 10px; }
.topic { font: 500 0.72rem var(--font-mono); border-radius: var(--radius-sm); border: 1px solid rgba(var(--brand-rgb), 0.3); }
.pill { border-radius: var(--radius-sm); font-family: var(--font-mono); font-weight: 600; border: 1px solid currentColor; }
.tag { border-radius: var(--radius-sm); }
input[type="search"], select, .inline-form input { font-family: var(--font-mono); font-size: 0.88rem; border-radius: var(--radius-sm); background: var(--surface); }
input[type="search"]:focus, select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.15); }
.story .meta { font-size: 0.72rem; }
.story h3 { font-family: var(--font-body); font-weight: 600; }
.tile { border-radius: var(--radius); background: var(--surface); border-top-width: 2px; }
.tile .n { font-family: var(--font-display); font-weight: 700; text-shadow: 0 0 22px currentColor; }
.tile:hover { background: var(--surface-2); }
.card { border-radius: var(--radius); background: var(--surface); }
.card:hover { border-color: var(--dg-line); border-left-color: var(--c); }
.lcard { border-radius: var(--radius); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.lcard:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(var(--brand-rgb), 0.12); }
.lcard h3, .lcard h2 { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; }
.case { border-left: 3px solid var(--exploited); background: var(--surface); }
.article h1 { text-transform: uppercase; }
.score-big { font-family: var(--font-display); color: var(--sun); text-shadow: 0 0 30px rgba(var(--sun-rgb), 0.35); }
.email-head .subj { font-family: var(--font-body); }
.path { border-radius: var(--radius); }
.path h3 { font-family: var(--font-display); }
.pchip { font-family: var(--font-mono); font-weight: 500; font-size: 0.74rem; }
.gl-letter { font-family: var(--font-display); color: var(--sun); }
.gl-item, .glossary details, .kev-item { border-radius: var(--radius); }
.toast { background: var(--sun); color: var(--sun-ink); font-family: var(--font-mono); border-radius: var(--radius-sm); box-shadow: 0 0 30px rgba(var(--sun-rgb), 0.35); }
.pop { border-color: rgba(var(--brand-rgb), 0.35); box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.08), 0 18px 50px rgba(0, 0, 0, 0.6); border-radius: var(--radius); }
.pop .x { width: 40px; height: 40px; top: 4px; right: 4px; display: grid; place-items: center; font-size: 1.3rem; }
.term { text-decoration-color: var(--brand); }
footer { padding-bottom: 8px; }
.rot { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }

/* Command palette */
.cmdk { position: fixed; inset: 0; z-index: 40; background: rgba(3, 6, 10, 0.72); backdrop-filter: blur(3px); display: grid; align-items: start; justify-items: center; padding: max(10vh, 24px) 16px 16px; }
.cmdk-box { width: min(680px, 100%); background: var(--surface); border: 1px solid rgba(var(--brand-rgb), 0.4); border-radius: var(--radius); box-shadow: 0 0 40px rgba(var(--brand-rgb), 0.15), 0 30px 80px rgba(0, 0, 0, 0.6); overflow: hidden; display: grid; max-height: 80vh; grid-template-rows: auto minmax(0, 1fr) auto; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); }
.cmdk-in .ps1 { color: var(--good); white-space: nowrap; font-size: 0.85rem; }
.cmdk-in .ps1 i { font-style: normal; color: var(--sun); }
.cmdk-in input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--ink); font: 0.95rem var(--font-mono); caret-color: var(--sun); }
.cmdk-out { overflow-y: auto; padding: 8px; font-family: var(--font-mono); font-size: 0.84rem; display: grid; gap: 2px; align-content: start; }
.cmdk-line { padding: 3px 8px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.cmdk-line.echo { color: var(--ink); }
.cmdk-line.echo::before { content: "$ "; color: var(--sun); }
.cmdk-line.ok { color: var(--good); }
.cmdk-line.err { color: var(--exploited); }
.cmdk-line b { color: var(--brand); font-weight: 500; }
.cmdk-res { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 7px 8px; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink); border: 1px solid transparent; }
.cmdk-res .k { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.cmdk-res .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-body); }
.cmdk-res .h { color: var(--muted); font-size: 0.72rem; }
.cmdk-res[aria-selected="true"] { background: var(--brand-soft); border-color: rgba(var(--brand-rgb), 0.35); }
.cmdk-res[aria-selected="true"] .k { color: var(--brand); }
.cmdk-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 14px; border-top: 1px solid var(--line); font: 0.72rem var(--font-mono); color: var(--muted); }

/* Status bar */
.statusbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; display: flex; gap: 0; align-items: stretch; font: 0.72rem/1 var(--font-mono); background: var(--statusbar); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.statusbar > span { padding: 6px 12px; display: flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--muted); border-right: 1px solid var(--line); }
.statusbar .mode { background: var(--brand); color: var(--brand-ink); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; border: 0; }
.statusbar .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.statusbar .grow { flex: 1; border-right: 0; overflow: hidden; }
.statusbar .lvl { color: var(--sun); }
.statusbar button { all: unset; cursor: pointer; color: var(--brand); }
body.has-status { padding-bottom: 30px; }
body.has-status .toast { bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }

/* Flag hunt */
.flags { display: grid; gap: 10px; }
.flag { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.flag .st { font: 600 0.8rem var(--font-mono); text-align: center; padding: 6px 0; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.flag.got .st { color: var(--good); border-color: var(--good); background: var(--good-tint); }
.flag h3, .flag .flag-name { margin: 0; font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.flag p { font-size: 0.92rem; color: var(--muted); }
.flag-form { display: flex; gap: 8px; flex-wrap: wrap; }
.flag-form input { flex: 1 1 240px; font: 0.9rem var(--font-mono); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; min-width: 0; }


/* ---------- Missions ---------- */
.mission { display: grid; gap: 18px; }
.mode-tabs .chip[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); border-color: rgba(var(--brand-rgb), 0.5); }
.mode-intro { color: var(--muted); max-width: 75ch; }
.mission-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stage-box { position: relative; background-color: var(--bg); background-image: radial-gradient(rgba(127, 144, 168, 0.16) 1px, transparent 1.2px); background-size: 18px 18px; background-position: 9px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.stage-box svg { width: 100%; height: auto; display: block; }
.m-zone rect { fill: rgba(var(--brand-rgb), 0.03); stroke: rgba(var(--brand-rgb), 0.22); stroke-width: 1.2; stroke-dasharray: 5 5; }
.m-zone text { fill: var(--brand); font: 500 12px var(--font-mono); letter-spacing: 0.04em; opacity: 0.85; }
.m-link { fill: none; stroke: var(--dg-line); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.m-box { fill: var(--surface); stroke: var(--dg-box); stroke-width: 1.25; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45)); }
.m-dev.talk .m-box { stroke: var(--brand); stroke-width: 2; filter: drop-shadow(0 0 10px rgba(var(--brand-rgb), 0.35)); }
.m-dev.ok .m-box { stroke: var(--good); }
.m-dev.bad .m-box { stroke: var(--exploited); }
.m-dev text { fill: var(--ink); font-family: var(--font-mono); }
.m-dev.warn .m-box { stroke: var(--likely); }
/* Hardware drawings: line art in the console palette; LEDs and the PC screen show the device's state. */
.hw-body { fill: url(#hw-sheen); stroke: var(--hw-stroke); stroke-width: 1.4; }
.hw { filter: drop-shadow(0 2px 2.5px var(--hw-shadow)); }
.hw-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.hw-defs .s1 { stop-color: var(--hw-top); } .hw-defs .s2 { stop-color: var(--hw-bot); }
.hw-text { font: 700 6px var(--font-mono); fill: var(--muted); letter-spacing: 0.08em; }
.hw-amber { fill: var(--sun); }
.hw-fw { stroke: rgba(var(--bad-rgb), 0.85); }
.hw-brick { fill: none; stroke: rgba(var(--bad-rgb), 0.55); stroke-width: 1.2; }
.hw-wave { fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linecap: round; }
.hw-cloud, .hw-globe { stroke: var(--good); }
.hw-threat { stroke: var(--bad); }
.hw-face { fill: #05080C; stroke: none; }
.hw-glint { fill: none; stroke: var(--bad); stroke-width: 1.6; stroke-linecap: round; opacity: .9; }
/* Depth faces of the 3/4 view: a lit top and a shaded side (they also carry hw-body, so state colours reach them). */
.hw-body.hw-top { fill: var(--hw-face-top); }
.hw-body.hw-side { fill: var(--hw-face-side); }
.hw-ant { fill: none; stroke: var(--hw-stroke); stroke-width: 3; stroke-linecap: round; }
.hw-vent { fill: none; stroke: var(--hw-stroke); stroke-width: 1.2; stroke-linecap: round; opacity: 0.6; }
.hw-btn { fill: none; stroke: var(--good); stroke-width: 1.2; }
@media (prefers-reduced-motion: no-preference) {
  .hw-live .hw-led { animation: hw-blink 2.4s steps(1) infinite; }
  .hw-live .hw:nth-child(3n) .hw-led { animation-delay: -0.8s; } .hw-live .hw:nth-child(3n+1) .hw-led { animation-delay: -1.7s; }
  .hw-live .hw-led:nth-of-type(2n) { animation-duration: 1.7s; }
  @keyframes hw-blink { 0%, 100% { opacity: 0.9; } 45% { opacity: 0.25; } }
  .hw-live .hw-wave { animation: hw-wave 2.2s ease-in-out infinite; }
  .hw-live .hw-wave.w2 { animation-delay: 0.25s; } .hw-live .hw-wave.w3 { animation-delay: 0.5s; }
  @keyframes hw-wave { 0%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
}
.hw-screen { fill: var(--hw-screen); stroke: var(--dg-box); stroke-width: 1; }
.hw-line { fill: none; stroke: var(--hw-stroke); stroke-width: 1.6; stroke-linecap: round; }
.hw-port { fill: var(--hw-port); stroke: var(--dg-box); stroke-width: 0.8; }
.hw-led { fill: var(--good); opacity: 0.85; }
.m-dev.talk .hw-led { fill: var(--brand); opacity: 1; }
.m-dev.talk .hw-screen, .m-dev.talk .hw-body { stroke: rgba(var(--brand-rgb), 0.7); }
.m-dev.bad .hw-screen { fill: var(--exploited-tint); stroke: var(--exploited); }
.m-dev.ok .hw-screen { fill: var(--good-tint); stroke: var(--good); }
.m-dev.warn .hw-led { fill: var(--likely); }
.m-name { font-size: 14px; font-family: var(--font-body) !important; font-weight: 600; }
.m-ip { font-size: 13px; }
.m-ip .m-k { fill: var(--muted); font-size: 11px; letter-spacing: 0.06em; }
.m-ip .m-v { fill: var(--brand); }
.m-status { font-size: 12px; font-family: var(--font-body) !important; fill: var(--muted) !important; }
.m-dot { fill: var(--dg-line); }
.m-dev.talk .m-dot { fill: var(--brand); }
.m-dev.ok .m-dot { fill: var(--good); }
.m-dev.bad .m-dot { fill: var(--exploited); }
.m-dev.ok .m-status { fill: var(--good) !important; }
.m-dev.bad .m-status { fill: var(--exploited) !important; }
.m-pkt { cursor: pointer; }
.m-pkt rect { fill: var(--sun); }
.m-pkt text { fill: var(--sun-ink); font: 600 12.5px var(--font-mono); }
.m-pkt:focus-visible rect { stroke: var(--ink); stroke-width: 2; }
.m-pkt rect { filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5)); }
.m-pkt.arrived { opacity: 0; pointer-events: none; transition: opacity 0.35s 0.35s; }
.bubbles { position: absolute; inset: 0; pointer-events: none; }
.bubble { --bc: rgba(var(--brand-rgb), 0.45); position: absolute; max-width: 42%; background: var(--surface-2); color: var(--ink); border: 1px solid var(--bc); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 0.78rem; line-height: 1.35; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.bubble::after { content: ""; position: absolute; left: var(--tail, 50%); bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: var(--surface-2); border: solid var(--bc); border-width: 0 1px 1px 0; transform: rotate(45deg); }
.bubble.below::after { bottom: auto; top: -6px; border-width: 1px 0 0 1px; }
.bubble.right::after { left: -6px; top: var(--tail, 50%); bottom: auto; margin: -5px 0 0; border-width: 0 0 1px 1px; }
.bubble.left::after { left: auto; right: -6px; top: var(--tail, 50%); bottom: auto; margin: -5px 0 0; border-width: 1px 1px 0 0; }
.bubble.say { --bc: var(--sun); }
.bubble.quiet { --bc: var(--line); color: var(--muted); border-style: dashed; }
.bubble.quiet::after { border-style: dashed; }
.m-controls { margin-top: 10px; }
.m-speed { font: 0.8rem var(--font-mono); color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.m-speed select { padding: 6px 8px; }
/* Honest labelling: every simulated stage and console says so where the learner is looking. */
/* ---------- Mission "room" scene (scenario.scene === "room"; the DHCP mission is the prototype) ----------
   The devices stand on one floor under one light, with no cards round them. The cable lies on the floor and
   carries a plain packet; each device shows its own state. The room is dark in both themes, so it carries
   the dark theme's colours for everything inside it instead of borrowing the page's. */
.stage.room .stage-box {
  --bg: #070A10; --surface: #0F1621; --surface-2: #142030; --ink: #DCE6F2; --muted: #9AA9BF; --line: #1E2A3A;
  --brand: #3FE0E8; --brand-rgb: 63, 224, 232; --sun: #FFB000; --sun-ink: #1F1400; --sun-rgb: 255, 176, 0;
  --good: #3DDC97; --good-tint: #0D2A20; --exploited: #FF5470; --exploited-tint: #2E1119; --likely: #FF8C42;
  --dg-line: #2B3D55; --dg-box: #24344A; --hw-stroke: #5E7799; --hw-screen: #0A1A26; --hw-port: #0A1018;
  --hw-face-top: #3A5075; --hw-face-side: #0B131E;
  color-scheme: dark; border-color: #1E2A3A;
  background: radial-gradient(ellipse 64% 48% at 50% 46%, #1d2b3c 0%, #121b27 48%, #080c12 100%);
}
.stage.room .m-dev .m-box { fill: transparent; stroke: none; filter: none; }
.stage.room .m-dot { display: none; }
.stage.room .hw { filter: none; }
.stage.room .hw * { vector-effect: non-scaling-stroke; }
.stage.room .hw-body:not(.hw-top):not(.hw-side) { fill: #17233A; }
.m-shadow { fill: #000; opacity: 0.6; filter: blur(7px); }
.stage.room .m-link { stroke: #05080c; stroke-width: 6; filter: drop-shadow(0 1px 0 rgba(120, 150, 190, 0.22)); transition: stroke 0.2s; }
.stage.room .m-link.live { stroke: #1f7d84; filter: drop-shadow(0 0 7px rgba(63, 224, 232, 0.55)); }
.stage.room .m-name { font-family: var(--font-mono) !important; font-weight: 600; font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase; fill: #C5D4E4; }
.stage.room .m-dev.talk .hw-screen { fill: #11404a; stroke: var(--brand); filter: drop-shadow(0 0 6px rgba(63, 224, 232, 0.6)); }
.stage.room .m-dev.talk .hw-led, .stage.room .m-dev.rx .hw-led { fill: var(--brand); opacity: 1; filter: drop-shadow(0 0 3px rgba(63, 224, 232, 0.9)); }
.stage.room .m-dev.ok .hw-led { fill: var(--good); opacity: 1; filter: drop-shadow(0 0 3px rgba(61, 220, 151, 0.9)); }
.stage.room .m-dev.bad .hw-led { fill: var(--exploited); opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 84, 112, 0.95)); }
.stage.room .m-dev.warn .hw-led { fill: var(--likely); opacity: 1; filter: drop-shadow(0 0 3px rgba(255, 140, 66, 0.9)); }
.stage.room .m-dev.lit .hw-screen { fill: #0f3a41; stroke: var(--brand); }
.m-screen { font: 600 3.6px var(--font-mono) !important; fill: #B6F6F9 !important; }
/* Desktop: the room is drawn smaller than its own units, so 11.5 came out at about 10 px; these read at 11 to 12 px. */
.stage.room svg:not(.compact) .m-name { font-size: 13.5px; }
.stage.room svg:not(.compact) .m-ip { font-size: 14.5px; }
.stage.room svg:not(.compact) .m-ip .m-k { font-size: 12px; }
.stage.room svg:not(.compact) .m-status { font-size: 13px; }
/* On a phone the room keeps the desktop arrangement, scaled down, so its words are drawn larger (layout textScale). */
.stage.room svg.compact .m-name { font-size: 21px; letter-spacing: 0.04em; }
.stage.room svg.compact .m-ip { font-size: 23px; }
.stage.room svg.compact .m-ip .m-k { font-size: 18px; }
.stage.room svg.compact .m-status { font-size: 21px; }
/* An address on the screen is not always good news: a self-assigned 169.254 address on a PC in trouble is red. */
.stage.room .m-dev.bad .hw-screen, .stage.room .m-dev.bad.lit .hw-screen { fill: #2E1119; stroke: var(--exploited); filter: none; }
.stage.room .m-dev.bad .m-screen { fill: #FFB3C0 !important; }
.stage.room .m-dev.warn.lit .hw-screen { fill: #2E1A0D; stroke: var(--likely); }
.stage.room .m-dev.warn .m-screen { fill: #FFD2B0 !important; }
.m-pkt.slab rect.m-hit { fill: transparent; filter: none; stroke: none; }
.m-pkt.slab rect.m-slab { fill: #0B1118; stroke: var(--brand); stroke-width: 1.5; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 7px rgba(63, 224, 232, 0.4)); }
.m-slab-edge { stroke: var(--brand); stroke-width: 2; stroke-linecap: round; fill: none; }
.m-pkt.slab:focus { outline: none; }
.m-pkt.slab:focus-visible rect.m-slab { stroke: #fff; stroke-width: 2.5; }
.m-tag { opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.m-pkt.slab:hover .m-tag, .m-pkt.slab:focus-visible .m-tag { opacity: 1; }
.m-pkt.slab .m-tag rect { fill: #142030; stroke: rgba(63, 224, 232, 0.5); stroke-width: 1; filter: none; }
.m-pkt.slab .m-tag text { fill: #DCE6F2; font: 600 11px var(--font-mono); }
.m-says { display: grid; gap: 6px; margin-top: 10px; min-height: 2.6em; }
.m-says:empty { display: none; }
.m-say { margin: 0; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 3px solid rgba(var(--brand-rgb), 0.6); font-size: 0.82rem; line-height: 1.4; }
.m-say.say { border-left-color: var(--sun); }
.m-say.quiet { color: var(--muted); border-left-style: dashed; }
.m-say b { font: 600 0.7rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; margin-right: 6px; }
.m-caption { margin: 10px 0 0; min-height: 1.5em; font: 600 0.8rem/1.5 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.m-caption:not(:empty)::before { content: "▸ "; color: var(--brand); }
.stage.room .stage-head { margin: 10px 0 0; }
@media (prefers-reduced-motion: reduce) { .stage.room .m-link, .m-tag { transition: none; } }
/* A small device picture as a room (docs/diagram-standard.md): any .stage-box can opt in with .room-box. Dark
   in both themes with its own colours; devices stand on the floor with a .room-shadow under them. */
.stage-box.room-box {
  --bg: #070A10; --surface: #0B1118; --surface-2: #142030; --ink: #DCE6F2; --muted: #9AA9BF; --line: #1E2A3A;
  --brand: #3FE0E8; --brand-rgb: 63, 224, 232; --sun: #FFB000; --good: #3DDC97; --bad: #FF5470; --exploited: #FF5470;
  --dg-line: #05080c; --dg-strong: #4D6280; --dg-box: #24344A;
  --hw-stroke: #5E7799; --hw-screen: #0A1A26; --hw-port: #0A1018; --hw-face-top: #3A5075; --hw-face-side: #0B131E;
  color-scheme: dark; border-color: #1E2A3A;
  background: radial-gradient(ellipse 70% 62% at 50% 52%, #1d2b3c 0%, #121b27 50%, #080c12 100%);
}
.room-box .hw { filter: none; }
.room-box .hw-body:not(.hw-top):not(.hw-side) { fill: #17233A; }
.room-shadow { fill: #000; opacity: 0.6; filter: blur(3px); }
.room-box .hs-wire, .room-box .tap-wire { stroke-width: 4.5; stroke-linecap: round; }
.room-box .hs-lbl, .room-box .tap-lbl { font: 600 8.5px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; fill: #C5D4E4; }
/* Here the words on the packet are the lesson (SYN, ACK; what a sniffer can read), so the slab keeps a short tag. */
.room-box .hs-pkt rect, .room-box .tap-pkt rect { fill: #0B1118; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.7)); }
/* The subnet calculator's network picture as a room (docs/diagram-standard.md). */
.sc-net {
  --surface: #0F1621; --ink: #DCE6F2; --muted: #9AA9BF; --line: #1E2A3A; --brand: #3FE0E8; --sun: #FFB000; --sun-rgb: 255, 176, 0; --good: #3DDC97;
  --dg-line: #05080c; --dg-box: #24344A; --hw-stroke: #5E7799; --hw-screen: #0A1A26; --hw-port: #0A1018; --hw-face-top: #3A5075; --hw-face-side: #0B131E;
  color-scheme: dark; border-color: #1E2A3A;
  background: radial-gradient(ellipse 72% 66% at 50% 52%, #1d2b3c 0%, #121b27 52%, #080c12 100%);
}
.sc-net .hw { filter: none; }
.sc-net .hw-body:not(.hw-top):not(.hw-side) { fill: #17233A; }
.sc-net .sc-wire { stroke-width: 2.2; }
.sc-net .sc-trunk line { stroke: #05080c; stroke-width: 5; stroke-linecap: round; }
.sc-net .sc-dev.me .hw-screen { filter: drop-shadow(0 0 4px rgba(255, 176, 0, 0.7)); }
.stage-head, .console-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.8rem; color: var(--muted); }
.stage-head { margin-bottom: 10px; }
.console-head { margin-top: 12px; }
.console-head + .console { margin-top: 6px; }
.sim-tag { font: 600 0.68rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--sun); background: rgba(var(--sun-rgb), 0.1); border: 1px solid rgba(var(--sun-rgb), 0.4); border-radius: var(--radius-sm); padding: 4px 7px; white-space: nowrap; }
/* Wireshark view: packet list summary, then one row per protocol layer. Long lines wrap; nothing scrolls sideways. */
.ws { display: grid; gap: 10px; margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--line); }
.ws-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ws-head h3 { font: 600 0.82rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.ws h4 { margin-top: 4px; }
.ws code { font-family: var(--font-mono); overflow-wrap: anywhere; }
.ws-filter { font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.ws-filter code { color: var(--good); background: var(--good-tint); border: 1px solid rgba(var(--good-rgb), 0.4); border-radius: 3px; padding: 1px 7px; }
.ws-filter .muted { font-size: 0.8rem; }
.ws-row { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.ws-row .wide { grid-column: 1 / -1; }
.ws-row dt { font: 500 0.66rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ws-row dd { margin: 2px 0 0; font-size: 0.82rem; color: var(--ink); }
.ws-tree { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: layer; }
.ws-tree > li { display: grid; gap: 4px; border-left: 2px solid var(--brand); padding-left: 10px; }
.ws-line { font-size: 0.8rem; color: var(--brand); }
.ws-tree p { font-size: 0.85rem; color: var(--muted); }
.ws-children { margin: 4px 0 0; padding: 8px 10px 8px 22px; display: grid; gap: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ws-children code { font-size: 0.76rem; color: var(--ink); }
.ws-note { font-size: 0.8rem; color: var(--muted); }
/* Evidence check: tick what supports the diagnosis; each item then explains itself. */
.ev { display: grid; gap: 10px; margin-top: 4px; }
.ev-set { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.ev-set legend { padding: 0; margin-bottom: 8px; }
.ev-item { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.ev-item label { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: 10px; align-items: start; cursor: pointer; font-size: 0.92rem; }
.ev-item input { margin: 3px 0 0; width: 1rem; height: 1rem; accent-color: var(--brand); }
.ev-item .tag { justify-self: start; margin-left: calc(1.1rem + 10px); font-size: 0.66rem; }
.ev-why { font-size: 0.84rem; color: var(--muted); margin-left: calc(1.1rem + 10px); }
.ev-item.right { border-color: rgba(var(--good-rgb), 0.5); }
.ev-item.right .ev-why b { color: var(--good); }
.ev-item.wrong { border-color: rgba(var(--bad-rgb), 0.6); background: var(--bad-tint); }
.ev-item.wrong .ev-why { color: var(--ink); }
.ev-item.wrong .ev-why b { color: var(--bad); }
.simplification { margin-top: 10px; }
.simplification p { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.m-toggle { font: 0.78rem var(--font-mono); color: var(--muted); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.fields { margin: 0; display: grid; gap: 8px; }
.fields div { display: grid; gap: 2px; border-left: 2px solid var(--line); padding-left: 10px; }
.fields dt { font: 500 0.7rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.fields dd { margin: 0; display: grid; gap: 2px; font-size: 0.88rem; }
.fields code { font-family: var(--font-mono); color: var(--sun); overflow-wrap: anywhere; }
.transcript { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 0.9rem; }
.transcript:empty::before { content: "Nothing yet. Press Play or Step, or use a tool."; color: var(--muted); }
.warnline { color: var(--likely); }
.tool-group { display: grid; gap: 6px; margin-top: 8px; }
.tool-group .chip { font-size: 0.76rem; text-align: left; }
.console { max-height: 220px; margin-top: 10px; }
.m-logview { display: grid; gap: 10px; }
.log-search { gap: 8px; }
.log-count { margin: 0; font-size: 0.85rem; }
.log-out { height: min(360px, 55vh); margin: 0; overflow: auto;  /* fixed, so a search doesn't move everything below */ white-space: pre; font-size: 0.8rem; }
.log-out mark { background: rgba(var(--brand-rgb), 0.28); color: inherit; border-radius: 2px; }
.findings { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 0.88rem; }
.rc { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 6px; display: grid; gap: 8px; }
.debrief { border-color: rgba(var(--good-rgb), 0.45); }
@media (max-width: 900px) { .mission-grid { grid-template-columns: 1fr; } .bubble { max-width: 60%; font-size: 0.7rem; } }
/* PATCH//AGENCY: a simulated SOC shift (static/js/agency/ui.js) */
.agency { display: grid; gap: 16px; }
.ag-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; position: sticky; top: 8px; z-index: 5; padding: 10px 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--sun) 7%, var(--surface)), var(--surface)); border: 1px solid rgba(var(--sun-rgb), 0.5); border-radius: var(--radius); box-shadow: var(--elev); }
.ag-clock b { font-size: 1.15rem; color: var(--sun); }
.ag-bar .btn { margin-left: auto; }
/* SOC-dashboard status tiles above the desk: a live read-out of the shift (decorative; the queue carries the facts). */
.ag-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ag-tile { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-top: 2px solid color-mix(in srgb, var(--brand) 42%, var(--line)); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, var(--surface)), var(--surface)); box-shadow: var(--elev); }
.ag-tile-v { font: 700 1.5rem/1 var(--font-display); color: var(--ink); letter-spacing: 0.01em; }
.ag-tile-l { font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ag-tile.cool { border-top-color: color-mix(in srgb, var(--brand) 42%, var(--line)); }
.ag-tile.hot { border-top-color: var(--sun); } .ag-tile.hot .ag-tile-v { color: var(--sun); }
.ag-tile.good { border-top-color: var(--good); } .ag-tile.good .ag-tile-v { color: var(--good); }
.ag-tile.sev-medium { border-top-color: var(--sun); } .ag-tile.sev-medium .ag-tile-v { color: var(--sun); }
.ag-tile.sev-high, .ag-tile.sev-critical { border-top-color: var(--bad); } .ag-tile.sev-high .ag-tile-v, .ag-tile.sev-critical .ag-tile-v { color: var(--bad); }
@media (max-width: 600px) { .ag-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.ag-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.ag-queue ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ag-qitem { position: relative; width: 100%; text-align: left; display: grid; gap: 4px; cursor: pointer; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--dk-p, var(--line)) 7%, var(--surface)), var(--surface));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.ag-qitem:hover { border-color: var(--brand); box-shadow: 0 8px 22px color-mix(in srgb, var(--dk-p, var(--brand)) 24%, transparent); }
@media (prefers-reduced-motion: no-preference) { .ag-qitem:hover { transform: translateY(-2px); } }
.ag-qitem[aria-current="true"] { border-color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 38%, transparent), 0 8px 24px color-mix(in srgb, var(--brand) 18%, transparent); }
.ag-qitem.closed { opacity: 0.72; }
.ag-qitem.closed .ag-qtitle { color: var(--muted); }
.ag-qtitle { font-weight: 600; font-size: 0.92rem; }
.ag-qmeta { font-size: 0.78rem; color: var(--muted); }
.ag-qmeta .tag { padding: 2px 5px; font-size: 0.66rem; }
.tag.sev-high, .tag.sev-critical { color: var(--bad); border-color: rgba(var(--bad-rgb), 0.6); }
.ag-alert { display: grid; gap: 12px; min-width: 0; }
.ag-alert h2:focus, .agency h2:focus { outline: none; }
.ag-ask, .ag-close { border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 8px; }
.ag-askform, .ag-close form { display: grid; gap: 10px; }
.ag-askform label, .ag-close label, .ag-hand label { display: grid; gap: 4px; font-size: 0.88rem; min-width: 0; }
.ag-askform select, .ag-close select, .ag-hand select, .ag-hand textarea { width: 100%; max-width: 100%; font: inherit; font-size: 0.88rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; }
.ag-hand form { display: grid; gap: 14px; }
.ag-hset { border-top: 1px dashed var(--line); padding-top: 10px; }
.ag-checks { margin: 8px 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.ag-checks b.ok, .ag-dalert b.ok { color: var(--good); } .ag-checks b.no, .ag-dalert b.no { color: var(--bad); }
.ag-dalert { margin-top: 8px; }
.ag-dalert p { margin: 6px 0; font-size: 0.9rem; }
.ag-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ag-notes > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.ag-notes p { margin: 6px 0 0; font-size: 0.88rem; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1300px) { .ag-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); } .ag-comms { grid-column: 1 / -1; } }
@media (max-width: 900px) { .ag-grid, .ag-notes { grid-template-columns: 1fr; } .ag-bar { top: 0; } }

/* The shift desk uses more of a wide screen than a normal reading column, so the three panes breathe. */
.view-wide { max-width: 1460px; }


/* Graph charts (static/js/chart.js): a table of numbers drawn as bars or a line, so a learner reads it at a glance.
   Namespaced gchart/ch- so it never collides with the CVE radar's own .chart. */
.gchart { margin: 0; min-width: 0; }
.gchart-title { font-weight: 700; margin: 0 0 8px; }
.ch-svg { width: 100%; max-width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--line); stroke-width: 1; opacity: 0.5; }
.ch-ytick, .ch-xtick { fill: var(--muted); font: 10px var(--font-mono, ui-monospace, monospace); }
.ch-bar { transition: opacity 0.15s; }
.ch-line { stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch-threshold { stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 5 4; }
.ch-thlbl { fill: var(--muted); font: 10px var(--font-mono, ui-monospace, monospace); }
.gchart-key { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; }
.gchart-key li { display: flex; align-items: center; gap: 7px; font-size: 0.84rem; color: var(--muted); }
.ch-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.gchart-cap { font-size: 0.82rem; margin: 8px 0 0; }

/* Bespoke case drawings (static/js/caseart.js): permission grid, crypto lock states, Wi-Fi rogue-AP map. */
.caseart { margin: 0; text-align: center; }
.ca-svg { width: 100%; max-width: 340px; height: auto; display: block; margin: 0 auto; }
.caseart figcaption { font-size: 0.82rem; margin-top: 8px; }
.ca-cell { fill: var(--surface-2, var(--surface)); stroke: var(--line); stroke-width: 1.2; }
.ca-cell.on { fill: rgba(var(--brand-rgb), 0.18); stroke: rgba(var(--brand-rgb), 0.5); }
.ca-cell.bad { fill: rgba(var(--bad-rgb), 0.22); stroke: var(--bad); }
.ca-bit { fill: var(--ink); font: 700 13px var(--font-mono, ui-monospace, monospace); }
.ca-rlbl, .ca-clbl { fill: var(--muted); font: 9px var(--font-mono, ui-monospace, monospace); }
.ca-lock { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ca-lock.open { stroke: var(--bad); } .ca-lock.weak { stroke: var(--sun); } .ca-lock.strong { stroke: var(--good); }
.ca-llbl { fill: var(--ink); font: 700 9px var(--font-mono, ui-monospace, monospace); }
.ca-lsub { font: 8px var(--font-body); }
.ca-lsub.open { fill: var(--bad); } .ca-lsub.weak { fill: var(--sun); } .ca-lsub.strong { fill: var(--good); }
.ca-dev { fill: var(--surface); stroke: var(--ink); stroke-width: 1.4; }
.ca-dev-l { stroke: var(--ink); stroke-width: 1.4; }
.ca-ap circle { fill: var(--surface); stroke-width: 1.6; }
.ca-ap.good circle { stroke: var(--good); } .ca-ap.bad circle { stroke: var(--bad); } .ca-ap.muted circle { stroke: var(--muted); }
.ca-ap-ic { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; }
.ca-aplbl { fill: var(--ink); font: 700 9px var(--font-mono, ui-monospace, monospace); }
.ca-apsub { fill: var(--muted); font: 8px var(--font-body); }
.ca-link { stroke-width: 1.6; } .ca-link.trust { stroke: var(--good); } .ca-link.danger { stroke: var(--bad); stroke-dasharray: 4 3; } .ca-link.ignore { stroke: var(--muted); opacity: 0.4; }

/* --- Ambient life --------------------------------------------------------------------------------------------
   The glow, the drifting grid, the packets and the scan line live on .ambience, which sits behind the page
   (see site_template.html). An earlier version painted the glow on body::before at z-index -1, so it sat
   behind the solid page background and never showed, and tried to drift the grid by animating
   background-position on a fixed background, which browsers ignore. This layer uses transform only.
   The shell adds body.life on ordinary pages and leaves it off during an exam or a review. */
/* The page is flat. The grid lives inside a picture, not behind the writing. */
.ambience, body.life .ambience { display: none; }
#main, footer, nav.trail { position: relative; z-index: 1; }
.amb-glow, .amb-grid, .amb-scan { position: absolute; inset: 0; }
.amb-glow {
  inset: -20vmax;
  background:
    radial-gradient(42vmax 36vmax at 18% 8%, rgba(var(--brand-rgb), 0.22), transparent 62%),
    radial-gradient(38vmax 32vmax at 88% 90%, rgba(var(--sun-rgb), 0.16), transparent 64%);
}
.amb-grid {
  inset: -40px;
  background-image:
    linear-gradient(rgba(var(--brand-rgb), 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--brand-rgb), 0.11) 1px, transparent 1px);
  background-size: 32px 32px;
}
.amb-scan { inset: auto 0 auto 0; height: 18%; top: -18%;
  background: linear-gradient(180deg, transparent, rgba(var(--brand-rgb), 0.09), transparent); }
.amb-scan-x { inset: 0 auto 0 -18%; width: 18%; height: auto; top: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(var(--brand-rgb), 0.09), transparent); }
body.life { background-image: none; }
@media (prefers-reduced-motion: no-preference) {
  body.life .amb-glow { animation: aurora 18s ease-in-out infinite alternate; }
  @keyframes aurora { from { transform: translate3d(-6%, -4%, 0) scale(1); } to { transform: translate3d(6%, 5%, 0) scale(1.12); } }
  body.life .amb-grid { animation: grid-pan 7s linear infinite; }
  @keyframes grid-pan { to { transform: translate3d(32px, 32px, 0); } }
  /* One pass down, then one pass across. Each pass takes 18s, so a full cycle is 36s. */
  body.life .amb-scan { animation: amb-scan-y 36s linear infinite; }
  body.life .amb-scan-x { animation: amb-scan-x 36s linear infinite; }
  @keyframes amb-scan-y {
    0% { top: -18%; opacity: 1; }
    45% { top: 100%; opacity: 1; }
    50%, 100% { top: 100%; opacity: 0; }
  }
  @keyframes amb-scan-x {
    0%, 50% { left: -18%; opacity: 0; }
    55% { left: -18%; opacity: 1; }
    95% { left: 100%; opacity: 1; }
    100% { left: 100%; opacity: 0; }
  }
}
@media (prefers-reduced-motion: reduce) { .amb-scan { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  /* Flow: little dashes marching along a link read as live traffic, on the case art and Wi-Fi maps only.
     (No bare .flow selector: stroke-dasharray/offset are inherited, so it would dash every stroke inside
     a lesson's flow diagram, which also uses class "flow".) */
  .ca-link.trust, .ca-link.danger { stroke-dasharray: 5 7; animation: flow-dash 1.5s linear infinite; }
  .ca-link.trust { animation-duration: 1.2s; } .ca-link.danger { animation-duration: 0.9s; stroke-dasharray: 5 5; }
  @keyframes flow-dash { to { stroke-dashoffset: -24; } }
  /* The "you're here" step gently breathes, so the current stage of the loop draws the eye. */
  .loop-node.here .loop-dot { box-shadow: 0 0 0 1px rgba(var(--brand-rgb), 0.7); }
  /* Each page eases in as you navigate, so moving around the site feels fluid. */
  .view { animation: view-rise 0.34s ease-out both; }
  @keyframes view-rise { from { opacity: 0; transform: translateY(10px); } }
  /* Charts build themselves on open: bars grow from the axis, the line draws left to right, dots arrive. */
  .ch-bar { transform-box: fill-box; transform-origin: bottom; animation: bar-grow 0.6s cubic-bezier(.2, .8, .3, 1) both; }
  .gchart svg:hover .ch-bar { filter: brightness(1.12); }
  @keyframes bar-grow { from { transform: scaleY(0); } }
  .ch-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: line-draw 0.9s ease-out 0.1s forwards; }
  @keyframes line-draw { to { stroke-dashoffset: 0; } }
  .ch-dot { opacity: 0; animation: dot-in 0.3s ease-out forwards; }
  .ch-dot:nth-of-type(1) { animation-delay: 0.5s; } .ch-dot:nth-of-type(2) { animation-delay: 0.6s; }
  .ch-dot:nth-of-type(3) { animation-delay: 0.7s; } .ch-dot:nth-of-type(4) { animation-delay: 0.8s; }
  .ch-dot:nth-of-type(n+5) { animation-delay: 0.9s; }
  @keyframes dot-in { from { opacity: 0; } to { opacity: 1; } }

  /* Home: the completed route road draws itself in from GO to where you are. */
  .route-road.done { stroke-dasharray: 1; stroke-dashoffset: 1; animation: route-draw 1.2s ease-out 0.2s forwards; }
  @keyframes route-draw { to { stroke-dashoffset: 0; } }
  /* Route stops lift a touch on hover. */
  .route-stop .route-dot { transition: transform 0.15s ease; transform-box: fill-box; transform-origin: center; }
  .route-stop:hover .route-dot, .route-stop:focus-visible .route-dot { transform: scale(1.12); }
  /* The briefing command types out with a caret. */
  .changelog .ver .cmd.typing::after { content: "\2588"; margin-left: 1px; color: var(--brand); animation: blink 1.1s steps(1) infinite; }
  /* The actively-exploited rows keep a visible red edge. A 4px shadow was too faint to read as motion. */
  .kev-list .kev-item { border-left: 3px solid transparent; animation: kev-glow 2.2s ease-in-out infinite; }
  @keyframes kev-glow { 0%, 100% { border-left-color: transparent; } 50% { border-left-color: var(--exploited); } }
  .mk.warn { animation: warn-pulse 2.2s ease-in-out infinite; }
  @keyframes warn-pulse { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 0 0 3px rgba(var(--bad-rgb), 0.45); } }
  /* The XP bar fills in on load and refills when you earn. */
  #xp .bar i { animation: xp-grow 0.9s cubic-bezier(.2, .8, .3, 1); }
  @keyframes xp-grow { from { width: 0; } }
  /* A correct quiz answer gives a little pop. */
  .opt.right { animation: opt-pop 0.4s cubic-bezier(.2, 1.4, .4, 1); }
  @keyframes opt-pop { from { transform: scale(0.96); } 50% { transform: scale(1.03); } }
}

/* The alert's work is split into two labelled cards: Investigate (logs, findings) and Decide (ask a team, close).
   They stack on narrow screens and sit side by side on a wide one, so the panel reads as steps, not one long scroll. */
.ag-worksplit { display: grid; gap: 14px; min-width: 0; }
.ag-worksplit > .ag-card { display: grid; gap: 12px; align-content: start; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.ag-worksplit > .ag-card > .ag-work:first-child { margin-top: 0; }
/* (They used to sit side by side from 1300 px, but the middle column is only ~800 px there: log lines were cut off and
   the request menu truncated. Stacked, the log and both forms get the full width.) */
@media (max-width: 560px) { .ag-worksplit > .ag-card { padding: 0; border: 0; } }

/* "See it at work": an optional, inline explainer on an alert. Opening it never leaves the shift or changes its state. */
.ag-see { border: 1px solid rgba(var(--sun-rgb), 0.45); border-radius: var(--radius); background: var(--brand-soft); padding: 0 14px; }
.ag-see > summary { cursor: pointer; font-weight: 600; color: var(--brand); padding: 11px 0; list-style: none; }
.ag-see > summary::-webkit-details-marker { display: none; }
.ag-see > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius-sm); }
.ag-see-ic { display: inline-block; transition: transform 0.2s ease; }
.ag-see[open] > summary .ag-see-ic { transform: rotate(90deg); }
.ag-see-body { padding-bottom: 14px; }

/* The "See it at work" diagrams themselves (static/js/explainers.js). SVG in currentColor, legible in both themes. */
.xpl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; }  /* minmax(0, …): a long unbroken status must not widen the page */
.xpl-head b { font-size: 1rem; }
.xpl-why { margin: -2px 0 2px; max-width: 70ch; }
.xpl-toggle { align-items: center; gap: 12px; }
.lesson-open h1 { font: 700 2.1rem/1.15 var(--font-display); letter-spacing: 0.04em; margin: 10px 0 0; }
.lesson .doc, .lesson .case { background: transparent; box-shadow: none; }
.lesson .screen { background: var(--panel-bg); }
.xpl-stage { display: grid; gap: 10px; background-color: var(--slab); background-image: linear-gradient(rgba(var(--brand-rgb), 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--brand-rgb), 0.07) 1px, transparent 1px); background-size: 24px 24px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03); }
:root[data-theme="light"] .panel, :root[data-theme="light"] .case { box-shadow: var(--elev); }
:root[data-theme="light"] .xpl-stage, :root[data-theme="light"] .flow-stage { background: var(--surface-2); }
.xpl-svg { width: 100%; height: auto; max-width: 540px; margin: 0 auto; display: block; }
.xpl-vpn .xpl-svg { max-width: 760px; }
.vpn-sea { fill: #07131d; }
.vpn-graticule path { fill: none; stroke: rgba(var(--brand-rgb), 0.08); stroke-width: 1; }
.vpn-land { fill: #163044; stroke: #7fa4c4; stroke-width: 1.2; }
.vpn-ie { fill: #102636; stroke: #5d7e98; }
.vpn-near { fill: var(--faint); font: 600 11px var(--font-mono, monospace); text-anchor: middle; }
.vpn-clear, .vpn-tube, .vpn-tube-in, .vpn-locks, .vpn-hop { stroke-linejoin: round; }
.vpn-landname { fill: var(--ink); font: 600 12px var(--font-mono, monospace); text-anchor: middle; }
.vpn-chip rect { fill: #0c1622; stroke: #314862; }
.vpn-chip text { fill: var(--ink); font: 600 12px var(--font-mono, monospace); }
.vpn-chip.quiet text { fill: var(--muted); font-size: 11px; }
.vpn-chip.onland rect { fill: #12283c; }
.vpn-chip.sun text { fill: var(--sun); }
:root[data-theme="light"] .vpn-chip rect { fill: #f4f8fb; stroke: #9fb1c7; }
.vpn-sea-name { fill: var(--faint); font: 600 11px var(--font-mono, monospace); letter-spacing: 0.22em; text-anchor: middle; }
.vpn-city { fill: var(--ink); font: 700 13px var(--font-body, sans-serif); }
.vpn-sub { fill: var(--muted); font: 11px var(--font-mono, monospace); }
.vpn-pin { fill: var(--sun); stroke: var(--bg); stroke-width: 1.5; }
.vpn-pin-hole { fill: var(--bg); }
.vpn-bldg, .vpn-server, .vpn-badge { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.vpn-badge.on { stroke: var(--brand); }
.vpn-roof, .vpn-win { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; }
.vpn-clear { fill: none; stroke: var(--sun); stroke-width: 2.2; stroke-dasharray: 6 7; stroke-linecap: round; }
.vpn-route-lbl { fill: var(--sun); font: 600 12px var(--font-mono, monospace); }
.vpn-tube { fill: none; stroke: #050a10; stroke-width: 22; stroke-linecap: round; }
.vpn-tube-in { fill: none; stroke: rgba(var(--brand-rgb), 0.35); stroke-width: 12; stroke-linecap: round; }
.vpn-locks { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linecap: butt; stroke-dasharray: 8 20; }
.vpn-hop { fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linecap: round; }
.vpn-badge-t { fill: var(--ink); font: 700 12px var(--font-mono, monospace); }
.xpl-vpn:not(.is-on) .vpn-on { display: none; }
.xpl-vpn.is-on .vpn-off { display: none; }
.xpl-vpn:not(.is-on) .vpn-dc { opacity: 0.38; }
:root[data-theme="light"] .vpn-sea { fill: #d7e6f2; }
:root[data-theme="light"] .vpn-land { fill: #f4f8fb; stroke: #7f93ae; }
:root[data-theme="light"] .vpn-tube { stroke: #b7c8da; }
.xpl-node rect { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.xpl-node .xpl-lbl { fill: var(--muted); font: 600 9px var(--font-mono, ui-monospace, monospace); text-anchor: middle; }
.xpl-node g path, .xpl-node g circle { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.xpl-node g rect { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.xpl-link line { stroke: var(--line); stroke-width: 2; }
.xpl-caption { margin: 0; font-size: 0.92rem; line-height: 1.5; }
.xpl-caption .mono { color: var(--muted); }
.xpl-foot { font-size: 0.78rem; }
@media (prefers-reduced-motion: no-preference) {
  .xpl-vpn.is-on:not(.is-reduced) .vpn-locks { animation: flow-dash 3.2s linear infinite; }
}

/* Request/response explainers (IDOR, cloud): a request line, then a card that flips allowed (a leak) to denied. */
.xpl-req { display: grid; gap: 4px; }
.xpl-url { font-size: 0.95rem; overflow-wrap: anywhere; }
.xpl-url b { color: var(--ink); }
.xpl-resp { display: flex; gap: 10px; align-items: baseline; margin-top: 12px; padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.xpl-resp .xpl-status { font-weight: 700; white-space: nowrap; }
/* On a phone a long browser error code (NET::ERR_CERT_AUTHORITY_INVALID) takes its own line and may break. */
@media (max-width: 520px) { .xpl-resp { flex-wrap: wrap; } .xpl-resp .xpl-status { white-space: normal; overflow-wrap: anywhere; } }
.xpl-resp.no { background: var(--bad-tint); border-color: rgba(var(--bad-rgb), 0.5); }
.xpl-resp.no .xpl-status { color: var(--bad); }
.xpl-resp.ok { background: var(--good-tint); border-color: rgba(var(--good-rgb), 0.5); }
.xpl-resp.ok .xpl-status { color: var(--good); }

/* The mechanism pictures: the query, the comment, the order number. The caption only confirms them. */
.mech { display: grid; gap: 12px; }
.mech-form, .mech-bar, .mech-page, .mech-query, .order { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 14px; }
.mech-k { font: 600 10px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mech-input { display: block; margin-top: 6px; font: 600 1.05rem var(--font-mono); color: var(--bad); }
.mech-query { font: 600 0.95rem/1.5 var(--font-mono); overflow-wrap: anywhere; }
.sql-code { color: var(--bad); background: var(--bad-tint); border-radius: 4px; padding: 0 4px; }
.sql-slot { color: var(--good); }
.sql-aside { display: block; margin-top: 8px; color: var(--muted); font-size: 0.82rem; }
.sql-aside b { color: var(--ink); }
.mech-out { margin: 0; font-weight: 650; }
.mech-out.bad { color: var(--bad); }
.mech-out.good { color: var(--good); }
.mech-page .as-text, .mech-page .ran { margin: 6px 0 0; }
.mech-page .as-text { font-family: var(--font-mono); overflow-wrap: anywhere; }
.mech-page .ran { color: var(--bad); font-weight: 650; }
.cookie-leave, .cookie-stay { padding: 8px 10px; border-radius: var(--radius-sm); font: 600 0.85rem var(--font-mono); }
.cookie-leave { display: flex; justify-content: space-between; gap: 8px; border: 1px solid rgba(var(--bad-rgb), 0.5); color: var(--bad); }
.cookie-stay { border: 1px solid rgba(var(--good-rgb), 0.45); color: var(--good); }
.mech-addr { margin-top: 6px; font: 600 1.05rem var(--font-mono); }
.mech-addr .was { color: var(--muted); text-decoration: line-through; margin-right: 8px; }
.mech-addr .now { color: var(--sun); }
.order { display: grid; gap: 4px; }
.order.open { border-color: rgba(var(--bad-rgb), 0.55); background: var(--bad-tint); }
.order.shut { border-color: rgba(var(--good-rgb), 0.5); background: var(--good-tint); }
.order b { font-size: 1.05rem; }

/* Inbox-rule explainer: a small mailbox; the supplier mail vanishes from the Inbox when the hidden rule is on. */
.xpl-folder { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.xpl-maillist { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.xpl-mail { display: grid; grid-template-columns: minmax(0, 10ch) minmax(0, 1fr); gap: 10px; padding: 7px 8px; border-radius: var(--radius-sm); background: var(--surface); font-size: 0.9rem; }
.xpl-mail b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xpl-mail span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xpl-mail.unread { border-left: 3px solid var(--sun); }
.xpl-mail.unread b, .xpl-mail.unread span { color: var(--ink); font-weight: 600; }
@media (max-width: 420px) { .xpl-mail { grid-template-columns: 1fr; gap: 1px; } }

/* Pick-one explainers (password spray / certificate states): option chips + a body that redraws per choice. */
.xpl-pick { flex-wrap: wrap; gap: 8px; }
.xpl-opt[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.xpl-shape { display: inline-block; padding: 5px 10px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; }
.xpl-facts { margin: 12px 0 0; display: grid; gap: 8px; }
.xpl-facts div { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: 10px; }
.xpl-facts dt { font-weight: 600; color: var(--muted); font-size: 0.82rem; }
.xpl-facts dd { margin: 0; font-size: 0.92rem; }
@media (max-width: 460px) { .xpl-facts div { grid-template-columns: 1fr; gap: 1px; } }

/* DDoS explainer: a capacity bar that fills with legitimate (green) then flood (red) traffic past a capacity line. */
.xpl-capwrap { display: grid; gap: 6px; }
.xpl-cap { position: relative; display: flex; height: 22px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.xpl-seg { height: 100%; transition: width 0.35s ease; }
.xpl-seg.legit { background: var(--good); }
.xpl-seg.attack { background: var(--bad); }
.xpl-cap.over { box-shadow: inset 0 0 0 1px var(--bad); }
.xpl-capline { position: absolute; inset: 0 0 0 auto; width: 2px; background: var(--ink); opacity: 0.55; }
.xpl-caplabel { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .xpl-seg { transition: none; } }

/* Attack-chain explainer: a row of numbered stages (click or Back/Next) and a detail card for the current one. */
.xpl-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.xpl-step { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 0.82rem; cursor: pointer; text-align: left; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px 4px 4px; }
.xpl-step-n { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--ink); font-weight: 700; font-size: 0.74rem; flex: none; }
.xpl-step[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.xpl-step[aria-pressed="true"] .xpl-step-n { background: var(--brand); color: #04121a; }
.xpl-step.win .xpl-step-n { background: var(--good); color: #04121a; }
.xpl-chain-card { border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); padding: 11px 13px; display: grid; gap: 4px; }
.xpl-chain-card b { font-size: 1rem; }
.xpl-chain-card p { margin: 0; }
.xpl-chain-card.win { border-left-color: var(--good); }

/* ---------- Illustrated cards ---------- */
.art-card, .card-art { --cat: var(--brand); }
.art-card { padding-top: 0; overflow: hidden; border-top: 3px solid var(--cat); }
.card-art { display: grid; place-items: center; height: 112px; margin-inline: -16px; margin-bottom: 4px; background: radial-gradient(120% 140% at 50% 120%, color-mix(in srgb, var(--cat) 22%, transparent), transparent 70%), color-mix(in srgb, var(--cat) 5%, var(--surface)); background-image: radial-gradient(120% 140% at 50% 120%, color-mix(in srgb, var(--cat) 22%, transparent), transparent 70%), radial-gradient(rgba(127, 144, 168, 0.14) 1px, transparent 1.2px); background-size: auto, 14px 14px; border-bottom: 1px solid var(--line); overflow: hidden; }
.card-art svg { width: 100%; max-width: 260px; height: 100%; overflow: hidden; }
.card-art .cln { stroke: color-mix(in srgb, var(--cat) 45%, var(--dg-line)); stroke-width: 1.6; }
.card-art .cln.air { stroke-dasharray: 2 4; stroke-linecap: round; }
.gl { fill: none; stroke: var(--cat, var(--brand)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gl.bad { stroke: var(--bad); } .gl.good { stroke: var(--good); }
.ctag rect { fill: var(--surface); stroke: color-mix(in srgb, var(--cat) 70%, transparent); stroke-width: 1; }
.ctag text { font: 600 8.5px var(--font-mono); fill: var(--ink); }
.ctag.bad rect { stroke: rgba(var(--bad-rgb), 0.75); } .ctag.bad text { fill: var(--bad); }
.cpkt { fill: var(--cat); stroke: var(--surface); stroke-width: 1.5; filter: drop-shadow(0 0 4px var(--cat)); }
.cpkt.bad { fill: var(--bad); } .cpkt.good { fill: var(--good); }
.czone { stroke-width: 1; stroke-dasharray: 3 3; }
.czone.a { fill: rgba(var(--brand-rgb), 0.08); stroke: rgba(var(--brand-rgb), 0.55); } .czone.b { fill: rgba(var(--sun-rgb), 0.08); stroke: rgba(var(--sun-rgb), 0.55); }
.cosi { opacity: 0.85; }
.cterm { fill: #05080C; stroke: var(--dg-strong); } .cterm-bar { stroke: var(--dg-strong); } .cdot { fill: var(--dg-strong); }
.cterm-t { font: 500 7px var(--font-mono); fill: #3DDC97; letter-spacing: 0; } .cterm-t.dim { fill: #7F90A8; }
.needle { transform-box: fill-box; transform-origin: 100% 100%; }
.art-card:hover { border-color: var(--cat); border-top-color: var(--cat); box-shadow: 0 12px 32px color-mix(in srgb, var(--cat) 20%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .needle { transition: transform 0.7s cubic-bezier(0.3, 1.6, 0.5, 1); }
  .art-card:hover .needle { transform: rotate(118deg); }
  .blink { animation: hw-blink 1s steps(1) infinite; }
  .art-card:hover .cosi { animation: cosi 0.9s ease-in-out; } .cosi:nth-child(2) { animation-delay: 0.06s; } .cosi:nth-child(3) { animation-delay: 0.12s; }
  @keyframes cosi { 50% { transform: translateX(4px); } }
}
.art-card .done { top: 10px; right: 10px; z-index: 1; border: 1px solid rgba(var(--good-rgb), 0.45); border-radius: var(--radius-sm); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }

/* ---------- Category headings ---------- */
.cat-h { font: 700 1.05rem var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; display: flex; align-items: center; gap: 10px; }
.cat-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- OSI lab ---------- */
.osi { display: grid; gap: 18px; }
.osi-progress .pchip { font-size: 0.8rem; }
.osi-stage { display: grid; grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr); gap: 10px; align-items: stretch; }
.osi-stack { display: grid; gap: 4px; }
.osi-host { font: 600 0.78rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); text-align: center; display: grid; justify-items: center; gap: 4px; }
.host-ic { width: 54px; height: 40px; overflow: visible; }
.pp-group { display: flex; align-items: center; gap: 8px; }
.grp-ic { width: 34px; height: 25px; flex: none; overflow: visible; }
.osi-layer { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--surface); font-size: 0.88rem; transition: background 0.2s, opacity 0.2s; }
.osi-layer b { font-family: var(--font-mono); color: var(--c); }
.osi-layer.past { opacity: 0.45; }
.osi-layer.on { background: color-mix(in srgb, var(--c) 18%, var(--surface)); border-color: var(--c); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 30%, transparent); opacity: 1; }
.osi-wire { align-self: end; height: 6px; margin-bottom: 18px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
.osi-wire.on { background: repeating-linear-gradient(90deg, var(--sun) 0 8px, transparent 8px 14px); }
@media (prefers-reduced-motion: no-preference) { .osi-wire.on { animation: wire 0.6s linear infinite; } @keyframes wire { to { background-position: 14px 0; } } }
.osi-pdu { display: grid; justify-items: center; gap: 6px; margin-top: 14px; min-height: 64px; }
.pdu-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; }
.pdu-h, .pdu-data { display: grid; padding: 6px 9px; border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 16%, var(--bg)); font: 0.76rem var(--font-mono); text-align: center; }
.pdu-h b { color: var(--c); font-weight: 600; }
.pdu-h i { font-style: normal; color: var(--muted); font-size: 0.7rem; }
.pdu-data { color: var(--ink); align-content: center; }
.pdu-bits { font: 0.85rem var(--font-mono); color: var(--sun); letter-spacing: 0.1em; overflow-wrap: anywhere; text-align: center; }
.pdu-name { font: 600 0.72rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.osi-say { text-align: center; max-width: 64ch; justify-self: center; min-height: 3em; }
.osi-ref { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 14px; }
.osi-pick { display: grid; gap: 4px; align-content: start; }
.osi-row { text-align: left; cursor: pointer; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--surface); font-size: 0.9rem; }
.osi-row b { font-family: var(--font-mono); color: var(--c); margin-right: 6px; }
.osi-row[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 18%, var(--surface)); border-color: var(--c); }
.osi-card { border: 1px solid var(--c); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; align-content: start; background: color-mix(in srgb, var(--c) 6%, var(--surface)); }
.osi-card h3 { font: 700 1.3rem var(--font-display); color: var(--c); }
.osi-job { font-weight: 600; }
.osi-facts { margin: 0; display: grid; gap: 6px; font-size: 0.88rem; }
.osi-facts dt { font: 500 0.68rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.osi-facts dd { margin: 0; }
.osi-tip { font-size: 0.9rem; border-top: 1px dashed var(--line); padding-top: 8px; }
.osi-mnem { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 6px; }
.osi-mnem p { font-size: 1rem; }
.osi-mnem b { color: var(--sun); font-size: 1.15rem; }
.osi-tcpip > div { display: flex; gap: 4px; margin-top: 6px; }
.osi-tcpip span:not(.eyebrow) { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; text-align: center; font-size: 0.8rem; }
.osi-tcpip i { font-style: normal; color: var(--muted); font-family: var(--font-mono); }
.osi-item { font: 700 1.25rem var(--font-display); text-align: center; padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); }
.osi-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.osi-choice { border-left: 4px solid var(--c) !important; }
.osi-choice b { font-family: var(--font-mono); color: var(--c); margin-right: 4px; }
.osi-missed { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 0.9rem; }
@media (max-width: 700px) { .osi-ref { grid-template-columns: 1fr; } .osi-pick { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } .osi-stage { grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); } .osi-layer span { font-size: 0.74rem; } .osi-layer { padding: 6px; gap: 6px; } }

/* ---------- Topology lab ---------- */
.topo { display: grid; gap: 18px; }
.topo-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
#tp-svg { width: 100%; height: auto; display: block; }
/* The topologies lab is a room (docs/diagram-standard.md): dark in both themes with its own colours. Devices
   stand on the floor; a ring of light under each shows its state; cables lie dark on the floor. */
.tp-room {
  --bg: #070A10; --surface: #0F1621; --ink: #DCE6F2; --muted: #9AA9BF; --line: #1E2A3A; --brand: #3FE0E8; --brand-soft: #0D2A33; --sun: #FFB000;
  --good: #3DDC97; --exploited: #FF5470; --exploited-tint: #2E1119; --dg-line: #05080c; --dg-strong: #05080c;
  --hw-stroke: #5E7799; --hw-screen: #0A1A26; --hw-port: #0A1018; --hw-face-top: #3A5075; --hw-face-side: #0B131E;
  color-scheme: dark; border-color: #1E2A3A;
  background: radial-gradient(ellipse 70% 60% at 50% 48%, #1d2b3c 0%, #121b27 50%, #080c12 100%);
}
.tp-room .tp-node .hit { fill: transparent; }
.tp-room .tp-node .shadow { fill: #000; opacity: 0.6; filter: blur(4px); }
.tp-room .tp-node .plate { fill: transparent; stroke: transparent; stroke-width: 1.6; }
.tp-room .tp-node.ok .plate { fill: rgba(61, 220, 151, 0.12); stroke: rgba(61, 220, 151, 0.75); }
.tp-room .tp-node.bad .plate, .tp-room .tp-node.down .plate { fill: rgba(255, 84, 112, 0.14); stroke: rgba(255, 84, 112, 0.85); }
.tp-room .tp-node.target .plate { fill: rgba(63, 224, 232, 0.16); stroke: var(--brand); stroke-width: 2.2; }
.tp-room .tp-node.spof .plate { stroke: var(--sun); stroke-width: 2.4; }
.tp-room .tp-node:hover .plate { stroke-width: 2.6; }
.tp-room .tp-node:focus-visible .plate { stroke: #fff; stroke-width: 2.6; }
.tp-room .hw { filter: none; }
.tp-room .hw-body:not(.hw-top):not(.hw-side) { fill: #17233A; }
.tp-room .tp-link .wire { stroke-width: 5; filter: drop-shadow(0 1px 0 rgba(120, 150, 190, 0.22)); }
.tp-room .tp-link.backbone .wire { stroke-width: 8; }
.tp-room .tp-link:hover .wire, .tp-room .tp-link:focus-visible .wire { stroke: #1f7d84; filter: drop-shadow(0 0 6px rgba(63, 224, 232, 0.55)); }
.tp-room .tp-link.broken .wire { stroke: var(--exploited); filter: none; }
.tp-room .tp-link.spof .wire { stroke: var(--sun); }
.tp-room .tp-node .lbl { fill: #C5D4E4; font: 600 9.5px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; stroke: #101924; }
.tp-link { cursor: pointer; }
.tp-link .hit { stroke: transparent; stroke-width: 16; }
.tp-link .wire { stroke: var(--dg-line); stroke-width: 3; stroke-linecap: round; }
.tp-link.backbone .wire { stroke: var(--dg-strong); stroke-width: 5; }
.tp-link:hover .wire, .tp-link:focus-visible .wire { stroke: var(--brand); }
.tp-link.broken .wire { stroke: var(--exploited); stroke-dasharray: 6 6; }
.tp-link.spof .wire { stroke: var(--sun); stroke-width: 4; }
.tp-link:focus { outline: none; }
.tp-tap { fill: var(--dg-strong); }
.tp-term { fill: var(--muted); }
.tp-node { cursor: pointer; }
.tp-node .plate { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.tp-node .lbl { fill: var(--muted); font: 11px var(--font-body); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.tp-node.ok .plate { stroke: var(--good); fill: color-mix(in srgb, var(--good) 8%, var(--surface)); }
.tp-node.bad .plate { stroke: var(--exploited); fill: color-mix(in srgb, var(--exploited) 10%, var(--surface)); }
.tp-node.bad .hw-screen { fill: var(--exploited-tint); }
.tp-node.bad .hw-led, .tp-node.down .hw-led { fill: var(--exploited); }
.tp-node.target .plate { stroke: var(--brand); stroke-width: 3; fill: var(--brand-soft); }
.tp-node.down .plate { stroke: var(--exploited); fill: var(--exploited-tint); }
.tp-node.down .hw { opacity: 0.45; }
.tp-node.down .x { stroke: var(--exploited); stroke-width: 3; stroke-linecap: round; }
.tp-node.spof .plate { stroke: var(--sun); stroke-width: 3; }
.tp-node:focus { outline: none; }
.tp-node:hover .plate { stroke-width: 3; }
.tp-node:focus-visible .plate { stroke: var(--ink); stroke-width: 3; }
@media (prefers-reduced-motion: no-preference) { .tp-node .plate { transition: fill 0.25s, stroke 0.25s; } .tp-node.bad .plate { animation: tp-shake 0.35s; } @keyframes tp-shake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } } }
.topo-status { min-height: 1.6em; margin-top: 8px; }
.topo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: 6px; }
@media (max-width: 860px) { .topo-grid { grid-template-columns: 1fr; } }

/* ---------- Terminal lab ---------- */
.term-lab { display: grid; gap: 18px; }
.term-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.term-shell { background: #05080C; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 460px; }
.term-bar { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; background: var(--surface); border-bottom: 1px solid var(--line); font: 0.76rem var(--font-mono); color: var(--muted); }
.term-out { overflow-y: auto; padding: 12px; font: 0.84rem/1.55 var(--font-mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; }
.term-out mark { background: rgba(var(--sun-rgb), 0.3); color: var(--ink); }
.term-out .t-err { color: var(--exploited); }
.term-out .t-dir { color: var(--high); font-weight: 600; }
.term-ps { color: var(--good); white-space: nowrap; }
.term-in { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); font: 0.84rem var(--font-mono); }
.term-in input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--ink); font: inherit; caret-color: var(--sun); }
.term-listen { margin: 0; padding: 0 12px 8px; font: 0.75rem var(--font-mono); color: var(--muted); }
.ag-queue h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ag-radar { flex: none; overflow: visible; --cat: var(--brand); }
.term-tasks ol { margin: 0; padding-left: 20px; display: grid; gap: 7px; font-size: 0.9rem; }
.term-tasks li.got { color: var(--good); }
/* Finished objectives fold to one line (19 Nov, the owner): the hint box below the list moves up as you go, and their
   explanation is already shown once as "What that showed". The full text stays in the page for screen readers. */
.term-tasks li.got { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; list-style: none; }  /* the ✓ is its marker: overflow clips a list number */
.term-tasks li.got .vl-why { display: none; }
.term-tasks li.now { color: var(--ink); font-weight: 600; }
.term-tasks li:not(.got):not(.now) { color: var(--muted); }
.term-tasks code { color: var(--sun); }
.term-editor textarea { width: 100%; min-height: 11rem; box-sizing: border-box; tab-size: 4; resize: vertical; font: 0.9rem/1.5 var(--font-mono); background: #05080C; color: #DCE6F2; caret-color: #FFB000; border: 1px solid #1E2A3A; border-radius: var(--radius-sm); padding: 10px 12px; }
.term-editor textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.term-editor .row { align-items: center; }
@media (max-width: 860px) { .term-grid { grid-template-columns: 1fr; } .term-shell { height: 380px; } }
/* VLAN lab: IOS output keeps its columns (and the ^ marker its place), so it scrolls sideways inside the console. */
.vlan-lab .term-out { white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.vl-tabs { justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
.vl-tabs .chip { padding: 4px 9px; font-size: 0.74rem; }
.vl-reuse { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-top: 1px solid var(--line); }
.vl-reuse .eyebrow { margin: 0; }
.vl-reuse select { font: 0.82rem var(--font-mono); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 6px; max-width: 100%; }
.vl-reuse-note { font-size: 0.74rem; }
.vl-diagram .netview { max-height: 460px; margin: 0 auto; }
.vl-node .plate { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.vl-name { font: 600 11px var(--font-mono); fill: var(--ink); }
.vl-port { font: 10px var(--font-mono); fill: var(--muted); }
.vl-link { stroke: var(--dg-line); stroke-width: 2.5; }
.vl-link.trunk { stroke: var(--brand); stroke-width: 5; }
.vl-link.v10 { stroke: var(--high); } .vl-link.v20 { stroke: var(--sun); } .vl-link.v30 { stroke: var(--good); } .vl-link.vx { stroke-dasharray: 4 4; }
.vl-table { position: relative; margin-top: 10px; font-size: 0.86rem; overflow-x: auto; }  /* positioned, so screen-reader-only text inside stays inside the scroll box */
.vl-table th, .vl-table td { text-align: left; padding: 4px 10px 4px 0; white-space: nowrap; }
.hash-lab textarea, .hash-lab .hl-two input { width: 100%; font: 0.9rem var(--font-mono); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; }
.hash-lab p { overflow-wrap: anywhere; }  /* hashes are long unbroken words; "anywhere" also lets grid cells shrink */
.hl-label { display: block; font-size: 0.88rem; margin: 6px 0 4px; }
.hl-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; } .hl-two label { display: grid; gap: 4px; font-size: 0.88rem; }
.hl-out { margin-top: 10px; } .hl-out dd { overflow-wrap: anywhere; } .hl-out dd .mono { display: block; }
.hl-hash { overflow-wrap: anywhere; font-size: 0.8rem; }
.hl-mirrors { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.hl-file { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.78rem; max-height: none; }
.hl-guesses { font-size: 0.8rem; overflow-wrap: anywhere; }
.hl-table td.hl-hit { color: var(--bad); font-weight: 600; }
.hl-q { margin-top: 10px; }
@media (max-width: 700px) { .hl-two, .hl-mirrors { grid-template-columns: minmax(0, 1fr); } }
.vl-why { display: block; font-weight: 400; font-size: 0.82rem; color: var(--muted); margin-top: 3px; }

/* ---------- Dashboard ---------- */
.view-head h1 .accent { font-style: normal; color: var(--brand); }
.continue { border-color: rgba(var(--brand-rgb), 0.4); }
.changelog h2 { font: 700 clamp(1.3rem, 3.4vw, 1.8rem)/1.1 var(--font-display); text-transform: uppercase; letter-spacing: 0.02em; }

/* ---------- Welcome ---------- */
.welcome { border-color: rgba(var(--brand-rgb), 0.4); }
.welcome-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.welcome .lcard .link-btn { margin-top: 4px; }

/* ---------- Labs, paths, charts, progress ---------- */
.kev-item.soft { border-left-color: var(--critical); }
.stack-cta { border-color: rgba(var(--sun-rgb), 0.35); }
.paths-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.lcard .progress { font-size: 0.78rem; }
/* Path cards: the progress bar takes the spare height, so every card in a row ends level (26 Nov) */
.path-card { display: flex; flex-direction: column; } .path-card .progress { margin-top: auto; padding-top: 4px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.steps .st { font: 600 0.8rem var(--font-mono); text-align: center; padding: 5px 0; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.steps li.got .st { color: var(--good); border-color: var(--good); background: var(--good-tint); }
.steps li.now { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.steps li.now .st { color: var(--brand); border-color: var(--brand); }
.steps a { font-weight: 600; text-decoration: none; }
.evidence { margin: 0; max-height: 360px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; font: 0.76rem/1.6 var(--font-mono); color: var(--ink); white-space: pre; }
.evidence mark { background: rgba(var(--sun-rgb), 0.3); color: var(--ink); border-radius: 2px; }
#lab-f { flex: 1 1 240px; }
.lab-step.got { border-color: rgba(var(--good-rgb), 0.4); }
.cvss-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.metric { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0; min-width: 0; background: var(--surface); }
.metric legend { font: 500 0.74rem var(--font-mono); color: var(--muted); padding: 0 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.metric .chip { font-size: 0.76rem; }
.score-panel { grid-template-columns: minmax(0, 1fr) auto; align-items: center; position: sticky; bottom: 40px; z-index: 2; }
/* It floats over the metrics while you scroll, so it needs a solid background and a clear edge. */
.score-panel > div { min-width: 0; }
.score-panel .mono { overflow-wrap: anywhere; }  /* the CVSS vector has no spaces to wrap at */
.score-panel .score-big { line-height: 1.3; }
.panel.score-panel { background: var(--surface); border-color: rgba(var(--brand-rgb), 0.45); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35), var(--elev); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 0.76rem var(--font-mono); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.chart { overflow-x: auto; }
.chart svg { width: 100%; min-width: 320px; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 11px var(--font-mono); }
.chart .axis.lbl { fill: var(--ink); font-family: var(--font-body); font-size: 12px; }
.chart .axis.val { fill: var(--ink); }
.chart-tip { position: fixed; z-index: 35; pointer-events: none; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 9px; font: 0.76rem var(--font-mono); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); max-width: 280px; }
.tbl summary { cursor: pointer; font: 0.76rem var(--font-mono); color: var(--brand); }
.tbl-wrap { overflow-x: auto; margin-top: 8px; }
.tbl table { border-collapse: collapse; font: 0.78rem var(--font-mono); width: 100%; }
.tbl td, .tbl th { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.trend-grid .panel:first-child { grid-column: 1 / -1; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 4px; }
.stat b { font: 700 1.4rem var(--font-display); font-variant-numeric: tabular-nums; }
/* KPI tiles on the You page: the Agency dashboard's read-out, so your stats feel like a console, not a plain table. */
.stat-row.kpi { gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 600px) { .stat-row.kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.stat-row.kpi .stat { padding: 14px 16px; gap: 3px;
  border-top: 2px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, var(--surface)), var(--surface)); }
.stat-row.kpi .stat .eyebrow { font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat-row.kpi .stat b { font: 700 1.6rem/1 var(--font-display); color: var(--ink); }
.stat-row.kpi .stat.hl { border-top-color: var(--sun); }
.stat-row.kpi .stat.hl b { color: var(--sun); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.badge { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 10px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
/* Unearned badges read as "not yet" through a recessed surface and a dimmed star, never through low opacity,
   which would drop the name and description below the contrast floor. */
.badge:not(.got) { background: color-mix(in srgb, var(--bg) 30%, var(--surface)); }
.badge:not(.got) .ico { color: var(--muted); }
.badge.got { border-color: rgba(var(--sun-rgb), 0.45); box-shadow: 0 0 20px rgba(var(--sun-rgb), 0.08); }
.badge .ico { font-size: 1.4rem; line-height: 1; color: var(--sun); text-align: center; }
.badge b { font-size: 0.95rem; }
.badge span { font-size: 0.82rem; color: var(--muted); }
.xp-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.xp-log li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 10px; font-size: 0.9rem; align-items: baseline; }
.xp-log b { color: var(--sun); font-family: var(--font-mono); }

@media (max-width: 860px) {
  .masthead { position: static; }
  .split { grid-template-columns: 1fr; }
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ladder { grid-template-columns: 1fr; }
  .rung { border-left: 0; border-top: 1px solid var(--line); }
  .rung:first-child { border-top: 0; }
  .cid { margin-left: 0; }
  .xp .bar { display: none; }
  .cwd { display: none; }
  .cmd-btn span { display: none; }
  .statusbar { display: none; }
  .score-panel { bottom: 8px; grid-template-columns: 1fr; }  /* stack on phones so the CVSS vector gets full width, not one char per line */
  .xp-log li { grid-template-columns: minmax(0, 1fr) auto; }
  .xp-log li .mono { display: none; }
  body.has-status { padding-bottom: 0; }
  nav.tabs a kbd { display: none; }
  nav.tabs a { padding: 6px 8px; }
  .tab-group.updates { margin-left: 0; }
  .tab-group + .tab-group { border-left: 0; padding-left: 0; }
}
@media (max-width: 380px) {
  nav.tabs a { padding: 6px 5px; font-size: 0.82rem; }
  .tab-group { gap: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: pop 0.25s ease-out; }
  @keyframes pop { from { transform: translate(-50%, 12px); opacity: 0; } }
}

/* Home hero: heading plus a live, clickable network drawn with the device library. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 16px 32px; align-items: center; }
.hero p { color: var(--muted); margin: 0; max-width: 46ch; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-stat { font: 0.8rem/1.3 var(--font-mono); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.hero-stat b { color: var(--brand); font-weight: 600; }
.hero-cta { gap: 10px; }
.hero-cap { height: calc(4 * 1.6em); overflow: hidden; margin: 0; font-size: 0.88rem; line-height: 1.6; color: var(--muted); }  /* fixed: room for the longest description, so nothing moves */
@media (max-width: 760px) { .hero-cap { height: calc(5 * 1.6em); } }
.hero-cap b { color: var(--ink); font-family: var(--font-display); }
@media (max-width: 760px) { .hero { grid-template-columns: minmax(0, 1fr); } }
/* Theme toggle */
.mast-end { display: flex; align-items: center; gap: 8px; flex: none; }
@media (max-width: 1100px) { .cwd { display: none; } }
.theme-btn { display: grid; place-items: center; width: 34px; height: 34px; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); padding: 0; flex: none; }
.theme-btn:hover { color: var(--ink); border-color: var(--brand); }
.theme-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Ports and protocols lab */
.ports, .subnet { display: grid; gap: 18px; }
.ports .panel > h3.eyebrow { margin: 8px 0 0; }
/* The Port Corridor lab (static/js/labs/corridor.js): a first-person corridor of port doors you walk and open/lock. */
.corridor-lab { display: grid; gap: 16px; --door-tex: url("img/lab/port-door.webp"); }
.co-brief h2 { margin: 2px 0 6px; }
.co-hint { margin: 6px 0 0; font-size: 0.86rem; }
.pc-gl { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* The 3D stage you walk down. --dx/--dz/--rot place the doors; JS sets --cur (which door you stand at). */
.co-stage { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #04070c; color-scheme: dark; }
.co-stage:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.hall3d { position: relative; height: clamp(300px, 44vh, 430px); overflow: hidden; perspective: 820px; perspective-origin: 50% 46%;
  --dx: 300px; --dz: 240px; --rot: 34deg;
  background: url("img/lab/corridor-bg.webp") center / cover no-repeat, #04070c; }
.hall-track { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateZ(calc(var(--cur, 0) * var(--dz) + 40px)); }
@media (prefers-reduced-motion: no-preference) { .hall-track { transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1); } }
.d3-door { position: absolute; left: 50%; top: 50%; width: 150px; height: 248px; margin: -124px 0 0 -75px; transform-style: preserve-3d; cursor: pointer;
  transform: translateX(calc(var(--side) * var(--dx))) translateZ(calc(var(--i) * var(--dz) * -1)) rotateY(calc(var(--side) * var(--rot) * -1)); }
.d3-face { position: absolute; inset: 0; overflow: hidden; display: grid; justify-items: center; align-content: start; gap: 9px; padding: 18px 10px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #121b27, #0a1017); border: 1px solid #22303f; color: #8094ab; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
/* Photoreal door texture behind the live overlay (static/img/lab/port-door.webp); dims when locked, lights when open. */
.d3-tex, .pc-tex, .cf-tex { position: absolute; inset: 0; z-index: 0; background: var(--door-tex) center / cover no-repeat; filter: brightness(0.5) saturate(0.78); transition: filter 0.35s ease; }
.d3-face > *:not(.d3-tex), .pc-door > *:not(.pc-tex), .cf-door > *:not(.cf-tex) { position: relative; z-index: 1; }
.d3-plate { font: 800 1.35rem var(--font-mono); padding: 3px 12px; border-radius: 5px; background: rgba(5, 9, 14, 0.82); border: 1px solid #22303f; color: #cfe0f0; }
.d3-ic { width: 46px; height: 46px; color: #8fb6c9; filter: drop-shadow(0 1px 3px #000); }
.d3-name { font: 700 1rem var(--font-body); color: #dce6f2; text-shadow: 0 1px 4px #000; }
.d3-tag { font: 600 0.64rem var(--font-mono); letter-spacing: 0.12em; color: #a7bcd0; text-shadow: 0 1px 3px #000; }
.d3-state { margin-top: auto; font: 700 0.64rem var(--font-mono); letter-spacing: 0.14em; color: #a7bcd0; text-shadow: 0 1px 3px #000; }
.d3-door.open .d3-face { border-color: rgba(var(--brand-rgb), 0.8);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 20%, #0a1017), #0a1017); box-shadow: 0 0 34px rgba(var(--brand-rgb), 0.4), inset 0 0 26px rgba(var(--brand-rgb), 0.12); }
.d3-door.open .d3-ic, .d3-door.open .d3-name, .d3-door.open .d3-plate, .d3-door.open .d3-state { color: var(--brand); }
.d3-door.open .d3-plate { border-color: rgba(var(--brand-rgb), 0.6); text-shadow: 0 0 10px rgba(var(--brand-rgb), 0.6); }
.d3-door.is-current .d3-face { border-color: rgba(var(--brand-rgb), 0.5); box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.4), 0 22px 54px rgba(0, 0, 0, 0.55); }
.d3-door.is-current.open .d3-face { box-shadow: 0 0 0 2px var(--brand), 0 0 44px rgba(var(--brand-rgb), 0.5); }
.d3-door.behind { opacity: 0.45; }
.d3-door.v-bad .d3-face { border-color: rgba(var(--bad-rgb), 0.85); box-shadow: 0 0 28px rgba(var(--bad-rgb), 0.4); }
.d3-door.v-bad .d3-plate { color: var(--bad); }
.d3-door.open .d3-tex { filter: brightness(1.14) saturate(1.25); }
.d3-door.is-current:not(.open) .d3-tex { filter: brightness(0.72) saturate(0.85); }
.d3-door.v-bad .d3-tex { filter: brightness(0.6) grayscale(0.45); }
.hall-fog { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(86% 104% at 50% 44%, transparent 54%, rgba(4, 7, 12, 0.66) 96%), linear-gradient(0deg, rgba(4, 7, 12, 0.4), transparent 24%); }
.hall-hud { position: absolute; left: 12px; bottom: 10px; z-index: 2; font: 600 0.72rem var(--font-mono); letter-spacing: 0.08em; color: var(--muted); }
/* The door in front of you: the accessible readout and controls. */
.co-focus { display: grid; gap: 14px; }
.cf-head { display: flex; gap: 16px; align-items: center; }
.cf-door { position: relative; overflow: hidden; flex: none; width: 74px; height: 104px; display: grid; justify-items: center; align-content: center; gap: 6px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #121b27, #0a1017); border: 1px solid #22303f; }
.cf-door.open { border-color: rgba(var(--brand-rgb), 0.8); box-shadow: 0 0 22px rgba(var(--brand-rgb), 0.3); }
.cf-door.open .cf-tex { filter: brightness(1.1) saturate(1.2); }
.cf-plate { font: 800 1rem var(--font-mono); color: #cfe0f0; text-shadow: 0 1px 3px #000; }
.cf-ic { width: 34px; height: 34px; color: #8fb6c9; filter: drop-shadow(0 1px 3px #000); }
.cf-door.open .cf-plate, .cf-door.open .cf-ic { color: var(--brand); }
.cf-meta h2 { margin: 2px 0 4px; }
.cf-meta p { margin: 0; color: var(--muted); }
.cf-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
#cf-toggle { min-width: 160px; justify-content: center; }
.btn.sun { background: var(--sun); color: var(--sun-ink); border-color: var(--sun); }
.co-minimap { display: flex; gap: 6px; flex-wrap: wrap; }
.mm-dot { font: 700 0.72rem var(--font-mono); padding: 4px 9px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.mm-dot.on { color: var(--brand); border-color: rgba(var(--brand-rgb), 0.5); }
.mm-dot.here { outline: 2px solid var(--brand); outline-offset: 1px; color: var(--ink); }
@media (max-width: 640px) { .hall3d { --dx: 150px; --dz: 190px; perspective: 540px; height: clamp(250px, 58vw, 320px); }
  .d3-door { width: 118px; margin-left: -59px; } }
/* View toggle (Walk / Overview) */
.co-viewrow { gap: 10px; align-items: center; }
.co-viewlabel { align-self: center; }
.cv-seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.cv-btn { font: 600 0.8rem var(--font-mono); padding: 5px 15px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.cv-btn[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
/* Overview (flat grid) view */
.co-scene { position: relative; overflow: hidden; padding: 22px 16px 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: radial-gradient(100% 130% at 50% -16%, #0f1a2b, #070a10 70%); color-scheme: dark; }
.co-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 80px; pointer-events: none;
  background: linear-gradient(0deg, rgba(var(--brand-rgb), 0.10), transparent 90%); border-top: 1px solid rgba(var(--brand-rgb), 0.16); }
.co-hall { position: relative; z-index: 1; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding-bottom: 22px; }
.pc-door { position: relative; overflow: hidden; width: 106px; min-height: 178px; display: grid; justify-items: center; align-content: start; gap: 7px; padding: 14px 6px 20px; cursor: pointer; font: inherit; color: #c7d4e4;
  background: linear-gradient(180deg, #131c28, #0b111a); border: 1px solid #243244; border-radius: 10px 10px 4px 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
/* Text scoped under .co-hall with explicit light colours: .pc-name/.pc-tr are also used by the ports flip-card lab,
   and the door is now a dark photo texture, so inheriting that lab's --ink colour would be unreadable in light theme. */
.co-hall .pc-plate { font: 800 1.1rem var(--font-mono); letter-spacing: 0.04em; padding: 3px 10px; border-radius: 5px; background: rgba(5, 9, 14, 0.82); border: 1px solid #243244; color: #cfe0f0; text-shadow: 0 1px 3px #000; }
.co-hall .pc-ic { width: 38px; height: 38px; color: #8fb6c9; filter: drop-shadow(0 1px 3px #000); }
.co-hall .pc-name { font: 700 0.9rem var(--font-body); color: #dce6f2; text-shadow: 0 1px 4px #000; }
.co-hall .pc-tr { font: 600 0.62rem var(--font-mono); letter-spacing: 0.1em; color: #a7bcd0; text-shadow: 0 1px 3px #000; }
.co-hall .pc-state { margin-top: auto; font: 700 0.6rem var(--font-mono); letter-spacing: 0.12em; color: #a7bcd0; text-shadow: 0 1px 3px #000; }
.pc-door.open { border-color: rgba(var(--brand-rgb), 0.75); box-shadow: 0 0 24px rgba(var(--brand-rgb), 0.28), inset 0 0 22px rgba(var(--brand-rgb), 0.10); }
.pc-door.open .pc-tex { filter: brightness(1.14) saturate(1.25); }
.co-hall .pc-door.open .pc-ic, .co-hall .pc-door.open .pc-name, .co-hall .pc-door.open .pc-plate, .co-hall .pc-door.open .pc-state { color: var(--brand); }
.co-hall .pc-door.open .pc-plate { border-color: rgba(var(--brand-rgb), 0.6); text-shadow: 0 0 10px rgba(var(--brand-rgb), 0.6); }
.pc-door:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.pc-door.v-bad { border-color: rgba(var(--bad-rgb), 0.85); box-shadow: 0 0 22px rgba(var(--bad-rgb), 0.3); }
.pc-door.v-bad .pc-tex { filter: brightness(0.6) grayscale(0.45); }
@media (prefers-reduced-motion: no-preference) { .pc-door:hover { transform: translateY(-4px); } }
.co-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.co-grades { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.co-grades li { font-size: 0.9rem; padding: 7px 11px; border-left: 3px solid var(--line); background: var(--surface-2); border-radius: 0 6px 6px 0; }
.co-grades li.should-close { border-left-color: var(--bad); }
.co-grades li.should-open { border-left-color: var(--sun); }
.co-grades li.ok { border-left-color: var(--good); }
.co-pass { color: var(--good); margin: 0; } .co-fail { margin: 0; }
.co-done { color: var(--good); font-weight: 600; margin: 10px 0 0; }
/* Firewall lab "You Are the Packet" (static/js/labs/firewall.js): predict, then watch the packet drop down the rules. */
.fwg-lab { display: grid; gap: 16px; }
.fwg-brief h2 { margin: 2px 0 6px; }
.fwg-board { max-width: 600px; margin-inline: auto; width: 100%; display: grid; gap: 4px; }
.fwg-you { display: grid; justify-items: center; gap: 6px; padding-bottom: 6px; }
.fwg-chip { display: inline-flex; gap: 8px; align-items: baseline; padding: 8px 14px; border-radius: 10px;
  background: var(--brand-soft); border: 1px solid rgba(var(--brand-rgb), 0.5); transition: box-shadow 0.25s, transform 0.25s; }
.fwg-chip.live { box-shadow: 0 0 18px rgba(var(--brand-rgb), 0.3); }
.fwg-chip.threat { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border-color: rgba(var(--bad-rgb), 0.5); }
.fwg-cl { font: 700 0.58rem var(--font-mono); letter-spacing: 0.18em; color: var(--brand); }
.fwg-chip.threat .fwg-cl { color: var(--bad); }
.fwg-cip { font: 700 0.92rem var(--font-mono); color: var(--ink); } .fwg-cpp { font: 600 0.72rem var(--font-mono); color: var(--muted); }
/* the rule list is a timeline: a line down the left with a node per rule */
.fwg-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; position: relative; }
.fwg-rules::before { content: ""; position: absolute; left: 11px; top: -8px; bottom: -8px; width: 2px; background: var(--line); }
.fwg-rule { position: relative; display: grid; grid-template-columns: 24px auto auto 1fr; align-items: center; gap: 10px;
  padding: 9px 12px 9px 34px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, opacity 0.2s; }
.fwg-node { position: absolute; left: 5px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line); z-index: 1; transition: background 0.2s, border-color 0.2s, box-shadow 0.2s; }
.fwg-rn { font: 700 0.8rem var(--font-mono); color: var(--muted); }
.fwg-act { font: 800 0.66rem var(--font-mono); letter-spacing: 0.08em; padding: 3px 8px; border-radius: 5px; }
.fwg-act.allow { color: var(--good); border: 1px solid rgba(var(--good-rgb), 0.5); }
.fwg-act.deny { color: var(--bad); border: 1px solid rgba(var(--bad-rgb), 0.5); }
.fwg-tuple { font: 600 0.82rem var(--font-mono); color: var(--ink); }
.fwg-note { grid-column: 2 / -1; font-size: 0.78rem; color: var(--muted); }
.fwg-rule.checking { border-color: rgba(var(--brand-rgb), 0.85); box-shadow: 0 0 16px rgba(var(--brand-rgb), 0.28); }
.fwg-rule.checking .fwg-node { border-color: var(--brand); box-shadow: 0 0 12px rgba(var(--brand-rgb), 0.7); }
.fwg-rule.nomatch { opacity: 0.5; } .fwg-rule.nomatch .fwg-node { border-color: var(--line); }
.fwg-rule.hit-allow { border-color: var(--good); box-shadow: 0 0 18px rgba(var(--good-rgb), 0.3); background: color-mix(in srgb, var(--good) 12%, var(--surface)); }
.fwg-rule.hit-allow .fwg-node { background: var(--good); border-color: var(--good); }
.fwg-rule.hit-deny { border-color: var(--bad); box-shadow: 0 0 18px rgba(var(--bad-rgb), 0.35); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.fwg-rule.hit-deny .fwg-node { background: var(--bad); border-color: var(--bad); }
/* the gate at the bottom: two doors that open (allow) or slam (deny) */
.fwg-gate { display: grid; justify-items: center; gap: 8px; padding-top: 10px; }
.fwg-doors { position: relative; width: 170px; height: 48px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line);
  background: var(--surface); box-shadow: inset 0 0 20px rgba(0,0,0,0.25); transition: border-color 0.25s, box-shadow 0.25s; }
.fwg-door { position: absolute; top: 0; bottom: 0; width: 50.5%; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink) 12%, var(--surface)) 0 7px, color-mix(in srgb, var(--ink) 7%, var(--surface)) 7px 14px);
  border-right: 1px solid var(--line); transition: transform 0.45s ease; }
.fwg-door.l { left: 0; } .fwg-door.r { right: 0; border-right: 0; border-left: 1px solid var(--line); }
.fwg-spark { position: absolute; inset: 0; display: grid; place-items: center; font: 800 1.1rem var(--font-mono); opacity: 0; transition: opacity 0.3s; }
.fwg-gate[data-state="open"] .fwg-door.l { transform: translateX(-100%); }
.fwg-gate[data-state="open"] .fwg-door.r { transform: translateX(100%); }
.fwg-gate[data-state="open"] .fwg-doors { border-color: var(--good); box-shadow: 0 0 22px rgba(var(--good-rgb), 0.3), inset 0 0 20px rgba(var(--good-rgb), 0.12); }
.fwg-gate[data-state="open"] .fwg-spark { opacity: 1; color: var(--good); } .fwg-gate[data-state="open"] .fwg-spark::before { content: "→ server"; }
.fwg-gate[data-state="deny"] .fwg-doors { border-color: var(--bad); box-shadow: 0 0 22px rgba(var(--bad-rgb), 0.4); animation: fwgShake 0.4s ease; }
.fwg-gate[data-state="deny"] .fwg-spark { opacity: 1; color: var(--bad); } .fwg-gate[data-state="deny"] .fwg-spark::before { content: "✕ blocked"; }
@keyframes fwgShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.fwg-dest { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; justify-content: center; color: var(--muted); transition: color 0.25s; }
.fwg-dest b { color: var(--ink); } .fwg-dest .mono { font-family: var(--font-mono); }
.fwg-gate[data-state="open"] .fwg-dest b { color: var(--good); }
@media (prefers-reduced-motion: reduce) { .fwg-chip, .fwg-door, .fwg-dest, .fwg-doors { transition: none; } .fwg-gate[data-state="deny"] .fwg-doors { animation: none; } }
.fwg-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fwg-predict { display: inline-flex; gap: 8px; align-items: center; }
.fwg-hintbox { flex-basis: 100%; border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--surface-2); padding: 8px 12px; border-radius: 6px; font-size: .92em; }
.fwg-hintbox ul, .fwg-why ul { margin: 4px 0; padding-left: 18px; } .fwg-hintbox p { margin: 4px 0; }
.nb-hint { margin-top: 4px; font-size: .92em; color: var(--muted); } .nb-hint summary { cursor: pointer; color: var(--brand); width: max-content; } .nb-hint p { margin: 2px 0 0; }
.cvss-clues { margin: 6px 0 0; padding-left: 18px; } .cvss-clues li { margin: 3px 0; }
.fwg-why { margin-top: 6px; } .fwg-why summary { cursor: pointer; color: var(--muted); }
.fwg-guess[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); border-color: rgba(var(--brand-rgb), 0.5); }
.fwg-result .fwg-pass { color: var(--good); margin: 0 0 6px; } .fwg-result .fwg-fail { color: var(--sun); margin: 0 0 6px; }
.fwg-done { color: var(--good); font-weight: 600; margin: 10px 0 0; }
.pchip.ghost { background: transparent; color: var(--muted); }
/* Vishing lab "The Call" (static/js/labs/vishing.js): a scam support call, captions-first, voice-ready. */
.vp-lab { display: grid; gap: 16px; }
.vp-stage { display: grid; justify-items: center; }
/* The handset: a portrait phone (about 9:19.5), gunmetal body with side buttons, a glass screen with a status bar,
   camera notch and home bar. The call screen lays out like a real one: caller at the top, actions at the bottom. */
.vp-phone { color-scheme: dark; position: relative; width: min(340px, 100%); padding: 11px; border-radius: 52px; border: 1px solid #2b3a4f;
  background: linear-gradient(158deg, #233044 0%, #111a27 50%, #0a0f17 100%);
  box-shadow: inset 0 0 0 2px #0a0f17, inset 0 1px 0 rgba(255,255,255,0.08), 0 30px 60px rgba(0,0,0,0.5), 0 0 34px rgba(var(--brand-rgb), 0.12); }
.vp-phone::before, .vp-phone::after { content: ""; position: absolute; width: 4px; border-radius: 2px; background: #1c2737; box-shadow: inset 0 0 0 1px #2b3a4f; }
.vp-phone::before { left: -4px; top: 118px; height: 64px; }   /* volume */
.vp-phone::after { right: -4px; top: 150px; height: 88px; }   /* power */
@keyframes vpRingGlow {
  0%, 100% { box-shadow: inset 0 0 0 2px #0a0f17, inset 0 1px 0 rgba(255,255,255,0.08), 0 30px 60px rgba(0,0,0,0.5), 0 0 30px rgba(var(--brand-rgb), 0.12); }
  50% { box-shadow: inset 0 0 0 2px #0a0f17, inset 0 1px 0 rgba(255,255,255,0.08), 0 30px 60px rgba(0,0,0,0.5), 0 0 64px rgba(var(--brand-rgb), 0.38); } }
.vp-phone[data-phase="ringing"] { animation: vpRingGlow 1.9s ease-in-out infinite; }
.vp-glass { position: relative; border-radius: 42px; overflow: hidden; color: #e6eef8; min-height: 640px; display: flex; flex-direction: column;
  background: radial-gradient(120% 70% at 50% 0%, #10223a, #070b12 70%); box-shadow: inset 0 0 0 1px #0b1420; }
.vp-status { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 26px 4px; font: 600 0.82rem var(--font-display); color: #f0f6ff; }
.vp-clock { justify-self: start; letter-spacing: 0.02em; }
.vp-island { width: 96px; height: 28px; border-radius: 16px; background: #000; box-shadow: inset 0 0 0 1px #111a26; }
.vp-icons { justify-self: end; display: inline-flex; gap: 5px; align-items: center; fill: #f0f6ff; }
.vp-batt { position: relative; width: 24px; height: 12px; border-radius: 3px; border: 1.5px solid rgba(240,246,255,0.55); }
.vp-batt::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: rgba(240,246,255,0.55); }
.vp-batt i { position: absolute; inset: 1.5px; right: 6px; border-radius: 1px; background: #f0f6ff; }
.vp-screen { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 8px; }
.vp-home { align-self: center; width: 120px; height: 5px; border-radius: 3px; background: rgba(240,246,255,0.7); margin: 6px 0 9px; }
/* incoming */
.vp-incoming { display: grid; justify-items: center; gap: 6px; text-align: center; margin-top: 18px; }
.vp-ring { color: #9fb4ca; font-size: 0.86rem; }
@keyframes vpRing { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.vp-phone[data-phase="ringing"] .vp-ring { animation: vpRing 1.3s ease-in-out infinite; }
.vp-name { font: 600 1.7rem/1.15 var(--font-display); color: #f4f8fd; margin-top: 6px; }
.vp-num { font-family: var(--font-mono); color: #9fb4ca; font-size: 0.86rem; }
.vp-av { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font: 800 0.95rem var(--font-mono); flex: none;
  color: #e9f6ff; background: linear-gradient(160deg, #2a4a63, #12263a); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12); }
.vp-av.lg { width: 104px; height: 104px; font-size: 2rem; margin-top: 10px; }
.vp-note { color: #b8c6d8; margin: auto 0 0; text-align: center; font-size: 0.92rem; line-height: 1.45; padding: 10px 12px;
  border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); }
.vp-calls { display: flex; justify-content: space-around; padding: 10px 0 6px; margin-top: auto; }
.vp-note + .vp-calls { margin-top: 6px; }
.vp-act { display: grid; justify-items: center; gap: 8px; font-size: 0.82rem; color: #dce6f2; text-align: center; max-width: 120px; }
.vp-btn { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; border: 0; cursor: pointer; font: 700 1.5rem var(--font-display); }
.vp-btn.answer { background: #2fcf92; color: #04170f; } .vp-btn.decline { background: #ff4f5a; color: #fff; }
.vp-btn:hover { filter: brightness(1.08); }
.vp-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
/* in the call */
.vp-call-head { display: flex; gap: 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.vp-id { display: grid; gap: 1px; text-align: left; flex: 1; } .vp-id b { color: #f0f6ff; font-size: 1rem; }
.vp-live { color: #2fcf92; font-size: 0.8rem; font-family: var(--font-mono); }
.vp-beat { font: 600 0.72rem var(--font-mono); color: #9fb4ca; border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; padding: 2px 8px; }
.vp-talk { display: grid; gap: 10px; align-content: start; }
.vp-endicon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,79,90,0.16); color: #ff6b74; }
.vp-line { margin: 8px 0 0; font-size: 1.08rem; line-height: 1.45; color: #f4f8fd; }
.vp-youline { margin: 8px 0 0; color: #9fd7ff; line-height: 1.4; }
.vp-verdict { margin: 0; line-height: 1.4; }
.vp-verdict.ok { color: #8ef0c4; }
.vp-verdict.bad { color: #ffc24d; }
.vp-phone[data-speaking="1"] .vp-av { box-shadow: 0 0 0 6px rgba(63,224,232,.18); }
.vp-options { margin-top: 8px; }
.vp-row { display: grid; gap: 3px; max-width: 86%; }
.vp-row.them { justify-items: start; } .vp-row.you { justify-items: end; margin-left: auto; }
.vp-who { font: 700 0.6rem var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: #7f93a8; }
.vp-bubble { padding: 9px 13px; border-radius: 13px; line-height: 1.45; font-size: 0.92rem; }
.vp-row.them .vp-bubble { background: #101a28; border: 1px solid #1e2a3a; color: #dbe6f2; border-top-left-radius: 4px; }
.vp-row.you .vp-bubble { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 24%, #0a1622), #0a1622); border: 1px solid rgba(var(--brand-rgb), 0.5); color: #eaf7ff; border-top-right-radius: 4px; }
.vp-play { margin-top: 8px; display: flex; width: fit-content; gap: 6px; align-items: center; background: rgba(var(--brand-rgb), 0.16); color: #3fe0e8;
  border: 1px solid rgba(var(--brand-rgb), 0.4); border-radius: 999px; padding: 3px 11px; font: 600 0.76rem var(--font-mono); cursor: pointer; }
.vp-ask { display: grid; gap: 8px; margin-top: 4px; }
.vp-prompt { margin: 0; color: #cdd9e8; font-weight: 600; }
.vp-options { display: grid; gap: 8px; }
.vp-opt { text-align: left; background: #0d1826; color: #e6eef8; border: 1px solid #22314400; border-color: #223144; border-radius: 10px; padding: 11px 13px; font: inherit; font-size: 0.9rem; cursor: pointer; }
.vp-opt:hover { border-color: var(--brand); background: #10212f; } .vp-opt:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.vp-feedback { display: flex; gap: 10px; padding: 11px 13px; border-radius: 11px; margin-top: 2px; }
.vp-feedback.ok { background: color-mix(in srgb, var(--good) 14%, #0a1622); border: 1px solid rgba(var(--good-rgb), 0.5); }
.vp-feedback.bad { background: color-mix(in srgb, var(--sun) 15%, #130f08); border: 1px solid rgba(var(--sun-rgb, 255 176 0), 0.5); }
.vp-feedback p { margin: 0 0 4px; color: #e6eef8; font-size: 0.9rem; } .vp-feedback p:last-child { margin: 0; }
.vp-fi { font-weight: 800; } .vp-feedback.ok .vp-fi { color: #2fcf92; } .vp-feedback.bad .vp-fi { color: #ffc24d; }
.vp-flag { color: #2fcf92; } .vp-risk { color: #ffc24d; }
.vp-next { margin-top: 4px; }
.vp-safe-end { display: grid; gap: 10px; justify-items: center; text-align: center; margin-top: 36px; }
.vp-muted { color: #9fb4ca !important; font-size: 0.88rem; }
.vp-screen .vp-prompt { font-size: 0.86rem; color: #9fb4ca; font-weight: 600; margin-top: 4px; }
.vp-screen .vp-line { font-size: 1rem; }
.vp-safe-end h2 { margin: 0; color: #2fcf92; } .vp-safe-end p { color: #cdd9e8; max-width: 40ch; margin: 0; }
.vp-side { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 15px; background: var(--surface); display: grid; gap: 8px; align-content: start; }
.vp-flags { margin: 2px 0 0; padding-left: 18px; display: grid; gap: 5px; } .vp-flags li { color: var(--good); }
.vp-rule { margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.vp-debrief-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.vp-debrief-list li { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.vp-debrief-list li.ok .vp-di { color: var(--good); } .vp-debrief-list li.miss { color: var(--muted); }
.vp-done { color: var(--ink); margin: 0; }
@media (prefers-reduced-motion: reduce) { .vp-ring, .vp-phone[data-phase="ringing"] { animation: none !important; } .vp-transcript { scroll-behavior: auto; } }
.port-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 8px; }
.port-card { display: grid; min-height: 118px; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--ink); font: inherit; }
.port-card:hover { border-color: var(--brand); }
.port-card > span { grid-area: 1 / 1; display: grid; gap: 4px; align-content: start; min-width: 0; }
.port-card .pc-back { visibility: hidden; }
.port-card.open .pc-front { visibility: hidden; }
.port-card.open .pc-back { visibility: visible; }
.port-card.open { border-color: var(--brand); background: var(--brand-soft); }
.pc-front b { font: 700 1.15rem var(--font-display); }
.pc-front span, .pc-what { font-size: 0.82rem; color: var(--muted); }
.pc-num { font: 700 1.5rem/1.1 var(--font-mono); color: var(--brand); }
.pc-name { font: 600 0.78rem var(--font-mono); color: var(--ink); }
.pc-tr { font: 600 0.7rem var(--font-mono); color: var(--sun); letter-spacing: 0.08em; }
@media (prefers-reduced-motion: no-preference) { .port-card.open .pc-back { animation: pc-in 0.25s ease-out; } @keyframes pc-in { from { opacity: 0; transform: translateY(4px); } } }
.pair-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 8px; }
.pair { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-family: var(--font-mono); font-size: 0.85rem; }
.pair i { font-style: normal; color: var(--muted); }
.pair .bad-p { color: var(--bad); } .pair .good-p { color: var(--good); }
/* Subnetting lab */
.sn-field { display: grid; gap: 6px; min-width: 0; }
.sn-input { font: 1rem var(--font-mono); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; width: 100%; min-width: 0; box-sizing: border-box; }
.sn-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.25); }
#sp-form .sn-input { width: auto; flex: 1 1 200px; }
.sn-key { font: 600 0.78rem var(--font-mono); padding: 1px 6px; border-radius: var(--radius-sm); }
.sn-key.net, .sn-cells i.net { background: rgba(var(--brand-rgb), 0.18); color: var(--brand); }
.sn-key.host, .sn-cells i.host { background: rgba(var(--sun-rgb), 0.16); color: var(--sun); }
.sn-bits { display: grid; gap: 10px; }
.sn-row { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 8px; align-items: start; }
.sn-lbl { font: 600 0.75rem var(--font-mono); color: var(--muted); padding-top: 4px; }
.sn-octets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sn-oct { display: grid; gap: 4px; justify-items: center; padding: 4px; border-radius: 6px; border: 1px solid transparent; min-width: 0; }
.sn-oct.hot { border-color: var(--line); background: var(--surface-2); }
.sn-cells { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; width: 100%; }
.sn-cells i { font: 600 0.8rem/1.9 var(--font-mono); font-style: normal; text-align: center; border-radius: 2px; min-width: 0; }
@media (prefers-reduced-motion: no-preference) { .sn-cells i { transition: background-color 0.2s, color 0.2s; } }
.sn-dec { font: 600 0.85rem var(--font-mono); }
.sc .stat-row { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
.sc .stat b { font-size: 1rem; overflow-wrap: anywhere; line-height: 1.3; }
.sc .stat.hl { border-color: rgba(var(--brand-rgb), 0.5); background: var(--brand-soft); }
.sn-given { font-size: 1.3rem; color: var(--brand); margin: 0; }
.table-wrap { overflow-x: auto; position: relative; }
.sn-table { width: 100%; border-collapse: collapse; font: 0.88rem var(--font-mono); }
.sn-table th, .sn-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sn-table th { color: var(--muted); font-weight: 500; }
@media (max-width: 760px) {
  .sn-octets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sn-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* Subnet calculator (static/js/labs/subnet.js mountCalc) */
.sc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; container: calc / inline-size; }
.sc-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px 18px; align-items: end; }
.sc-pre { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sc-pre input { flex: 1 1 auto; min-width: 0; margin: 0; accent-color: var(--brand); }
.sc-step { padding: 4px 0; width: 34px; flex: none; font-size: 1.05rem; line-height: 1.4; }
.sc-pval { flex: none; min-width: 2.4em; text-align: right; color: var(--brand); font-size: 1.05rem; }
.sc-msg { margin: 0; font-size: 0.9rem; color: var(--bad); }
.sc-msg.good { color: var(--good); }
.sc-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-badge { font: 600 0.76rem/1.3 var(--font-mono); padding: 4px 9px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }
.sc-badge.cls { color: var(--sun); border-color: rgba(var(--sun-rgb), 0.45); }
.sc-badge.k-private { color: var(--good); border-color: rgba(var(--good-rgb), 0.45); }
.sc-badge.k-public { color: var(--brand); border-color: rgba(var(--brand-rgb), 0.45); }
.sc-badge.k-special, .sc-badge.k-broadcast { color: var(--likely); }
.sc-badge.ok { color: var(--good); }
.sc-badge.warn { color: var(--bad); border-color: rgba(var(--bad-rgb), 0.45); background: var(--bad-tint); }
.sc-note, .sc-cap { margin: 0; font-size: 0.9rem; color: var(--muted); }
.sc-h { font: 600 1rem var(--font-display); margin-top: 6px; }
.sc-net { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 8px; }
.sc-net svg { width: 100%; height: auto; max-height: 260px; display: block; }
.sc-trunk line { stroke: var(--dg-strong); stroke-width: 3; }
.sc-wire { stroke: var(--dg-line); stroke-width: 1.4; opacity: 0; }
.sc-wire.on { opacity: 1; }
.sc-router.me .hw-body { stroke: var(--sun); stroke-width: 2.4; }
.sc-dev { opacity: 0; transform: scale(0.3); transform-origin: 0 0; }
.sc-dev.on { opacity: 1; transform: none; }
.sc-dev.me .hw-screen { fill: rgba(var(--sun-rgb), 0.35); stroke: var(--sun); stroke-width: 2; }
.sc-dev.me .hw-body { stroke: var(--sun); }
.sc-more { font: 600 17px var(--font-mono); fill: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .sc-dev { transition: opacity 0.3s, transform 0.3s; transition-delay: calc(var(--i) * 12ms); }
  .sc-wire { transition: opacity 0.3s; }
  .sc-map i { transition: background-color 0.25s; }
}
.sc-map { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 2px; max-width: 480px; }
.sc-map i, .sc-legend i { aspect-ratio: 1; border-radius: 2px; background: var(--surface-2); }
.sc-map i.b1, .sc-legend i.b1 { background: color-mix(in srgb, var(--dg-line) 60%, var(--surface-2)); }
.sc-map i.cur, .sc-legend i.cur { background: rgba(var(--brand-rgb), 0.55); }
.sc-map i.nw, .sc-legend i.nw { background: rgba(var(--bad-rgb), 0.6); }
.sc-map i.me, .sc-legend i.me { box-shadow: inset 0 0 0 2px var(--sun); }
.sc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.8rem; color: var(--muted); }
.sc-legend span { display: inline-flex; align-items: center; gap: 4px; }
.sc-legend i { display: inline-block; width: 12px; height: 12px; }
.sc-split summary { cursor: pointer; font-weight: 600; }
.sc-split[open] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sc-splitctl { font-size: 0.92rem; }
.sc-splitctl select { font: inherit; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px 6px; margin-inline: 4px; }
.sn-table tr.cur td { color: var(--brand); font-weight: 600; }
@container calc (max-width: 520px) { .sc .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .sc .stat { padding: 10px; } .sc .stat b { font-size: 0.85rem; } }
.sn-table .link-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

/* Section header art */
.view-head.with-art { position: relative; padding-right: 300px; min-height: 120px; align-content: center; }
.head-art { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 270px; height: 118px; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.head-art svg { max-width: none; }
@media (max-width: 900px) { .view-head.with-art { padding-right: 0; min-height: 0; } .head-art { display: none; } }
.radar circle:not(.blip), .radar path:not(.sweep) { fill: none; stroke: color-mix(in srgb, var(--cat) 45%, transparent); stroke-width: 1; }
.radar .sweep { fill: color-mix(in srgb, var(--cat) 30%, transparent); transform-origin: 0 0; }
.radar .blip { fill: var(--cat); }
@media (prefers-reduced-motion: no-preference) {
  .radar .sweep { animation: radar 3.2s linear infinite; }
  @keyframes radar { to { transform: rotate(360deg); } }
  .radar .blip { animation: blip 3.2s ease-out infinite; } .radar .b2 { animation-delay: 1.9s; } .radar .b3 { animation-delay: 1.2s; }
  @keyframes blip { 0%, 100% { opacity: 0.15; } 8% { opacity: 1; } }
  .head-art .needle { animation: needle 3s ease-in-out infinite alternate; }
  @keyframes needle { from { transform: rotate(10deg); } to { transform: rotate(120deg); } }
  /* Page entry and scroll reveal */
  #main.enter { animation: view-in 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
  @keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
  .rv { opacity: 0; transform: translateY(16px); }
  .rv.in { opacity: 1; transform: none; transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--rd, 0s); }
  /* A light sweep across primary buttons */
  .btn.brand { position: relative; overflow: hidden; }
  .btn.brand::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%); transform: translateX(-120%); pointer-events: none; }
  .btn.brand:hover::after { transform: translateX(120%); transition: transform 0.7s ease; }
}

/* Elevation: cards and panels sit clearly above the page in both themes */
.panel, .lcard, .path, .stat, .gl-item, .changelog { box-shadow: var(--elev); }
.panel, .lcard, .path, .stat, .gl-item { border-color: var(--card-line); }
.lcard:hover, .art-card:hover { box-shadow: var(--elev-hover); border-color: rgba(var(--brand-rgb), 0.55); }
.lessons { gap: 20px; }
.paths { gap: 18px; }
.stat-row { gap: 14px; }

/* Lesson "See it" diagrams (static/js/flow.js) */
.flow { margin: 0; display: grid; gap: 12px; min-width: 0; }
.flow-title { font-weight: 600; }
.flow.is-stage .stage-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--slab); padding: 18px 16px; min-height: 148px; min-width: 0; }
.obj { display: grid; gap: 8px; }
.obj-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 10px; margin: 0; align-items: baseline; }
.obj-row span { font: 600 10px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.obj-row b { font: 600 0.95rem/1.4 var(--font-mono); overflow-wrap: anywhere; }
.obj-row.bad b { color: var(--bad); }
.obj-body, .obj pre { margin: 0; color: var(--ink); }
.obj pre { font: 500 0.85rem/1.55 var(--font-mono); white-space: pre-wrap; }
.obj-out { margin: 0; font-weight: 650; }
.stage-card.bad .obj-out, .stage-card.bad .stage-line { color: var(--bad); }
.stage-card.good .obj-out, .stage-card.good .stage-line { color: var(--good); }
@media (prefers-reduced-motion: no-preference) {
  .stage-card.is-in[data-dir="next"] { animation: stage-next 0.42s cubic-bezier(.2, .7, .2, 1); }
  .stage-card.is-in[data-dir="back"] { animation: stage-back 0.42s cubic-bezier(.2, .7, .2, 1); }
  @keyframes stage-next { from { opacity: 0; transform: translateY(12px); } }
  @keyframes stage-back { from { opacity: 0; transform: translateY(-12px); } }
  .xpl-stage.is-flip { animation: stage-next 0.36s cubic-bezier(.2, .7, .2, 1); }
}
.stage-line { margin: 0; font: 600 1.15rem/1.4 var(--font-mono); overflow-wrap: anywhere; }
.stage-sub { margin: 0; color: var(--muted); font: 500 0.85rem/1.4 var(--font-mono); overflow-wrap: anywhere; }
.flow-stage { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; padding: 22px 10px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background-color: var(--slab); background-image: radial-gradient(rgba(127, 144, 168, 0.16) 1px, transparent 1.2px); background-size: 18px 18px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03); }
.flow-node { position: relative; z-index: 1; display: grid; justify-items: center; align-content: start; gap: 8px; text-align: center; font-size: 0.82rem; line-height: 1.3; color: var(--muted); min-width: 0; }
.flow-node svg { width: min(76px, 100%); height: auto; overflow: visible; }
.flow-node span { overflow-wrap: anywhere; }
.flow.is-screens .flow-pkt { display: none; }
.flow-screen { width: min(168px, 100%); min-height: 4.6em; display: grid; align-content: start; gap: 4px; text-align: left; padding: 8px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.flow-screen .k { font: 600 10px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.flow-screen .ln { font: 600 0.84rem/1.3; color: var(--ink); }
.flow-screen.bad { border-color: rgba(var(--bad-rgb), 0.55); }
.flow-screen.bad .ln { color: var(--bad); }
.flow-screen.wait .ln { color: var(--sun); }
.flow-screen.good { border-color: rgba(var(--good-rgb), 0.5); }
.flow-screen.ask { border-color: var(--sun); }
.flow-screen.stop { border-color: var(--bad); background: var(--bad-tint); }
.flow-screen.stop .ln { color: var(--bad); }
.flow-choice { display: flex; gap: 4px; margin-top: 2px; }
.flow-choice button { font: 700 10px var(--font-mono); padding: 4px 8px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer; }
.flow-choice button[data-act="deny"] { border-color: var(--bad); color: var(--bad); }
.flow-choice button[data-act="approve"] { border-color: var(--good); color: var(--good); }
/* --bad and --good are bright in dark theme and deep in light theme, so the pressed label flips with them. */
.flow-choice button[aria-pressed="true"][data-act="deny"] { background: var(--bad); color: #2a0610; }
.flow-choice button[aria-pressed="true"][data-act="approve"] { background: var(--good); color: #06281c; }
:root[data-theme="light"] .flow-choice button[aria-pressed="true"] { color: #fff; }
.flow-node.send span, .flow-node.recv span { color: var(--ink); }  /* colour only: bold would re-wrap labels and shift the layout */
.flow-node.send svg, .flow-node.recv svg { filter: drop-shadow(0 0 10px rgba(var(--brand-rgb), 0.55)); }
.flow-stage[data-tone="bad"] .flow-node.send svg { filter: drop-shadow(0 0 10px rgba(var(--bad-rgb), 0.6)); }
.flow-stage[data-tone="good"] .flow-node.recv svg { filter: drop-shadow(0 0 10px rgba(var(--good-rgb), 0.6)); }
.flow-wire { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: visible; }
.flow-wire line { stroke: var(--brand); stroke-width: 2; stroke-dasharray: 6 5; }
.flow-wire marker path { fill: var(--brand); }
.flow-stage[data-tone="bad"] .flow-wire line { stroke: var(--bad); } .flow-stage[data-tone="bad"] .flow-wire marker path { fill: var(--bad); }
.flow-stage[data-tone="good"] .flow-wire line { stroke: var(--good); } .flow-stage[data-tone="good"] .flow-wire marker path { fill: var(--good); }
.flow-pkt { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; z-index: 2; background: var(--brand); box-shadow: 0 0 12px var(--brand); }
.flow.is-route { gap: 16px; }
.route { position: relative; min-height: 250px; padding: 18px 8px 16px; }
.route-pkt { position: absolute; z-index: 2; top: 8px; left: 28%; width: min(230px, 64%); transform: translateX(-50%); padding: 10px 12px 12px; border: 1px solid rgba(var(--brand-rgb), 0.55); border-radius: 8px; background: var(--surface); box-shadow: 0 10px 28px rgba(0,0,0,.35); transition: left .7s cubic-bezier(.2,.7,.2,1); }
.route-pkt.back { border-color: rgba(var(--good-rgb), 0.6); }
.route-note { margin: 0 0 6px; color: var(--brand); font: 650 .72rem var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.route-pkt.back .route-note { color: var(--good); }
.route-addr { display: flex; gap: 8px; align-items: baseline; margin: 0; font: 600 .95rem/1.35 var(--font-mono); color: var(--ink); }
.route-addr span { width: 2.4em; color: var(--muted); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.route-addr .was { color: var(--muted); text-decoration: line-through; font-weight: 500; }
.route-track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 118px; }
.route-line { position: absolute; left: 12%; right: 12%; top: 156px; height: 2px; background: var(--line); }
.route-stop { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: .78rem; text-align: center; }
.route-stop svg { width: 54px; height: auto; opacity: .55; }
.route-stop.on { color: var(--ink); }
.route-stop.on svg { opacity: 1; filter: drop-shadow(0 0 8px rgba(var(--brand-rgb), .45)); }
@media (prefers-reduced-motion: reduce) { .route-pkt { transition: none; } }
/* The route as a room (docs/diagram-standard.md): dark in both themes with its own colours, devices on a floor
   with shadows, a floor cable with a plain slab riding it, and one fixed address card above. Every step's card and
   caption sit stacked in one grid cell (only the current one is visible), so the figure keeps the height of its
   tallest step on every step and at every width. */
.flow.is-route .route {
  --dev: 96px; --cable: calc(var(--dev) * 0.56);
  --surface: #0F1621; --surface-2: #142030; --ink: #DCE6F2; --muted: #9AA9BF; --line: #1E2A3A;
  --brand: #3FE0E8; --brand-rgb: 63, 224, 232; --good: #3DDC97; --good-rgb: 61, 220, 151;
  --hw-stroke: #5E7799; --hw-screen: #0A1A26; --hw-port: #0A1018; --hw-face-top: #3A5075; --hw-face-side: #0B131E; --dg-box: #24344A;
  color-scheme: dark; position: relative; display: grid; gap: 16px; min-height: 0; padding: 16px 8px 18px; border: 1px solid #1E2A3A; border-radius: var(--radius-sm); overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 66%, #1d2b3c 0%, #121b27 50%, #080c12 100%);
}
.route-cards, .flow-steps { display: grid; }
.route-cards > *, .flow-steps > * { grid-area: 1 / 1; visibility: hidden; }
.route-cards > .now, .flow-steps > .now { visibility: visible; }
.flow.is-route .route-cards { justify-items: center; }
.flow.is-route .route-pkt { position: static; box-sizing: border-box; width: min(340px, 100%); transform: none; padding: 10px 12px 12px; border: 1px solid rgba(63, 224, 232, 0.55); border-radius: 8px; background: #0F1621; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); }
.flow.is-route .route-pkt.back { border-color: rgba(61, 220, 151, 0.6); }
.flow.is-route .route-addr { display: grid; grid-template-columns: 5.4em 1fr; gap: 6px; align-items: start; }
.flow.is-route .route-addr .vals { display: grid; width: auto; }
/* The label sits beside the current address; the reserved line for the old address is above it. */
.flow.is-route .route-addr > span:first-child { align-self: end; width: auto; line-height: 1.6; }
.flow.is-route .route-addr .vals b { font-weight: 600; }
.flow.is-route .route-addr .was { min-height: 1.3em; color: transparent; font-weight: 500; text-decoration: none; }
.flow.is-route .route-addr .was.on { color: #9AA9BF; text-decoration: line-through; }
.flow.is-route .route-track { position: relative; display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); padding-top: 0; }
.flow.is-route .route-line { position: absolute; left: calc(50% / var(--n, 4)); right: calc(50% / var(--n, 4)); top: var(--cable); height: 6px; margin-top: -3px; border-radius: 3px; background: #05080c; box-shadow: 0 1px 0 rgba(120, 150, 190, 0.22); }
.route-lit, .route-slab { position: absolute; top: var(--cable); transition: left 1.1s cubic-bezier(.45, 0, .25, 1), width 1.1s cubic-bezier(.45, 0, .25, 1); }
.route-lit { z-index: 1; width: 0; height: 4px; margin-top: -2px; border-radius: 2px; background: #1f7d84; box-shadow: 0 0 9px rgba(63, 224, 232, 0.55); }
.route-lit.back { background: #1f7a55; box-shadow: 0 0 9px rgba(61, 220, 151, 0.5); }
.route-slab { z-index: 4; width: 30px; height: 18px; margin: -9px 0 0 -15px; border-radius: 4px; background: #0B1118; border: 1.5px solid var(--brand); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7), 0 0 8px rgba(63, 224, 232, 0.4); }
.route-slab::before { content: ""; position: absolute; left: 5px; right: 5px; top: 4px; height: 2px; border-radius: 1px; background: var(--brand); }
.route-slab.back { border-color: var(--good); } .route-slab.back::before { background: var(--good); }
.flow.is-route .route-stop { z-index: 3; gap: 10px; color: #9AA9BF; font: 600 0.7rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.flow.is-route .route-stop::before { content: ""; position: absolute; left: 50%; top: calc(var(--dev) * 0.66); width: calc(var(--dev) * 1.05); height: 14px; margin-left: calc(var(--dev) * -0.525); border-radius: 50%; background: #000; opacity: 0.6; filter: blur(7px); z-index: -1; }
.flow.is-route .route-stop svg { width: var(--dev); opacity: 1; overflow: visible; }
.flow.is-route .route-stop .hw { filter: none; }
.flow.is-route .route-stop .hw * { vector-effect: non-scaling-stroke; }
.flow.is-route .route-stop .hw-body:not(.hw-top):not(.hw-side) { fill: #17233A; }
.flow.is-route .route-stop.on { color: #DCE6F2; }
.flow.is-route .route-stop.on svg { filter: none; }
.flow.is-route .route-stop.on .hw-screen { fill: #11404a; stroke: var(--brand); filter: drop-shadow(0 0 6px rgba(63, 224, 232, 0.6)); }
.flow.is-route .route-stop.on .hw-led { fill: var(--brand); opacity: 1; filter: drop-shadow(0 0 3px rgba(63, 224, 232, 0.9)); }
.flow.is-route .route-stop.on .hw-body { stroke: rgba(63, 224, 232, 0.75); }
@media (max-width: 640px) { .flow.is-route .route { --dev: 58px; } .route-slab { width: 20px; height: 12px; margin: -6px 0 0 -10px; } .route-slab::before { left: 3px; right: 3px; top: 2.5px; } .flow.is-route .route-stop { font-size: 0.6rem; letter-spacing: 0.04em; } .flow.is-route .route-addr { font-size: .8rem; } }
@media (prefers-reduced-motion: reduce) { .route-lit, .route-slab { transition: none; } }
/* The route uses the lesson's full width, like the other See it pictures (it was boxed at 820 px for email cards),
   with larger devices, step dots and its words in one caption card under the room (18 Nov). */
.article.lesson > .lesson-mail.is-wide { max-width: none; padding-inline: 0; }
.lesson-mail.is-wide .flow.is-route .route { --dev: 112px; padding: 22px 12px 24px; }
.route-dots { display: flex; justify-content: center; gap: 8px; margin-top: -4px; }
.route-dots span { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; transition: background .2s, border-color .2s, transform .2s; }
.route-dots span.done { background: rgba(var(--brand-rgb), .45); border-color: transparent; }
.route-dots span.now { background: var(--brand); border-color: var(--brand); transform: scale(1.25); }
.route-dots span.back.done { background: rgba(var(--good-rgb), .45); } .route-dots span.back.now { background: var(--good); border-color: var(--good); }
/* Every lesson flow's caption (route, stage, phone, devices): one card under the picture, who and the step in the
   eyebrow, a title, the text and how it's stopped; its edge takes the step's tone (18 Nov). */
.flow .flow-step { gap: 8px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); background: var(--surface); }
.flow .flow-step:has(.flow-msg.bad) { border-left-color: var(--bad); } .flow .flow-step:has(.flow-msg.good), .route-caption.back .flow-step { border-left-color: var(--good); }
.flow .flow-step .flow-msg { padding: 0; border: 0; background: none; font: 650 1.15rem/1.35 var(--font-display); }
.flow .flow-step .flow-msg.bad { color: var(--bad); }
.route-caption .route-text { font-size: 1rem; line-height: 1.6; color: var(--ink); }
.flow.is-route .route-via b { color: var(--muted); font-weight: 500; }
@media (max-width: 640px) { .lesson-mail.is-wide .flow.is-route .route { --dev: 58px; padding: 16px 8px 18px; } .flow .flow-step { padding: 14px; } .flow .flow-step .flow-msg { font-size: 1.05rem; } }
.flow-stage[data-tone="bad"] .flow-pkt { background: var(--bad); box-shadow: 0 0 12px var(--bad); }
.flow-stage[data-tone="good"] .flow-pkt { background: var(--good); box-shadow: 0 0 12px var(--good); }
.flow-step { display: grid; gap: 6px; align-content: start; }
.flow-step > p { max-width: 72ch; }
.flow-step p { margin: 0; }
.flow-msg { font: 600 0.88rem/1.45 var(--font-mono); padding: 8px 12px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.flow-msg.bad { border-left-color: var(--bad); } .flow-msg.good { border-left-color: var(--good); }
.flow-stop { font-size: 0.9rem; color: var(--muted); } .flow-stop b { color: var(--good); }
.flow-text summary { cursor: pointer; font-size: 0.9rem; color: var(--muted); }
.flow-text ol { margin: 8px 0 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 0.9rem; }
@media (max-width: 520px) { .flow-stage { gap: 4px; padding-inline: 4px; } .flow-node { font-size: 0.72rem; } }
/* Concept diagrams (static/js/concept.js): triad, cycle and card layouts */
.concept { margin: 0; display: grid; gap: 14px; min-width: 0; }
.cc-title { font-weight: 600; }
.cc-ic { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.cc-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-content: start; padding: 14px; border: 1px solid var(--card-line); border-radius: var(--radius-sm); background: var(--surface); }
.lesson .screen .cc-card { background: var(--slab); }
.lesson .screen .cc-card .cc-ic { color: var(--muted); }
.stage-card .flow-choice button { font-size: 12px; padding: 8px 14px; }
.cc-card .cc-ic { grid-row: 1 / 3; align-self: start; color: var(--brand); width: 26px; height: 26px; }
.cc-card b { color: var(--ink); font-size: 0.95rem; }
.cc-card span { color: var(--muted); font-size: 0.86rem; line-height: 1.4; }
.cc-stage { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 16px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background-color: var(--bg); background-image: radial-gradient(rgba(127, 144, 168, 0.16) 1px, transparent 1.2px); background-size: 18px 18px; }
.cc-svg { width: 100%; height: auto; overflow: visible; }
.cc-edges line, .cc-edges path { fill: none; stroke: var(--line); stroke-width: 2; }
.cc-nodes .cc-edges path { stroke: var(--brand); stroke-dasharray: 5 5; opacity: 0.6; }
.cc-edges marker path { fill: var(--brand); stroke: none; }
.cc-node { cursor: pointer; }
.cc-node circle { fill: var(--surface); stroke: var(--card-line); stroke-width: 2; transition: stroke 0.15s, fill 0.15s; }
.cc-node .cc-gi { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.15s; }
.cc-node .cc-num { fill: var(--muted); font: 600 15px var(--font-display); text-anchor: middle; }
.cc-node-lbl { fill: var(--ink); font: 600 11px var(--font-display); text-anchor: middle; }
.cc-node:hover circle, .cc-node:focus-visible circle { stroke: rgba(var(--brand-rgb), 0.55); }
.cc-node:focus-visible { outline: none; }
.cc-node.on circle { fill: rgba(var(--brand-rgb), 0.12); stroke: var(--brand); }
.cc-node.on .cc-gi { stroke: var(--brand); }
.cc-node.on .cc-node-lbl { fill: var(--brand); }
.cc-detail { align-self: center; min-height: 3.5em; }
.cc-detail b { color: var(--ink); font-size: 1rem; }
.cc-detail p { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.cc-detail .cc-eg { color: var(--ink); } .cc-detail .cc-eg .eyebrow { margin-right: 4px; }
.cc-detail .muted { color: var(--muted); }
@media (max-width: 560px) { .cc-stage { grid-template-columns: 1fr; } .cc-detail { min-height: 0; } }
/* Lesson practice and next steps */
.try-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.try-row { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border: 1px solid var(--card-line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--elev); }
.try-row:hover { border-color: rgba(var(--brand-rgb), 0.55); }
.try-row .muted { font-size: 0.88rem; }
.try-else { margin: 0; font-size: 0.9rem; }
.next-step { border-color: rgba(var(--brand-rgb), 0.5); }
.next-step h2 { margin: 0; }
.next-step > .row { column-gap: 20px; row-gap: 12px; }
.next-step .looptrack { margin: 2px 0; }
[tabindex="-1"]:focus { outline: none; }
/* The learning-loop strip: Understand → Experiment → Diagnose → Prove it, for one topic. */
.looptrack { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.loop-node { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--radius-sm); padding: 8px 12px; min-width: 0; box-shadow: var(--elev); }
a.loop-node:hover { border-color: var(--brand); }
.loop-node.here { border-color: rgba(var(--brand-rgb), 0.55); background: var(--brand-soft); }
.loop-dot { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font: 600 0.78rem var(--font-mono); background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.loop-node.done .loop-dot { background: var(--good-tint); color: var(--good); border-color: var(--good); }
.loop-node.part .loop-dot { background: rgba(var(--sun-rgb), 0.12); color: var(--sun); border-color: var(--sun); }
.loop-node.here .loop-dot { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.loop-node.none { box-shadow: none; background: transparent; border-style: dashed; color: var(--muted); }
.loop-node.none .loop-dot { background: transparent; border-style: dashed; }
.to-top { justify-self: start; }
.loop-lbl { display: grid; line-height: 1.2; min-width: 0; }
.loop-lbl b { font: 600 0.9rem var(--font-display); }
.loop-lbl span { font: 0.72rem var(--font-mono); color: var(--muted); white-space: nowrap; }
.loop-arr { display: flex; align-items: center; color: var(--faint); font-size: 0.9rem; }
@media (max-width: 560px) { .loop-lbl span { display: none; } .loop-arr { font-size: 0.8rem; } }
/* Quick tip: a memory hook / mnemonic that makes a concept stick. */
.qtip { display: grid; gap: 4px; background: rgba(var(--sun-rgb), 0.07); border: 1px solid rgba(var(--sun-rgb), 0.35); border-left: 3px solid var(--sun); border-radius: var(--radius-sm); padding: 12px 14px; }
.qtip-k { font: 600 0.68rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--sun); }
.qtip p { font-size: 0.95rem; line-height: 1.5; max-width: 68ch; }
.cert-note { margin: 0; font-size: 0.9rem; }
.cert-h { font: 600 1rem var(--font-display); margin: 6px 0 0; }
.cert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cert-obj { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--card-line); border-radius: var(--radius-sm); background: var(--surface); }
.cert-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.cert-title { flex: 1 1 240px; font-weight: 600; }
.cert-badge { font: 600 0.72rem var(--font-mono); padding: 2px 8px; border-radius: var(--radius-sm); border: 1px solid currentColor; white-space: nowrap; }
.cert-badge.good { color: var(--good); } .cert-badge.sun { color: var(--sun); } .cert-badge.muted { color: var(--muted); }
.cert-done { font: 0.78rem var(--font-mono); color: var(--muted); white-space: nowrap; } .cert-done.ok { color: var(--good); }
.cert-acts { gap: 6px; }
.cert-gap { margin: 0; font-size: 0.88rem; }
.ex-scenario { margin: 0; padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: var(--radius-sm); }
.ex-scenario.ex-cli { font: 0.86rem/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.ex-hint { margin: 0; font-size: 0.88rem; }
.ex-opts { display: grid; gap: 8px; margin-top: 16px; }  /* breathing room under the question (19 Nov: the stem sat on the first answer) */
:is(.ex-qhead, .eyebrow, .ex-scenario) + :is(.q, .ex-scenario) { margin-top: 12px; }
.q + .ex-hint { margin-top: 6px; }
#ex-foot, .ex-opts + .ex-ctl { margin-top: 18px; }  /* Previous / Next stand apart from the last answer */
.ex-opt { display: flex; align-items: baseline; gap: 10px; width: 100%; }  /* the letter sits on the answer's first line */
.ex-opt.picked { border-color: var(--brand); background: var(--brand-soft); }
.ex-why { margin: -2px 0 4px; padding: 8px 12px; font-size: 0.9rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.ex-why.ok b { color: var(--good); } .ex-why.no b { color: var(--bad); }
.ex-review ol { display: grid; gap: 10px; padding-left: 1.2em; }
.ex-review li.no > b { color: var(--bad); } .ex-review li.ok > b { color: var(--good); }
.ex-review ul { margin: 4px 0 0; padding-left: 1.1em; font-size: 0.9rem; }
.cert-badge.bad { color: var(--bad); }
.ready-verdict { margin: 0; padding: 10px 14px; border-left: 3px solid var(--muted); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.ready-verdict.good { border-left-color: var(--good); } .ready-verdict.sun { border-left-color: var(--sun); } .ready-verdict.bad { border-left-color: var(--bad); }
.ready-each > summary { cursor: pointer; font: 600 0.82rem var(--font-mono); color: var(--muted); margin-bottom: 8px; }
.ready-domains { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ready-domains li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.ready-domains .rd-name { grid-column: 1 / -1; }
.ready-domains .trk { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.ready-domains .trk i { display: block; height: 100%; background: var(--muted); }
.ready-domains .trk i.good { background: var(--good); } .ready-domains .trk i.sun { background: var(--sun); } .ready-domains .trk i.bad { background: var(--bad); }
.ready-domains .rd-pct { font-size: 0.85rem; min-width: 3.5ch; text-align: right; }
.ready-domains .rd-ev { grid-column: 1 / -1; font-size: 0.82rem; }
button.try-row { font: inherit; text-align: left; cursor: pointer; width: 100%; }
.ready-how summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; }
.ready-how p { margin: 6px 0 0; font-size: 0.88rem; }
.scope-note { margin: 0; padding: 10px 14px; border: 1px solid rgba(var(--sun-rgb), 0.5); border-left: 3px solid var(--sun); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--sun) 8%, var(--surface)); font-size: 0.92rem; }
.scope-note b { color: var(--sun); }
.ex-letter { font: 700 0.85rem var(--font-mono); color: var(--muted); flex: none; width: 1.4em; text-align: center; }
.ex-opt.picked .ex-letter, .ex-opt.right .ex-letter { color: var(--brand); }
.ex-qhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.ex-flag { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 3px 10px; font: 600 0.78rem var(--font-mono); color: var(--muted); cursor: pointer; }
.ex-flag:hover { color: var(--ink); border-color: var(--sun); }
.ex-flag.on { color: var(--sun); border-color: var(--sun); background: color-mix(in srgb, var(--sun) 12%, transparent); }
.ex-nav { gap: 8px; }
.ex-nav [data-act="end"] { margin-left: auto; }
.ex-items { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }  /* the divider stands clear of the buttons */
.ex-items summary { cursor: pointer; font: 600 0.82rem var(--font-mono); color: var(--muted); }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; margin-top: 10px; }
.ex-item { aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font: 600 0.8rem var(--font-mono); cursor: pointer; }
.ex-item:hover { border-color: var(--brand); color: var(--ink); }
.ex-item.done { background: var(--brand-soft); color: var(--brand); border-color: rgba(var(--brand-rgb), 0.5); }
.ex-item.flag { box-shadow: inset 0 0 0 2px var(--sun); }
.ex-item.cur { outline: 2px solid var(--ink); outline-offset: 1px; }
.ex-legend { font-size: 0.78rem; margin: 8px 0 0; }
.ex-review li.skip > b { color: var(--muted); }
.hs { display: grid; gap: 18px; }
.hs-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 820px) { .hs-grid { grid-template-columns: 1fr; } }
.hs-wire { stroke: var(--dg-line); stroke-width: 2; }
.hs-lbl { font: 500 10px var(--font-mono); fill: var(--muted); text-anchor: middle; }
.hs-pkt rect { fill: var(--surface); stroke: var(--brand); stroke-width: 1.4; }
.hs-pkt text { font: 600 9px var(--font-mono); fill: var(--brand); text-anchor: middle; }
.hs-pkt.good rect { stroke: var(--good); } .hs-pkt.good text { fill: var(--good); }
.hs-pkt.bad rect { stroke: var(--bad); } .hs-pkt.bad text { fill: var(--bad); }
.hs-status { margin: 0; min-height: 3em; font-size: 0.95rem; }
.hs-status .ok { color: var(--good); } .hs-status .no { color: var(--bad); }
.hs-ctl h2 { margin: 0; }
.hs-ctl .btn { width: 100%; text-align: left; }
.hs-queue { display: grid; gap: 6px; }
.hs-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(26px, 1fr)); gap: 5px; }
.hs-slot { aspect-ratio: 1; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); transition: background-color 0.25s, border-color 0.25s; }
.hs-slot.flood { background: var(--bad); border-color: var(--bad); }
.hs-slot.client { background: var(--good); border-color: var(--good); }
.hs-stats { display: grid; gap: 4px; margin: 0; font-size: 0.9rem; }
.hs-stats div { display: flex; justify-content: space-between; gap: 10px; }
.hs-stats dt { color: var(--muted); } .hs-stats dd { margin: 0; font-variant-numeric: tabular-nums; }
.hs-stats dd.ok { color: var(--good); } .hs-stats dd.no { color: var(--bad); }
.hs-explain summary { cursor: pointer; font-weight: 600; }
.hs-explain p { margin: 8px 0 0; max-width: 72ch; }
.wire-lab { display: grid; gap: 18px; }
.rj45 { display: grid; justify-items: center; gap: 0; margin: 4px 0; }
.rj45-body { background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.12)), var(--surface-2); border: 2px solid var(--dg-strong); border-radius: 8px 8px 4px 4px; padding: 10px 10px 16px; }
.rj45-pins { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.rj45-pin { position: relative; width: 34px; height: 76px; display: grid; align-items: end; justify-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 3px 3px 0 0; cursor: pointer; padding: 0; overflow: hidden; }
.rj45-pin:hover { border-color: var(--brand); }
.rj45-pin.filled { border-color: var(--dg-strong); }
.rj45-pin.wrong { border-color: var(--bad); box-shadow: inset 0 0 0 2px var(--bad); }
.rj45-pin .w-wire { position: absolute; inset: 0 0 18px 0; }
.rj45-pin .rj45-num { position: relative; z-index: 1; font: 600 0.7rem var(--font-mono); color: var(--ink); background: var(--surface); width: 100%; text-align: center; padding: 1px 0; }
.rj45-clip { width: 26px; height: 12px; background: var(--surface-2); border: 2px solid var(--dg-strong); border-top: 0; border-radius: 0 0 4px 4px; }
.wire-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.w-chip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--card-line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.w-chip:hover { border-color: var(--brand); }
.w-chip.held { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.4); }
.w-chip.used { opacity: 0.4; cursor: default; }
.w-swatch { display: inline-block; width: 36px; height: 16px; border-radius: 3px; border: 1px solid rgba(0,0,0,0.3); flex: none; }
.w-swatch.sm { width: 26px; height: 13px; }
.wire-result { margin: 0; min-height: 1.4em; }
.wire-result .ok { color: var(--good); } .wire-result .no { color: var(--bad); }
.wire-table { border-collapse: collapse; font-size: 0.85rem; }
.wire-table th, .wire-table td { border: 1px solid var(--line); padding: 5px 8px; text-align: center; }
.wire-table th { color: var(--muted); font-weight: 600; }
.wire-table td.w-swap { background: rgba(var(--sun-rgb), 0.12); box-shadow: inset 0 0 0 1px rgba(var(--sun-rgb), 0.4); }
.wire-tip { margin: 0; font-size: 0.9rem; line-height: 1.5; background: rgba(var(--sun-rgb), 0.07); border: 1px solid rgba(var(--sun-rgb), 0.35); border-left: 3px solid var(--sun); border-radius: var(--radius-sm); padding: 10px 12px; }
.wire-tip b:first-child { color: var(--sun); }
@media (max-width: 520px) { .rj45-pin { width: 30px; height: 66px; } .w-swatch { width: 28px; } }
.tap { display: grid; gap: 18px; }
.tap-wire { stroke: var(--dg-line); stroke-width: 2; }
.tap-tap { stroke: var(--dg-strong); stroke-width: 1.5; stroke-dasharray: 3 3; }
.tap-strike { stroke: var(--bad); stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 3px var(--bad)); }
.tap-pkt.hit rect { stroke-width: 2.6; filter: drop-shadow(0 0 6px var(--bad)); }
.tap-pkt.enc.hit rect { filter: drop-shadow(0 0 6px var(--good)); }
.tap-copy rect { fill: var(--surface); stroke: var(--bad); stroke-width: 1.2; stroke-dasharray: 3 2; }
.tap-copy text { font: 600 7px var(--font-mono); fill: var(--bad); text-anchor: middle; }
.tap-copy.enc rect { stroke: var(--good); } .tap-copy.enc text { fill: var(--good); }
.tap-lbl { font: 500 10px var(--font-mono); fill: var(--muted); text-anchor: middle; }
.tap-pkt rect { fill: var(--surface); stroke: var(--brand); stroke-width: 1.4; }
.tap-pkt text { font: 600 8px var(--font-mono); fill: var(--brand); text-anchor: middle; }
.tap-pkt.clear rect { stroke: var(--bad); } .tap-pkt.clear text { fill: var(--bad); }
.tap-pkt.enc rect { stroke: var(--good); } .tap-pkt.enc text { fill: var(--good); }
.tap-capture { margin: 0; min-height: 5em; max-height: 220px; overflow: auto; background: #05080C; color: #E6EDF3; border: 1px solid var(--dg-strong); border-radius: var(--radius-sm); padding: 10px 12px; font: 0.85rem/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.tap-sniff .panel-title .no { color: var(--bad); } .tap-sniff .panel-title .ok { color: var(--good); }

/* ---------- network view (static/js/net/view.js): broadcast domains in colour ---------- */
.netview { width: 100%; height: auto; display: block; overflow: visible; }
.nv-wire { stroke-width: 3.2; stroke-linecap: round; }
.nv-wire.dead { stroke: var(--muted); stroke-dasharray: 5 5; opacity: 0.7; }
.nv-wire.seg0 { stroke: var(--seg0); } .nv-dot.seg0, .nv-swatch.seg0 { fill: var(--seg0); background: var(--seg0); } .nv-plate.seg0 { stroke: var(--seg0); }
.nv-wire.seg1 { stroke: var(--seg1); } .nv-dot.seg1, .nv-swatch.seg1 { fill: var(--seg1); background: var(--seg1); } .nv-plate.seg1 { stroke: var(--seg1); }
.nv-wire.seg2 { stroke: var(--seg2); } .nv-dot.seg2, .nv-swatch.seg2 { fill: var(--seg2); background: var(--seg2); } .nv-plate.seg2 { stroke: var(--seg2); }
.nv-wire.seg3 { stroke: var(--seg3); } .nv-dot.seg3, .nv-swatch.seg3 { fill: var(--seg3); background: var(--seg3); } .nv-plate.seg3 { stroke: var(--seg3); }
.nv-wire.seg4 { stroke: var(--seg4); } .nv-dot.seg4, .nv-swatch.seg4 { fill: var(--seg4); background: var(--seg4); } .nv-plate.seg4 { stroke: var(--seg4); }
.nv-wire.seg5 { stroke: var(--seg5); } .nv-dot.seg5, .nv-swatch.seg5 { fill: var(--seg5); background: var(--seg5); } .nv-plate.seg5 { stroke: var(--seg5); }
.nv-wire.seg6 { stroke: var(--seg6); } .nv-dot.seg6, .nv-swatch.seg6 { fill: var(--seg6); background: var(--seg6); } .nv-plate.seg6 { stroke: var(--seg6); }
.nv-wire.seg7 { stroke: var(--seg7); } .nv-dot.seg7, .nv-swatch.seg7 { fill: var(--seg7); background: var(--seg7); } .nv-plate.seg7 { stroke: var(--seg7); }
.nv-plate { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.nv-pc .nv-plate[class*="seg"] { stroke-width: 3; }
/* The PC's VLAN colour bar: a solid stripe so devices on the same segment read as one colour at a glance. */
.nv-stripe, .nv-tint { pointer-events: none; }
.nv-tint { fill-opacity: 0.12; }
.nv-tint.seg0 { fill: var(--seg0); } .nv-tint.seg1 { fill: var(--seg1); } .nv-tint.seg2 { fill: var(--seg2); } .nv-tint.seg3 { fill: var(--seg3); }
.nv-tint.seg4 { fill: var(--seg4); } .nv-tint.seg5 { fill: var(--seg5); } .nv-tint.seg6 { fill: var(--seg6); } .nv-tint.seg7 { fill: var(--seg7); }
.nv-stripe.seg0 { fill: var(--seg0); } .nv-stripe.seg1 { fill: var(--seg1); } .nv-stripe.seg2 { fill: var(--seg2); } .nv-stripe.seg3 { fill: var(--seg3); }
.nv-stripe.seg4 { fill: var(--seg4); } .nv-stripe.seg5 { fill: var(--seg5); } .nv-stripe.seg6 { fill: var(--seg6); } .nv-stripe.seg7 { fill: var(--seg7); }
@media (prefers-reduced-motion: no-preference) {
  .nv-wire:not(.dead) { stroke-dasharray: 3 14; animation: flow-dash 1.6s linear infinite; }
}
.nv-name { font: 600 12px var(--font-mono); fill: var(--ink); }
.nv-sub, .nv-port, .nv-tag { font: 10.5px var(--font-mono); fill: var(--muted); }
.nv-tag { font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.nv-port { paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.nv-dot { stroke: var(--bg); stroke-width: 1.5; }
.nv-link, .nv-dev { transition: opacity 0.2s; }
.nv-link.dim, .nv-dev.dim { opacity: 0.18; }
.nv-dev[role="button"] { cursor: grab; outline: none; }
.nv-dev[role="button"]:focus-visible .nv-plate, .nv-dev.sel .nv-plate { stroke: var(--brand); stroke-width: 3.5; }
.nv-badge circle { stroke: var(--bg); stroke-width: 2; } .nv-badge text { font: 700 11px var(--font-body); fill: var(--bg); }
.nv-badge.ok circle { fill: var(--good); } .nv-badge.no circle { fill: var(--bad); }
.nv-legend { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.nv-key { width: 100%; display: grid; grid-template-columns: 14px auto 1fr; gap: 4px 8px; align-items: baseline; text-align: left; cursor: pointer; font: inherit; font-size: 0.86rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; }
.nv-key .muted { grid-column: 2 / -1; font-size: 0.8rem; overflow-wrap: anywhere; }
.nv-key:hover, .nv-key.on { border-color: var(--brand); }
.nv-swatch { width: 12px; height: 12px; border-radius: 3px; align-self: center; }
@media (prefers-reduced-motion: reduce) { .nv-link, .nv-dev { transition: none; } }
.nv-idle { font-size: 0.82rem; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nv-chip { display: inline-flex; gap: 6px; align-items: center; font: inherit; font-size: 0.8rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; cursor: pointer; }
.nv-chip:hover, .nv-chip.on { border-color: var(--brand); }
.nv-chip .nv-swatch { width: 9px; height: 9px; }

/* ---------- network builder (static/js/labs/netbuilder.js) ---------- */
.nb-toolbar { gap: 6px; }
.nb-toolbar .btn { padding: 7px 12px; }
#nb-connect[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.nb-scen { display: inline-flex; gap: 6px; align-items: center; font-size: 0.85rem; margin-left: auto; }
.nb-scen select, .nb-lab input, .nb-lab select { font: inherit; font-size: 0.85rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 5px 7px; max-width: 100%; }
.nb-help { margin: 0; min-height: 1.4em; font-size: 0.88rem; }
.nb-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.nb-grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.nb-canvas { position: relative; padding: 8px; }
/* The network builder's canvas is a room (docs/diagram-standard.md): dark in both themes with its own colours.
   Devices stand on the floor with a shadow; a PC stands in a pool of light in its network's colour; cables lie
   dark on the floor with the networks they carry as coloured wires. The plate is only a hit area. */
.nb-canvas {
  --bg: #070A10; --surface: #0F1621; --ink: #DCE6F2; --muted: #9AA9BF; --line: #1E2A3A; --brand: #3FE0E8; --sun: #FFB000;
  --good: #3DDC97; --bad: #FF5470;
  --seg0: #5AA9FF; --seg1: #FFB000; --seg2: #3DDC97; --seg3: #FF7EB6; --seg4: #B794FF; --seg5: #3FE0E8; --seg6: #FF8C42; --seg7: #C5E063;
  --hw-stroke: #5E7799; --hw-screen: #0A1A26; --hw-port: #0A1018; --hw-face-top: #3A5075; --hw-face-side: #0B131E;
  color-scheme: dark; border-radius: var(--radius-sm);
  background: radial-gradient(ellipse 70% 60% at 50% 48%, #1d2b3c 0%, #121b27 50%, #080c12 100%);
}
.nb-canvas .nv-dev .nv-plate, .nb-canvas .nv-dev.sel .nv-plate, .nb-canvas .nv-dev.nb-from .nv-plate, .nb-canvas .nv-dev[role="button"]:focus-visible .nv-plate { fill: transparent; stroke: none; }
.nb-canvas .hw { filter: none; }
.nb-canvas .hw-body:not(.hw-top):not(.hw-side) { fill: #17233A; }
.nv-shadow { fill: #000; opacity: 0.6; filter: blur(6px); pointer-events: none; }
.nv-pool { fill-opacity: 0.2; filter: blur(5px); pointer-events: none; }
.nv-pool.seg0 { fill: var(--seg0); } .nv-pool.seg1 { fill: var(--seg1); } .nv-pool.seg2 { fill: var(--seg2); } .nv-pool.seg3 { fill: var(--seg3); }
.nv-pool.seg4 { fill: var(--seg4); } .nv-pool.seg5 { fill: var(--seg5); } .nv-pool.seg6 { fill: var(--seg6); } .nv-pool.seg7 { fill: var(--seg7); }
.nv-ring { fill: none; stroke: transparent; stroke-width: 1.5; stroke-opacity: 0.8; pointer-events: none; }
.nv-dev[role="button"]:focus-visible .nv-ring, .nv-dev.sel .nv-ring { stroke: var(--brand); }
.nv-dev.nb-from .nv-ring { stroke: var(--sun); stroke-dasharray: 5 3; }
.nv-bed { stroke: #05080c; stroke-linecap: round; }
.nb-canvas .nv-wire { stroke-width: 2.6; }
.nb-canvas .nv-name { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; fill: #C5D4E4; }
.nb-canvas .nv-port, .nb-canvas .nv-tag { stroke: #101924; }
.nb-canvas .netview { touch-action: none; user-select: none; -webkit-user-select: none; }
.nb-canvas.connecting .nv-dev { cursor: crosshair; }
.nb-fx { position: absolute; left: 8px; top: 8px; width: calc(100% - 16px); height: calc(100% - 16px); pointer-events: none; }
.nb-path { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.nb-path.ok, .nb-pkt.ok { stroke: var(--good); fill: var(--good); } .nb-path.no, .nb-pkt.no { stroke: var(--bad); fill: var(--bad); }
.nb-path { fill: none !important; }
.nv-dev.nb-from .nv-plate { stroke: var(--sun); stroke-width: 3.5; stroke-dasharray: 5 3; }
.nb-empty { margin: 40px 20px; }
.nb-side { display: grid; gap: 10px; align-content: start; }
.nb-side [role="tab"][aria-selected="true"] { background: var(--brand-soft); color: var(--brand); border-color: rgba(var(--brand-rgb), 0.5); }
.nb-form { display: grid; gap: 8px; }
.nb-field { display: grid; gap: 3px; font-size: 0.86rem; } .nb-field .muted { font-size: 0.78rem; }
.nb-reach { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.84rem; }
.nb-reach li { border-left: 3px solid var(--line); padding-left: 8px; } .nb-reach li.ok { border-color: var(--good); } .nb-reach li.no { border-color: var(--bad); }
.nb-reach li.ok b { color: var(--good); } .nb-reach li.no b { color: var(--bad); }
.nb-vlans, .nb-cables, .nb-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 0.86rem; }
.nb-vlans input { width: 9.5em; }
.nb-issues li { border-left: 3px solid var(--sun); padding-left: 8px; }
.nb-ports { display: grid; gap: 8px; }
.nb-port { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; display: grid; gap: 6px; font-size: 0.84rem; min-width: 0; }
.nb-port legend { padding: 0 4px; } .nb-port label { display: grid; gap: 2px; }
.nb-port .nb-check, .nb-check { display: inline-flex; gap: 6px; align-items: center; }
.nb-sub { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; } .nb-sub label { display: grid; gap: 2px; font-size: 0.8rem; }
.nb-addv, .nb-plug { gap: 6px; align-items: end; font-size: 0.84rem; } .nb-addv label, .nb-plug label { display: grid; gap: 2px; }
.nb-term { height: 300px; }
.nb-lab .vl-why { display: block; font-weight: 400; font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.nb-goals ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 0.9rem; } .nb-goals li.got { color: var(--good); }
@media (max-width: 900px) { .nb-grid, .nb-grid2 { grid-template-columns: minmax(0, 1fr); } .nb-scen { margin-left: 0; } }
.nb-goalmsg { margin: 6px 0 0; font-size: 0.86rem; color: var(--good); font-weight: 600; } .nb-goalmsg:empty { display: none; }
.nb-side h3.eyebrow { margin: 10px 0 2px; }

/* ---------- permissions lab (static/js/labs/perms.js) ---------- */
.pm-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 8px; }
.pm-people li { display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 0.88rem; }
.pm-people .muted { grid-column: 2; font-size: 0.8rem; } .pm-groups { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; }
.pm-av { grid-row: span 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.pm-g { font: 600 0.72rem var(--font-mono); padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; }
.pm-g.pg0 { color: var(--seg1); }
.pm-g.pg1 { color: var(--seg2); }
.pm-g.pg2 { color: var(--seg0); }
.pm-g.pg3 { color: var(--seg3); }
.pm-g.pg4 { color: var(--seg4); }
.pm-g.pg5 { color: var(--seg5); }
.pm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.perm-lab > *, .pm-grid > * { min-width: 0; }
.perm-lab .panel { grid-template-columns: minmax(0, 1fr); }  /* panels are grids; let their column shrink below the ls line */
.pm-scroll { overflow-x: auto; }
.pm-tabs .chip[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); border-color: rgba(var(--brand-rgb), 0.5); }
.pm-ls { background: #05080C; color: #DCE6F2; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 0.8rem; overflow-x: auto; white-space: pre; margin: 10px 0 8px; }
.pm-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; font-size: 0.86rem; }
.pm-meta label { display: grid; gap: 2px; } .pm-meta select { font: inherit; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 6px; }
.pm-oct { margin-left: auto; } .pm-oct b { color: var(--sun); font-size: 1.05rem; }
.pm-bits { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.85rem; }
.pm-bits th, .pm-bits td { padding: 5px 4px; text-align: left; } .pm-bits thead th { font: 600 0.8rem var(--font-mono); } .pm-bits thead .muted { font: 400 0.72rem var(--font-body); display: block; }
.pm-bit { width: 100%; min-width: 2.4em; font: 700 0.95rem var(--font-mono); padding: 7px 0; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.pm-bit.on { background: var(--brand-soft); color: var(--brand); border-color: rgba(var(--brand-rgb), 0.55); }
.pm-note { font-size: 0.84rem; margin: 8px 0 0; }
.pm-matrix { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.pm-matrix th, .pm-matrix td { padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.pm-matrix td.yes { color: var(--good); font-weight: 700; } .pm-matrix td.no { color: var(--bad); font-weight: 700; }
.pm-matrix td.yes, .pm-matrix td.no { text-align: center; font-size: 1.05rem; }
.pm-cls { font: 0.76rem var(--font-mono); color: var(--muted); }
.pm-matrix tr.pm-owner .pm-cls { color: var(--seg1); } .pm-matrix tr.pm-group .pm-cls { color: var(--seg2); } .pm-matrix tr.pm-root .pm-cls { color: var(--sun); }
.pm-why { font-size: 0.84rem; margin: 8px 0 0; }
@media (max-width: 900px) { .pm-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- practise page ---------- */
.pr-start .lessons { margin-top: 2px; }
.pr-tracks { gap: 6px; }
.pr-more { justify-self: start; }

/* ---------- home: the route map ---------- */
.home-head { gap: 8px; } .home-head p { max-width: 62ch; }
/* Premium home hero: a cinematic, centred first impression that leads the page (the route map sits below it). */
.home .home-hero { position: relative; isolation: isolate; overflow: hidden; text-align: left;
  color-scheme: dark;
  --ink: #DCE6F2; --muted: #9AA9BF; --line: #243244; --surface: #0F1621; --bg: #070A10;
  --brand: #3FE0E8; --brand-rgb: 63, 224, 232; --sun-rgb: 255, 176, 0;
  --brand-ink: #03171B;  /* dark text on the bright teal button, in either theme (light theme's white failed contrast) */
  margin: -6px 0 4px; padding: clamp(48px, 12vh, 128px) clamp(26px, 6vw, 76px) clamp(44px, 9vh, 104px);
  min-height: clamp(380px, 54vh, 580px); display: flex; align-items: center;
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: #070A10; }
.hh-bg { position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(58% 78% at 90% 34%, rgba(var(--brand-rgb), 0.16), transparent 62%),
    radial-gradient(48% 68% at 104% 112%, rgba(var(--sun-rgb), 0.12), transparent 58%),
    #070A10; }
.hh-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }
.hh-scrim { position: absolute; inset: 0;
  background:
    linear-gradient(90deg, #070A10 0%, rgba(7,10,16,0.92) 40%, rgba(7,10,16,0.64) 58%, rgba(7,10,16,0.24) 77%, rgba(7,10,16,0) 92%),
    linear-gradient(0deg, rgba(7,10,16,0.55), transparent 48%); }
.hh-inner { position: relative; display: grid; justify-items: start; gap: 0; max-width: 580px;
  text-shadow: 0 2px 22px rgba(0,0,0,0.5); }
.hh-eyebrow { font: 600 0.8rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand); margin: 0 0 16px; }
.hh-title { font: 800 clamp(2.1rem, 4.6vw, 3.5rem)/1.03 var(--font-display); letter-spacing: -0.01em; text-transform: uppercase; margin: 0; max-width: 14ch; text-wrap: balance; color: #F2F7FC; }
.hh-title .accent { font-style: normal; color: var(--brand); text-shadow: 0 0 34px rgba(var(--brand-rgb), 0.5); }
.hh-sub { color: var(--ink); opacity: 0.9; max-width: 46ch; margin: 20px 0 28px; font-size: clamp(1rem, 1.5vw, 1.16rem); line-height: 1.55; }
.hh-cta { display: flex; gap: 14px; justify-content: flex-start; flex-wrap: wrap; }
.btn.lg { padding: 12px 24px; font-size: 1.02rem; border-radius: 999px; }
.hh-trust { margin: 24px 0 0; color: var(--muted); font: 500 0.82rem/1.5 var(--font-mono); max-width: 50ch; }
/* Once hero.js has run, the photo sits in a stage sized like object-fit: cover, so the live screen can be pinned to the
   monitor's corners; the slow drift moves the stage, so the screen drifts with the photo. */
.hh-stage { position: absolute; transform-origin: 70% 50%; }
.hh-stage .hh-img { inset: 0; object-fit: fill; }
.hh-screen { position: absolute; left: 0; top: 0; transform-origin: 0 0; box-sizing: border-box; overflow: hidden; padding: 18px 22px;
  background: radial-gradient(120% 90% at 30% 20%, #0E1A24, #071017 70%); color: #CFE3EE; font: 500 15px/1.5 var(--font-mono);
  box-shadow: inset 0 0 60px rgba(63, 224, 232, 0.08); opacity: 0.94; }
.hs-bar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.hs-logo { font: 800 26px/1 var(--font-display); letter-spacing: 0.02em; color: #F2F7FC; }
.hs-logo i { font-style: normal; color: #FFB000; }
.hs-dots { display: flex; gap: 7px; } .hs-dots i { width: 10px; height: 10px; border-radius: 50%; background: #243244; }
.hh-screen { display: flex; flex-direction: column; }
.hs-body { flex: 1; min-height: 0; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 1.8em); mask-image: linear-gradient(transparent, #000 1.8em); }
  /* earlier scenes stay as dimmed scrollback (hero.js play) */
.nw { white-space: nowrap; }
.hs-line { overflow-wrap: anywhere; padding-left: 2ch; text-indent: -2ch; }
.hs-line.out { font-size: 13.5px; line-height: 1.45; margin-top: 3px; }
.hs-line.cmd { color: #F2F7FC; margin-top: 6px; } .hs-ps { color: #3FE0E8; }
.hs-line.bad .hs-t { color: #FF8A9B; } .hs-line.good .hs-t { color: #3DDC97; } .hs-line.warn .hs-t { color: #FFB000; } .hs-line.dim .hs-t { color: #7F90A8; }
.hs-cur { display: inline-block; width: 9px; height: 17px; margin-left: 2px; vertical-align: -3px; background: #3FE0E8; animation: hs-blink 1s steps(1) infinite; }
@keyframes hs-blink { 50% { opacity: 0; } }
/* 19 Nov: the new photo is anchored right (the monitor never cropped); on phones the monitor gets its own frame under the
   buttons, with the "On screen" caption and its link. */
.home .home-hero .hh-img { object-position: 100% 50%; }
/* the photo may be smaller than the hero now: fade its top, bottom and left into the hero's dark background */
.hh-stage .hh-img { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to right, transparent 0, #000 22%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to right, transparent 0, #000 22%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
@media (min-width: 1051px) { .home .home-hero .hh-scrim { background: linear-gradient(90deg, #070A10 0%, rgba(7,10,16,0.9) 34%, rgba(7,10,16,0.45) 50%, rgba(7,10,16,0.08) 60%, rgba(7,10,16,0) 70%), linear-gradient(0deg, rgba(7,10,16,0.5), transparent 30%); } }
.hs-tab { font: 600 12px var(--font-mono); color: #8a9bb0; letter-spacing: 0.04em; }
.hs-line { white-space: pre-wrap; }
.hh-now { position: absolute; right: clamp(16px, 3vw, 40px); bottom: 14px; z-index: 2; margin: 0; max-width: min(520px, 60%); text-align: right;
  font: 500 0.8rem/1.4 var(--font-mono); color: #9AA9BF; text-shadow: 0 1px 8px rgba(0,0,0,0.8); }
.hh-now a { color: var(--brand); font-weight: 600; white-space: nowrap; }
.hh-now-k { color: #6f7f94; }
.hh-phone { display: none; }
@media (max-width: 1050px) {  /* tablets and phones: the monitor in its own frame under the buttons */
  .home .home-hero { flex-direction: column; align-items: stretch; gap: 22px; }
  .hh-phone { display: grid; gap: 8px; width: 100%; max-width: 620px; }  /* a monitor, not a billboard, on tablets */
  .hh-shot { position: relative; overflow: hidden; aspect-ratio: 900 / 490; border-radius: 12px; border: 1px solid var(--line); background: #070A10; }
  .hh-phone .hh-now { position: static; max-width: none; text-align: left; }
}
@media (prefers-reduced-motion: no-preference) { .home .home-hero .hh-img:not(.hh-stage .hh-img), .home .home-hero .hh-stage { animation: hh-drift 22s ease-in-out infinite alternate; }
  @keyframes hh-drift { from { transform: scale(1.02); } to { transform: scale(1.1); } } }
@media (max-width: 760px) { .home .home-hero { min-height: 0; padding: 40px 20px 34px; }
  .hh-img { object-position: 68% 44%; }
  .hh-scrim { background:
    linear-gradient(90deg, #070A10 0%, rgba(7,10,16,0.74) 52%, rgba(7,10,16,0.46) 100%),
    linear-gradient(0deg, rgba(7,10,16,0.66) 0%, rgba(7,10,16,0.22) 46%, rgba(7,10,16,0.44) 100%); }
  .hh-inner { max-width: 100%; }
  .btn.lg { width: 100%; justify-content: center; } .hh-cta { width: 100%; } }
.route-panel { gap: 10px; }
.route-now { display: grid; justify-items: start; gap: 8px; margin: 0 0 14px; }
.route-now h1 { font: 700 2.1rem/1.15 var(--font-display); letter-spacing: 0.03em; margin: 0; }
.home-note { margin: 4px 0 0; }
.route-top { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; justify-content: space-between; }
.route-top h2 { font: 600 1.25rem/1.25 var(--font-display); }
.route-paths { gap: 6px; }
.route-map { width: 100%; height: auto; display: block; overflow: visible; }
.route-road { fill: none; stroke: var(--line); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.route-road.done { stroke: var(--brand); opacity: 0.85; }
.route-dot { fill: var(--surface); stroke: var(--dg-strong); stroke-width: 3; }
.route-stop.done .route-dot { fill: var(--brand); stroke: var(--brand); }
.route-stop.next .route-dot { fill: var(--sun); stroke: var(--sun); }
.route-n { font: 700 15px var(--font-mono); fill: var(--ink); }
.route-stop.done .route-n, .route-stop.next .route-n { fill: var(--bg); }
.route-kind { font: 600 10px var(--font-mono); letter-spacing: 0.12em; fill: var(--muted); }
.route-lbl { font: 600 13.5px var(--font-body); fill: var(--ink); }
.route-stop { cursor: pointer; text-decoration: none; outline: none; }
.route-stop:hover .route-dot, .route-stop:focus-visible .route-dot { stroke: var(--brand); stroke-width: 5; }
.route-stop:focus-visible .route-lbl { text-decoration: underline; }
.route-start rect, .route-finish rect { fill: var(--surface-2); stroke: var(--dg-strong); stroke-width: 2; }
.route-start text, .route-finish text { font: 700 11px var(--font-mono); fill: var(--ink); letter-spacing: 0.08em; }
.route-finish.done rect { fill: var(--sun); stroke: var(--sun); } .route-finish.done text { fill: var(--bg); font-size: 20px; }
.route-next { gap: 8px 16px; align-items: center; } .route-next .btn { margin-left: auto; }
@media (max-width: 600px) { .route-next .btn { margin-left: 0; } }
/* "One request, start to finish" (labs/journey.js): numbered stops, one scene each */
.jr-stops ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); }
.jr-stops li { position: relative; }
.jr-stops li + li::before { content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 4px; background: var(--line); border-radius: 2px; }
.jr-stops li.done + li::before, .jr-stops li.done::before { background: var(--brand); }
.jr-stops button { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; width: 100%; background: none; border: 0; padding: 0 2px; cursor: pointer; color: var(--muted); font: 600 0.74rem/1.2 var(--font-body); text-align: center; }
.jr-dot { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); font: 700 0.9rem var(--font-mono); color: var(--ink); }
.jr-stops .done .jr-dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.jr-stops .here .jr-dot { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.25); }
.jr-stops .here button { color: var(--ink); }
.jr-stops button:hover .jr-dot { border-color: var(--brand); }
@media (max-width: 520px) { .jr-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .jr-dot { width: 32px; height: 32px; } .jr-stops li + li::before { top: 15px; } }
.jr-chapter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.jr-chapter h2 { margin: 0; }
.jr-idea { margin: 0; font-size: 1.02rem; max-width: 72ch; }
.jr-small { font-size: 0.84rem; margin: 0; }
.jr-h { margin: 8px 0 0; }
.jr-svg { width: 100%; max-width: 720px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.jr-seqsvg { display: block; margin: 0 auto; max-width: 100%; overflow: visible; }
.jr-seq-l.to { fill: var(--sun); }
/* On a phone the fixed-size scenes shrink to about half, so their text is drawn bigger to stay readable. */
@media (max-width: 520px) { .jr-svg .jr-label { font-size: 21px; } .jr-svg .jr-sub, .jr-svg .jr-tag { font-size: 19px; } }
.jr-label { font: 600 12px var(--font-body); fill: var(--ink); }
.jr-sub { font: 500 11px var(--font-mono); fill: var(--muted); }
.jr-wire { stroke: var(--dg-line); stroke-width: 3; stroke-linecap: round; }
.jr-tap { stroke: var(--bad); stroke-dasharray: 4 4; }
.jr-inside { stroke-dasharray: 3 5; }
.jr-svg.tls .jr-tlswire { stroke: var(--good); stroke-width: 5; }
.jr-tag { font: 700 12px var(--font-mono); fill: var(--muted); }
.jr-tag.s2xx, .jr-svg.tls .jr-tag { fill: var(--good); } .jr-tag.s4xx, .jr-tag.s5xx { fill: var(--bad); }
.jr-pkt { fill: var(--brand); filter: drop-shadow(0 0 6px var(--brand)); }
.jr-pkt.s2xx { fill: var(--good); } .jr-pkt.s4xx, .jr-pkt.s5xx, .jr-pkt.bad { fill: var(--bad); }
.jr-picks { gap: 8px; }
.jr-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; align-items: start; }
.jr-pair > p { grid-column: 1 / -1; }
.jr-code { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; min-width: 0; }
.jr-code figcaption { font: 600 0.72rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 10px; background: var(--surface-2); color: var(--muted); }
.jr-code pre { margin: 0; padding: 10px; font: 0.8rem/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.jr-code.s2xx, .jr-code.good, .jr-code.s1xx { border-color: rgba(var(--good-rgb), 0.6); }
.jr-code.s4xx, .jr-code.s5xx, .jr-code.bad { border-color: rgba(var(--bad-rgb), 0.6); }
.jr-code pre mark { background: rgba(var(--brand-rgb), 0.28); color: inherit; }
.jr-note { margin: 0; }
.jr-status.s2xx { color: var(--good); } .jr-status.s4xx, .jr-status.s5xx { color: var(--bad); }
.jr-goal { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px dashed var(--line); }
.jr-tick { margin-right: 6px; }
.jr-tick::before { content: "○"; font-weight: 700; color: var(--muted); }
.jr-goal.met { border-style: solid; border-color: var(--good); background: var(--good-tint); }
.jr-goal.met .jr-tick::before { content: "✓"; color: var(--good); }
.jr-angle { border-left: 4px solid var(--sun); padding: 4px 0 4px 12px; }
.jr-angle b { font: 700 0.72rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--sun); }
.jr-angle p { margin: 4px 0 0; }
.jr-nav { justify-content: space-between; }
.jr-seg[aria-pressed="true"] { background: var(--bad-tint); border-color: var(--bad); color: var(--bad); text-decoration: line-through; }
.jr-lane { stroke: var(--line); stroke-width: 2; stroke-dasharray: 3 4; }
.jr-seq-a { stroke: var(--seg0); stroke-width: 2.5; }
.jr-seq-a.lost { stroke: var(--bad); } .jr-seq-a.re { stroke: var(--sun); stroke-width: 3; }
.jr-seq-a.ack { stroke: var(--good); } .jr-seq-a.dup { stroke-dasharray: 5 3; }
.jr-seq-a.waste { stroke: var(--muted); stroke-dasharray: 3 3; }
.jr-seq-l { font: 600 11px var(--font-mono); fill: var(--ink); }
.jr-seq-x { font: 700 11px var(--font-mono); fill: var(--bad); }
.jr-seq-to { font-size: 13px; }
.jr-buffer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.jr-boxes { display: inline-flex; gap: 6px; }
.jr-box { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; font: 700 0.85rem var(--font-mono); border: 2px solid var(--line); }
.jr-box.got { background: var(--good-tint); border-color: var(--good); color: var(--good); }
.jr-box.gap { border-color: var(--bad); color: var(--bad); border-style: dashed; }
.jr-heads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; align-items: start; }
.jr-head { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 0 8px; overflow: hidden; }
.jr-head-t { display: flex; justify-content: space-between; padding: 7px 10px; background: var(--surface-2); font-size: 0.85rem; }
.jr-head-t span { font: 600 0.75rem var(--font-mono); color: var(--muted); }
.jr-bits { display: flex; justify-content: space-between; padding: 4px 10px 2px; font: 0.66rem var(--font-mono); color: var(--muted); }
.jr-row { display: flex; gap: 4px; padding: 2px 8px; }
.jr-f { min-width: 0; text-align: center; padding: 6px 2px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); font: 0.72rem var(--font-mono); overflow-wrap: anywhere; }
.jr-f.key { border-color: var(--brand); background: rgba(var(--brand-rgb), 0.1); }
.jr-cert { border: 1px solid var(--line); border-left-width: 5px; border-radius: var(--radius-sm); padding: 10px 12px; }
.jr-cert.good { border-left-color: var(--good); } .jr-cert.bad { border-left-color: var(--bad); }
.jr-cert p { margin: 6px 0 0; }
.jr-verdict { font-weight: 700; }
.jr-cert.good .jr-verdict { color: var(--good); } .jr-cert.bad .jr-verdict { color: var(--bad); }
.jr-srv.dead .hw-body { stroke: var(--bad); }
.jr-srv.dead .hw-led { fill: var(--bad); }
.jr-srv.out { opacity: 0.45; }
.jr-srvs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.jr-srvs li { display: grid; gap: 2px; padding: 7px 9px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 4px solid var(--good); font-size: 0.8rem; min-width: 0; }
.jr-srvs li.warn { border-left-color: var(--sun); } .jr-srvs li.bad { border-left-color: var(--bad); opacity: 0.8; }
.jr-lblog { margin: 0; padding-left: 18px; display: grid; gap: 4px; max-height: 220px; overflow: auto; font-size: 0.88rem; }
.jr-zone { fill: rgba(var(--brand-rgb), 0.05); stroke: var(--line); stroke-dasharray: 5 4; }
[data-svc].on .hw-body { stroke: var(--brand); stroke-width: 2.4; }
[data-svc].on .jr-label { fill: var(--brand); }
.jr-path { gap: 6px; align-items: center; flex-wrap: wrap; }
.jr-path label { font-size: 0.85rem; color: var(--muted); }
.jr-path input { flex: 1 1 140px; min-width: 0; }
.jr-act { min-width: 5.5em; }
.jr-act.allow { color: var(--good); border-color: var(--good); }
.jr-act.deny { color: var(--bad); border-color: var(--bad); }
.jr-ord { white-space: nowrap; }
.jr-ord button:disabled { opacity: 0.3; cursor: default; }
.jr-tests tr.wrong td { background: var(--bad-tint); }
.jr-upd { stroke: var(--sun); stroke-width: 2; stroke-dasharray: 2 4; }
.jr-dotp { fill: var(--muted); } .jr-dotp.news { fill: var(--good); }
@media (prefers-reduced-motion: reduce) { .jr-pkt { transition: none !important; } }
.jr-zone.priv { fill: rgba(var(--sun-rgb), 0.05); }
[data-hop].on .hw-body { stroke: var(--brand); stroke-width: 2.4; }
[data-hop].on .jr-label { fill: var(--brand); }
.jr-box-host { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.jr-host-t { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 8px 12px; background: var(--surface-2); }
.jr-svcs { list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.jr-svcs li { display: grid; gap: 6px; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-top: 4px solid var(--sun); min-width: 0; }
.jr-svcs li.local { border-top-color: var(--good); }
.jr-svcs label { display: grid; gap: 3px; font-size: 0.8rem; color: var(--muted); }
.jr-svcs select { min-width: 0; max-width: 100%; }
.jr-port { font-size: 1.1rem; font-weight: 700; }
.jr-reach { font-size: 0.8rem; }
.jr-sgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.jr-sg { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; min-width: 0; }
.jr-sg p { margin: 6px 0 0; overflow-wrap: anywhere; }
.jr-sg select { max-width: 100%; }
.jr-tests .jr-why { white-space: normal; min-width: 16em; font-size: 0.8rem; }
.jr-svg.tall { max-width: 360px; }
/* The journey labs' pictures are rooms (docs/diagram-standard.md): dark in both themes with their own colours,
   devices standing on the floor with a shadow, cables lying dark on it, zones as faint markings on the floor. */
.jr-svg {
  --bg: #070A10; --surface: #0F1621; --surface-2: #142030; --ink: #DCE6F2; --muted: #9AA9BF; --line: #2A3B52;
  --brand: #3FE0E8; --brand-rgb: 63, 224, 232; --sun: #FFB000; --sun-rgb: 255, 176, 0; --good: #3DDC97; --good-rgb: 61, 220, 151; --bad: #FF5470; --bad-rgb: 255, 84, 112;
  --exploited: #FF5470; --dg-line: #05080c; --dg-box: #24344A; --dg-strong: #05080c;
  --hw-stroke: #5E7799; --hw-screen: #0A1A26; --hw-port: #0A1018; --hw-face-top: #3A5075; --hw-face-side: #0B131E;
  color-scheme: dark; box-sizing: border-box; padding: 12px; border: 1px solid #1E2A3A; border-radius: var(--radius-sm); overflow: hidden;
  background: radial-gradient(ellipse 72% 64% at 50% 50%, #1d2b3c 0%, #121b27 52%, #080c12 100%);
}
.jr-svg .hw { filter: none; }
.jr-svg .hw-body:not(.hw-top):not(.hw-side) { fill: #17233A; }
.jr-shadow { fill: #000; opacity: 0.55; filter: blur(4px); }
/* Controls under a picture never butt against it. */
.jr-svg + .row, .jr-svg + .jr-pair, .jr-svg + p { margin-top: 14px; }
.jr-svg .jr-wire { stroke-width: 5; }
.jr-svg .jr-pkt { fill: #0B1118; stroke: var(--brand); stroke-width: 1.6; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 6px rgba(63, 224, 232, 0.45)); }
.jr-svg .jr-pkt.s2xx { fill: #0B1118; stroke: var(--good); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 6px rgba(61, 220, 151, 0.5)); }
.jr-svg .jr-pkt.s4xx, .jr-svg .jr-pkt.s5xx, .jr-svg .jr-pkt.bad { fill: #0B1118; stroke: var(--bad); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 6px rgba(255, 84, 112, 0.5)); }
.jr-svg .jr-dev .jr-label { font: 600 10.5px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; fill: #C5D4E4; }
.jr-svg .jr-zone { fill: rgba(63, 224, 232, 0.035); stroke: rgba(120, 150, 190, 0.28); }
.jr-svg .jr-zone.priv { fill: rgba(255, 176, 0, 0.04); }
/* The picture is scaled down a lot on a phone, so its text is drawn larger there to stay readable. */
@media (max-width: 520px) { .jr-svg .jr-dev .jr-label { font-size: 17px; letter-spacing: 0.02em; } }

@media (max-width: 520px) { .jr-svg.tall .jr-label { font-size: 13px; } .jr-svg.tall .jr-sub { font-size: 11px; } }
#jr-body[aria-busy="true"] button, #jr-body[aria-busy="true"] .btn { cursor: progress; }
/* The shared email (static/js/mail.js): a mail app's look, links that reveal where they go, Details and Original views */
.em { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.em-tabs { display: flex; gap: 2px; padding: 6px 6px 0; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.em-tab { font: 600 0.8rem var(--font-body); padding: 7px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: none; color: var(--muted); cursor: pointer; }
.em-tab[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--line); margin-bottom: -1px; }
.em-pane { display: grid; gap: 10px; padding: 16px 18px; min-width: 0; }
.em-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.em-av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 700 0.9rem var(--font-body); color: #fff; background: hsl(var(--em-h) 55% 28%); }
.em-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; min-width: 0; }
.em-name { font-weight: 700; }
.em-addr { font: 0.8rem var(--font-mono); color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
.em-to { flex-basis: 100%; font-size: 0.78rem; color: var(--muted); }
.em-date { font-size: 0.78rem; color: var(--muted); white-space: nowrap; align-self: start; }
.em-dom { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.05em; color: var(--ink); background: var(--brand-soft); border-radius: 3px; padding: 0 3px; }
.em-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.em-flag { font: 600 0.72rem var(--font-mono); padding: 3px 7px; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--muted); overflow-wrap: anywhere; }
.em-flag.ext { color: var(--sun); border-color: rgba(var(--sun-rgb), 0.6); background: rgba(var(--sun-rgb), 0.08); }
.em-flag.warn { color: var(--bad); border-color: rgba(var(--bad-rgb), 0.6); }
.em-subj { margin: 0; font-size: 1.08rem; }
.em-body p { margin: 0 0 8px; }
.em-body p:last-of-type { margin-bottom: 0; }
.em-links { display: grid; gap: 8px; }
.em-link { display: grid; gap: 4px; justify-items: start; }
.em-cta { background: var(--brand); color: var(--brand-ink); border: 0; border-radius: var(--radius-sm); padding: 9px 16px; font-weight: 700; cursor: help; }
.em-url { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; font: inherit; cursor: help; overflow-wrap: anywhere; text-align: left; }
.em-go { margin: 0; padding: 6px 9px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 0.82rem; overflow-wrap: anywhere; }
.em-app { display: grid; grid-template-rows: auto minmax(0, 1fr) 26px; min-height: 520px; border: 1px solid #d1d1d1; border-radius: 8px; overflow: hidden; background: #fff; color: #242424; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28); font-family: "Segoe UI", var(--font-body), sans-serif; }
.em-bar { display: grid; grid-template-columns: auto auto 1fr; gap: 14px; align-items: center; height: 40px; padding: 0 12px; background: #f3f2f1; border-bottom: 1px solid #e1dfdd; color: #242424; }
.em-win { width: 42px; height: 10px; background: radial-gradient(circle at 5px 5px, #ff5f57 4.5px, transparent 5px), radial-gradient(circle at 21px 5px, #febc2e 4.5px, transparent 5px), radial-gradient(circle at 37px 5px, #28c840 4.5px, transparent 5px); }
.em-bar b { font: 600 0.84rem "Segoe UI", var(--font-body), sans-serif; }
.em-search { justify-self: center; width: min(280px, 46vw); padding: 4px 12px; border-radius: 4px; background: #fff; border: 1px solid #d1d1d1; color: #595959; font: 400 0.78rem "Segoe UI", var(--font-body), sans-serif; }
.em-split { display: grid; grid-template-columns: 176px minmax(0, 1fr); min-height: 0; }
.em-folders { display: grid; align-content: start; gap: 1px; padding: 8px 6px; background: #faf9f8; border-right: 1px solid #edebe9; }
.em-folders b, .em-folders span { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 4px; color: #323130; font: 400 0.84rem "Segoe UI", var(--font-body), sans-serif; }
.em-folders b.on { background: #ebebeb; font-weight: 650; }
.em-folders b span { padding: 0; color: #0f6cbd; font: 650 0.78rem "Segoe UI", var(--font-body), sans-serif; }
.em-col { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; background: #fff; }
.em-list { border-bottom: 1px solid #edebe9; background: #fff; }
.article.lesson > .lesson-mail { max-width: 820px; margin-inline: auto; padding-inline: 28px; box-sizing: border-box; }
.lesson-mail { margin: 8px auto 28px; }
.lesson-mail .flow { margin: 0; }
.em-app .em { margin: 16px 18px 18px; border-color: #edebe9; }
.em-row { display: grid; grid-template-columns: 10px 132px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 18px 8px 14px; border-left: 3px solid transparent; color: #605e5c; }
.em-row.on { background: #eff6fc; border-left-color: #0f6cbd; color: #242424; }
.em-row i { width: 8px; height: 8px; border-radius: 50%; background: #0f6cbd; }
.em-row i.read { background: transparent; }
.em-row b { font: 650 0.82rem "Segoe UI", var(--font-body), sans-serif; color: #201f1e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-row:not(.on) b { font-weight: 400; color: #605e5c; }
.em-row span { font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-row span strong { font-weight: 650; color: #201f1e; }
.em-row:not(.on) span strong { font-weight: 400; color: #605e5c; }
.em-row time { color: #605e5c; font: 400 0.75rem "Segoe UI", var(--font-body), sans-serif; }
.em-app .em { background: #fff; color: #242424; }
.em-app .em-pane { display: flex; flex-direction: column; gap: 12px; padding: 16px 28px 24px; background: #fff; }
.em-app .em-tools { display: flex; gap: 8px; }
.em-app .em-tools span { padding: 4px 12px; border: 1px solid #d1d1d1; border-radius: 4px; background: #fff; color: #323130; font: 600 0.78rem "Segoe UI", var(--font-body), sans-serif; }
.em-app .em-subj { order: -2; margin: 0; color: #242424; font: 600 1.35rem/1.3 "Segoe UI", var(--font-body), sans-serif; }
.em-app .em-tools { order: -1; }
.em-app .em-tabs { background: #f3f2f1; border-bottom: 1px solid #edebe9; padding: 8px 12px 0; }
.em-app .em-tab { color: #605e5c; }
.em-app .em-tab[aria-pressed="true"] { background: #fff; color: #242424; border-color: #edebe9; }
.em-app .em-raw { color: #242424; background: #faf9f8; }
.em-app .em-name { color: #242424; font-weight: 650; }
.em-app .em-addr, .em-app .em-to, .em-app .em-date { color: #605e5c; }
.em-app .em-dom { background: #fff4ce; color: #323130; font-weight: 700; }
.em-app .em-flags { display: block; }
.em-app .em-flag { font-family: "Segoe UI", var(--font-body), sans-serif; font-weight: 400; letter-spacing: 0; }
.em-app .em-flag.ext { display: block; margin: 0; padding: 8px 12px; border-radius: 2px; background: #fff4ce; border: 1px solid #f4e4a6; color: #323130; }
.em-app .em-flag.warn { color: #a4262c; border-color: #f1bbbc; background: #fdf6f6; }
.em-app .em-body { max-width: 64ch; color: #242424; font: 400 0.95rem/1.55 "Segoe UI", var(--font-body), sans-serif; }
.em-app .em-body p { margin: 0 0 12px; }
.em-app .em-cta { background: #0f6cbd; color: #fff; border-radius: 4px; padding: 8px 18px; font: 600 0.9rem "Segoe UI", var(--font-body), sans-serif; box-shadow: none; }
.em-app .em-cta::after { display: none; }
.em-app .em-go { background: #f3f2f1; color: #323130; }
.em-status { padding: 0 10px; display: flex; align-items: center; background: #f3f2f1; border-top: 1px solid #e1dfdd; color: #323130; font: 400 0.75rem ui-monospace, var(--font-mono), monospace; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lesson-mail { margin: 8px auto 28px; width: 100%; min-width: 0; box-sizing: border-box; grid-template-columns: minmax(0, 1fr); }  /* auto margins make a grid item shrink to its content, so a wide stage widened the page on a phone */
.flow.is-stage .stage-card:has(.em-app),
.flow.is-stage .stage-card:has(.signin) { padding: 0; background: transparent; border: 0; }
.signin { min-height: 520px; margin-inline: auto; border: 1px solid #d1d1d1; border-radius: 8px; overflow: hidden; background: #f3f2f1; color: #242424; box-shadow: 0 12px 32px rgba(0,0,0,.28); font-family: "Segoe UI", var(--font-body), sans-serif; }
.signin-chrome { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: #f3f2f1; border-bottom: 1px solid #e1dfdd; }
.signin-dots { width: 42px; height: 10px; border-radius: 99px; background: radial-gradient(circle at 5px 5px, #c4c4c4 4px, transparent 4.5px), radial-gradient(circle at 21px 5px, #c4c4c4 4px, transparent 4.5px), radial-gradient(circle at 37px 5px, #c4c4c4 4px, transparent 4.5px); }
.signin-url { flex: 1; min-width: 0; padding: 6px 12px; border: 1px solid #d1d1d1; border-radius: 999px; background: #fff; color: #a4262c; font: 500 .82rem var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* On a phone the address is the lesson, so it wraps rather than being cut to "company-mail.s…". */
@media (max-width: 520px) { .signin-url { white-space: normal; overflow-wrap: anywhere; border-radius: 12px; } }
.signin-page { box-sizing: border-box; display: grid; gap: 12px; width: min(360px, calc(100% - 64px)); margin: 48px auto; padding: 28px 24px; border: 1px solid #edebe9; border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.signin-brand { color: #0f6cbd; font-weight: 700; }
.signin-page h2 { margin: 0; color: #242424; font-size: 1.35rem; }
.signin-page label { display: grid; gap: 4px; color: #605e5c; font-size: .8rem; }
.signin-page input { min-width: 0; box-sizing: border-box; width: 100%; border: 1px solid #8a8886; border-radius: 4px; padding: 8px 10px; color: #242424; font: inherit; background: #fff; }
.signin-go { border: 0; border-radius: 4px; padding: 10px; background: #0f6cbd; color: #fff; font: 650 .95rem "Segoe UI", var(--font-body), sans-serif; cursor: pointer; }
.signin-sent { margin: 0; padding: 8px 10px; border: 1px solid #f1bbbc; border-radius: 4px; background: #fdf6f6; color: #a4262c; font-size: .85rem; }
@media (max-width: 720px) {
  .em-split { grid-template-columns: 1fr; }
  .em-folders, .em-list { display: none; }
  .em-app { min-height: 0; }
}
.em-go.bad { border-left: 3px solid var(--bad); }
.em-k, .em-aside { font-size: 0.8rem; color: var(--muted); }
/* The mail app is white in both themes. Its parts are styled with theme colours, which in dark theme are
   made for a dark page (pale grey labels, bright red warnings), so inside the app they take the light
   theme's values. Without this each label needed its own fix as it was found. */
.em-app {
  --surface: #FFFFFF; --surface-2: #E7EDF5; --ink: #0F1B2D; --muted: #4F5E77; --line: #CDD6E3; --faint: #B3BFCF;
  --brand: #08717D; --brand-ink: #FFFFFF; --brand-soft: #DDF1F3; --brand-rgb: 8, 113, 125;
  --sun: #8A5000; --sun-ink: #FFFFFF; --sun-rgb: 138, 80, 0;
  --good: #11784A; --good-rgb: 17, 120, 74; --bad: #BE1F36; --bad-rgb: 190, 31, 54;
}
.em-aside { margin: 0; }
.em-files { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.em-files li { padding: 5px 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.85rem; }
.em-facts { display: grid; gap: 6px; margin: 0; }
.em-facts div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 8px; align-items: baseline; }
.em-facts dt { font-size: 0.78rem; color: var(--muted); }
.em-facts dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.em-facts .warn dd { color: var(--bad); }
.em-h { margin: 4px 0 0; font: 600 0.72rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.em-route { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.em-route li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.em-hop { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 9px; border-radius: var(--radius-sm); border: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.em-hop.out { border-color: rgba(var(--sun-rgb), 0.6); }
.em-tag { font: 600 0.68rem var(--font-mono); color: var(--muted); }
.em-arrow { color: var(--muted); }
.em-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.em-check { display: grid; grid-template-columns: 4.2em 5.5em minmax(0, 1fr); gap: 2px 10px; align-items: baseline; padding: 7px 10px; border-radius: var(--radius-sm); border-left: 4px solid var(--line); background: var(--surface-2); }
.em-res { font: 700 0.8rem/1 var(--font-mono); text-transform: uppercase; }
.em-q { font-size: 0.82rem; color: var(--muted); }
.em-check.ok { border-left-color: var(--good); } .em-check.ok .em-res { color: var(--good); }
.em-check.bad { border-left-color: var(--bad); } .em-check.bad .em-res { color: var(--bad); }
.em-check.warn { border-left-color: var(--sun); } .em-check.warn .em-res { color: var(--sun); }
.em-raw { margin: 0; max-height: 300px; overflow: auto; white-space: pre; font: 0.78rem/1.5 var(--font-mono); }
.em-pin { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 50%; background: var(--sun); color: var(--sun-ink); font: 700 0.72rem var(--font-mono); vertical-align: middle; }
.em-pins { margin: 0; padding: 12px 18px 14px 40px; border-top: 1px solid var(--line); display: grid; gap: 6px; background: var(--surface-2); font-size: 0.9rem; }
.em-pins li::marker { font: 700 0.8rem var(--font-mono); color: var(--sun); }
@media (max-width: 520px) {
  .em-pane { padding: 14px; }
  .em-top { grid-template-columns: auto minmax(0, 1fr); }
  .em-date { grid-column: 2; }
  .em-check { grid-template-columns: 4.2em minmax(0, 1fr); }
  .em-q { grid-column: 1 / -1; }
  .em-facts div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
.m-mailnote { margin: 0 0 8px; font-size: 0.92rem; }
/* PATCH//AGENCY: its own section, with a lantern (amber) accent */
.ag-logo { font: 800 0.95rem var(--font-mono); letter-spacing: 0.12em; color: var(--ink); }
.ag-logo b { color: var(--sun); }
.ag-logo.sm { font-size: 0.68rem; color: var(--sun); }
.ag-hub { display: grid; gap: 18px; }
.ag-hero { display: grid; gap: 6px; padding: 22px 22px 18px; border-radius: var(--radius); border: 1px solid rgba(var(--sun-rgb), 0.45); background: radial-gradient(120% 140% at 0% 0%, rgba(var(--sun-rgb), 0.16), transparent 60%), var(--surface); }
.ag-hero h1 { margin: 0; }
.ag-hero p { margin: 0; max-width: 70ch; }
.ag-hubgrid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.ag-idcard { display: flex; flex-direction: column; align-items: center; gap: 0; align-self: start; position: relative; }  /* the badge hangs free: no card behind it */
/* The staff badge (19 Nov): the owner's Lanternfield badge photo (holder and clip, no lanyard: the owner's choice), with live
   text on its blank panels. Positions are % of the 600x847 crop, measured from the photo's pixels. The badge itself is dark, so these colours don't follow the theme. The background is cut out (transparent WebP). */
.ag-badge { position: relative; width: 100%; max-width: 340px; aspect-ratio: 600 / 847; container-type: inline-size; color: #eef2f7; }
.ag-badge > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.45)); }
@media (max-width: 600px) { .ag-badge { max-width: 280px; } }  /* keeps Clock in within reach on a phone */
.ag-b-photo { position: absolute; left: 30%; top: 25.88%; width: 40%; height: 29.43%; padding: 9% 7% 0; box-sizing: border-box; fill: #4a525c; opacity: 0.85; }
.ag-b-name, .ag-b-rank { position: absolute; left: 15.5%; width: 69.5%; display: flex; align-items: center; padding: 0 5%; box-sizing: border-box; }
.ag-b-name { top: 58.31%; height: 7.54%; justify-content: center; font: 800 8.6cqw/1 var(--font-display, var(--font-body)); letter-spacing: 0.01em; }
.ag-b-rank { top: 67.39%; height: 6.81%; justify-content: space-between; gap: 6px; white-space: nowrap; font: 700 4.1cqw/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: #ffb000; }
.ag-b-no { color: #9aa6b4; letter-spacing: 0.04em; }
.ag-b-stamps { list-style: none; margin: 0; padding: 0; }
.ag-bstamp { position: absolute; top: 76.7%; width: 7.56%; aspect-ratio: 1; left: calc(27.18% + var(--i) * 13.87%); display: grid; place-items: center; border-radius: 50%; font: 700 3.5cqw/1 var(--font-mono); color: #6f7b88; }
.ag-bstamp.on { color: #1a1205; background: radial-gradient(circle, #ffc23d 0 58%, #e29a00 62% 100%); box-shadow: 0 0 0 1.5px #ffb000, 0 0 12px rgba(255, 176, 0, 0.45); transform: rotate(-10deg); }
.ag-id-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; padding: 10px 14px 0; margin: 14px 0 0; border-top: 1px dashed var(--line); }
.ag-id-stats dt { font-size: 0.72rem; color: var(--muted); }
.ag-id-stats dd { margin: 0; font: 700 1rem var(--font-mono); }
.ag-idcard .ag-id-stats { width: min(100%, 340px); }
.ag-tc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; padding: 18px; border-radius: 16px; border: 1px solid var(--line); border-top: 2px solid rgba(var(--sun-rgb), 0.5); box-shadow: var(--elev);
  background: linear-gradient(180deg, color-mix(in srgb, var(--sun) 5%, var(--surface)), var(--surface)); }
.ag-tc h2, .ag-tc p { margin: 0; }
.ag-tc-screen { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 2px; padding: 16px 14px; border-radius: 10px; background: radial-gradient(120% 140% at 50% 0%, #10160d, #0b0f0a); border: 3px solid #2a2f26; color: #ffb000; font-family: var(--font-mono); text-shadow: 0 0 10px rgba(255, 176, 0, 0.45); box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.55); }
.ag-tc-screen > * { position: relative; z-index: 1; }
.ag-tc-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px); }
.ag-tc-screen b { font-size: 2.6rem; line-height: 1.1; letter-spacing: 0.06em; }
.ag-tc-screen span { font-size: 0.78rem; letter-spacing: 0.18em; }
.ag-clockin { justify-self: start; font-size: 1rem; padding: 12px 26px; }
.ag-tc-badge { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; border: 2px dashed rgba(var(--sun-rgb), 0.6); background: rgba(var(--sun-rgb), 0.06); color: var(--ink); font: 700 1rem var(--font-body); cursor: pointer; transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; }
.ag-tc-badge:hover:not(:disabled) { border-style: solid; background: rgba(var(--sun-rgb), 0.1); box-shadow: 0 8px 22px rgba(var(--sun-rgb), 0.14); }
@media (prefers-reduced-motion: no-preference) { .ag-tc-badge:hover:not(:disabled) { transform: translateY(-2px); } .ag-tc-badge:active:not(:disabled) { transform: translateY(0); } }
/* Before you tap: fill the briefing column with a hint instead of a blank panel. */
.ag-chat:empty { min-height: 128px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--bg) 25%, var(--surface)); }
.ag-chat:empty::before { content: "Tap your badge — your shift lead will brief you here."; color: var(--muted); font: 500 0.92rem/1.5 var(--font-body); max-width: 30ch; text-align: center; padding: 0 18px; }
.ag-tc-badge:disabled { cursor: default; border-style: solid; border-color: var(--good); }
.ag-tc-card { position: relative; display: grid; align-content: space-between; width: 70px; height: 46px; padding: 6px; border-radius: 6px; background: var(--sun); transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1); }
.ag-tc-logo { font: 800 0.42rem var(--font-mono); color: var(--sun-ink); letter-spacing: 0.08em; }
.ag-tc-chip { width: 14px; height: 10px; border-radius: 2px; background: rgba(0, 0, 0, 0.35); }
.ag-tc.tapped .ag-tc-card { transform: translateY(-6px) rotate(-6deg); }
.ag-stamp { justify-self: start; margin: 0; padding: 6px 12px; font: 800 1rem var(--font-mono); letter-spacing: 0.1em; color: var(--good); border: 3px solid var(--good); border-radius: 6px; transform: rotate(-3deg); }
.ag-stamp.out { color: var(--sun); border-color: var(--sun); font-size: 0.9rem; }
.ag-in { display: grid; gap: 16px; }
.ag-in-head h1 { margin: 4px 0 0; }
.ag-in-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.ag-in-side { display: grid; gap: 14px; }
@keyframes ag-dot { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.ag-dossier { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); border-top: 4px solid var(--sun); background: var(--surface); }
.ag-resume { display: grid; gap: 8px; padding: 14px 16px; margin-bottom: 12px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 4px solid var(--brand); background: var(--surface); }
.ag-resume h2 { font-size: 1.05rem; }
.ag-dossier h2 { margin: 0; }
.ag-dossier .btn { justify-self: start; }
.ag-lead { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.ag-count { font-size: 0.88rem; color: var(--muted); }
.ag-comms { display: grid; gap: 8px; max-height: 70vh; overflow: auto; }
.ag-comms h2 { margin: 0; }
.ag-out { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ag-report { border-top: 4px solid var(--sun); }
.ag-rota { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ag-rota li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr) minmax(0, 1.3fr) auto auto; gap: 6px 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ag-rota-when { font-size: 0.78rem; color: var(--sun); }
.ag-rota-st { font-size: 0.85rem; }
.ag-rota-soon { border-style: dashed !important; opacity: 0.8; }
.ag-steps { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: ag; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.ag-steps li { counter-increment: ag; display: grid; gap: 4px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.ag-steps li::before { content: counter(ag); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sun); color: var(--sun-ink); font: 700 0.8rem var(--font-mono); }
.ag-steps span { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 760px) {
  .ag-hubgrid, .ag-in-grid { grid-template-columns: minmax(0, 1fr); }
  /* Stack each rota row and give it one full-width Clock in button, so every card looks the same and the
     button is an easy tap. */
  .ag-rota li { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .ag-rota li b { font-size: 1.02rem; }
  .ag-rota li .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .ag-tc-card { transition: none; } .dk-dots i { animation: none; opacity: 0.7; } }
/* Lessons: the key ideas as pictures first; the full explanation is one tap away */
.keys { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.keys li { display: grid; justify-items: start; gap: 4px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.keys b { font-size: 1rem; }
.keys span { font-size: 0.92rem; color: var(--muted); }
.key-ic { width: 64px; height: 52px; padding: 4px; border-radius: 12px; background: var(--brand-soft); overflow: visible; }
.key-ic .gl { stroke-width: 2.2; }
.more-what { margin-top: 12px; }
.more-what summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.more-what p { margin: 10px 0 0; }
/* A section folded behind its heading (radar trends, priority ladder): the page leads with what matters. */
.fold-sec { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.fold-sec > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; list-style: none; }
.fold-sec > summary::-webkit-details-marker { display: none; }
.fold-sec > summary::before { content: "▸"; color: var(--brand); width: 1em; }
.fold-sec[open] > summary::before { content: "▾"; }
.fold-sec > summary h2 { display: inline; margin: 0; font-size: 1rem; color: var(--ink); }
.fold-sec > summary .muted { font-weight: 400; font-size: 0.85rem; }
.fold-sec[open] > summary { margin-bottom: 12px; }
.news-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.news-lines li { display: grid; gap: 2px; }
.news-lines .muted { font-size: 0.8rem; }
.hl-time { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.hl-time li { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); border-top: 5px solid var(--bad); font-size: 0.88rem; overflow-wrap: anywhere; min-width: 0; }
.hl-time li.ok { border-top-color: var(--good); }
.hl-time b { font: 800 1.2rem var(--font-mono); }
.hl-year { font: 700 0.72rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--bad); }
.hl-time li.ok .hl-year { color: var(--good); }
/* Lab primers: what result words mean, and "Show me where" */
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.results li { display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 4px solid var(--line); font-size: 0.86rem; }
.results li.ok { border-left-color: var(--good); } .results li.ok b { color: var(--good); }
.results li.bad { border-left-color: var(--bad); } .results li.bad b { color: var(--bad); }
.results li.warn { border-left-color: var(--sun); } .results li.warn b { color: var(--sun); }
.where { justify-self: start; font-size: 0.85rem; }
.em-raw mark { background: rgba(var(--sun-rgb), 0.3); color: inherit; border-radius: 2px; }
/* Email header checker (static/js/tools/headers.js) */
.hc { display: grid; gap: 16px; }
.hc-in { display: grid; gap: 10px; }
.hc-raw { width: 100%; min-height: 9em; font: 0.8rem/1.45 var(--font-mono); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; resize: vertical; }
.hc-row { display: grid; gap: 4px; font-size: 0.88rem; }
.hc-row input { max-width: 340px; font-size: 0.88rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.hc-how, .hc-small { margin: 0; font-size: 0.85rem; }
.hc-try { font-size: 0.85rem; }
.hc-private { color: var(--good); border-color: rgba(var(--good-rgb), 0.5); background: rgba(var(--good-rgb), 0.08); }
.hc-find { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hc-find li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 4px solid var(--line); }
.hc-find li.warn { border-left-color: var(--bad); } .hc-find li.info { border-left-color: var(--sun); } .hc-find li.ok { border-left-color: var(--good); }
.hc-find p { margin: 2px 0 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.hc-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; background: var(--surface-2); }
.hc-find li.warn .hc-ic { color: var(--bad); } .hc-find li.info .hc-ic { color: var(--sun); } .hc-find li.ok .hc-ic { color: var(--good); }
/* CVSS decoder: the score, where it sits on the scale, and each metric with its options */
.cv-in { width: 100%; font-size: 0.9rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.cv-res { display: grid; gap: 12px; }
.cv-res h2 { margin: 6px 0 0; }
.cv-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.cv-score b { font: 800 3rem/1 var(--font-mono); }
.cv-score > span:nth-child(2) { font: 700 1.1rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.cv-score.critical b, .cv-score.critical > span:nth-child(2) { color: var(--critical); }
.cv-score.high b, .cv-score.high > span:nth-child(2) { color: var(--high); }
.cv-score.medium b, .cv-score.medium > span:nth-child(2) { color: var(--sun); }
.cv-score.low b, .cv-score.low > span:nth-child(2), .cv-score.none b { color: var(--good); }
.cv-scale { position: relative; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--good) 0 39%, var(--sun) 40% 69%, var(--high) 70% 89%, var(--critical) 90%); }
.cv-scale span { position: absolute; top: -5px; width: 4px; height: 22px; margin-left: -2px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); }
.cv-bands { display: grid; grid-template-columns: 0.4fr 3.5fr 3fr 2fr 1.1fr; font: 0.7rem var(--font-mono); color: var(--muted); }
.cv-metrics { display: grid; gap: 8px; margin: 0; }
.cv-metrics > div { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.cv-metrics dt { font-size: 0.85rem; }
.cv-metrics dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.cv-opt { padding: 3px 8px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-size: 0.78rem; color: var(--muted); }
.cv-opt.on { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); font-weight: 700; }
@media (max-width: 600px) { .cv-metrics > div { grid-template-columns: minmax(0, 1fr); } .cv-bands span:first-child { visibility: hidden; } }
.lg-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.lg-tables caption { text-align: left; font-weight: 700; padding-bottom: 4px; }
.lg-tables td { white-space: normal; overflow-wrap: anywhere; }
.lg-tables .wide { grid-column: 1 / -1; }
.lg-tables td.mono { white-space: nowrap; }

/* ---------- service desk: tickets and staff messages (static/js/desk.js) ---------- */
.p-critical { --dk-p: var(--bad); } .p-high { --dk-p: var(--sun); } .p-medium { --dk-p: var(--brand); } .p-low { --dk-p: var(--muted); }
.dk-ticket { position: relative; display: grid; gap: 10px; padding: 14px 16px 14px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--elev); min-width: 0; overflow: hidden; }
.dk-ticket::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--dk-p, var(--line)); }
.dk-ticket.compact { gap: 6px; padding: 10px 12px 10px 18px; box-shadow: none; }
.dk-ticket.compact::before { width: 4px; }
.dk-head { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding-bottom: 8px; border-bottom: 2px dashed var(--line); }
.compact .dk-head { padding-bottom: 6px; border-bottom-width: 1px; }
.dk-kind { font: 700 0.7rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.dk-ref { font: 700 0.74rem var(--font-mono); padding: 2px 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.dk-pri { font: 700 0.72rem var(--font-mono); color: var(--dk-p, var(--muted)); }
.dk-pill { font: 700 0.66rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.dk-head .dk-pill { margin-left: auto; }
.dk-pill.info { color: var(--brand); } .dk-pill.wait { color: var(--muted); } .dk-pill.warn { color: var(--sun); } .dk-pill.ok { color: var(--good); } .dk-pill.bad { color: var(--bad); }
.dk-title { margin: 0; font-size: 1.12rem; line-height: 1.3; }
.compact .dk-title { font-size: 0.92rem; }
.dk-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(8em, 1fr)); gap: 8px 14px; margin: 0; }
.dk-fields dt { font: 600 0.68rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.dk-fields dd { margin: 2px 0 0; font-size: 0.88rem; overflow-wrap: anywhere; }
.dk-body { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 3px solid var(--dk-p, var(--line)); min-width: 0; }
.dk-body p { margin: 0 0 6px; overflow-wrap: anywhere; } .dk-body p:last-child { margin-bottom: 0; }
.dk-label { font: 600 0.68rem var(--font-mono) !important; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.dk-foot { border-top: 1px dashed var(--line); padding-top: 8px; }
.dk-steps { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.dk-steps li { flex: 1; min-width: 0; padding-top: 4px; border-top: 3px solid var(--line); font-size: 0.74rem; color: var(--muted); }
.dk-steps li.done { border-top-color: var(--good); }
.dk-steps li.now { border-top-color: var(--sun); color: var(--ink); font-weight: 600; }
.dk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dk-resolve { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid rgba(var(--good-rgb), 0.5); border-radius: var(--radius-sm); background: var(--good-tint); }
.dk-resolve-stamp { justify-self: start; font: 800 0.8rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--good); border: 2px solid var(--good); border-radius: 4px; padding: 2px 8px; transform: rotate(-2deg); }
.dk-channel { display: grid; gap: 10px; }
.dk-chan { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; padding-bottom: 6px; border-bottom: 1px solid var(--line); font: 700 0.85rem var(--font-mono); }
.dk-chan > span[aria-hidden] { color: var(--muted); margin-right: -6px; }
.dk-chan-about { flex-basis: 100%; font: 400 0.74rem var(--font-body); color: var(--muted); }
.dk-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dk-msg { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: start; }
.dk-av { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; font: 700 0.75rem var(--font-body); color: #fff; background: hsl(var(--dk-h, 200) 55% 32%); }
.dk-bubble { min-width: 0; padding: 8px 12px; border-radius: 4px 12px 12px 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.9rem; }
.dk-msg.me { grid-template-columns: minmax(0, 1fr) 38px; }
.dk-msg.me .dk-av { order: 2; background: var(--brand); color: var(--brand-ink); }
.dk-msg.me .dk-bubble { background: var(--brand-soft); border-radius: 12px 4px 12px 12px; }
.dk-msg.warn .dk-bubble { border-color: var(--sun); }
.dk-who { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: 0.85rem; }
.dk-team { font: 600 0.68rem var(--font-mono); padding: 1px 7px; border-radius: 999px; border: 1px solid hsl(var(--dk-h, 200) 45% 50% / 0.6); color: var(--ink); }
.dk-time { font: 0.74rem var(--font-mono); color: var(--muted); }
.dk-about { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dk-text p { margin: 0 0 6px; overflow-wrap: anywhere; } .dk-text p:last-child { margin-bottom: 0; }
.dk-attach { font-size: 0.8rem; padding: 4px 8px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.dk-note { font-size: 0.78rem; color: var(--muted); }
.dk-msg.sys { display: block; }
.dk-msg.sys p { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 0.8rem; color: var(--muted); padding: 4px 0; }
.dk-msg.sys b { color: var(--ink); }
.dk-sysicon { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--bad); color: var(--bad); font: 700 0.68rem var(--font-mono); }
.dk-dots { display: inline-flex; gap: 4px; }
.dk-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: ag-dot 1s infinite ease-in-out; }
.dk-dots i:nth-child(2) { animation-delay: 0.15s; } .dk-dots i:nth-child(3) { animation-delay: 0.3s; }
.ag-qitem { border-left: 4px solid var(--dk-p, var(--line)); }
.ag-qref { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ag-qref .dk-ref { font-size: 0.68rem; }
.ag-work { margin: 4px 0 0; }
.ag-lead .dk-av, .ag-lead-av { width: 26px; height: 26px; font-size: 0.66rem; }
.dk-photo { display: block; object-fit: cover; background: var(--surface-2); }
.dk-scene { display: block; width: 100%; max-width: 100%; min-width: 0; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); }
/* Views that load a module first hold the space they'll fill, so the footer doesn't jump up and back down. */
#mission-root > .empty:only-child, #lab-root > .empty:only-child, #agency-root > .empty:only-child, #hc-root > .empty:only-child, #lg-root > .empty:only-child { min-height: 70vh; }
/* Agency levels: the choice on the client file, the lead's tips and feedback as each alert closes */
.ag-level { display: grid; gap: 8px; margin: 4px 0; padding: 0; border: 0; min-width: 0; }
.ag-level legend { font-weight: 600; margin-bottom: 6px; }
.ag-lv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 0.9rem; }
.ag-lv:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.ag-lv input { margin-top: 3px; }
.ag-lv b { display: block; }
.ag-guide { display: grid; gap: 8px; padding: 12px; border: 1px dashed rgba(var(--sun-rgb), 0.7); border-radius: var(--radius-sm); background: rgba(var(--sun-rgb), 0.06); }
.ag-guide h3 { margin: 0; }
.ag-tries { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ag-tries .chip { font-size: 0.78rem; overflow-wrap: anywhere; text-align: left; }
.ag-fb { display: grid; gap: 6px; padding: 12px; border-radius: var(--radius-sm); border-left: 4px solid var(--good); background: var(--surface-2); margin-bottom: 10px; }
.ag-fb.wrong { border-left-color: var(--sun); }
.ag-fb h3 { margin: 0; font-size: 1rem; }
.ag-fb p { margin: 0; font-size: 0.9rem; }
.ag-fb b.ok { color: var(--good); } .ag-fb b.no { color: var(--bad); }
.ag-mails { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ag-mail { width: 100%; display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.88rem; cursor: pointer; }
.ag-mail.read { border-left-color: var(--line); }
.ag-mail.read b { font-weight: 500; }
.ag-mail[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.ag-mail span:nth-child(2) { overflow-wrap: anywhere; }
@media (max-width: 600px) { .ag-mail { grid-template-columns: minmax(0, 1fr) auto; } .ag-mail span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; } }
#ag-mailview .em { margin-top: 8px; }
/* Finished steps keep their number (1, 2, 3...) and gain a tick, so a list never reads 1, 2, ✓, 4. */
.steps .st { position: relative; }
.st-tick { position: absolute; top: -7px; right: -7px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--good); color: var(--bg); font-size: 0.62rem; line-height: 1; }
.route-tick circle { fill: var(--good); stroke: var(--bg); stroke-width: 2; }
.route-tick path { fill: none; stroke: var(--bg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.loop-dot, .flag .st, .jr-dot { position: relative; }
/* Scroll boxes move one way at a time: the browser does up/down, a sideways drag only goes sideways (09-shell.js),
   and sideways swipes inside them don't turn into the browser's back gesture. Pinch-zoom still works. */
.log-out, .term-out, .evidence, .em-raw, .tap-capture, .pm-ls, .pm-scroll, .jr-code pre, .vl-table, .tbl-wrap, .table-wrap, .chart, .ag-comms {
  touch-action: pan-y pinch-zoom; overscroll-behavior-x: contain;
}
/* Card photos: a wide picture area (2:1) reserved before the image loads, a soft fade-in and a slow zoom on hover. */
.card-art.photo { display: block; position: relative; height: auto; aspect-ratio: 2 / 1; padding: 0; overflow: hidden; background: var(--surface-2); }
.card-img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.45s ease, transform 0.6s ease; }
.card-img.in { opacity: 1; }
/* Filmic scrim: every photo melts into the card the same way whatever its source brightness, with a faint glow in
   the card's category colour at the base so the picture ties to the top accent. Theme-aware (melts into --surface). */
.card-art.photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
    linear-gradient(180deg, transparent 46%, color-mix(in srgb, var(--surface) 42%, transparent) 78%, color-mix(in srgb, var(--surface) 80%, transparent) 100%),
    radial-gradient(132% 66% at 50% 126%, color-mix(in srgb, var(--cat) 24%, transparent), transparent 60%); }
.art-card:hover .card-img { transform: scale(1.05); }
/* Premium hover: a small lift and a glow in the card's category colour, matching the hero's cinematic language. */
.art-card { transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease; }
.art-card:hover { border-color: var(--cat);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--cat) 24%, transparent), 0 0 0 1px color-mix(in srgb, var(--cat) 32%, transparent); }
@media (prefers-reduced-motion: no-preference) { .art-card:hover { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .card-img { transition: none; opacity: 1; } .art-card:hover .card-img { transform: none; } }
/* Every card picture has the same shape, drawn or photo, so rows line up while photos arrive batch by batch. */
.card-art { height: auto; aspect-ratio: 2 / 1; }
.card-art svg { max-height: 80%; }
/* The card's picture carried onto its page: a slim banner, at most 640 px wide so it stays sharp, fading at the bottom. */
.view[data-banner]::before { content: ""; display: block; width: min(100%, 640px); height: clamp(104px, 24vw, 160px); margin-bottom: -10px; border-radius: var(--radius); background: var(--banner) center / cover no-repeat, var(--surface-2); -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
/* First visit: three ways in, with pictures */
.start { display: grid; gap: 14px; }
.start h2 { margin: 0; }
.start-note { max-width: 70ch; margin: -4px 0 0; line-height: 1.55; }
.start-note a { color: var(--brand); text-underline-offset: 3px; }
.start-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.roles .start-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }  /* six cards: basics and the five jobs */
/* How it works (04-home howItWorks): four square tiles in the order a learner meets them; rows under 820 px. */
.how, .roles { gap: 6px; }
h2.how-label { margin: 0 0 12px; }
h2.how-title { margin: 0 0 14px; font: 700 clamp(1.4rem, 2.4vw, 1.9rem)/1.15 var(--font-display); letter-spacing: -0.01em; }
.how-steps { --ic: 52px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.how-steps li { position: relative; z-index: 1; }
.how-steps a { display: flex; flex-direction: column; gap: 8px; height: 100%; aspect-ratio: 1 / 1; padding: 22px; border-radius: 22px; position: relative; overflow: hidden;
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; isolation: isolate;
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 60%), linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--brand) 2%), var(--surface));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 6%, transparent) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.6); transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.how-steps a:hover, .how-steps a:focus-visible { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 70%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent), 0 24px 50px -26px color-mix(in srgb, var(--brand) 55%, transparent); }
.how-ic { width: var(--ic); height: var(--ic); flex: none; display: grid; place-items: center; border-radius: 16px; color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  box-shadow: 0 0 22px -6px color-mix(in srgb, var(--brand) 60%, transparent); }
.how-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.how-steps b { margin-top: auto; font: 700 1.2rem/1.2 var(--font-display); }
.how-d { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.how-go { font: 700 0.75rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); transition: transform 0.2s ease; }
.how-steps a:hover .how-go, .how-steps a:focus-visible .how-go { transform: translateX(3px); }
@media (max-width: 1180px) { .how-steps a { aspect-ratio: auto; min-height: 240px; } }
@media (max-width: 820px) {
  .how-steps { grid-template-columns: 1fr; gap: 12px; }
  .how-steps a { aspect-ratio: auto; min-height: 0; display: grid; grid-template-columns: var(--ic) 1fr; column-gap: 16px; row-gap: 2px; padding: 18px; border-radius: 18px; }
  .how-ic { grid-row: 1 / span 3; }
  .how-steps b { margin-top: 0; } }
@media (prefers-reduced-motion: reduce) { .how-steps a, .how-go { transition: none; } .how-steps a:hover { transform: none; } }
.leads { display: grid; gap: 10px; } .leads p { margin: 0; } .leads-next { gap: 10px; flex-wrap: wrap; }
.cert-version { border: 1px solid var(--sun); border-left-width: 4px; border-radius: var(--radius); padding: 12px 14px; background: var(--surface); font-size: 0.95rem; }
.cert-jobs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.job-block { display: grid; gap: 10px; padding: 16px 18px; border-left: 3px solid var(--good); background: var(--surface); border-radius: var(--radius); }
.job-block h2 { margin: 0; } .job-block p { margin: 0; }
.job-roles { gap: 8px; align-items: center; flex-wrap: wrap; }
.st-stage.st-practise { color: var(--sun); } .st-stage.st-investigate { color: var(--good); }
@media (max-width: 1100px) { .start-grid, .roles .start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.start-card h3 { font-size: 1.15rem; }
.start-cta { margin-top: auto; font: 700 0.85rem var(--font-mono); color: var(--brand); letter-spacing: 0.04em; }
/* Role journey cards: one anatomy for every path, so the list reads as one system (04-home roleCards). Flex column so
   the stop count and CTA sit on the same baseline across the row whatever the outcome line's length. */
.role-card { display: flex; flex-direction: column; }
.role-card .role-meta, .tool-card .role-meta { font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: auto; padding-top: 6px; }
.role-card .start-cta { margin-top: 10px; }
/* Tool cards are a prompt, not another job photograph (04-home toolCards). */
.tools-home .start-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }  /* Linux, Windows, Python in one row, like the job cards */
@media (max-width: 1100px) { .tools-home .start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tool-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 100%; padding: 14px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.tool-card:hover { transform: translateY(-4px); border-color: var(--sun);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--sun) 22%, transparent), 0 0 0 1px color-mix(in srgb, var(--sun) 28%, transparent); }
.tool-screen { display: grid; gap: 10px; margin: 0; padding: 10px 12px 14px; border-radius: 10px; background: #0D131C; color: #DCE6F2;
  font: 0.82rem/1.45 var(--font-mono); min-height: 96px; }
.tool-top { display: flex; align-items: center; gap: 5px; color: #7F90A8; font-size: 0.68rem; letter-spacing: 0.04em; }
.tool-top i { width: 7px; height: 7px; border-radius: 50%; background: #243044; }
.tool-top i:first-child { background: #FF5470; } .tool-top i:nth-child(2) { background: #FFB000; } .tool-top i:nth-child(3) { background: #3DDC97; }
.tool-top span { margin-left: 6px; }
.tool-line { display: flex; align-items: center; min-width: 0; }
.tool-screen .ps { color: #FFB000; white-space: pre; }
.tool-screen .cur { width: 7px; height: 1em; margin-left: 2px; background: #FFB000; }
.tool-lock { justify-self: start; color: #7F90A8; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.tool-card.locked .tool-line { opacity: 0.45; }
.tool-card .done { position: absolute; top: 22px; right: 22px; font: 700 0.7rem var(--font-mono); color: var(--good); background: var(--good-tint); border-radius: var(--radius-sm); padding: 3px 8px; }
.tool-card .role-meta { margin-top: auto; padding-top: 6px; }
.tool-card .start-cta { margin-top: 10px; }  /* only the stop count takes the spare height, so every card ends the same way */
@media (prefers-reduced-motion: no-preference) { .tool-screen .cur { animation: tool-blink 1.1s steps(1) infinite; } }
@keyframes tool-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tool-card:hover { transform: none; } }
@media (max-width: 800px) { .tools-home .start-grid { grid-template-columns: 1fr; } }
.roles-foot { margin: 16px 0 0; font-size: 0.94rem; color: var(--muted); }
.roles-foot a, .paths-foot a { color: var(--brand); text-underline-offset: 3px; font-weight: 600; }
.paths-foot { margin: 2px 0 0; font-size: 0.9rem; }
.news-line { display: grid; gap: 8px; align-content: start; }
.news-line p { margin: 0; }
.news-line .btn { justify-self: start; }
@media (max-width: 800px) { .start-grid, .roles .start-grid { grid-template-columns: 1fr; } }
/* Terminals never grow past their column: a long prompt or title shortens with an ellipsis instead of pushing the
   terminal wider than the screen (the permissions lab's "root@marlow-fs:/srv/payroll#" did on phones). */
.term-grid > *, .term-shell { min-width: 0; }
.term-bar > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-bar .tag { flex: none; }
.term-ps { min-width: 0; max-width: 62%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) { .term-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .term-shell { height: 320px; } }
.term-shell { grid-template-columns: minmax(0, 1fr); }  /* its one column is the shell's width, not its widest line */
/* Down to 320 px phones: grids whose columns started at 320 px, the OSI reference and the RJ45 plug shrink to fit. */
.dir, .trend-grid { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.trend-grid { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.rj45-pins { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.rj45-pin { min-width: 0; }
.rj45, .rj45-body { max-width: 100%; min-width: 0; }
@media (max-width: 420px) { .osi-ref { grid-template-columns: minmax(0, 1fr); } }
.osi-tcpip > div { flex-wrap: wrap; } .osi-tcpip span:not(.eyebrow) { min-width: 0; overflow-wrap: anywhere; }
/* Page header illustrations: a 2:1 picture beside the title on wide screens, a slim strip above it on phones.
   Cinematic finish to match the hero: the inner edge melts toward the title, a teal glow and border tie it in. */
.head-art.photo { width: 300px; height: 150px; overflow: hidden; background: var(--surface-2);
  border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px color-mix(in srgb, var(--brand) 12%, transparent); }
.head-art.photo .card-img { width: 100%; height: 100%; object-fit: cover; }
.head-art.photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 60%, transparent), transparent 44%),
    radial-gradient(120% 86% at 100% 112%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%); }
.view-head.with-art:has(.head-art.photo) { padding-right: 330px; min-height: 150px; }
@media (max-width: 900px) {
  .view-head.with-art:has(.head-art.photo) { padding-right: 0; min-height: 0; }
  .head-art.photo { display: block; position: static; transform: none; width: 100%; height: auto; aspect-ratio: 3 / 1; order: -1; }
  .head-art.photo::after { content: none; }  /* keep the clean stacked strip; the inner-edge melt is a desktop nicety */
}
/* Agency desk on phones and tablets: tabs in the sticky bar show one part at a time; desktops keep three columns. */
.ag-tabs { display: none; }
.ag-count b { color: var(--ink); }
.ag-count a { font-weight: 600; }
@media (max-width: 900px) {
  .ag-tabs { display: flex; flex-basis: 100%; gap: 6px; }
  .ag-tab { flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 8px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font: 600 0.82rem var(--font-mono); cursor: pointer; }
  .ag-tab[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); }
  .ag-unread { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--sun); color: var(--sun-ink); font-size: 0.7rem; }
  .ag-unread[hidden] { display: none; }
  .ag-grid[data-tab="queue"] > :not(.ag-queue), .ag-grid[data-tab="alert"] > :not(.ag-alert), .ag-grid[data-tab="chat"] > :not(.ag-comms) { display: none; }
  .ag-grid[data-tab="chat"] .ag-comms { max-height: none; }
  .ag-lead { display: none; }
}
@media (max-width: 900px) {
  .ag-bar { gap: 6px 12px; padding: 8px 10px; }
  .ag-bar .ag-logo, .ag-clock .eyebrow { display: none; }
  .ag-bar .btn { padding: 6px 10px; font-size: 0.72rem; }
  .ag-count { flex: 1; min-width: 0; font-size: 0.8rem; }
}

/* Shadowing a shift: the lead's narration beside what they're looking at, one step at a time. */
.ag-shadow { display: grid; gap: 14px; scroll-margin-top: 120px; }
.ag-sh-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 6px 16px; }
.ag-sh-head h1 { margin: 2px 0 0; font-size: 1.4rem; }
.ag-sh-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; min-height: 320px; }
@media (min-width: 900px) { .ag-sh-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.ag-sh-say { margin: 0; }
.ag-sh-show { min-width: 0; display: grid; gap: 8px; }
.ag-sh-show .log-out { max-height: 260px; overflow: auto; }
.ag-sh-wait { font-size: 1.3rem; margin: 0; }
.ag-sh-nav { justify-content: space-between; }
.ag-sh-turn { border-top: 1px solid var(--line); padding-top: 12px; }
.ag-sh-turn h2 { margin: 0 0 4px; }

/* The route you're on: one slim bar above each of its stops (drawTrail in 06-learn). */
.trail { padding-inline: 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.trail-in { max-width: 1120px; margin: 0 auto; padding-block: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.trail-name { display: grid; gap: 1px; text-decoration: none; color: var(--ink); min-width: 0; }
.trail-name .eyebrow { font-size: 0.66rem; }
.trail-name b { font-size: 0.95rem; }
.trail-name:hover b { color: var(--brand); }
.trail-pos { font-size: 0.8rem; color: var(--muted); }
.trail-dots { display: flex; gap: 5px; list-style: none; margin: 0; padding: 0; }
.trail-dots li { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--muted); }
.trail-dots li.done { background: var(--good); border-color: var(--good); }
.trail-dots li.here { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.25); }
.trail-nav { display: flex; gap: 8px; margin-left: auto; }
.trail-nav .btn { padding: 7px 12px; }
.trail-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 6px; border-radius: var(--radius-sm); }
.trail-x:hover { color: var(--ink); background: var(--surface-2); }
@media (max-width: 600px) {
  .trail-in { gap: 8px 12px; }
  .trail-name { flex: 1 1 0; order: 0; }
  .trail-pos { order: 1; }
  .trail-x { order: 2; }
  .trail-dots { order: 3; flex: 1 1 100%; }
  .trail-nav { order: 4; margin-left: 0; flex: 1 1 100%; }
  .trail-nav .btn { flex: 1; text-align: center; }
}
/* A topic's own steps sit under a label, so they read as extras within one stop, not as the route. */
.loopwrap { display: grid; gap: 6px; }
.loop-eyebrow { margin: 0; }
/* Agency close form: evidence the learner has already found for themselves. */
.tag.ev-seen { color: var(--good); border-color: rgba(var(--good-rgb), 0.5); }
/* A plain notice above a section, such as CVE data that came from an earlier update. */
.notice { margin: 0; padding: 10px 14px; border: 1px solid rgba(var(--sun-rgb), 0.5); border-left-width: 4px; border-radius: var(--radius-sm); background: var(--surface); font-size: 0.9rem; }
@media (max-width: 560px) { .loop-node.none .loop-lbl span { display: block; } }

/* The on-site feedback form (#feedback). */
.fb-set { border: 1px solid var(--card-line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; }
.fb-set legend { padding: 0 6px; font: 600 0.9rem var(--font-display); }
.fb-opts { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.fb-opt { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.fb-opt input { width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.fb-scale .fb-opt { flex-direction: column-reverse; gap: 4px; }
#fb-form textarea, #fb-form input[type="email"] { width: 100%; box-sizing: border-box; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; }
#fb-form textarea:focus, #fb-form input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.fb-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }


/* Keyboard accessibility: let visitors bypass repeated navigation and jump straight to the current view. */
.skip-link { position: fixed; z-index: 10000; top: 8px; left: 8px; padding: 10px 14px; border: 2px solid var(--brand); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; transform: translateY(calc(-100% - 12px)); }
.skip-link:focus { transform: translateY(0); outline: 3px solid var(--sun); outline-offset: 3px; }

/* Review (spaced repetition, static/js/review.js + 08-you.js): the daily recall card, the home nudge and the
   dashboard bits. Plain, calm, keyboard friendly. */
.rev-nudge { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid rgba(var(--sun-rgb), 0.5); border-radius: var(--radius); background: var(--brand-soft); color: var(--ink); text-decoration: none; }
.rev-nudge .eyebrow { color: var(--brand); }
.rev-nudge > span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.rev-nudge b { color: var(--brand); }
.rev-nudge-go { font: 0.8rem var(--font-mono); color: var(--brand); white-space: nowrap; }
.rev-nudge:hover { border-color: var(--brand); }

/* Patch, the site guide. Drawn in the device-library style (hw.js), so it shares the hw-* tokens and themes for free. */
.patch { display: block; overflow: visible; }
.pn-body { stroke: var(--hw-stroke); stroke-width: 1.6; }
.pn-body.pn-top { fill: var(--hw-face-top); stroke: none; }
.pn-body.pn-side { fill: var(--hw-face-side); stroke: none; }
.pn-screen { fill: var(--hw-screen); stroke: rgba(var(--brand-rgb), 0.7); stroke-width: 1.4; }
.pn-eye { fill: var(--brand); }
.pn-arc, .pn-mouth { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linecap: round; }
.pn-caret { fill: var(--sun); }
.pn-prompt { fill: none; stroke: rgba(var(--brand-rgb), 0.65); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pn-ant { fill: none; stroke: var(--hw-stroke); stroke-width: 5; stroke-linecap: round; }
.pn-dot, .pn-plate { fill: var(--sun); }
.pn-plus { fill: var(--bg); }
.pn-think circle { fill: var(--brand); opacity: 0.8; }
.pn-shadow { fill: var(--hw-shadow); }
@media (prefers-reduced-motion: no-preference) {
  .pn-live { animation: pn-bob 4.6s ease-in-out infinite; transform-origin: 50% 100%; }
  @keyframes pn-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
  .pn-live .pn-caret { animation: blink 1.1s steps(1) infinite; }
  .pn-live .pn-dot { animation: hw-blink 2.6s steps(1) infinite; }
  .pn-live .pn-dot:nth-of-type(2n) { animation-delay: -1.1s; }
  .pn-wave-arm { transform-box: fill-box; transform-origin: 20% 62%; animation: pn-wave 0.62s ease-in-out 3; }
  @keyframes pn-wave { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(-20deg); } 70% { transform: rotate(15deg); } }
}

/* Patch the companion: a small corner guide that sits just above the status bar and pops the occasional nudge. */
.pn-companion { position: fixed; right: 28px; bottom: calc(58px + env(safe-area-inset-bottom, 0px)); z-index: 15; display: grid; justify-items: end; gap: 10px; pointer-events: none; }
.pn-companion > * { pointer-events: auto; }
.pn-co-figure { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4)); }
.pn-co-figure .patch { width: 66px; height: auto; }
.pn-co-figure:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 12px; }
.pn-co-bubble { max-width: min(264px, calc(100vw - 56px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px 14px 4px 14px; padding: 10px 14px; font: 0.92rem/1.5 var(--font-body); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.pn-co-bubble a { color: var(--brand); font-weight: 600; white-space: nowrap; }
.pn-co-close { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 700 0.9rem/1 var(--font-body); cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.pn-co-close:hover { color: var(--ink); border-color: var(--brand); }
/* On a phone Patch sits in the corner, clear of the screen's rounded edge (19 Nov: at 40 px, 6 px from the edge, he was
   too small to notice and hard to tap now he's a helper). The page gets room at the bottom so he never hides its end. */
@media (max-width: 520px) { .pn-co-figure .patch { width: 56px; } .pn-co-figure { min-width: 56px; min-height: 56px; display: grid; place-items: end; }
  .pn-companion { right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .pn-co-close { width: 28px; height: 28px; top: -10px; right: -8px; }
  body:has(.pn-companion) main { padding-bottom: 96px; } }
/* Between phone and wide desktop the content column reaches the right edge, so Patch sits on the status bar, in its
   empty middle (left of the XP and help items, ~220 px), instead of covering side panels and captions (18 Nov audit:
   it hid lab goals, stats and the lesson caption at 1000 to 1300 px). */
@media (min-width: 521px) and (max-width: 1319px) { .pn-co-figure .patch { width: 40px; } .pn-companion { right: 252px; bottom: calc(1px + env(safe-area-inset-bottom, 0px)); gap: 8px; } }
@media (prefers-reduced-motion: no-preference) { .pn-co-bubble { animation: pn-co-in 0.25s ease-out; } @keyframes pn-co-in { from { opacity: 0; transform: translateY(6px); } } }
.pn-set { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.pn-set input { width: 16px; height: 16px; accent-color: var(--brand); }
.rev-cta { display: grid; gap: 8px; }
.rev-card { display: grid; gap: 14px; text-align: center; }
.rev-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rev-term { font-size: clamp(1.4rem, 5vw, 2rem); overflow-wrap: anywhere; }
.rev-ans { display: grid; gap: 12px; justify-items: center; min-height: 72px; align-content: center; }
.rev-short { margin: 0; font-size: 1.05rem; max-width: 60ch; line-height: 1.5; }
.rev-q { margin: 0; font-size: 0.9rem; }
.rev-grades { justify-content: center; gap: 10px; }
.rev-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font: 0.82rem var(--font-mono); color: var(--muted); }
.rev-stats b { color: var(--ink); }
.rev-done { text-align: center; }
.rev-qcard { text-align: left; }
.rev-qcard .rev-stem { font-size: 1.05rem; margin: 0; }
.rev-qcard .opts { margin-top: 4px; }

/* You Are the Packet: a vertical drop. The packet falls; the first matching rule is the gate. */
.fwg-shaft { position: relative; max-width: 560px; margin-inline: auto; padding: 64px 18px 18px; border-radius: 16px; background: radial-gradient(120% 40% at 50% 0%, #1a2838, #0c1218 55%); border: 1px solid #243244; box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 16px 40px rgba(0,0,0,.35); }
.fwg-shaft { padding-top: calc(var(--lane, 54px) + 10px) !important; }
.fwg-shaft .fwg-you { position: absolute; top: 12px; left: 50%; z-index: 3; width: max-content; max-width: calc(100% - 36px); transform: translateX(-50%); transition: top .42s cubic-bezier(.2,.7,.2,1); }
.fwg-shaft .fwg-rules { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.fwg-shaft .fwg-rules::before { display: none; }
.fwg-shaft .fwg-rule { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; min-height: 78px; margin: 0; padding: var(--lane, 54px) 8px 8px 0; border: 0; border-top: 1px solid rgba(255,255,255,.06); background: transparent; box-shadow: none; }
.fwg-shaft .fwg-beam { display: flex; gap: 10px; align-items: center; min-width: 0; padding: 8px 12px; border-radius: 8px; background: rgba(8,14,22,.72); border: 1px solid #2a3b50; }
.fwg-shaft .fwg-tuple { color: #d5e2f0; min-width: 0; overflow-wrap: anywhere; }  /* wrap, never cut: the rule is what you read */
.fwg-shaft .fwg-note { grid-column: 1 / -1; margin: 0; color: #8ea0b4; font-size: .78rem; }
.fwg-gatelet { position: relative; width: 54px; height: 22px; border-radius: 4px; overflow: hidden; border: 1px solid #31445c; background: #101820; }
.fwg-gatelet i { position: absolute; top: 0; bottom: 0; width: 50%; background: repeating-linear-gradient(45deg, #243246, #243246 4px, #1a2634 4px, #1a2634 8px); transition: transform .35s ease; }
.fwg-gatelet i:first-child { left: 0; } .fwg-gatelet i:last-child { right: 0; }
.fwg-gatelet[data-state="open"] { border-color: #2f9e6b; box-shadow: 0 0 12px rgba(47,158,107,.45); }
.fwg-gatelet[data-state="open"] i:first-child { transform: translateX(-100%); }
.fwg-gatelet[data-state="open"] i:last-child { transform: translateX(100%); }
.fwg-gatelet[data-state="deny"] { border-color: #e15b64; box-shadow: 0 0 12px rgba(225,91,100,.45); background: #3a1518; }
.fwg-rule.nomatch .fwg-beam { opacity: .45; }
.fwg-rule.checking .fwg-beam { border-color: #3fe0e8; box-shadow: 0 0 16px rgba(63,224,232,.35); }
.fwg-rule.hit-allow .fwg-beam { border-color: #2f9e6b; box-shadow: 0 0 16px rgba(47,158,107,.35); }
.fwg-rule.hit-deny .fwg-beam { border-color: #e15b64; box-shadow: 0 0 16px rgba(225,91,100,.4); }
.fwg-rule.unrun { opacity: .28; }
.fwg-floor { margin-top: 8px; text-align: center; color: #9fb0c4; }
.fwg-floor b { color: #f2f6fb; }
@media (prefers-reduced-motion: reduce) { .fwg-shaft .fwg-you, .fwg-gatelet i { transition: none; } }

/* VLAN lesson scene: two rooms on one switch. */
.vn-scene { display: grid; gap: 12px; margin: 0 0 18px; padding: 14px; border-radius: 14px; background: #10161d; border: 1px solid #243244; color: #e6eef8; }
.vn-chassis { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 12px; border-radius: 8px; background: linear-gradient(#2a3848, #1a2430); border: 1px solid #3a4c60; font: 700 .78rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.vn-chassis b { font-weight: 500; letter-spacing: 0; text-transform: none; color: #9fb0c4; }
.vn-floor { position: relative; display: grid; grid-template-columns: 1fr 14px 1fr 36px 104px; gap: 0; min-height: 230px; padding: 14px; border-radius: 10px; background: radial-gradient(80% 80% at 50% 100%, #1a2430, #0c1116); }
.vn-room { position: relative; display: flex; align-items: flex-end; justify-content: space-evenly; padding: 36px 10px 16px; border-radius: 8px; }
.vn-room.staff { background: linear-gradient(180deg, rgba(47,120,190,.18), rgba(47,120,190,.05)); box-shadow: inset 0 0 0 1px rgba(90,160,220,.45); }
.vn-room.students { background: linear-gradient(180deg, rgba(210,150,60,.16), rgba(210,150,60,.05)); box-shadow: inset 0 0 0 1px rgba(220,170,70,.4); }
.vn-tag { position: absolute; top: 10px; left: 12px; font: 700 .72rem var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: #c5d4e4; }
.vn-host { display: grid; place-items: center; width: 64px; height: 78px; border-radius: 6px 6px 2px 2px; background: linear-gradient(#2c3846, #161d26); border: 1px solid #41566c; color: #d5e2f0; font: 600 .72rem var(--font-mono); box-shadow: 0 8px 0 #0a0e13; }
.vn-wall { background: linear-gradient(90deg, #1a120c, #8a5a32 40%, #c9844a 50%, #8a5a32 60%, #1a120c); box-shadow: 0 0 0 1px #3a2a1c; }
.vn-wall.hit { box-shadow: 0 0 18px #e15b64, 0 0 0 1px #e15b64; }
.vn-trunk { align-self: center; height: 8px; margin: 0 4px; border-radius: 99px; background: repeating-linear-gradient(90deg, #3a4c60 0 8px, #243244 8px 12px); }
.vn-far { align-self: center; display: grid; gap: 4px; justify-items: center; padding: 12px 8px; border-radius: 8px; background: linear-gradient(#243246, #141b24); border: 1px solid #3a4c60; font: 600 .68rem var(--font-mono); text-align: center; color: #9fb0c4; }
.vn-far b { color: #8ec5ff; }
.vn-pkt { position: absolute; left: 0; top: 0; z-index: 2; display: inline-flex; gap: 6px; align-items: center; padding: 4px 8px; border-radius: 99px; background: #12324a; border: 1px solid #3fe0e8; color: #e8fbff; font: 700 .68rem var(--font-mono); box-shadow: 0 0 12px rgba(63,224,232,.45); }
.vn-pkt em { font-style: normal; padding: 0 5px; border-radius: 99px; background: #0f6cbd; color: #fff; }
.vn-controls { display: flex; flex-wrap: wrap; gap: 8px; }
/* The scene is dark in both themes, so its buttons can't take the theme's text colour (unreadable in light). */
.vn-controls .btn.ghost { color: #e6eef8; border-color: #5a718a; background: #1a2430; }
.vn-controls .btn.ghost:hover { background: #243244; border-color: #8ec5ff; }
.vn-say { margin: 0; min-height: 1.3em; color: #d5e2f0; }
@media (max-width: 720px) {
  .vn-floor { grid-template-columns: 1fr 10px 1fr; }
  /* the trunk and the next switch drop to a row under the rooms, so "Send across the trunk" still has somewhere to go */
  .vn-trunk { display: block; grid-column: 1 / 3; grid-row: 2; margin: 14px 4px 0 30%; }
  .vn-far { grid-column: 3; grid-row: 2; margin-top: 14px; grid-auto-flow: column; justify-content: center; gap: 8px; padding: 8px; }
  .vn-room { padding: 34px 6px 14px; gap: 6px; }
  .vn-host { width: 50px; height: 62px; }
  .vn-tag { font-size: 0.6rem; letter-spacing: 0.04em; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .vn-pkt { transition: none !important; } }

/* PATCH//AGENCY workstation refinement — layout and hierarchy, not a feature rewrite.
   Keep the three existing work areas; give them room and let the selected incident lead. */
.view-wide {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-inline: 0;  /* centred once, by left + transform: .view's auto margins centred it too, pushing it right on wide screens */
  width: min(1460px, calc(100vw - 48px));
  max-width: none;
  min-width: 0;
}
.agency { gap: 18px; min-width: 0; }
.ag-bar {
  top: 10px;
  gap: 8px 16px;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--sun) 24%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
  backdrop-filter: blur(14px);
}
.ag-clock { display: inline-flex; align-items: baseline; gap: 9px; }
.ag-clock b { font-size: 1.22rem; letter-spacing: .04em; }
.ag-count { color: var(--muted); font-size: .84rem; }
.ag-bar .btn { margin-left: auto; }
.ag-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 2px 4px;
  border-bottom: 1px solid var(--line);
}
.ag-tile {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 18px 8px 0;
  margin-right: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.ag-tile-v { font-size: 1.12rem; }
.ag-tile-l { font-size: .66rem; letter-spacing: .1em; }
.ag-grid {
  /* The chat gets the most extra room: its messages were wrapping at about 27 characters. */
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(290px, 360px);
  gap: 18px;
  align-items: start;
}
.ag-queue, .ag-comms {
  min-width: 0;
  padding: 16px;
  border-color: color-mix(in srgb, var(--line) 82%, var(--brand));
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
}
.ag-queue h2, .ag-comms h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  font-size: .82rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.ag-queue ol { gap: 7px; margin-top: 14px; }
.ag-qitem {
  gap: 6px;
  padding: 12px 13px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
  box-shadow: none;
}
.ag-qitem[aria-current="true"] {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand-soft) 72%, var(--surface));
  box-shadow: inset 3px 0 0 var(--brand);
}
.ag-qtitle { font-size: .88rem; line-height: 1.35; }
.ag-qmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; font-size: .72rem; }
.ag-alert {
  gap: 16px;
  padding: 0;
  min-width: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.ag-alert > .panel, .ag-alert > .ag-card {
  border-radius: 12px;
}
.ag-worksplit { gap: 12px; }
.ag-worksplit > .ag-card {
  gap: 14px;
  padding: 16px;
  border-color: color-mix(in srgb, var(--line) 88%, var(--brand));
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 78%, var(--bg));
}
.ag-worksplit > .ag-card > .ag-work:first-child { margin-bottom: 0; }
.ag-comms { overflow-wrap: anywhere; }
.ag-comms .dk-channel { min-width: 0; }
.ag-see {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface));
}
/* Up to 1300 px the chat drops below: three columns there left the alert under 460 px wide. */
@media (max-width: 1300px) {
  .ag-grid { grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); }
  .ag-comms { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .view-wide { width: calc(100vw - 28px); }
  .ag-grid, .ag-notes { grid-template-columns: 1fr; }
  .ag-bar { top: 0; }
  .ag-queue, .ag-comms { padding: 14px; }
}
@media (max-width: 560px) {
  .view-wide { width: calc(100vw - 20px); }
  .ag-bar { padding: 8px 10px; border-radius: 9px; }
  .ag-tile { margin-right: 10px; padding-right: 10px; }
  .ag-worksplit > .ag-card { padding: 0; }
}

/* Investigation workspace: give the incident narrative and evidence a deliberate reading order.
   Container queries are intentional here: the centre column, not the browser width, decides
   when investigation and decision controls can sit side by side. */
.ag-alert { container-type: inline-size; }
.ag-alert > .dk-ticket {
  gap: 13px;
  padding: 18px 20px 18px 24px;
  border-radius: 13px;
  border-color: color-mix(in srgb, var(--line) 78%, var(--brand));
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, var(--brand)), var(--surface));
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
}
.ag-alert > .dk-ticket .dk-head {
  gap: 7px 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.ag-alert > .dk-ticket .dk-title {
  font-size: clamp(1.12rem, 1.4vw, 1.38rem);
  line-height: 1.24;
  letter-spacing: -.015em;
}
.ag-alert > .dk-ticket .dk-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
}
.ag-alert > .dk-ticket .dk-fields > div { min-width: 0; }
.ag-alert > .dk-ticket .dk-fields dt {
  font-size: .64rem;
  letter-spacing: .09em;
}
.ag-alert > .dk-ticket .dk-fields dd {
  font-size: .82rem;
  line-height: 1.4;
}
.ag-alert > .dk-ticket .dk-body {
  padding: 13px 15px;
  border-left-width: 3px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 82%, var(--surface));
  line-height: 1.55;
}
.ag-alert > .dk-ticket .dk-body p:last-child { font-size: .91rem; }
.ag-alert > #ag-guide { min-width: 0; }
.ag-guide {
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--sun) 34%, var(--line));
  border-left: 3px solid var(--sun);
  border-radius: 10px;
  background: color-mix(in srgb, var(--sun) 4%, var(--surface));
}
.ag-guide h3 { letter-spacing: .1em; }
.ag-guide .dk-msgs { gap: 8px; }
.ag-tries { gap: 7px; }
.ag-tries .chip { line-height: 1.45; }
.ag-worksplit {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.ag-worksplit > .ag-card {
  gap: 15px;
  padding: 18px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 90%, var(--bg));
}
.ag-investigate {
  border-top: 2px solid color-mix(in srgb, var(--brand) 58%, var(--line)) !important;
}
.ag-decide {
  border-top: 2px solid color-mix(in srgb, var(--sun) 52%, var(--line)) !important;
}
.ag-worksplit .ag-work {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  letter-spacing: .12em;
}
.ag-investigate > .row[role="group"] {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.ag-investigate > .row[role="group"] .chip {
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 7px;
  font-size: .77rem;
}
.ag-investigate > .row[role="group"] .chip[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--brand);
}
.ag-investigate .m-logview { gap: 12px; }
.ag-investigate .log-out {
  height: min(390px, 52vh);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--bg) 72%, var(--surface));
  font-size: .78rem;
  line-height: 1.65;
  scrollbar-gutter: stable;
}
.ag-investigate .log-count {
  color: var(--muted);
  font-size: .78rem;
}
.ag-investigate #ag-found {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.ag-investigate #ag-found:empty { display: none; }
.ag-decide { align-content: start; }
.ag-decide .ag-ask, .ag-decide .ag-close {
  gap: 11px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.ag-decide .ag-ask { padding-top: 0; border-top: 0; }
.ag-decide .ag-ask h3, .ag-decide .ag-close h3 { margin: 0; }
.ag-decide .ag-askform, .ag-decide .ag-close form { gap: 12px; }
.ag-decide .ag-askform label, .ag-decide .ag-close label {
  gap: 6px;
  line-height: 1.4;
}
.ag-decide .ag-askform select, .ag-decide .ag-close select {
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 8px;
}
.ag-decide .ag-close button[type="submit"],
.ag-decide .ag-ask button[type="submit"] { min-height: 40px; }
/* Investigate and Decide stay stacked: side by side (from a 780 px column) cut log lines off and truncated the request menu. */
@media (max-width: 700px) {
  .ag-alert > .dk-ticket { padding: 15px 15px 15px 19px; }
  .ag-alert > .dk-ticket .dk-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-worksplit > .ag-card { padding: 14px; }
  .ag-investigate .log-out { height: min(320px, 48vh); }
}

/* Evidence review and analyst findings: make the work legible without changing its mechanics. */
.ag-investigate .panel-title {
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.ag-investigate .panel-title h3 {
  margin: 0;
  font: 650 .82rem/1.3 var(--font-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.ag-investigate .sim-tag {
  font-size: .62rem;
  letter-spacing: .08em;
}
.ag-investigate .log-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: stretch;
  gap: 8px;
}
.ag-investigate .log-search input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.ag-investigate .log-search .btn {
  min-height: 40px;
  padding-inline: 12px;
  white-space: nowrap;
}
.ag-investigate .log-count {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 22px;
}
.ag-investigate .log-out {
  border-color: color-mix(in srgb, var(--line) 85%, var(--brand));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.ag-investigate .log-out:focus-visible,
.ag-investigate .log-search input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.ag-investigate #ag-found {
  display: grid;
  gap: 10px;
}
.ag-investigate #ag-found > .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: .7rem;
  letter-spacing: .12em;
}
.ag-investigate #ag-found > .eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.ag-investigate #ag-found > p.muted {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-size: .82rem;
}
.ag-investigate .findings {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: agency-finding;
}
.ag-investigate .findings li {
  position: relative;
  counter-increment: agency-finding;
  padding: 10px 12px 10px 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--good-tint) 28%, var(--surface));
  font-size: .84rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.ag-investigate .findings li::before {
  content: counter(agency-finding, decimal-leading-zero);
  position: absolute;
  left: 12px;
  top: 11px;
  color: var(--good);
  font: 700 .68rem var(--font-mono);
}
.ag-decide .ev-set {
  gap: 7px;
}
.ag-decide .ev-set legend {
  margin-bottom: 5px;
  font-size: .83rem;
  line-height: 1.45;
}
.ag-decide .ev-item {
  padding: 11px 12px;
  border-radius: 8px;
  transition: border-color .16s ease, background .16s ease;
}
.ag-decide .ev-item:has(input:checked) {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand-soft) 48%, var(--surface));
}
.ag-decide .ev-item:focus-within {
  outline: 2px solid color-mix(in srgb, var(--brand) 65%, transparent);
  outline-offset: 1px;
}
.ag-decide .ev-item label {
  font-size: .84rem;
  line-height: 1.45;
}
.ag-decide .ev-item .ev-seen {
  border-color: color-mix(in srgb, var(--good) 45%, var(--line));
}
.ag-decide .dk-list { gap: 9px; }
.ag-decide .dk-ticket.compact {
  padding: 11px 12px 11px 16px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 42%, var(--surface));
}
.ag-decide .dk-ticket.compact .dk-fields {
  grid-template-columns: repeat(auto-fit, minmax(8em, 1fr));
}
.ag-decide .dk-steps li {
  font-size: .68rem;
}
@media (max-width: 520px) {
  .ag-investigate .log-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ag-investigate .log-search input {
    grid-column: 1 / -1;
  }
  .ag-investigate .log-search .btn {
    justify-self: stretch;
  }
  .ag-investigate .log-out {
    font-size: .72rem;
    padding: 10px;
  }
  .ag-decide .ev-item { padding: 10px; }
}

/* Incident queue: persistent, scannable navigation alongside a long investigation. */
@media (min-width: 1181px) {
  .ag-queue {
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 108px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .ag-queue ol {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 2px 3px 3px 0;
  }
}
.ag-queue h2 {
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.ag-queue h2::after {
  content: "SHIFT INBOX";
  margin-left: auto;
  color: var(--muted);
  font: 600 .59rem var(--font-mono);
  letter-spacing: .13em;
}
.ag-qitem {
  gap: 7px;
  padding: 12px 13px 12px 15px;
  border-left: 2px solid color-mix(in srgb, var(--dk-p, var(--line)) 65%, var(--line));
  border-radius: 9px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--dk-p, var(--line)) 5%, var(--surface)), var(--surface) 58%);
}
.ag-qitem[aria-current="true"] {
  border-left: 3px solid var(--brand);
  padding-left: 14px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 15%, transparent), 0 8px 22px color-mix(in srgb, var(--brand) 12%, transparent);
}
.ag-qitem.closed {
  border-left-color: var(--good);
  background: color-mix(in srgb, var(--good-tint) 20%, var(--surface));
}
.ag-qitem.closed[aria-current="true"] { border-left-color: var(--brand); }
.ag-qref { gap: 8px; }
.ag-qref .dk-ref {
  color: var(--muted);
  letter-spacing: .04em;
}
.ag-qtitle {
  color: var(--ink);
  font-size: .86rem;
  line-height: 1.4;
}
.ag-qitem.closed .ag-qtitle { color: var(--muted); }
.ag-qmeta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  font-size: .7rem;
}
.ag-qmeta .tag {
  padding: 3px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ag-qitem:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  z-index: 1;
}
@media (max-width: 1180px) {
  .ag-queue h2::after { display: none; }
  .ag-queue ol { max-height: min(44vh, 420px); overflow-y: auto; }
}
@media (max-width: 560px) {
  .ag-qitem { padding: 11px 11px 11px 13px; }
  .ag-qitem[aria-current="true"] { padding-left: 12px; }
}


/* PATCH//AGENCY debrief: make the assessment readable as a report without hiding any outcomes. */
.ag-report {
  gap: 17px;
  padding: clamp(16px, 2.2vw, 26px);
  border-top-width: 4px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--sun) 4%, transparent), transparent 34%),
    var(--panel-bg);
}
.ag-report > .ag-out {
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.ag-report .ag-stamp {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--sun) 42%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--sun) 9%, var(--surface));
  color: var(--sun);
  font: 600 .68rem var(--font-mono);
  letter-spacing: .06em;
}
.ag-report > .eyebrow {
  margin-bottom: -10px;
}
.ag-report > h2 {
  max-width: 32ch;
  font-size: clamp(1.45rem, 2.8vw, 2.15rem);
  line-height: 1.12;
}
.ag-report > p {
  max-width: 88ch;
}
.ag-report > .ag-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}
.ag-report > .ag-checks li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-content: start;
  gap: 3px 9px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 54%, var(--surface));
  font-size: .84rem;
  line-height: 1.45;
}
.ag-report > .ag-checks li > b:first-child {
  grid-row: span 2;
  font-size: 1rem;
}
.ag-report > .ag-checks li > b:nth-child(2) {
  color: var(--ink);
  font-size: .78rem;
  letter-spacing: .01em;
}
.ag-report > .ag-checks li > b.ok:first-child { color: var(--good); }
.ag-report > .ag-checks li > b.no:first-child { color: var(--bad); }
.ag-report > .ag-dalert {
  margin: 0;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  transition: border-color .18s ease, background .18s ease;
}
.ag-report > .ag-dalert[open] {
  padding-bottom: 13px;
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
  background: var(--surface);
}
.ag-report > .ag-dalert > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 10px 0;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.ag-report > .ag-dalert > summary::-webkit-details-marker { display: none; }
.ag-report > .ag-dalert > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font: 500 1rem var(--font-mono);
}
.ag-report > .ag-dalert[open] > summary::after { content: "−"; color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.ag-report > .ag-dalert > summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}
.ag-report > .ag-dalert > p {
  max-width: 96ch;
  margin: 9px 0;
  line-height: 1.55;
}
.ag-report > .ag-dalert .ev {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}
.ag-report > .ag-dalert .ev-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.ag-report > .ag-notes {
  gap: 12px;
}
.ag-report > .ag-notes > div {
  min-width: 0;
  padding: 14px 15px;
  background: var(--surface);
  border-radius: 10px;
}
.ag-report > .ag-notes > div:first-child {
  border-top: 2px solid var(--brand);
}
.ag-report > .ag-notes > div:last-child {
  border-top: 2px solid var(--sun);
}
.ag-report > .ag-notes > div > b {
  display: block;
  color: var(--ink);
  font: 600 .72rem var(--font-mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.ag-report > .ag-notes p {
  font-size: .9rem;
  line-height: 1.6;
}
.ag-report > .row {
  gap: 9px;
  padding-top: 5px;
}
.ag-report > .row .btn {
  min-height: 42px;
}
@media (max-width: 640px) {
  .ag-report { gap: 13px; }
  .ag-report > .ag-out { align-items: flex-start; }
  .ag-report > .ag-checks { grid-template-columns: minmax(0, 1fr); }
  .ag-report > .ag-dalert { padding-inline: 10px; }
  .ag-report > .ag-dalert[open] { padding-bottom: 10px; }
  .ag-report > .row { display: grid; grid-template-columns: minmax(0, 1fr); }
  .ag-report > .row .btn { width: 100%; justify-content: center; }
}


/* PATCH//AGENCY handover: make the final decisions feel deliberate and easy to complete. */
.ag-hand {
  gap: 16px;
  padding: clamp(16px, 2.2vw, 26px);
  border-top: 3px solid var(--brand);
}
.ag-hand > h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.15;
}
.ag-hand > p {
  max-width: 78ch;
  line-height: 1.55;
}
.ag-hand > form {
  gap: 17px;
}
.ag-hand .ag-hset {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 13px 14px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--brand) 48%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 38%, var(--surface));
}
.ag-hand .ag-hset legend {
  max-width: 100%;
  padding: 0 7px;
  color: var(--ink);
  font-size: .94rem;
  font-weight: 650;
  line-height: 1.4;
}
.ag-hand .ag-hset > label:first-of-type {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: min(100%, 34rem);
  color: var(--muted);
  font: 600 .72rem var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ag-hand .ag-hset > label:first-of-type select {
  color: var(--ink);
  font: 500 .85rem var(--font-body);
  letter-spacing: normal;
  text-transform: none;
}
.ag-hand .ag-hset > .ev-item {
  padding: 10px 12px;
  border-radius: 8px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.ag-hand .ag-hset > .ev-item label {
  grid-template-columns: 1.15rem minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  line-height: 1.5;
}
.ag-hand .ag-hset > .ev-item input {
  width: 1rem;
  height: 1rem;
  margin-top: 3px;
}
.ag-hand .ag-hset > .ev-item:has(input:checked) {
  border-color: color-mix(in srgb, var(--brand) 66%, var(--line));
  background: color-mix(in srgb, var(--brand-soft) 64%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 15%, transparent);
}
.ag-hand .ag-hset > .ev-item:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.ag-hand .ag-note {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}
.ag-hand .ag-note textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
  font-weight: 400;
}
.ag-hand form > .row {
  gap: 9px;
  padding-top: 3px;
}
.ag-hand #ag-hfill {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
}
@media (max-width: 560px) {
  .ag-hand { gap: 13px; }
  .ag-hand .ag-hset { padding: 11px 10px 12px; }
  .ag-hand .ag-hset > label:first-of-type {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    width: 100%;
  }
  .ag-hand form > .row { display: grid; grid-template-columns: minmax(0, 1fr); }
  .ag-hand form > .row .btn { width: 100%; justify-content: center; }
}


/* PATCH//AGENCY pre-shift briefing: organise the badge, lead messages and client file as one clear entry flow. */
.ag-in {
  gap: 19px;
}
.ag-in-head {
  display: grid;
  gap: 5px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.ag-in-head > .link-btn {
  justify-self: start;
  font-size: .82rem;
}
.ag-in-head > .eyebrow {
  color: var(--brand);
  font-size: .66rem;
  letter-spacing: .16em;
}
.ag-in-head h1 {
  max-width: 30ch;
  margin-top: 2px;
  font-size: clamp(1.8rem, 3.5vw, 2.55rem);
  line-height: 1.08;
}
.ag-in-grid {
  grid-template-columns: minmax(280px, .78fr) minmax(0, 1.65fr);
  gap: clamp(14px, 2vw, 22px);
}
/* This rule comes after the older one-column rule for small screens and would override it, squeezing the
   client file (and its map) into a 47px column on a phone and making the page scroll sideways. */
@media (max-width: 900px) { .ag-in-grid { grid-template-columns: minmax(0, 1fr); } }
.ag-in-grid > *, .ag-in-side > * {
  min-width: 0;
}
.ag-tc {
  gap: 14px;
  padding: 17px;
}
.ag-tc-screen {
  min-height: 116px;
  align-content: center;
}
.ag-tc-badge {
  width: 100%;
  min-height: 72px;
  justify-content: flex-start;
  text-align: left;
}
.ag-in-side {
  gap: 13px;
}
.ag-chat {
  max-height: min(46vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 5px 7px 5px 0;
}
.ag-dossier {
  gap: 12px;
  padding: clamp(14px, 2vw, 19px);
  border-top-width: 3px;
}
.ag-dossier > .dk-scene {
  aspect-ratio: 16 / 5;
  max-height: 184px;
  object-fit: cover;
}
.ag-dossier > .eyebrow {
  margin-top: 1px;
  color: var(--sun);
  letter-spacing: .15em;
}
.ag-dossier h2 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.18;
}
.ag-dossier .fields {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 8px;
}
.ag-dossier .fields > div {
  min-width: 0;
  min-height: 70px;
  align-content: start;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 52%, var(--surface));
}
.ag-dossier .fields dt {
  font-size: .65rem;
  letter-spacing: .1em;
}
.ag-dossier .fields dd {
  font-size: .84rem;
  line-height: 1.35;
}
.ag-dossier .ag-level {
  gap: 7px;
  margin: 3px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.ag-dossier .ag-level legend {
  margin-bottom: 3px;
  font-size: .9rem;
}
.ag-dossier .ag-lv {
  min-height: 58px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface-2) 38%, var(--surface));
  line-height: 1.45;
}
.ag-dossier .ag-lv:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}
.ag-dossier > .btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  margin-top: 2px;
}
@media (max-width: 760px) {
  .ag-in { gap: 15px; }
  .ag-in-grid { gap: 13px; }
  .ag-tc { padding: 14px; }
  .ag-chat { max-height: 42vh; }
  .ag-dossier > .dk-scene {
    max-height: 145px;
  }
  .ag-dossier .fields {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .ag-tc-badge, .ag-report > .ag-dalert, .ag-hand .ag-hset > .ev-item {
    transition: none;
  }
}


/* PATCH//AGENCY collaboration and incident relationships: clarify the request trail and linked-alert decision. */
.ag-decide .ag-ask {
  gap: 12px;
}
.ag-decide .ag-ask > .dk-list {
  gap: 9px;
}
.ag-decide .ag-ask > .dk-list .dk-ticket.compact {
  border-color: color-mix(in srgb, var(--line) 82%, var(--brand));
  background: linear-gradient(110deg, color-mix(in srgb, var(--brand-soft) 38%, var(--surface)), var(--surface) 68%);
}
.ag-decide .ag-ask > .dk-list .dk-ticket.compact .dk-head {
  align-items: center;
  gap: 6px 8px;
}
.ag-decide .ag-ask > .dk-list .dk-ticket.compact .dk-steps {
  gap: 7px;
  margin-top: 3px;
}
.ag-decide .ag-ask > .dk-list .dk-ticket.compact .dk-steps li {
  min-height: 34px;
  padding-top: 6px;
  font-size: .68rem;
  line-height: 1.35;
}
.ag-decide .ag-askform {
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 36%, var(--surface));
}
.ag-decide .ag-askform label {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 600;
}
.ag-decide .ag-askform select {
  color: var(--ink);
  font-weight: 400;
}
.ag-decide .ag-askform .row {
  align-items: center;
  gap: 8px 12px;
  margin-top: 1px;
}
.ag-decide .ag-askform .row .btn {
  min-height: 42px;
}
.ag-decide .ag-close fieldset:has(input[name="related"]) {
  gap: 8px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand-soft) 24%, var(--surface));
}
.ag-decide .ag-close fieldset:has(input[name="related"]) legend {
  margin-bottom: 2px;
  color: var(--brand);
  font-weight: 650;
}
.ag-decide .ag-close fieldset:has(input[name="related"]) .ev-item {
  background: var(--surface);
}
.ag-decide .ag-close fieldset:has(input[name="related"]) .ev-item:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}
@media (max-width: 520px) {
  .ag-decide .ag-askform { padding: 11px; }
  .ag-decide .ag-askform .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .ag-decide .ag-askform .row .btn {
    width: 100%;
    justify-content: center;
  }
  .ag-decide .ag-close fieldset:has(input[name="related"]) { padding: 10px; }
}


/* PATCH//AGENCY team communications: keep the request conversation readable as an operational timeline. */
.ag-comms {
  gap: 12px;
  max-height: min(70vh, 760px);
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.ag-comms > h2 {
  position: sticky;
  top: -1px;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 2px 0 10px;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--line);
}
.ag-comms .dk-channel {
  gap: 12px;
}
.ag-comms .dk-chan {
  position: sticky;
  top: 36px;
  z-index: 1;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 90%, var(--surface));
}
.ag-comms .dk-chan-about {
  line-height: 1.4;
}
.ag-comms .dk-msgs {
  gap: 11px;
}
.ag-comms .dk-msg:not(.sys) {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.ag-comms .dk-msg:not(.sys) .dk-av {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: .68rem;
}
.ag-comms .dk-msg:not(.sys) .dk-bubble {
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 4px 10px 10px 10px;
  line-height: 1.5;
}
.ag-comms .dk-msg.me {
  width: min(100%, 94%);
  margin-left: auto;
  grid-template-columns: minmax(0, 1fr) 32px;
}
.ag-comms .dk-msg.me .dk-bubble {
  border-radius: 10px 4px 10px 10px;
}
.ag-comms .dk-who {
  gap: 4px 7px;
  align-items: center;
  margin-bottom: 7px;
}
.ag-comms .dk-who b {
  color: var(--ink);
  font-size: .84rem;
}
.ag-comms .dk-team {
  font-size: .64rem;
}
.ag-comms .dk-about {
  margin-bottom: 7px;
  gap: 5px;
}
.ag-comms .dk-text {
  font-size: .87rem;
  line-height: 1.55;
}
.ag-comms .dk-attach {
  margin-top: 7px;
  padding: 6px 8px;
  overflow-wrap: anywhere;
}
.ag-comms .dk-note {
  display: block;
  margin-top: 7px;
  line-height: 1.4;
}
.ag-comms .dk-msg.sys {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 42%, transparent);
}
.ag-comms .dk-msg.sys .dk-sysicon {
  margin-top: 1px;
}
.ag-comms .dk-msg.sys p {
  min-width: 0;
  gap: 4px 8px;
  font-size: .76rem;
  line-height: 1.5;
}
.ag-comms .dk-msg.sys p > b {
  font-weight: 650;
}
.ag-comms .dk-msg.warn .dk-bubble {
  border-color: color-mix(in srgb, var(--sun) 72%, var(--line));
  background: color-mix(in srgb, var(--bad-tint) 28%, var(--surface));
}
@media (max-width: 900px) {
  .ag-comms {
    max-height: min(64vh, 620px);
  }
}
@media (max-width: 520px) {
  .ag-comms .dk-msg.me {
    width: 100%;
  }
  .ag-comms .dk-msg:not(.sys) .dk-bubble {
    padding: 9px 10px;
  }
}


/* PATCH//AGENCY shift status and navigation: concise metrics, clear priority and dependable mobile tabs. */
.ag-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 2px 0 4px;
  border: 0;
}
.ag-tile {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 62px;
  padding: 9px 12px;
  margin: 0;
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--brand) 44%, var(--line));
  border-radius: 9px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--surface-2) 54%, var(--surface)), var(--surface));
  box-shadow: none;
}
.ag-tile-v {
  font-size: clamp(1.02rem, 1.45vw, 1.28rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.ag-tile-l {
  font-size: .62rem;
  line-height: 1.2;
  letter-spacing: .11em;
}
.ag-tile.cool { border-left-color: color-mix(in srgb, var(--brand) 48%, var(--line)); }
.ag-tile.hot { border-left-color: var(--sun); }
.ag-tile.good { border-left-color: var(--good); }
.ag-tile.sev-medium { border-left-color: var(--sun); }
.ag-tile.sev-high, .ag-tile.sev-critical { border-left-color: var(--bad); }
.ag-count {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 7px;
  min-width: 0;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-2) 56%, var(--surface));
  line-height: 1.35;
}
.ag-count b {
  color: var(--ink);
  font-weight: 650;
}
.ag-count a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.ag-count a:hover { color: var(--ink); }
.ag-tab {
  min-height: 40px;
  border-radius: 8px;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.ag-tab[aria-pressed="true"] {
  box-shadow: inset 0 -2px 0 var(--brand);
}
.ag-tab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.ag-unread {
  font: 700 .66rem var(--font-mono);
  box-shadow: 0 0 0 2px var(--surface);
}
@media (max-width: 900px) {
  .ag-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .ag-tile {
    min-height: 56px;
    padding: 8px 9px;
  }
  .ag-tile-v { font-size: 1rem; }
  .ag-tile-l { font-size: .57rem; letter-spacing: .08em; }
  .ag-count {
    flex: 1 1 0;
    min-width: 0;
    padding: 5px 8px;
  }
  .ag-bar .btn { margin-left: auto; }
}
@media (max-width: 560px) {
  .ag-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .ag-tile {
    min-height: 54px;
    padding: 8px 10px;
  }
  .ag-tile-v { font-size: 1.04rem; }
  .ag-tile-l { font-size: .6rem; }
  .ag-tabs { gap: 7px; }
  .ag-tab { min-height: 42px; font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-tab { transition: none; }
}


/* PATCH//AGENCY shadow shift: make the lead's explanation, live example and step navigation read as one lesson. */
.ag-shadow {
  gap: 17px;
  padding: clamp(16px, 2.1vw, 24px);
  border-top: 3px solid var(--brand);
  scroll-margin-top: 112px;
}
.ag-sh-head {
  align-items: center;
  gap: 10px 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.ag-sh-head .eyebrow {
  color: var(--brand);
  letter-spacing: .14em;
}
.ag-sh-head h1 {
  margin-top: 3px;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.12;
}
.ag-sh-head > span {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  font-size: .72rem;
}
.ag-shadow > .progress {
  margin: -5px 0 0;
  padding: 2px 0 11px;
  border-bottom: 1px solid var(--line);
}
.ag-shadow > .progress .trk {
  display: block;
  height: 7px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}
.ag-shadow > .progress .trk i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 54%, var(--good)));
}
.ag-sh-grid {
  grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr);
  gap: 15px;
  min-height: 300px;
}
.ag-sh-say {
  min-width: 0;
  align-content: start;
}
.ag-sh-say .dk-msg {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
}
.ag-sh-say .dk-av {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}
.ag-sh-say .dk-bubble {
  padding: 13px 15px;
  border-radius: 4px 12px 12px 12px;
  background: color-mix(in srgb, var(--brand-soft) 32%, var(--surface));
  line-height: 1.65;
  font-size: .91rem;
}
.ag-sh-say .dk-who {
  margin-bottom: 8px;
}
.ag-sh-say .dk-text {
  font-size: .9rem;
  line-height: 1.65;
}
.ag-sh-show {
  min-width: 0;
  align-content: start;
  gap: 11px;
  padding: clamp(12px, 1.7vw, 17px);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-2) 30%, var(--surface));
}
.ag-sh-show > .panel-title {
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.ag-sh-show > .panel-title h3 {
  font-size: .8rem;
  letter-spacing: .07em;
}
.ag-sh-show .log-count {
  margin: 0;
  font-size: .78rem;
}
.ag-sh-show .log-out {
  max-height: 330px;
  margin: 0;
  border-radius: 8px;
  line-height: 1.6;
}
.ag-sh-show > .dk-ticket {
  box-shadow: none;
}
.ag-sh-show .dk-channel {
  min-width: 0;
}
.ag-sh-wait {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--sun);
  font-size: clamp(1.3rem, 3vw, 2rem);
  letter-spacing: .04em;
}
.ag-sh-nav {
  align-items: center;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.ag-sh-nav .btn {
  min-width: 112px;
  min-height: 42px;
}
.ag-sh-nav .btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.ag-sh-turn {
  display: grid;
  gap: 9px;
  padding: 17px 18px;
  border: 1px solid color-mix(in srgb, var(--good) 42%, var(--line));
  border-left: 4px solid var(--good);
  border-radius: 10px;
  background: color-mix(in srgb, var(--good-tint) 32%, var(--surface));
}
.ag-sh-turn h2 {
  margin: 0;
  font-size: 1.24rem;
}
.ag-sh-turn > p {
  max-width: 75ch;
  color: var(--muted);
  line-height: 1.55;
}
.ag-sh-turn .row {
  gap: 9px;
}
.ag-sh-turn .btn {
  min-height: 42px;
}
@media (max-width: 899px) {
  .ag-sh-grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
}
@media (max-width: 560px) {
  .ag-shadow {
    gap: 14px;
    padding: 14px;
  }
  .ag-sh-head {
    align-items: flex-start;
  }
  .ag-sh-head > span {
    font-size: .66rem;
    padding: 5px 7px;
  }
  .ag-sh-show { padding: 10px; }
  .ag-sh-nav {
    gap: 8px;
  }
  .ag-sh-nav .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }
  .ag-sh-turn { padding: 14px; }
  .ag-sh-turn .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .ag-sh-turn .btn {
    width: 100%;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ag-shadow > .progress .trk i {
    transition: none;
  }
}
/* Mock exam options on a cert page: three small radio groups (length, timer, feedback). */
.ex-setup { display: grid; gap: 10px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.ex-setup h3 { margin: 0; font-size: 1rem; }
.ex-setup fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.ex-setup legend { font: 600 0.78rem var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 0; margin-bottom: 6px; }
.ex-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-choice { position: relative; display: inline-flex; }
.ex-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ex-choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 0.9rem; }
.ex-choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--brand); }
.ex-choice input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.ex-setup-note { margin: 0; font-size: 0.88rem; }

/* The shift desk on a wide screen (16 Nov): the queue and the chat stay in view beside the long alert column instead of
   leaving empty space under them (top 84 px clears the sticky shift bar), and the chat title sits with its marker. */
@media (min-width: 901px) {
  .ag-queue { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
}
@media (min-width: 1301px) {
  .ag-comms { position: sticky; top: 84px; max-height: calc(100vh - 100px); }
}
.ag-comms h2 { justify-content: flex-start; }

/* Phones: the section tabs sit in one row that scrolls sideways (they wrapped to three rows, about 170 px, above every
   page). A fade at the right edge shows there are more. (The row isn't scrolled to the current tab: that pushes
   "home" off the left edge, which accessibility checkers read as a hidden skip link. The page title says where you are.) */
@media (max-width: 600px) {
  .tabs-inner { flex-wrap: nowrap; overflow-x: auto; gap: 2px; scrollbar-width: none; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); padding-right: 24px; }
  .tabs-inner::-webkit-scrollbar { display: none; }
  .tab-group { flex-wrap: nowrap; }
  .tab-label { display: none; }
  nav.tabs a { white-space: nowrap; min-height: 40px; }
}

/* PATCH//AGENCY desk spacing (16 Nov): one scale, last in the file so it wins over the earlier layers. The shift bar,
   status tiles and columns were stacked with no gap at all (0 px), and the other gaps ranged from 7 to 18 px.
   Regions and columns 20 px apart, tiles 14, queue items 10; a little tighter on phones. */
.ag-desk:not([hidden]) { display: grid; gap: 20px; min-width: 0; }
.ag-stats { gap: 14px; padding: 0; }
.ag-grid { gap: 20px; }
.ag-alert { gap: 20px; }
.ag-worksplit { gap: 20px; }
.ag-queue ol { gap: 10px; }
.ag-comms { gap: 12px; }
@media (max-width: 900px) {
  .ag-desk:not([hidden]) { gap: 14px; }
  .ag-stats { gap: 10px; }
  .ag-grid, .ag-alert, .ag-worksplit { gap: 14px; }
}

/* Navigation and controls (16 Nov aesthetics audit).
   - The section tabs wrapped to two rows at 601-700 and 900-1099 px (small laptops, tablets): one row there too, with
     the keyboard numbers hidden (they're for keyboards, and the row needs the room).
   - The decorative prompt (guest@patchnotes:~/…) was cut off with an ellipsis between 1100 and 1360 px: hidden there.
   - Small controls: "Show me where" was 22 px tall (under the 24 px WCAG minimum); links styled as buttons, chips and
     the cards/compact toggle are at least 32 px, and 44 px on touch screens.
   - Buttons press down a pixel when clicked, so a click feels like it landed. */
@media (min-width: 601px) and (max-width: 1099px) {
  .tabs-inner { flex-wrap: nowrap; overflow-x: auto; gap: 2px 8px; scrollbar-width: none; }
  .tabs-inner::-webkit-scrollbar { display: none; }
  .tab-group { flex-wrap: nowrap; }
  .tab-label { display: none; }
  nav.tabs a kbd { display: none; }
  nav.tabs a { white-space: nowrap; padding: 6px 9px; }
  .tab-group + .tab-group { padding-left: 8px; }
}
@media (max-width: 1360px) { .cwd { display: none; } }
.link-btn.where, button.link-btn { min-height: 32px; display: inline-flex; align-items: center; }
.chip, .vt { min-height: 32px; }
@media (pointer: coarse) {
  .chip, .vt, .link-btn.where, button.link-btn, .em-tab, .em-cta { min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip, .opt { transition: transform 0.08s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
  .btn:active:not(:disabled), .chip:active, .opt:active:not(:disabled) { transform: translateY(1px); }
}

/* Exam hub: how prep works, then the three exams as numbered steps with their key numbers. */
.exam-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.exam-how li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.exam-how li b { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(var(--sun-rgb), 0.14); color: var(--sun); border: 1px solid rgba(var(--sun-rgb), 0.45); font: 700 0.9rem var(--font-mono); }
.exam-how li span { font-size: 0.9rem; color: var(--muted); }
.exam-how li strong { display: block; color: var(--ink); font-size: 0.95rem; }
.exam-card { gap: 10px; }
.exam-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 104px), 1fr)); gap: 8px; margin: 0; }
.exam-facts dd { white-space: nowrap; }
.exam-facts > div { flex: 1; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.exam-facts dt { font: 600 0.66rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.exam-facts dd { margin: 2px 0 0; font: 700 1.05rem var(--font-mono); color: var(--ink); }
@media (max-width: 700px) { .exam-how { grid-template-columns: minmax(0, 1fr); } }

/* Agency client file: "What you're watching", one card per source the learner will search on the desk
   (static/js/agency/watch.js). Full width, so it reads as part of the file rather than a picture in a box. */
.ag-watch { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.ag-watch-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.ag-watch-head h3 { margin: 0; color: var(--muted); }
.ag-watch-head .muted { font-size: 0.8rem; }
.ag-watch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.ag-src { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.ag-src-ico { flex: none; width: 36px; height: 36px; padding: 7px; border-radius: 10px; color: var(--sun);
  background: rgba(var(--sun-rgb), 0.12); border: 1px solid rgba(var(--sun-rgb), 0.35);
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ag-src b { display: block; font-size: 0.92rem; color: var(--ink); }
.ag-src-tag { display: block; margin-top: 2px; font-size: 0.7rem; color: var(--muted); overflow-wrap: anywhere; }
.ag-src p { margin: 5px 0 0; font-size: 0.82rem; line-height: 1.4; color: var(--muted); }

/* Lesson concept diagrams, centre stage (they now lead the lesson): a bigger ring or triangle, the first part
   already open beside it, and Back/Next to walk through it. */
.cc-stage { grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: 24px; padding: 22px 24px;
  background: radial-gradient(90% 120% at 20% 50%, rgba(var(--brand-rgb), 0.08), transparent 60%), var(--surface-2); }
.cc-side { display: grid; gap: 14px; align-content: center; min-width: 0; }
.cc-detail { display: grid; gap: 4px; padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(var(--brand-rgb), 0.35); background: var(--surface); min-height: 0; }
.cc-detail b { font: 700 1.25rem var(--font-display); }
.cc-detail p { font-size: 0.95rem; }
.cc-step { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-step .btn { min-height: 36px; padding: 6px 14px; font-size: 0.78rem; }
.cc-nodes .cc-edges path.on { stroke: var(--brand); stroke-dasharray: none; opacity: 1; stroke-width: 3; }
.cc-node.on circle { stroke-width: 3; filter: drop-shadow(0 0 6px rgba(var(--brand-rgb), 0.55)); }
@media (prefers-reduced-motion: no-preference) {
  .cc-node.on circle { animation: cc-pulse 2.4s ease-in-out infinite; }
  @keyframes cc-pulse { 50% { filter: drop-shadow(0 0 11px rgba(var(--brand-rgb), 0.8)); } }
}
/* Stacked up to 680 px: at ~600 px the side column couldn't fit its detail and buttons (box check, 19 Nov). */
@media (max-width: 680px) { .cc-stage { grid-template-columns: minmax(0, 1fr); padding: 16px; } .cc-svg { max-width: 300px; justify-self: center; } }

/* Risk heat map (concept type "matrix"): 5 x 5 likelihood x impact, bands tinted so it reads at a glance. */
.cc-matrix { --rm-low: 45, 212, 160; --rm-medium: 250, 204, 21; --rm-high: 251, 140, 50; --rm-critical: 244, 63, 94; }
.rm-stage { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: start; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.rm-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 6px 8px; }
.rm-ylab { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; font: 600 0.7rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.rm-xlab { grid-column: 2; justify-self: center; font: 600 0.7rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.rm-grid { display: grid; gap: 4px; }
.rm-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.rm-cell { position: relative; aspect-ratio: 1; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 3px; border-radius: 8px; border: 1px solid transparent; }
.rm-cell.rm-low { background: linear-gradient(160deg, rgba(var(--rm-low), 0.42), rgba(var(--rm-low), 0.24)); } .rm-cell.rm-medium { background: linear-gradient(160deg, rgba(var(--rm-medium), 0.5), rgba(var(--rm-medium), 0.3)); }
.rm-cell.rm-high { background: linear-gradient(160deg, rgba(var(--rm-high), 0.62), rgba(var(--rm-high), 0.4)); } .rm-cell.rm-critical { background: linear-gradient(160deg, rgba(var(--rm-critical), 0.72), rgba(var(--rm-critical), 0.5)); }
.rm-cell.over { border: 2px dashed rgba(255, 255, 255, 0.55); }
:root[data-theme="light"] .rm-cell.over { border-color: rgba(0, 0, 0, 0.45); }
.rm-s { position: absolute; top: 3px; left: 5px; font: 700 0.62rem var(--font-mono); color: var(--ink); opacity: 0.75; }
.rm-dot { width: 28px; height: 28px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font: 700 0.75rem var(--font-mono); cursor: pointer; }
.rm-dot.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink, #04121a); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.3); }
.rm-side { display: grid; gap: 12px; }
.rm-detail { display: grid; gap: 6px; padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(var(--brand-rgb), 0.35); background: var(--surface); }
.rm-detail b { font: 700 1.2rem var(--font-display); color: var(--ink); }
.rm-detail p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.rm-detail .cc-eg { color: var(--ink); }
.rm-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.rm-calc { font: 600 0.85rem var(--font-mono); color: var(--ink); }
.rm-b { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 700 0.72rem var(--font-mono); color: var(--ink); }
.rm-b.rm-low { background: rgba(var(--rm-low), 0.25); } .rm-b.rm-medium { background: rgba(var(--rm-medium), 0.3); }
.rm-b.rm-high { background: rgba(var(--rm-high), 0.35); } .rm-b.rm-critical { background: rgba(var(--rm-critical), 0.4); }
.rm-ap { font-size: 0.78rem; color: var(--good); } .rm-ap.over { color: var(--bad); font-weight: 600; }
.rm-list { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.rm-pick { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; text-align: left; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 0.88rem var(--font-body); cursor: pointer; }
.rm-pick .rm-b { margin-left: auto; }
.rm-pick.on { border-color: var(--brand); background: rgba(var(--brand-rgb), 0.1); }
.rm-n { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--muted); font: 700 0.7rem var(--font-mono); }
.rm-pick.on .rm-n { border-color: var(--brand); color: var(--brand); }
.rm-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; font-size: 0.75rem; color: var(--muted); }
.rm-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 6px; }
.rm-sw.rm-low { background: rgba(var(--rm-low), 0.5); } .rm-sw.rm-medium { background: rgba(var(--rm-medium), 0.55); }
.rm-sw.rm-high { background: rgba(var(--rm-high), 0.6); } .rm-sw.rm-critical { background: rgba(var(--rm-critical), 0.65); }
.rm-sw.over { border: 1.5px dashed var(--ink); }
@media (max-width: 760px) { .rm-stage { grid-template-columns: minmax(0, 1fr); padding: 16px; } }

/* Card concepts as a spotlight: picture tiles across the top (the overview), the chosen one large beneath.
   Ordered sets number their tiles and join them with arrows. */
.cs-stage { display: grid; gap: 16px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: radial-gradient(90% 140% at 50% 0%, rgba(var(--brand-rgb), 0.08), transparent 60%), var(--surface-2); }
.cs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr)); gap: 10px; }
.ordered .cs-tiles { gap: 22px; }
.cs-tile { position: relative; display: grid; justify-items: center; align-content: start; gap: 8px; min-height: 0; padding: 14px 8px 12px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 0.85rem/1.25 var(--font-display, var(--font-body)); text-align: center; cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.cs-tile:hover { border-color: rgba(var(--brand-rgb), 0.5); }
.cs-ic { width: 38px; height: 38px; padding: 8px; border-radius: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
  stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; box-sizing: content-box; }
.cs-tile.on { border-color: var(--brand); background: rgba(var(--brand-rgb), 0.1); box-shadow: 0 8px 22px -12px rgba(var(--brand-rgb), 0.7); }
.cs-tile.on .cs-ic { color: var(--brand); border-color: rgba(var(--brand-rgb), 0.5); background: rgba(var(--brand-rgb), 0.12); }
.cs-num { position: absolute; top: 6px; left: 8px; font: 700 0.68rem var(--font-mono); color: var(--muted); }
.cs-tile.on .cs-num { color: var(--brand); }
.ordered .cs-tile:not(:last-child)::after { content: "→"; position: absolute; right: -17px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 0.9rem; pointer-events: none; }
.cs-detail { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; align-items: start; padding: 18px 20px; border-radius: 14px;
  border: 1px solid rgba(var(--brand-rgb), 0.35); background: var(--surface); }
.cs-big { grid-row: span 2; width: 34px; height: 34px; padding: 13px; border-radius: 16px; color: var(--brand); background: rgba(var(--brand-rgb), 0.12);
  border: 1px solid rgba(var(--brand-rgb), 0.45); stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; box-sizing: content-box; }
.cs-body { display: grid; gap: 4px; }
.cs-body b { font: 700 1.25rem var(--font-display); color: var(--ink); }
.cs-body p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; max-width: 70ch; }
.cs-body .cc-eg { color: var(--ink); }
.cs-detail .cc-step { grid-column: 2; margin-top: 6px; }
@media (max-width: 560px) {
  .cs-stage { padding: 12px; } .cs-tiles { grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 6px; }
  .cs-tile { padding: 10px 4px 8px; gap: 5px; font-size: 0.7rem; border-radius: 10px; } .cs-ic { width: 24px; height: 24px; padding: 6px; border-radius: 9px; }
  .cs-num { top: 3px; left: 5px; font-size: 0.6rem; }
  .ordered .cs-tiles { gap: 10px; } .ordered .cs-tile::after { display: none; }
  .cs-detail { grid-template-columns: minmax(0, 1fr); } .cs-big { grid-row: auto; } .cs-detail .cc-step { grid-column: 1; }
}

/* Path record: a printable page for a finished learning path (not a qualification, and it says so). */
.path-rec-wrap { display: grid; gap: 12px; margin-top: 8px; }
.path-rec-tools { align-items: end; gap: 10px; }
.path-rec-name { display: grid; gap: 4px; font-size: 0.85rem; color: var(--muted); }
.path-rec-name input { min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.95rem; }
.path-rec { display: grid; justify-items: center; gap: 6px; padding: 32px 28px; text-align: center; border-radius: 16px;
  border: 2px solid rgba(var(--sun-rgb), 0.55); background: radial-gradient(100% 80% at 50% 0%, rgba(var(--sun-rgb), 0.1), transparent 70%), var(--surface);
  box-shadow: inset 0 0 0 6px var(--surface), inset 0 0 0 7px rgba(var(--sun-rgb), 0.3); }
.path-rec-top { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 0.75rem; color: var(--muted); margin-bottom: 10px; }
.path-rec-for { margin: 0; color: var(--muted); font-size: 0.9rem; }
.path-rec-who { margin: 0; font: 700 1.6rem var(--font-display); color: var(--ink); overflow-wrap: anywhere; }
.path-rec h3 { margin: 0; font: 700 1.3rem var(--font-display); color: var(--sun); }
.path-rec-steps { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 60ch; }
.path-rec-steps li { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); }
.path-rec-date { margin: 12px 0 0; font: 600 0.8rem var(--font-mono); color: var(--ink); }
.path-rec-note { margin: 0; font-size: 0.75rem; color: var(--muted); }
#print-root { display: none; }
@media print {
  body.printing-record { background: #fff !important; }
  body.printing-record > :not(#print-root) { display: none !important; }
  body.printing-record #print-root { display: block; padding: 24px; }
  #print-root .path-rec { max-width: 680px; margin: 0 auto; background: #fff; border-color: #b07a00; box-shadow: none; }
  #print-root .path-rec * { color: #000 !important; }
  #print-root .path-rec h3 { color: #8a5000 !important; }
  #print-root .path-rec-steps li { border-color: #999; }
}
.pr-resume { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 14px 18px;
  border-radius: var(--radius); border: 1px solid rgba(var(--brand-rgb), 0.45); background: linear-gradient(90deg, rgba(var(--brand-rgb), 0.12), transparent 70%), var(--surface);
  color: var(--ink); text-decoration: none; }
.pr-resume b { grid-column: 1; font: 700 1.05rem var(--font-display); }
.pr-resume-go { grid-row: 1 / 3; grid-column: 2; font: 700 0.8rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
.pr-resume:hover { border-color: var(--brand); }
.pr-filters { gap: 6px; }
.pr-count { margin: -4px 0 0; font-size: 0.85rem; min-height: 1em; }
.pr-filterbar { justify-content: space-between; align-items: center; gap: 10px; }
.pr-filters { align-items: center; }
.pr-filters .eyebrow { margin-right: 2px; }
.pr-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

/* Exam date planner inside "Am I ready?": the date, days to go, then one row per week. */
.exam-date { display: grid; gap: 10px; padding-top: 4px; }
.ed-set { align-items: end; gap: 10px; }
.ed-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--ink); }
.ed-label input { min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; color-scheme: light dark; }
.ed-left { margin: 0; font-size: 1rem; } .ed-left b { font: 700 1.15rem var(--font-display); color: var(--sun); }
.week-plan { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.week-plan li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.week-plan li.wk-mock { border-color: rgba(var(--sun-rgb), 0.5); background: rgba(var(--sun-rgb), 0.08); }
.wk-when { display: grid; gap: 2px; font-size: 0.85rem; }
.wk-what { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.9rem; }
.wk-what .chip { font-size: 0.75rem; text-transform: none; letter-spacing: 0; }
@media (max-width: 600px) { .week-plan li { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* Photo scenes (concept type "scene"): a real photograph with numbered hotspots, the chosen one explained beside it.
   Tones: c / i / a for the CIA pillars (cyan, amber, green), good and bad for fixes and faults. */
.cc-scene { --t: var(--brand-rgb); }
.sc-stage { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; align-items: center; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.sc-photo { position: relative; border-radius: 12px; overflow: hidden; line-height: 0; box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.8); }
.sc-photo img { width: 100%; height: auto; display: block; }
.sc-spot { --t: var(--brand-rgb); position: absolute; transform: translate(-50%, -50%); width: 34px; height: 34px; min-height: 0; padding: 0; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid rgb(var(--t)); background: rgba(7, 10, 16, 0.72); color: #fff; font: 700 0.85rem var(--font-mono);
  cursor: pointer; box-shadow: 0 0 0 4px rgba(var(--t), 0.22), 0 4px 12px rgba(0, 0, 0, 0.6); }
.sc-spot.on { background: rgb(var(--t)); color: #04121a; box-shadow: 0 0 0 6px rgba(var(--t), 0.35), 0 4px 12px rgba(0, 0, 0, 0.6); }
.sc-spot:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.t-c { --t: 63, 224, 232; } .t-i { --t: 255, 176, 0; } .t-a { --t: 61, 220, 151; } .t-good { --t: var(--good-rgb); } .t-bad { --t: var(--bad-rgb); }
@media (prefers-reduced-motion: no-preference) {
  .sc-spot:not(.on)::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(var(--t), 0.7); animation: sc-ping 2.4s ease-out infinite; }
  @keyframes sc-ping { 0% { transform: scale(1); opacity: 0.8; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
}
.sc-detail { display: grid; gap: 6px; padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(var(--t), 0.5);
  border-left-width: 4px; background: var(--surface); }
.sc-detail b { font: 700 1.25rem var(--font-display); color: var(--ink); }
.sc-detail p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.sc-breaks { color: var(--ink) !important; }
@media (max-width: 760px) { .sc-stage { grid-template-columns: minmax(0, 1fr); padding: 12px; } .sc-spot { width: 30px; height: 30px; } }
.see-switch { display: flex; gap: 6px; margin: -4px 0 10px; }

/* Safety notes (safeNote in 02-glossary, content/safety.json) and the flag hunt's: a title, one line, folds.
   Green reassures ("Is this safe? Yes."); amber is a real-life caution (permission, the law). */
.flag-safe, .safe-note { display: grid; gap: 6px; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(var(--good-rgb), 0.45); background: rgba(var(--good-rgb), 0.07); font-size: 0.92rem; color: var(--ink); }
.flag-safe, .safe-note { border-left: 4px solid var(--good); }
.safe-note.warn { border-color: rgba(var(--sun-rgb), 0.5); border-left-color: var(--sun); background: rgba(var(--sun-rgb), 0.07); }
.safe-note p { margin: 0; line-height: 1.5; }
.flag-safe > b, .safe-note b { color: var(--ink); }
.flag-safe details summary, .safe-note details summary, .flag-how summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 0.88rem; }
.flag-safe details p { margin: 6px 0 0; color: var(--muted); }
.flag-safe details b { color: var(--ink); }
.safe-note details ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 0.9rem; }
.safe-note details > p { margin-top: 8px; }
.safe-note .flag-phone { margin-top: 8px; }
.ed-saved { margin: 4px 0 0; font-size: 0.85rem; }
.flag-how ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 0.9rem; color: var(--ink); }
.flag-phone { margin: 8px 0 0; font-size: 0.85rem; }

/* Ransomware: the attack walks the network (static/js/ransomware.js), then "Stop it" with two defences. */
.rw { display: grid; gap: 14px; margin: 0; }
.rw-map { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 50% 0%, rgba(var(--brand-rgb), 0.06), transparent 60%), var(--surface-2); }
.rw-link { stroke: var(--line); stroke-width: 2.5; stroke-linecap: round; }
.rw-lbl { fill: var(--muted); font: 600 12px var(--font-mono); }
.rw-dev.on .rw-lbl { fill: var(--ink); }
.rw-dev.bad .hw-body, .rw-dev.locked .hw-body, .rw-dev.wiped .hw-body { stroke: var(--bad); }
.rw-dev.bad .hw-led, .rw-dev.locked .hw-led, .rw-dev.wiped .hw-led, .rw-dev.attacker .hw-led { fill: var(--bad); }
.rw-dev.guarded .hw-body, .rw-dev.safe .hw-body { stroke: var(--good); }
.rw-badge rect { fill: var(--surface); stroke: var(--bad); stroke-width: 1.5; }
.rw-badge text { fill: var(--bad); font: 700 11px var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.rw-badge.guarded rect, .rw-badge.safe rect { stroke: var(--good); } .rw-badge.guarded text, .rw-badge.safe text { fill: var(--good); }
.rw-exfil { fill: none; stroke: var(--bad); stroke-width: 2; stroke-dasharray: 6 5; marker-end: url(#rw-arrow); }
#rw-arrow path { fill: var(--bad); }
.rw-exfil-lbl { fill: var(--bad); font: 600 11px var(--font-mono); }
.rw-clock { fill: var(--sun); font: 700 13px var(--font-mono); }
@media (prefers-reduced-motion: no-preference) { .rw-exfil { animation: flow-dash 1.2s linear infinite; } .rw-dev.on .hw { animation: rw-pulse 1.8s ease-in-out infinite; } }
@keyframes rw-pulse { 50% { filter: drop-shadow(0 0 6px rgba(var(--bad-rgb), 0.7)); } }
.rw-track { display: flex; gap: 6px; justify-content: center; }
.rw-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); }
.rw-dot.done { background: rgba(var(--bad-rgb), 0.5); border-color: var(--bad); }
.rw-dot.blocked, .rw-dot.survived { background: rgba(var(--good-rgb), 0.5); border-color: var(--good); }
.rw-dot.never { opacity: 0.35; }
.rw-dot.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.rw-card { display: grid; gap: 6px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--bad); background: var(--surface); }
.rw-title { font: 700 1.2rem var(--font-display); color: var(--ink); }
.rw-card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.rw-verdict b { color: var(--ink); } .rw-verdict.good b { color: var(--good); }
.rw-out { margin-top: 6px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); }
.rw-out b { font: 700 1.05rem var(--font-display); }
.rw-out.lost { border-color: rgba(var(--bad-rgb), 0.6); background: rgba(var(--bad-rgb), 0.08); } .rw-out.lost b { color: var(--bad); }
.rw-out.recovered { border-color: rgba(var(--sun-rgb), 0.6); background: rgba(var(--sun-rgb), 0.08); } .rw-out.recovered b { color: var(--sun); }
.rw-out.stopped { border-color: rgba(var(--good-rgb), 0.6); background: rgba(var(--good-rgb), 0.08); } .rw-out.stopped b { color: var(--good); }
.rw-stop { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; border: 1px dashed rgba(var(--brand-rgb), 0.45); }
.rw-stop h3 { margin: 0; }
.rw-pick { gap: 6px; }
.rw-card.good { border-left-color: var(--good); }
.rw-step .btn:disabled { opacity: 0.35; box-shadow: none; cursor: default; }
@media (max-width: 600px) { .rw-map { max-width: 380px; justify-self: center; } }
/* Kill chain explainer (attack models lesson, static/js/killchain.js): seven numbered links in a row (two rows of
   cards on a phone), the stage card in the ransomware card's look, and the "break the chain" picker. */
.kc-chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; counter-reset: none; }
.kc-link { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-align: center; min-width: 0; }
.kc-link:not(:last-child)::after { content: ""; position: absolute; top: 24px; right: -7px; width: 8px; height: 2px; background: var(--line); }
.kc-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid rgba(var(--bad-rgb), 0.6); color: var(--bad); font: 700 0.85rem var(--font-mono); }
.kc-name { font: 600 0.78rem/1.25 var(--font-body); color: var(--ink); overflow-wrap: anywhere; }
.kc-id { font: 500 0.7rem var(--font-mono); color: var(--muted); }
.kc-link.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.kc-link.ahead, .kc-link.never { opacity: 0.45; }
.kc-link.never .kc-n { border-color: var(--line); color: var(--muted); }
.kc-link.blocked { border-color: var(--good); } .kc-link.blocked .kc-n { border-color: var(--good); background: rgba(var(--good-rgb), 0.15); color: var(--good); }
.kc-link.slowed .kc-n { border-color: var(--sun); color: var(--sun); }
.kc-card { display: grid; gap: 6px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--bad); background: var(--surface); }
.kc-card.good { border-left-color: var(--good); }
.kc-title { font: 700 1.2rem var(--font-display); color: var(--ink); }
.kc-card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.kc-attack { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.kc-attack a { font: 600 0.9rem var(--font-mono); }
.kc-verdict b { color: var(--sun); } .kc-verdict.good b { color: var(--good); }
.kc-out { margin-top: 6px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); }
.kc-out b { font: 700 1.05rem var(--font-display); }
.kc-out.lost, .kc-out.late { border-color: rgba(var(--bad-rgb), 0.6); background: rgba(var(--bad-rgb), 0.08); } .kc-out.lost b, .kc-out.late b { color: var(--bad); }
.kc-out.stopped { border-color: rgba(var(--good-rgb), 0.6); background: rgba(var(--good-rgb), 0.08); } .kc-out.stopped b { color: var(--good); }
.kc-break { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; border: 1px dashed rgba(var(--brand-rgb), 0.45); }
.kc-break h3 { margin: 0; } .kc-pick { gap: 6px; }
.kc-step .btn:disabled { opacity: 0.35; box-shadow: none; cursor: default; }
@media (max-width: 720px) { .kc-chain { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kc-link::after { display: none; } }
@media (max-width: 420px) { .kc-chain { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Zero-day timeline (zero-day lesson, static/js/zeroday.js): the zero-day band in red, your own window in amber, the
   attack curve filled where you were exposed and greyed where you'd already patched. */
.zd-svg { width: 100%; height: auto; display: block; overflow: hidden; }
.zd-band.zero { fill: rgba(var(--bad-rgb), 0.13); } .zd-band.nday { fill: rgba(var(--sun-rgb), 0.14); }
.zd-band-lbl { font: 600 11px var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.zd-band-lbl.zero { fill: var(--bad); } .zd-band-lbl.nday { fill: var(--sun); }
.zd-hit { fill: rgba(var(--bad-rgb), 0.35); } .zd-miss { fill: rgba(var(--good-rgb), 0.18); }
.zd-curve { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: 0.7; }
.zd-axis, .zd-tick { stroke: var(--muted); stroke-width: 1; }
.zd-ev { font: 500 11px var(--font-body); fill: var(--muted); }
.zd-you { stroke: var(--brand); stroke-width: 2.5; }
.zd-you-lbl { font: 700 12px var(--font-mono); fill: var(--brand); }
.zd-ctl { display: grid; gap: 8px; }
.zd-ctl label { font-size: 0.95rem; } .zd-ctl #zd-nv { font: 700 1rem var(--font-mono); color: var(--brand); }
.zd-ctl input[type=range] { width: 100%; accent-color: var(--brand); }
.zd-chips { gap: 6px; }
.zd-read { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); border-left: 4px solid var(--sun); background: var(--surface); }
.zd-read p { margin: 0; line-height: 1.55; }
@media (max-width: 520px) { .zd-band-lbl { font-size: 20px; } .zd-ev { font-size: 21px; } .zd-you-lbl { font-size: 22px; } }

/* Performance-based questions (static/js/pbq.js): a bar (kind, clock), the brief, the answer area, then marks. */
.pbq { display: grid; gap: 16px; }
.pbq-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.pbq-kind { font: 600 0.78rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand); border: 1px solid rgba(var(--brand-rgb), 0.45); border-radius: 999px; padding: 3px 10px; }
.pbq-time { font: 500 0.85rem var(--font-mono); color: var(--muted); }
.pbq-best { font-size: 0.85rem; color: var(--muted); margin-left: auto; }
.pbq-brief { display: grid; gap: 8px; padding: 14px 16px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: var(--radius-sm); }
.pbq-brief p { margin: 0; }
.pbq-reqs { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.pbq-how { margin: 0 0 8px; font-size: 0.9rem; }
.pbq-match, .pbq-order, .pbq-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pbq-match li, .pbq-order li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px); gap: 8px 12px; align-items: center; padding: 10px 12px;
  border: 1px solid var(--card-line); border-radius: var(--radius-sm); background: var(--surface); }
.pbq-order li { grid-template-columns: minmax(0, 1fr) auto; }
.pbq-item.mono { font: 0.82rem/1.45 var(--font-mono); overflow-wrap: anywhere; }
.pbq-match select, .pbq-rule select { width: 100%; min-height: 40px; }
.pbq-why { grid-column: 1 / -1; margin: 0; font-size: 0.88rem; color: var(--muted); }
.pbq-why b { color: var(--ink); }
.pbq-mv { display: inline-flex; gap: 6px; }
.pbq-mv .btn { min-width: 40px; padding-inline: 10px; }
.pbq-match li.ok, .pbq-order li.ok, .pbq-cell.ok { border-color: rgba(var(--good-rgb), 0.6); box-shadow: inset 4px 0 0 var(--good); }
.pbq-match li.no, .pbq-order li.no, .pbq-cell.no { border-color: rgba(var(--bad-rgb), 0.6); box-shadow: inset 4px 0 0 var(--exploited); }
.pbq-sub { border: 1px solid var(--card-line); border-radius: var(--radius-sm); padding: 10px 12px 12px; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.pbq-sub legend { padding: 0 6px; font-weight: 600; }
.pbq-cell { display: grid; gap: 4px; padding: 6px; border: 1px solid transparent; border-radius: var(--radius-sm); }
.pbq-cell span { font-size: 0.82rem; color: var(--muted); }
.pbq-cell input { min-height: 40px; width: 100%; }
.pbq-cellwhy { font-size: 0.8rem; font-style: normal; color: var(--muted); }
.pbq-rules fieldset { border: 1px solid var(--card-line); border-radius: var(--radius-sm); padding: 8px 12px 12px; margin: 0; }
.pbq-rules legend { padding: 0 6px; font-weight: 600; font-size: 0.9rem; }
.pbq-rule { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 8px; align-items: end; }
.pbq-rule label { display: grid; gap: 4px; font-size: 0.8rem; color: var(--muted); }
.pbq-devs { gap: 8px; margin-bottom: 8px; }
.pbq[data-kind="cli"] .term-shell { height: 380px; }
.pbq-result:empty { display: none; }
.pbq-result { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: var(--radius-sm); background: var(--surface); }
.pbq-score { margin: 0; }
.pbq-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pbq-parts li { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--radius-sm); border-left: 4px solid var(--good); background: rgba(var(--good-rgb), 0.06); }
.pbq-parts li.no { border-left-color: var(--exploited); background: rgba(var(--bad-rgb), 0.06); }
.pbq-pwhy { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 700px) {
  .pbq-match li { grid-template-columns: minmax(0, 1fr); }
  .pbq-rule { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pbq-rule .pbq-mv { grid-column: 1 / -1; }
}

/* A stage's items under the topic strip (loopItems in 06-learn): every experiment or case, the one you're on marked. */
.loop-items { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 10px; }
.loop-items-h { font: 600 0.72rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-right: 2px; }
.loop-items .chip { text-decoration: none; }
.loop-items .chip.on { border-color: var(--brand); color: var(--ink); background: rgba(var(--brand-rgb), 0.12); }
.loop-items .loop-next { margin-left: 10px; }  /* beside its chips, not pinned to the far edge (26 Nov, the owner) */
.loop-pos { font: 600 0.82rem var(--font-mono); color: var(--ink); }
.loop-items.long .loop-next { margin-left: 0; }
.loop-all { flex-basis: 100%; }
.loop-all summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 0.88rem; width: fit-content; }
.loop-all-list { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 8px; }
@media (max-width: 600px) { .loop-items .loop-next { margin-left: 0; } }

/* PBQs inside a mock (exam.js mountMock): a title, the task kept mounted, P1/P2 in the jump grid, a results block. */
.ex-pbq-title { margin: 4px 0 0; font-size: 1.15rem; }
.ex-pbq { margin-top: 8px; }
.ex-item.pbq { font-family: var(--font-mono); font-weight: 700; }
.ex-pbq-results { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--card-line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 12px; }
.ex-pbq-results h3 { margin: 0; font-size: 1rem; }
.ex-pbq-results > ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.ex-pbq-results li.ok > b { color: var(--good); } .ex-pbq-results li.no > b { color: var(--exploited); }
.ex-parts { margin: 4px 0 0; padding-left: 18px; font-size: 0.86rem; color: var(--muted); display: grid; gap: 2px; }

/* Process tree (static/js/proctree.js): each process under the one that started it, with what it did. */
.ev-views { margin-bottom: 8px; }
.pt { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 12px 14px; }
.pt ul { list-style: none; margin: 0; padding: 0; }
.pt-kids { margin-left: 14px; padding-left: 14px !important; border-left: 2px solid var(--line); }
.pt-kids > li { position: relative; padding-top: 8px; }
.pt-kids > li::before { content: ""; position: absolute; left: -16px; top: 24px; width: 14px; border-top: 2px solid var(--line); }
.pt-root > li { padding-top: 4px; }
.pt-node { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--bg); min-width: 0; }
.pt-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.pt-exe { font-family: var(--font-mono); }
.pt-t { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }
.pt-cmd { display: block; margin-top: 4px; font-size: .8rem; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; color: var(--muted); }
.pt-evs { margin-top: 6px !important; display: grid; gap: 4px; }
.pt-ev { display: flex; gap: 6px; align-items: baseline; font-size: .85rem; min-width: 0; }
.pt-ev .pt-txt { font-family: var(--font-mono); font-size: .8rem; overflow-wrap: anywhere; min-width: 0; }
.pt-ico { flex: none; width: 1.2em; text-align: center; font-weight: 700; }
.pt-ev.net .pt-ico { color: var(--sun); }
.pt-ev.file .pt-ico, .pt-ev.read .pt-ico { color: var(--brand, var(--sun)); }
.pt-notes { margin-bottom: 10px !important; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.pt-key { margin: 10px 0 0; font-size: .8rem; }
@media (max-width: 520px) { .pt { padding: 10px; } .pt-kids { margin-left: 6px; padding-left: 10px !important; } .pt-kids > li::before { left: -12px; width: 10px; } }
/* The evidence panel's Tree / Raw panes are grid children: let them shrink so the log scrolls inside, not past, the panel. */
#lab-raw, #lab-tree { min-width: 0; }
/* Patch as a helper: his bubble holds a short menu of help for the page. */
.pn-companion.open .pn-co-bubble { max-width: min(320px, calc(100vw - 24px)); }
.pn-co-title { margin: 0; font-weight: 600; }
.pn-co-said { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pn-co-said .ok { color: var(--good); } .pn-co-said .no { color: var(--bad); }
.pn-co-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pn-co-acts.col { flex-direction: column; align-items: stretch; }
.pn-co-acts .chip { font-size: 0.8rem; text-align: left; white-space: normal; }
.opt.ruled { opacity: 0.45; text-decoration: line-through; }
/* 19 Nov deep run: long addresses and commands in a mission's step log wrap instead of running off the panel on phones,
   and the data-breach tiles hyphenate long words ("Misconfiguration") rather than spill past the tile. */
#m-log li, #m-log li strong { overflow-wrap: anywhere; min-width: 0; }
.cs-lbl { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }

/* VLAN labs: the objective you're on sits at the top of the console, and the two-rooms demo hands over to it. */
.vl-now { padding: 10px 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); display: grid; gap: 6px; }
.vl-now p { margin: 0; } .vl-now .row { gap: 10px; align-items: center; }
.vl-obj { font-size: 0.92rem; line-height: 1.45; color: var(--ink); } .vl-obj .eyebrow { display: block; margin-bottom: 2px; }
.vl-done { font-size: 0.82rem; color: var(--good); }
.vl-nowhint { font: 0.85rem var(--font-mono); color: var(--sun); }
.vn-intro { margin: 0 0 6px; }
.vn-next { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; color: #d5e2f0; }
.vlan-lab .term-shell { height: 540px; }
@media (max-width: 860px) { .vlan-lab .term-shell { height: 640px; } }  /* the hint box sits above the console here; keep ~280 px of output */
/* Linux lab: the guided strip sits above the bar, so the output keeps the flexible row and the shell grows to fit it. */
/* Command-line labs with the hint box: a column where the output takes whatever is left, with or without the hint box
   above it (it sits in the objectives panel on wide screens, above the terminal at 860 px and below). */
.term-shell.t-guided, .vlan-lab .term-shell { display: flex; flex-direction: column; }
:is(.term-shell.t-guided, .vlan-lab .term-shell) > .term-out { flex: 1 1 0; min-height: 0; }
:is(.term-shell.t-guided, .vlan-lab .term-shell) > :not(.term-out) { flex: none; }
.term-shell.t-guided { height: 520px; }
@media (max-width: 860px) { .term-shell.t-guided { height: 600px; } }
@media (max-width: 520px) { .term-shell.t-guided { height: 660px; } }  /* the hint box wraps tall on a phone; keep ~250 px of output */
/* In the objectives panel the list already marks the objective you're on, so the box shows only the hint and findings. */
/* Docked above the terminal (860 px and below) the hint box sits on the console's dark navy in both themes. It takes its
   colours from the shell's dark tokens; before 19 Nov the light theme's ink and teal showed there (text 1.07:1, links 3.1:1). */
.term-shell .vl-now:not(.in-panel) { color: var(--ink); --muted: #9AA9BF; --surface-2: #142030; --brand: #3FE0E8; --brand-rgb: 63, 224, 232; --brand-ink: #04121A; --bad: #FF5470; }
.vl-now.in-panel { padding: 0; border: 0; background: none; margin-top: 12px; }
.vl-now.in-panel .vl-objrow { display: none; }
.vl-now.in-panel .vl-next { background: var(--surface-2); }
.vl-now.in-panel .vl-cmd code { color: var(--sun); }  /* the theme's amber: #ffd27a fails contrast on the light panel */
/* Vishing call (restored 19 Nov): after each reply, the red flag you caught or what an unsafe reply would give away. */
.vp-talk .vp-flag, .vp-talk .vp-risk { margin: 0; font-size: 0.86rem; line-height: 1.4; }

/* SQL injection lab (static/js/labs/sqli.js): a browser window with a fictional shop in it, and "Behind the scenes". */
.sq-lab { display: grid; gap: 16px; }
.sq-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .sq-grid { grid-template-columns: 1fr; } }
.bw { border-radius: 12px; overflow: hidden; border: 1px solid #c9d1dc; background: #fff; color: #1d2733; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); color-scheme: light; }
.bw-top { display: flex; align-items: flex-end; gap: 12px; padding: 8px 12px 0; background: #dfe4ea; }
.bw-dots { display: flex; gap: 6px; padding-bottom: 10px; } .bw-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .bw-dots i:nth-child(2) { background: #febc2e; } .bw-dots i:nth-child(3) { background: #28c840; }
.bw-tab { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 9px 9px 0 0; background: #f4f6f8; font: 500 0.8rem var(--font-body); min-width: 0; }
.bw-fav { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: #23402f; color: #f3e7c9; font: 700 0.62rem Georgia, serif; }
.bw-bar { display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: #f4f6f8; border-bottom: 1px solid #dde2e8; }
.bw-nav { color: #56616d; letter-spacing: 0.3em; font-size: 0.9rem; }
.bw-url { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 99px; background: #fff; border: 1px solid #dde2e8; font: 0.8rem var(--font-mono); color: #1d2733; white-space: nowrap; overflow: hidden; }
#sq-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }  /* one line, like a real address bar */
.bw-url .muted { color: #5f6b77; } .bw-lock { font-size: 0.7rem; }
.bw-page { min-height: 380px; background: #fbf8f2; }
/* the shop's own look: cream and bottle green, a serif logo */
.ws-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; background: #23402f; color: #f3e7c9; flex-wrap: wrap; }
.ws-logo { font: 600 1.2rem Georgia, "Times New Roman", serif; letter-spacing: 0.02em; } .ws-logo i { font-style: italic; color: #d9b36c; }
.ws-nav { display: flex; gap: 6px; } .ws-nav button { background: none; border: 1px solid rgba(243, 231, 201, 0.35); color: #f3e7c9; padding: 5px 12px; border-radius: 99px; font: 500 0.82rem var(--font-body); cursor: pointer; }
.ws-nav button:hover, .ws-nav button:focus-visible { background: rgba(243, 231, 201, 0.12); }
.ws-main { padding: 22px 20px 28px; }
.ws-card { max-width: 360px; margin: 6px auto; display: grid; gap: 12px; padding: 22px; border-radius: 12px; background: #fff; border: 1px solid #e6dfd1; box-shadow: 0 6px 18px rgba(60, 50, 30, 0.08); }
.ws-card h2 { margin: 0; font: 600 1.25rem Georgia, serif; color: #23402f; }
.ws-card label { display: grid; gap: 5px; font: 600 0.82rem var(--font-body); color: #4a4234; }
.ws-card input, .ws-search input { font: 0.95rem var(--font-mono); padding: 9px 11px; border-radius: 8px; border: 1px solid #cfc6b4; background: #fffdf9; color: #1d2733; min-width: 0; }
.ws-card input:focus, .ws-search input:focus { outline: 2px solid #3a7d57; outline-offset: 1px; }
.ws-btn { padding: 9px 16px; border-radius: 8px; border: 0; background: #23402f; color: #f3e7c9; font: 600 0.92rem var(--font-body); cursor: pointer; }
.ws-btn:hover, .ws-btn:focus-visible { background: #2e5a40; }
.ws-small { margin: 0; font-size: 0.8rem; color: #6b6253; } .ws-bad { margin: 0; color: #a3261c; font-weight: 600; font-size: 0.88rem; }
.ws-search { display: flex; gap: 8px; margin-bottom: 16px; } .ws-search input { flex: 1; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ws-prod { display: grid; gap: 4px; padding: 10px; border-radius: 10px; background: #fff; border: 1px solid #e6dfd1; min-width: 0; overflow-wrap: anywhere; }
.ws-prod b { font-size: 0.9rem; color: #23402f; } .ws-prod p { margin: 0; font-size: 0.78rem; color: #6b6253; }
.ws-price { font: 600 0.85rem var(--font-mono); color: #8a5a12; }
.ws-ph { height: 70px; border-radius: 7px; background: linear-gradient(135deg, #efe6d4, #e2d6bd); margin-bottom: 4px; }
.ws-hello { max-width: 460px; margin: 0 auto; display: grid; gap: 10px; } .ws-hello h2 { margin: 0; font: 600 1.3rem Georgia, serif; color: #23402f; }
.ws-admin { margin: 0; font: 700 0.75rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: #a3261c; }
.ws-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .ws-stats span { padding: 10px; border-radius: 8px; background: #fff; border: 1px solid #e6dfd1; font-size: 0.8rem; color: #6b6253; } .ws-stats b { display: block; font-size: 1.1rem; color: #23402f; }
.ws-link { background: none; border: 0; padding: 0; color: #2e5a40; font: 600 0.88rem var(--font-body); text-decoration: underline; cursor: pointer; justify-self: start; }
/* a PHP error page as a misconfigured server shows it: plain, serif, unstyled */
.ws-raw { margin: 0; padding: 16px 18px; font: 0.92rem/1.5 "Times New Roman", Times, serif; color: #000; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.ws-back { margin: 0; padding: 0 18px 18px; background: #fff; }
/* behind the scenes */
.sq-side { display: grid; gap: 16px; min-width: 0; }
.sq-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px; display: grid; gap: 10px; min-width: 0; }
.sq-ptitle { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; } .sq-ptitle h2 { margin: 0; font-size: 1rem; }
.sq-sql, .sq-code { margin: 0; padding: 12px; border-radius: 8px; background: #0b1118; color: #d5e2f0; font: 0.82rem/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #1e2a3a; }
.sq-kw { color: #8ec5ff; font-weight: 700; }
.sq-in { background: rgba(255, 176, 0, 0.22); color: #ffd27a; border-radius: 3px; padding: 0 2px; outline: 1px solid rgba(255, 176, 0, 0.5); }
.sq-note { margin: 0; font-size: 0.85rem; } .sq-err { margin: 0; color: var(--bad); font: 0.82rem/1.5 var(--font-mono); overflow-wrap: anywhere; }
.sq-params { margin: 0; padding-left: 1.2em; font: 0.85rem var(--font-mono); }
.sq-grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.sq-rows { border-collapse: collapse; width: 100%; font: 0.8rem var(--font-mono); } .sq-rows th, .sq-rows td { padding: 6px 9px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; } .sq-rows th { background: var(--surface-2); }
.sq-tasks { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; font-size: 0.9rem; } .sq-tasks li.now { font-weight: 600; } .sq-tasks li.got { color: var(--muted); }
.sq-fix { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: 8px; border: 1px dashed var(--line); font-size: 0.9rem; cursor: pointer; }
.sq-note .sq-in, .sq-params .sq-in { color: var(--ink); background: rgba(255, 176, 0, 0.28); }  /* outside the dark SQL box, keep the theme's text colour */

/* Switch front panel (static/js/net/panel.js): a dark 1U chassis; LEDs and plugs in each port's network colour. */
.vl-front { margin-top: 14px; display: grid; gap: 8px; }
.vl-front-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; } .vl-front-head h3 { margin: 0; }
.vl-panel-wrap { overflow-x: auto; border-radius: 8px; background: #06090d; padding: 10px; }
.sw-panel { display: block; width: 100%; min-width: 620px; height: auto; }
.sp-ear { fill: #1a1f25; } .sp-hole { fill: #05070a; }
.sp-body { stroke: #3b434c; stroke-width: 1; }
.sp-name { font: 700 13px var(--font-mono); fill: #e6edf3; letter-spacing: 0.06em; }
.sp-model, .sp-tiny { font: 600 7px var(--font-mono); fill: #9aa7b4; letter-spacing: 0.08em; text-transform: uppercase; }
.sp-tiny.mid { text-anchor: middle; }
.sp-num { font: 600 7.5px var(--font-mono); fill: #9aa7b4; text-anchor: middle; }
.sp-socket { fill: #0a0d11; stroke: #59636e; stroke-width: 1; }
.sp-latch { fill: #0a0d11; stroke: #59636e; stroke-width: 0.8; }
.sp-pins { fill: #1b2129; }
.sp-boot { fill: rgba(0, 0, 0, 0.28); }
.sp-console { fill: #1d4f8f; stroke: #8fb4e8; stroke-width: 1; }
.sp-sfp { fill: #0a0d11; stroke: #7d8893; stroke-width: 1; } .sp-sfp-in { fill: #14191f; }
.sp-vent { fill: #10141a; }
.sp-led.off { fill: #262c33; } .sp-led.amber { fill: #ffb000; }
.sp-led.on { filter: drop-shadow(0 0 3px currentColor); } .sp-led.sys { fill: #3ddc97; color: #3ddc97; }
.sp-port { cursor: pointer; outline: none; } .sp-port:focus-visible .sp-socket, .sp-port:hover .sp-socket { stroke: #e6edf3; stroke-width: 1.6; }
.vl-port-info { margin: 0; font-size: 0.86rem; min-height: 1.4em; }
/* the photo skin: the live plugs and lights over a switch photo */
.vl-front-head > .row { gap: 6px; }
.sw-photo { min-width: 640px; }
.pp-hit { fill: transparent; }
.pp-plug { stroke: rgba(0, 0, 0, 0.55); stroke-width: 2; opacity: 0.92; }
.pp-boot { fill: rgba(0, 0, 0, 0.32); }
.pp-led.on { filter: drop-shadow(0 0 5px currentColor); }
.pp-led.sys { fill: #3ddc97; color: #3ddc97; } .pp-led.sys.idle { fill: #2c6b50; filter: none; }
.pp-num { font: 600 13px var(--font-mono); fill: #aeb8c3; text-anchor: middle; }
.pp-name { font: 700 30px var(--font-mono); fill: #e6edf3; letter-spacing: 0.08em; }
.sw-photo .sp-port:focus-visible .pp-hit, .sw-photo .sp-port:hover .pp-hit { stroke: #ffffff; stroke-width: 3; }
/* Guided mode in the console's objective strip */
.vl-objrow { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.vl-next { display: grid; gap: 6px; padding: 12px 14px; border-radius: 8px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); }
/* The hint's actions: Hide on the left, a small Run it on the right edge, with room above them (19 Nov, the owner). */
.vl-next > .row { margin-top: 10px; justify-content: flex-end; align-items: center; gap: 14px; }
.vl-next > .row [data-hidehint] { order: -1; margin-right: auto; }
.vl-next :is([data-runit], [data-more]) { padding: 6px 14px; font-size: 0.72rem; }
.vl-nudge { margin: 0; font-size: 0.9rem; line-height: 1.5; } .vl-nudge .eyebrow { display: block; margin-bottom: 4px; }
.vl-cmd { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin: 0; } .vl-cmd code { font: 700 0.95rem var(--font-mono); color: #ffd27a; overflow-wrap: anywhere; }
.vl-cmdwhy { margin: 0; font-size: 0.84rem; color: var(--muted); }
.t-tip { color: #8ec5ff; white-space: normal; overflow-wrap: anywhere; }  /* tips wrap, unlike device output */
.vl-next.rescue { border-color: var(--sun); } .vl-rescue { margin: 0; font-weight: 600; color: var(--sun); font-size: 0.86rem; }
/* Network detective: "Where's the fault?", the chain from the PC outwards; each link lights as it's tested (19 Nov). */
.nd-chain { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.nd-chain h2 { margin: 0 0 10px; }
.nd-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; counter-reset: nd; }
.nd-link { position: relative; display: grid; gap: 2px; align-content: start; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); min-width: 0; font-size: 0.85rem; }
.nd-link + .nd-link::before { content: "→"; position: absolute; left: -8px; top: 12px; transform: translateX(-50%); color: var(--muted); font-size: 0.8rem; }
.nd-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; background: var(--line); color: var(--muted); }
.nd-link.ok { border-color: color-mix(in srgb, var(--good) 55%, var(--line)); } .nd-link.ok .nd-dot { background: var(--good); color: #04120b; }
.nd-link.bad { border-color: color-mix(in srgb, var(--exploited) 65%, var(--line)); background: color-mix(in srgb, var(--exploited) 8%, var(--surface-2)); } .nd-link.bad .nd-dot { background: var(--exploited); color: #fff; }
.nd-sub { color: var(--muted); font-size: 0.75rem; overflow-wrap: anywhere; }
.nd-say { color: var(--ink); overflow-wrap: anywhere; } .nd-link.todo .nd-say { color: var(--muted); } .nd-say code { font-size: 0.75rem; }
.nd-verdict { margin: 10px 0 0; padding: 8px 10px; border-left: 3px solid var(--sun); background: color-mix(in srgb, var(--sun) 8%, transparent); }
@media (max-width: 980px) { .nd-links { grid-template-columns: repeat(3, minmax(0, 1fr)); } .nd-link + .nd-link::before { display: none; } }
@media (max-width: 520px) { .nd-links { grid-template-columns: 1fr; } .nd-link { grid-template-columns: 22px auto 1fr; align-items: center; column-gap: 8px; } .nd-link .nd-dot { grid-row: span 2; } .nd-say { grid-column: 2 / -1; } }
/* The hero is a screen (19 Nov, the owner's choice; ?hero=photo shows the old desk photo): a monitor bezel, glass with a faint
   glare, the headline on the glass, the live terminal as a flat window beside it, a chin with a power light. No stand. */
.home .home-hero.hh-monitor { display: block; min-height: 0; padding: 6px 0 0; border: 0; background: transparent; overflow: visible; }
.hm-frame { position: relative; max-width: 1180px; margin: 0 auto; padding: 14px 14px 0; border-radius: 22px;
  background: linear-gradient(180deg, #1c222b, #0d1117 70%); border: 1px solid #2b333e;
  box-shadow: 0 34px 70px -30px rgba(0, 0, 0, 0.75), 0 2px 0 rgba(255, 255, 255, 0.06) inset; }
.hm-glass { position: relative; overflow: hidden; border-radius: 10px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: clamp(20px, 3vw, 40px); padding: clamp(28px, 4vw, 52px); min-height: 420px; border: 1px solid #000;
  /* A cool cyan light behind the terminal, and a faint dot grid on the glass (the owner disliked the amber glow, 20 Nov). */
  background: radial-gradient(55% 75% at 76% 48%, rgba(63, 224, 232, 0.13), transparent 65%), radial-gradient(40% 60% at 10% 10%, rgba(63, 224, 232, 0.04), transparent 70%),
    radial-gradient(circle, rgba(148, 196, 220, 0.07) 1px, transparent 1.4px) 0 0 / 22px 22px, #05080c; }
.hm-glass::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 32%, transparent 46%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px); }
.hh-monitor .hh-inner { max-width: none; }
.hm-term { position: relative; height: 340px; min-width: 0; }
.hm-win.hh-screen { position: relative; width: 100%; height: 100%; transform: none; opacity: 1; border-radius: 10px; border: 1px solid #1d2a36;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.8), inset 0 0 60px rgba(63, 224, 232, 0.06); font-size: 14px; padding: 14px 18px; }
.hm-win .hs-bar { padding-bottom: 10px; margin-bottom: 10px; }
.hm-chin { display: flex; align-items: center; justify-content: center; gap: 10px; height: 34px; position: relative; }
.hm-brand { font: 800 0.72rem/1 var(--font-display); letter-spacing: 0.12em; color: #5d6b7c; } .hm-brand i { font-style: normal; color: #b07a10; }
.hm-led { position: absolute; right: 22px; width: 6px; height: 6px; border-radius: 50%; background: #3fe0e8; box-shadow: 0 0 8px #3fe0e8; }
@media (max-width: 900px) {
  .hm-glass { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hm-term { height: 260px; }
}
@media (max-width: 520px) {
  .hm-frame { padding: 8px 8px 0; border-radius: 16px; } .hm-glass { padding: 24px 18px; } .hm-chin { height: 26px; }
  .hm-term { height: 230px; } .hm-win.hh-screen { font-size: 12.5px; padding: 10px 12px; }
}

/* Exam prep cards on the home page (04-home examCards): a drawn emblem over a faint pattern, one accent per exam. */
.xgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1200px) { .xgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.xcard { --c: var(--brand); display: flex; flex-direction: column; gap: 6px; padding: 0 22px 22px; border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); background: var(--surface); box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.6); transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.xc-sec { --c: var(--good); } .xc-pen { --c: var(--bad); } .xc-ap { --c: var(--seg4); }
.xcard:hover, .xcard:focus-visible { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 65%, var(--line)); box-shadow: 0 24px 50px -26px color-mix(in srgb, var(--c) 55%, transparent); }
.xa { display: block; width: calc(100% + 44px); margin: 0 -22px 10px; aspect-ratio: 2 / 1; height: auto; color: var(--c);
  background: radial-gradient(60% 90% at 50% 50%, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%), linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, var(--surface)), var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--c) 22%, var(--line)); }
.xa-pat { fill: none; stroke: currentColor; stroke-width: 1.4; opacity: 0.28; } .xa-pat circle[r="4"] { fill: currentColor; }
.xa-hex { fill: color-mix(in srgb, var(--c) 14%, var(--surface)); stroke: currentColor; stroke-width: 2; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--c) 55%, transparent)); }
.xa-hex2 { fill: none; stroke: currentColor; stroke-width: 1; opacity: 0.45; }
.xa-mono { fill: currentColor; font: 800 34px var(--font-display); letter-spacing: -0.02em; }
.xc-code { font: 700 0.72rem var(--font-mono); letter-spacing: 0.12em; color: var(--c); }
.xcard h3 { margin: 0; font: 700 1.3rem/1.2 var(--font-display); }
.xcard p { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.45; }
.xc-meta { margin-top: auto; padding-top: 8px; font: 600 0.72rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.xc-go { font: 700 0.78rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c); }
:root[data-theme="light"] .xc-code, :root[data-theme="light"] .xc-go { color: color-mix(in srgb, var(--c) 60%, #000); }
@media (max-width: 900px) { .xgrid { grid-template-columns: 1fr; } .xa { aspect-ratio: 3 / 1; } }
@media (prefers-reduced-motion: reduce) { .xcard { transition: none; } .xcard:hover { transform: none; } }

/* One-row header (20 Nov, the owner's call): logo, six section tabs, then search, your progress badge and the theme
   switch. The tmux-style status bar, the guest@patchnotes prompt, the version and the number badges are gone; the
   number keys still work. Under 1000 px the tabs drop to their own row (sideways scroll on phones). */
.masthead { padding-inline: 16px; }
.mast-inner { max-width: 1120px; padding-block: 10px; flex-wrap: nowrap; gap: 8px 24px; }
.brand b { font-size: 1.15rem; }
.mast-inner nav.tabs { border-top: 0; flex: 1 1 auto; min-width: 0; }
.mast-inner .tabs-inner { max-width: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 2px; }
.mast-inner nav.tabs a { font: 500 0.92rem var(--font-body); letter-spacing: 0; padding: 8px 12px; border-radius: 999px; white-space: nowrap; color: var(--muted); border: 1px solid transparent; }
.mast-inner nav.tabs a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: transparent; }
.mast-inner nav.tabs a[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--brand) 14%, transparent); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.mast-end { margin-left: auto; gap: 8px; }
.cmd-btn { margin-left: 0; gap: 8px; padding: 7px 8px 7px 12px; border-radius: 999px; font: 500 0.88rem var(--font-body); }
.cmd-btn::before { content: none; }
.cmd-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cmd-btn kbd { font-size: 0.7rem; }
a.xp { text-decoration: none; color: var(--ink); border-radius: 999px; padding: 5px 12px 5px 5px; }
a.xp:hover, a.xp[aria-current="page"] { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
a.xp .lvl { border-radius: 999px; }
.theme-btn { border-radius: 999px; }
body main { padding-bottom: 72px; }
@media (max-width: 1239px) { .mast-inner .cmd-btn span, .mast-inner .cmd-btn kbd { display: none; } .mast-inner .cmd-btn { padding: 8px; } a.xp .bar { display: none; } .mast-inner { gap: 8px 16px; } }
@media (max-width: 999px) {
  .mast-inner { flex-wrap: wrap; row-gap: 6px; }
  .mast-inner nav.tabs { order: 10; flex-basis: 100%; margin-inline: -16px; padding: 4px 16px 0; border-top: 1px solid var(--line); }
  .mast-inner .tabs-inner { overflow-x: auto; scrollbar-width: none; padding-block: 4px; }
  .mast-inner .tabs-inner::-webkit-scrollbar { display: none; }
}
@media (max-width: 600px) {
  .cmd-btn span, .cmd-btn kbd { display: none; } .cmd-btn { padding: 8px; }
  a.xp .bar, a.xp .pts { display: none; } a.xp { padding: 5px; }
  .brand b { font-size: 1.02rem; } .mast-end { gap: 6px; } .theme-btn { width: 36px; height: 36px; }
  .mast-inner nav.tabs a { padding: 8px 10px; min-height: 40px; }
}
/* With no status bar, Patch sits in the bottom-right corner at every width; main keeps room so he never hides its end. */
@media (min-width: 521px) and (max-width: 1319px) { .pn-co-figure .patch { width: 48px; } .pn-companion { right: 20px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); } }
@media (min-width: 1320px) { .pn-companion { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); } }
/* Practise filters (20 Nov): the topic chips are one row that scrolls sideways (they wrapped to two rows of 12), and
   length and "Not done yet" fold under "Filters" (open while one is set). */
.view > .row:has(> .pr-tracks) { min-width: 0; flex-wrap: nowrap; }
.pr-tracks { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; max-width: 100%;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); padding-right: 32px; }
.pr-tracks::-webkit-scrollbar { display: none; }
.pr-tracks .chip { white-space: nowrap; flex: none; }
.pr-filterbar { justify-content: space-between; align-items: flex-start; }
.pr-filtfold > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font: 500 0.88rem var(--font-body); color: var(--muted); }
.pr-filtfold > summary::-webkit-details-marker { display: none; }
.pr-filtfold > summary::before { content: ""; width: 14px; height: 10px; background: linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 2px 4px / 10px 2px no-repeat, linear-gradient(currentColor, currentColor) 4px 8px / 6px 2px no-repeat; }
.pr-filtfold[open] > summary, .pr-filtfold > summary:hover { color: var(--ink); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.pr-filtfold[open] .pr-filters { margin-top: 10px; }

/* Permissions lab, "Read the line" (20 Nov): the file's permissions big and split into type, owner, group and others;
   the chosen person's set is lit, with what each letter lets them do. The switches and the full table are folded. */
.pm-read .panel-title { flex-wrap: wrap; gap: 10px; }
.pm-big { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px clamp(10px, 3vw, 28px); padding: 22px 8px 8px; }
.pm-seg { display: grid; justify-items: center; gap: 8px; padding: 10px clamp(8px, 2vw, 18px) 12px; border-radius: 16px; border: 1px solid transparent; transition: background 0.2s ease, border-color 0.2s ease; }
.pm-seg b { font: 700 clamp(2.1rem, 7vw, 3.6rem)/1 var(--font-mono); letter-spacing: 0.06em; color: color-mix(in srgb, var(--ink) 55%, transparent); }
.pm-seg small { font: 600 0.72rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.pm-seg.on { background: color-mix(in srgb, var(--brand) 10%, transparent); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.pm-seg.on b { color: var(--brand); text-shadow: 0 0 22px color-mix(in srgb, var(--brand) 45%, transparent); }
.pm-seg.on small { color: var(--ink); }
.pm-s-type b { color: color-mix(in srgb, var(--ink) 35%, transparent); }
.pm-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin: 6px 0 14px; color: var(--muted); font-size: 0.92rem; }
.pm-key b { color: var(--ink); margin-right: 4px; }
.pm-who { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pm-who .chip { display: grid; gap: 1px; text-align: left; padding: 6px 12px; border-radius: 12px; }
.pm-who .chip small { font: 400 0.72rem var(--font-body); color: var(--muted); }
.pm-who .chip[aria-pressed="true"] { background: var(--brand-soft); color: var(--ink); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.pm-say { max-width: 640px; margin: 14px auto 4px; text-align: center; }
.pm-say p { margin: 0 0 8px; }
.pm-say ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.pm-say li.yes { color: var(--good); } .pm-say li.no { color: var(--muted); }
.pm-say li.no span[aria-hidden] { color: var(--bad); }
.pm-fold > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.pm-read .pm-fold { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
details.panel.pm-all { display: block; }
@media (prefers-reduced-motion: reduce) { .pm-seg { transition: none; } }
.pm-seg { gap: 4px; } .pm-seg b { margin-bottom: 6px; }
.pm-seg i { font: 500 0.86rem var(--font-body); font-style: normal; color: var(--muted); text-align: center; }
.pm-seg.on i { color: var(--ink); }
@media (max-width: 600px) {
  .pm-big { flex-wrap: nowrap; gap: 4px; padding-inline: 0; }
  .pm-seg { padding: 8px 6px 10px; border-radius: 12px; min-width: 0; }
  .pm-seg b { font-size: 1.7rem; letter-spacing: 0.02em; }
  .pm-seg small { font-size: 0.62rem; letter-spacing: 0.06em; }
  .pm-seg i { font-size: 0.74rem; line-height: 1.2; }
  .pm-key { gap: 4px 14px; font-size: 0.86rem; }
}
/* Header breathing room (20 Nov, the owner found it cramped around 1100-1300 px): the tabs sit centred between the logo
   and the controls, and the badge shows rank and XP without its bar (the bar is on the progress page). */
.mast-inner nav.tabs { display: flex; justify-content: center; }
.mast-inner .tabs-inner { gap: 4px; }
a.xp .bar { display: none; }
a.xp { gap: 8px; padding-right: 14px; }
@media (max-width: 1239px) { .mast-inner .tabs-inner { gap: 0; } .mast-inner nav.tabs a { padding-inline: 10px; } }
@media (max-width: 999px) { .mast-inner nav.tabs { justify-content: flex-start; } }

/* Evidence labs, "Read a line" (20 Nov): one real line of the log taken apart, each part labelled underneath. */
.ln-anat { margin: 0 0 12px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.ln-anat > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ln-anat > summary .muted { font-size: 0.86rem; }
.ln-parts { display: flex; flex-wrap: wrap; gap: 10px 8px; margin-top: 12px; }
.ln-p { display: grid; gap: 5px; min-width: 0; max-width: 100%; }
.ln-p code { display: block; max-width: 36ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 0.84rem var(--font-mono); color: var(--ink);
  padding: 6px 9px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 6%, transparent); border: 1px solid var(--line); }
.ln-p small { font: 500 0.72rem var(--font-body); color: var(--muted); padding-left: 2px; }
.ln-p:hover code { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
@media (max-width: 600px) { .ln-parts { gap: 8px 6px; } .ln-p code { max-width: 26ch; font-size: 0.78rem; padding: 5px 7px; } }

/* Linux terminal, "Read the prompt" and "Read a command" (20 Nov): the prompt split into who / machine / where / ready (it
   follows cd), and the last command taken apart. Reuses the permissions lab's big segments and the evidence labs' parts. */
.t-read { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px 28px; align-items: start; margin-bottom: 14px; }
.t-read h2 { margin: 0 0 6px; font-size: 1.05rem; }
.t-prompt { justify-content: flex-start; flex-wrap: wrap; gap: 2px; padding: 8px 0 4px; }
.t-prompt .pm-seg { padding: 8px 8px 10px; }
.t-prompt .pm-seg b { font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: var(--brand); }
.t-prompt .t-sep { padding-inline: 0; align-self: start; }
.t-prompt .t-sep b { color: color-mix(in srgb, var(--ink) 40%, transparent); }
.t-prompt .pm-seg i { max-width: 18ch; font-size: 0.78rem; line-height: 1.3; }
.t-cmd-note { margin: 0 0 4px; font-size: 0.86rem; }
.t-read .ln-parts { margin-top: 6px; }
@media (max-width: 860px) { .t-read { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .t-prompt .pm-seg b { font-size: 1.3rem; } .t-prompt .pm-seg { padding: 6px 4px 8px; } .t-prompt .pm-seg i { font-size: 0.7rem; max-width: 12ch; } }

/* Subnetting, "Read the address" (20 Nov): the 32 bits in four octets, network part lit, host part dim, a bracket under
   each saying what it does. A 35-column grid: 32 bits plus a gap column between octets. */
.sc-read { margin: 10px 0 6px; }
.sr-bar { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)) 10px repeat(8, minmax(0, 1fr)) 10px repeat(8, minmax(0, 1fr)) 10px repeat(8, minmax(0, 1fr)); gap: 3px 2px; align-items: center; }
.sr-bar i { grid-row: 1; font: 700 clamp(0.72rem, 1.6vw, 1.05rem)/1 var(--font-mono); font-style: normal; text-align: center; padding: 8px 0; border-radius: 5px; }
.sr-bar i.net { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--brand); }
.sr-bar i.host { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); }
.sr-bar b { grid-row: 2; text-align: center; font: 700 clamp(1rem, 2.4vw, 1.5rem) var(--font-mono); color: var(--ink); padding-top: 4px; }
.sr-bar span { grid-row: 3; margin-top: 6px; padding-top: 6px; font: 500 0.82rem/1.3 var(--font-body); border-top: 2px solid; }
.sr-net { color: var(--brand); border-color: var(--brand); padding-right: 6px; }
.sr-host { color: var(--muted); border-color: color-mix(in srgb, var(--ink) 30%, transparent); text-align: right; padding-left: 6px; }
@media (max-width: 600px) { .sr-bar { gap: 2px 1px; grid-template-columns: repeat(8, minmax(0, 1fr)) 5px repeat(8, minmax(0, 1fr)) 5px repeat(8, minmax(0, 1fr)) 5px repeat(8, minmax(0, 1fr)); } .sr-bar i { padding: 5px 0; border-radius: 3px; } .sr-bar span { font-size: 0.74rem; } }
@media (max-width: 600px) {
  .sr-bar span { grid-column: 1 / -1 !important; text-align: left; border-top: 0; border-left: 3px solid; padding: 2px 0 2px 8px; margin-top: 4px; }
  .sr-bar .sr-host { grid-row: 4; }
}

/* CVSS builder (20 Nov): the eight metrics under three plain questions, each answered in a sentence as you pick. */
.cvss-qs { display: grid; gap: 14px; }
.cvss-q { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--surface); display: grid; gap: 12px; }
.cvss-qh { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.cvss-qh h2 { margin: 0; font-size: 1.08rem; }
.cvss-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 0.9rem var(--font-mono); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.cvss-say { margin: 4px 0 0; font-size: 1rem; color: var(--ink); }
.cvss-q .cvss-grid { margin: 0; }
/* Network detective chain (20 Nov): "Not tested yet" and the command to try sit on their own lines (they ran together). */
.nd-try { display: block; margin-top: 4px; color: var(--muted); }
.nd-try code { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 1px 5px; border-radius: 4px; }
/* VLAN labs (20 Nov): the key idea in one line above the demo; the front panel folds under a summary. */
.vn-glance { margin: 4px 0 10px; max-width: 70ch; font-size: 1.06rem; line-height: 1.5; color: var(--ink); padding-left: 12px; border-left: 3px solid var(--brand); }
details.vl-front > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
details.vl-front[open] > summary { margin-bottom: 8px; }
details.vl-front { display: block; min-width: 0; max-width: 100%; }
details.vl-front > *:not(summary) { min-width: 0; max-width: 100%; margin-top: 8px; }
details.vl-front .vl-panel-wrap { max-width: 100%; overflow-x: auto; }

/* SQL injection lab, "What just happened" (20 Nov): under the shop, each request's result in plain words. */
.sq-left { display: grid; gap: 14px; align-content: start; min-width: 0; }
.sq-explain { border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); border-left: 3px solid var(--brand); border-radius: 12px; padding: 12px 16px; background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.sq-explain h2 { margin: 0 0 4px; font-size: 0.95rem; }
.sq-explain p { margin: 0; line-height: 1.55; }

/* Careers (20 Nov, the owner: line the boxes up): every card is a column with "Start this path" pinned to its foot, so the
   buttons sit level across a row; one short label instead of "Start the path to <job>", which wrapped. */
.path.career-card { display: flex; flex-direction: column; gap: 10px; }
.path.career-card h3, .path.career-card h4, .path.career-card p, .path.career-card ul { margin: 0; }
.career-go { margin-top: auto; align-self: flex-start; }
.path.career-card > .row:last-of-type { margin-bottom: 8px; }

/* CVE Radar "What to patch first" (20 Nov): one status colour (exploited) over a neutral mass; position shows the rest. */
.cvc-panel { display: grid; gap: 10px; }
.cvc-head h2 { margin: 0 0 4px; font-size: 1.1rem; }
.cvc-head p { margin: 0; font-size: 0.92rem; max-width: 80ch; }
.cvc-red { color: var(--exploited); }
.cvc-wrap { position: relative; }
.cvc { display: block; width: 100%; height: auto; overflow: visible; }
.cvc-hot { fill: color-mix(in srgb, var(--exploited) 7%, transparent); }
.cvc-grid { stroke: var(--line); stroke-width: 1; }
.cvc-th { stroke: color-mix(in srgb, var(--ink) 35%, transparent); stroke-width: 1; stroke-dasharray: 4 4; }
.cvc-tick, .cvc-th-l, .cvc-axis { fill: var(--muted); font: 500 11px var(--font-mono); }
.cvc-axis { font: 500 12px var(--font-body); }
.cvc-zone { fill: var(--exploited); font: 700 13px var(--font-body); }
.cvc-zone.dim { fill: var(--muted); font-weight: 600; }
.cvc-dot { fill: var(--other); opacity: 0.38; }
.cvc-kev { fill: var(--exploited); stroke: var(--surface); stroke-width: 2; cursor: pointer; }
.cvc .on { opacity: 1; stroke: var(--ink); stroke-width: 2; }
.cvc-kev:focus-visible { outline: none; stroke: var(--ink); stroke-width: 3; }
.cvc-tip { position: absolute; z-index: 3; max-width: 300px; display: grid; gap: 3px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--elev); font-size: 0.82rem; pointer-events: none; }
.cvc-tip span { color: var(--muted); }
.cvc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 0.85rem; }
.cvc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.cvc-k { background: var(--exploited); } .cvc-o { background: var(--other); opacity: 0.6; }
@media (max-width: 600px) { .cvc-tick, .cvc-th-l { font-size: 15px; } .cvc-axis { font-size: 16px; } .cvc-zone { font-size: 17px; } }
/* Labels sit on a halo of the surface colour, so the dashed threshold lines pass behind them, not through them. */
.cvc-th-l, .cvc-zone, .cvc-tick { paint-order: stroke; stroke: var(--cvc-halo); stroke-width: 7px; stroke-linejoin: round; }
@media (max-width: 600px) { .cvc-axis[transform] { display: none; } }
.cvc-panel { --cvc-halo: #0C121B; }
:root[data-theme="light"] .cvc-panel { --cvc-halo: #FBFCFE; }

/* Headings in the home page's calm style (20 Nov, Pass B): page, lesson and lab titles and section headings in mixed case,
   without the amber "> " prompt, which competed with the cyan accent. The eyebrows above titles keep their small caps. */
.view-head h1 { text-transform: none; letter-spacing: -0.01em; font-weight: 700; }
.view-head h1::before { content: none; }
.article h1 { text-transform: none; letter-spacing: -0.01em; }
.cat-h { text-transform: none; letter-spacing: 0; font-size: 1.15rem; }
/* One accent (20 Nov, Pass B): the rank badge and the panel-title markers use the cyan brand colour; amber stays for
   warnings and the PATCH//NOTES mark. */
a.xp .lvl, .xp .lvl { background: var(--brand); color: var(--brand-ink); }
.panel-title h2::before, .panel > h2::before, .dir h3::before { color: var(--brand); }
/* Risk register lab heat map (20 Nov): blind cells are plain until the scoring questions are answered. */
.lab-matrix { margin-top: 4px; }
.rm-cell.rm-blind { background: color-mix(in srgb, var(--ink) 5%, transparent); }


/* Module 1: interactive desktop PC anatomy. The cutaway is a teaching model; the selected part
   and its explanation stay together on desktop and stack cleanly on a phone. */
.xpl-computer { display: grid; gap: 14px; }
.xpl-computer .xpl-head { display: grid; gap: 5px; }
.xpl-computer .xpl-head > b { font: 700 1.15rem var(--font-display); color: var(--ink); }
.xpl-computer .xpl-head p { margin: 0; font-size: .88rem; }
.pc-tabs { gap: 8px; }
.pc-tabs .chip[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); background: rgba(var(--brand-rgb), .1); }
.pc-explore { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.pc-visual { grid-column: 1 / -1; align-self: start; min-width: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: #070b10; overflow: hidden; }
.pc-shot { position: relative; line-height: 0; }
.pc-shot img { display: block; width: 100%; height: auto; }
.pc-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.pc-lines line { stroke: rgba(255, 255, 255, .8); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pc-lines line.on { stroke: var(--brand); stroke-width: 2.5; }
.pc-shot:has(.on) .pc-lines line:not(.on) { opacity: .28; }
.pc-dot { position: absolute; z-index: 1; transform: translate(-50%, -50%); width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: var(--brand); cursor: pointer; }
.pc-dot.on { box-shadow: 0 0 0 5px rgba(var(--brand-rgb), .35); }
.pc-shot:has(.on) .pc-dot:not(.on) { opacity: .4; }
.pc-pin { position: absolute; z-index: 2; transform: translate(-50%, -50%); width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid var(--brand); background: #0c141c; color: #fff; cursor: pointer; }
.pc-pin span { font: 700 .72rem var(--font-mono); }
.pc-pin.on, .pc-pin:focus-visible { background: var(--brand); color: var(--brand-ink); outline: none; }
.pc-shot:has(.on) .pc-pin:not(.on) { opacity: .55; }
.pc-kicker { display: flex; justify-content: space-between; gap: 8px; }
.pc-kicker .eyebrow { white-space: nowrap; }
.pc-hot { cursor: pointer; outline: none; }
.pc-hot circle { fill: var(--surface); stroke: var(--brand); stroke-width: 2.5; }
.pc-hot text { fill: var(--ink); font: 700 14px var(--font-mono); text-anchor: middle; pointer-events: none; }
.pc-hot.on circle, .pc-hot:focus-visible circle { fill: var(--brand); stroke: var(--ink); stroke-width: 3; filter: drop-shadow(0 0 7px rgba(var(--brand-rgb), .7)); }
.pc-hot.on text, .pc-hot:focus-visible text { fill: var(--brand-ink, #04121a); }
.pc-detail { min-width: 0; display: grid; align-content: start; gap: 9px; padding: 16px; border: 1px solid rgba(var(--brand-rgb), .35); border-radius: 14px; background: var(--surface); }
.pc-detail h3, .pc-boot-detail h3 { margin: 0; font: 700 1.25rem var(--font-display); }
.pc-detail > p, .pc-fact p, .pc-fault p, .pc-boot-detail p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.pc-fact, .pc-fault { display: grid; gap: 3px; padding-top: 8px; border-top: 1px solid var(--line); }
.pc-fact b, .pc-fault b { font: 600 .72rem var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--brand); }
.pc-fault b { color: var(--sun); }
.pc-part-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.pc-part { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 1px 8px; align-items: center; min-width: 0; padding: 8px 10px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.pc-part > span { grid-row: span 2; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font: 700 .68rem var(--font-mono); }
.pc-part b { overflow-wrap: anywhere; font-size: .82rem; }
.pc-part small { color: var(--muted); font-size: .7rem; line-height: 1.25; }
.pc-part.on { border-color: var(--brand); background: rgba(var(--brand-rgb), .08); }
.pc-part.on > span { border-color: var(--brand); color: var(--brand); }
.pc-build, .pc-startup { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.pc-question, .pc-boot { display: grid; gap: 14px; }
.pc-question h3 { margin: 0; font-size: 1.1rem; }
.pc-options { display: grid; gap: 8px; }
.pc-option { width: 100%; min-height: 44px; padding: 10px 12px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.pc-option:hover:not(:disabled) { border-color: var(--brand); }
.pc-option.correct { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--surface)); }
.pc-option.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.pc-option:disabled { cursor: default; opacity: 1; }
.pc-feedback { min-height: 44px; padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--surface); color: var(--muted); font-size: .88rem; }
.pc-boot-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.pc-boot-steps button { width: 100%; height: 100%; min-height: 64px; display: grid; justify-items: start; align-content: start; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); text-align: left; font-size: .72rem; cursor: pointer; }
.pc-boot-steps button span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; font: 700 .68rem var(--font-mono); }
.pc-boot-steps button[aria-current="step"] { border-color: var(--brand); color: var(--ink); background: rgba(var(--brand-rgb), .1); }
.pc-boot-steps button[aria-current="step"] span { border-color: var(--brand); color: var(--brand); }
.pc-boot-detail { display: grid; gap: 7px; padding: 16px; border: 1px solid rgba(var(--brand-rgb), .35); border-radius: 12px; background: var(--surface); }
.pc-boot-detail .eyebrow { color: var(--brand); }
.pc-explore[hidden], .pc-startup[hidden], .pc-build[hidden] { display: none !important; }
@media (min-width: 860px) {
  .pc-explore { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
  .pc-visual { grid-column: 1 / -1; }
  .pc-part-list { grid-column: 1; }
  .pc-detail { grid-column: 2; }
}
@media (max-width: 859px) {
  .pc-visual { max-width: 720px; width: 100%; margin-inline: auto; }
  .pc-detail { min-height: 0; }
}
@media (max-width: 560px) {
  .pc-part-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .pc-part { padding: 7px; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 6px; }
  .pc-part > span { width: 21px; height: 21px; }
  .pc-part b { font-size: .76rem; }
  .pc-part small { font-size: .66rem; }
  .pc-build, .pc-startup { padding: 12px; }
  .pc-boot-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


.pc-peripherals { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.pc-peripherals h3 { margin: 3px 0 0; font: 700 1rem var(--font-display); }
.pc-peripherals p { margin: 5px 0 0; font-size: .84rem; }
.pc-peripheral-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pc-peripheral-grid article { display: grid; align-content: start; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pc-peripheral-grid b { font-size: .82rem; color: var(--ink); }
.pc-peripheral-grid span { color: var(--muted); font-size: .75rem; line-height: 1.45; }
@media (max-width: 760px) { .pc-peripheral-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pc-build-layout { display: grid; grid-template-columns: minmax(180px, .75fr) minmax(0, 1.25fr); gap: 14px; }
.pc-tray, .pc-slots { display: grid; align-content: start; gap: 8px; }
.pc-tray > b, .pc-slots > b { color: var(--ink); font-size: .82rem; }
.pc-option.selected { border-color: var(--brand); background: rgba(var(--brand-rgb), .1); color: var(--brand); }
.pc-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pc-slot { display: grid; gap: 6px; min-height: 82px; padding: 10px; text-align: left; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.pc-slot .eyebrow { color: var(--muted); font-size: .64rem; }
.pc-slot b { font-size: .82rem; }
.pc-slot.filled { border-style: solid; border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--surface)); cursor: default; }
.pc-build-success { padding: 12px; border: 1px solid var(--good); border-radius: 10px; background: color-mix(in srgb, var(--good) 10%, var(--surface)); color: var(--ink); }
.pc-build-success p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; }
@media (max-width: 560px) { .pc-build-layout { grid-template-columns: minmax(0, 1fr); } .pc-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Module 1: make the hardware-to-software relationship a clear teaching layer. */
.pc-system-layers { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.pc-system-layers h3 { margin: 3px 0 0; font: 700 1rem var(--font-display); }
.pc-system-layers > div:first-child p { margin: 5px 0 0; font-size: .84rem; }
.pc-system-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pc-system-grid article { display: grid; align-content: start; gap: 7px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pc-system-grid b { color: var(--brand); font: 700 .8rem var(--font-display); }
.pc-system-grid strong { font-size: .78rem; line-height: 1.35; }
.pc-system-grid span, .pc-system-grid p { margin: 0; color: var(--muted); font-size: .73rem; line-height: 1.45; }
@media (max-width: 900px) { .pc-system-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pc-system-layers { padding: 12px; } .pc-system-grid { grid-template-columns: minmax(0, 1fr); } .pc-system-grid article { padding: 10px; } }


/* BUILD: interactive workshop index */
.build-view { gap: 22px; }
.build-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.build-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-bg); display: grid; grid-template-rows: auto 1fr; }
.build-card.is-ready { border-color: rgba(var(--brand-rgb), .45); }
.build-card-media { position: relative; height: 180px; overflow: hidden; background: var(--slab); }
.build-card-media::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(7,10,16,.8)); pointer-events: none; }
.build-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .82; }
.build-card-number, .build-state { position: absolute; z-index: 1; top: 12px; font: 600 .68rem var(--font-mono); letter-spacing: .08em; }
.build-card-number { left: 14px; color: #fff; }
.build-state { right: 12px; padding: 5px 8px; border-radius: 4px; color: var(--brand); background: rgba(7,10,16,.88); border: 1px solid rgba(var(--brand-rgb),.35); }
.is-planned .build-state { color: var(--muted); border-color: var(--line); }
.build-card-body { padding: 18px; display: grid; align-content: start; gap: 10px; }
.build-card-body h2 { font-size: 1.25rem; }
.build-card-body > p:not(.eyebrow) { color: var(--muted); font-size: .92rem; }
.build-meta { border-top: 1px solid var(--line); padding-top: 10px; color: var(--muted); font: .72rem var(--font-mono); }
.build-card-body .btn { justify-self: start; margin-top: 4px; }
.build-soon { justify-self: start; color: var(--muted); font: .76rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 680px) { .build-grid { grid-template-columns: minmax(0,1fr); } .build-card-media { height: 160px; } }

/* Python workshop */
.py-runtime{display:flex;align-items:center;gap:10px;padding:12px 16px;margin:16px 0}.live-dot{width:8px;height:8px;border-radius:50%;background:var(--good)}
.py-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:16px;align-items:start}.py-lessons{padding:14px;position:sticky;top:12px}.py-lessons h2{font-size:1rem;margin:0 0 12px}
#py-topic-list{display:grid;gap:5px}.py-topic{display:grid;grid-template-columns:30px 1fr;text-align:left;gap:2px 8px;padding:10px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--ink);cursor:pointer}
.py-topic span{grid-row:span 2;color:var(--muted);font:12px monospace}.py-topic b{font-size:.88rem}.py-topic small{color:var(--muted);font-size:.72rem}.py-topic.active{background:var(--brand-soft);border-color:var(--brand)}
.py-main{min-width:0}.py-explain,.py-editor-panel,.py-task{padding:18px}.py-explain h2{margin:5px 0}.py-explain p{color:var(--muted)}.py-example{background:var(--slab);border-left:2px solid var(--brand);padding:12px;border-radius:4px;font-family:monospace}
.py-editor-head{justify-content:space-between;align-items:center;margin-bottom:12px}.py-editor-head h3{margin:3px 0}.py-editor-panel textarea{width:100%;min-height:260px;resize:vertical;background:#05080D;color:#DCE6F2;border:1px solid var(--line);border-radius:8px;padding:16px;font:14px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:4;white-space:pre;overflow:auto}
.py-console-head{display:flex;justify-content:space-between;align-items:center;margin:14px 0 8px;font:11px monospace;color:var(--muted)}
#py-output{background:#05080D;color:#BFE9D5;border:1px solid var(--line);border-radius:8px;padding:14px;min-height:100px;max-height:260px;overflow:auto;white-space:pre-wrap;font:13px/1.6 ui-monospace,monospace}
#py-input-wrap{margin-top:12px}#py-input-wrap label{display:block;margin-bottom:6px}.py-task h3{margin:6px 0}.py-footnote{font-size:.8rem;margin-top:16px}
@media(max-width:760px){.py-layout{grid-template-columns:1fr}.py-lessons{position:static}#py-topic-list{display:flex;overflow:auto;padding-bottom:8px}.py-topic{min-width:145px}.py-editor-head{align-items:flex-start;flex-direction:column}}

/* Python editor: CodeMirror gives the workshop syntax colours, line numbers and matching brackets. */
.py-editor-panel .CodeMirror{height:auto;min-height:280px;max-height:560px;border:1px solid var(--line);border-radius:9px;background:#05080D;color:#DCE6F2;font:14px/1.65 var(--font-mono);text-align:left}
.py-editor-panel .CodeMirror-scroll{min-height:280px;max-height:560px}
.py-editor-panel .CodeMirror-gutters{background:#090F17;border-right:1px solid #1E2A3A}
.py-editor-panel .CodeMirror-linenumber{color:#62748B;padding:0 10px 0 6px}
.py-editor-panel .CodeMirror-cursor{border-left:2px solid #3FE0E8}
.py-editor-panel .CodeMirror-selected{background:rgba(63,224,232,.18)!important}
.py-editor-panel .cm-keyword{color:#70C7FF}.py-editor-panel .cm-def{color:#FFE08A}.py-editor-panel .cm-variable{color:#DCE6F2}
.py-editor-panel .cm-string{color:#9AD7A5}.py-editor-panel .cm-number{color:#D6A8FF}.py-editor-panel .cm-comment{color:#8291A5;font-style:italic}
.py-editor-help{display:flex;justify-content:space-between;gap:10px;margin-top:8px;color:var(--muted);font:11px var(--font-mono)}
.py-editor-help kbd{font-size:10px}
@media(max-width:560px){.py-editor-help{flex-wrap:wrap}.py-editor-panel .CodeMirror,.py-editor-panel .CodeMirror-scroll{min-height:240px}}

.py-editor-panel .py-error-line{background:rgba(255,84,112,.14)!important;border-left:2px solid var(--bad)}

/* Python workshop: completed lesson markers and compact course progress. */
.py-progress{margin:0 0 16px;padding:12px;border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.02)}
.py-progress .row{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px}
.py-progress .row b{color:var(--accent,#3FE0E8);font:600 12px var(--font-mono)}
.py-progress-track{height:5px;margin-top:9px;overflow:hidden;border-radius:99px;background:#1B2633}
.py-progress-track span{display:block;width:0;height:100%;border-radius:99px;background:#3FE0E8;transition:width .25s ease}
.py-topic{position:relative;padding-right:38px!important}
.py-topic-number{display:inline-flex;align-items:center;justify-content:center;min-width:25px;height:22px;margin-right:7px;border:1px solid var(--line);border-radius:5px;font:11px var(--font-mono);color:var(--muted)}
.py-topic-status{position:absolute;right:13px;top:15px;display:grid;place-items:center;width:20px;height:20px;border:1px solid var(--line);border-radius:50%;color:var(--muted);font-size:12px}
.py-topic.completed .py-topic-status{border-color:#3FE0E8;background:rgba(63,224,232,.12);color:#3FE0E8;font-weight:700}
.py-topic.completed .py-topic-number{border-color:rgba(63,224,232,.45);color:#3FE0E8}


/* BUILD · System Builder */
.sb-view{display:grid;gap:1rem}
.sb-machine{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.15rem 1.25rem;background:linear-gradient(115deg,rgba(63,224,232,.075),transparent 58%),var(--surface)}
.sb-machine h2{margin:.15rem 0;font-size:1.45rem}
.sb-machine p{margin:.25rem 0;color:var(--muted)}
.sb-machine-state{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.2rem .5rem;font-size:.82rem}
.sb-machine-state small{grid-column:2;color:var(--muted)}
.sb-machine-state .live-dot{width:.55rem;height:.55rem;border-radius:50%;background:var(--good);box-shadow:0 0 0 4px color-mix(in srgb,var(--good) 14%,transparent)}
.sb-progress{padding:1rem 1.2rem}
.sb-progress-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.sb-progress-head .eyebrow{margin:0 0 .2rem}
.sb-progress-head strong{font-size:1.25rem;font-variant-numeric:tabular-nums;color:var(--brand)}
.sb-progress-track{height:.45rem;border-radius:999px;background:var(--line);overflow:hidden;margin-top:.8rem}
.sb-progress-track span{display:block;height:100%;width:0;border-radius:inherit;background:var(--brand);transition:width .2s ease}
.sb-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:start}
.sb-panel{padding:1rem 1.1rem;min-width:0}
.sb-panel-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.65rem}
.sb-panel-head .eyebrow{margin:0 0 .2rem}
.sb-panel-head h2{margin:0;font-size:1.15rem}
.sb-count{font:600 .65rem/1 var(--font-mono);letter-spacing:.06em;color:var(--muted);white-space:nowrap}
.sb-toggle-list{display:grid;gap:0;margin-top:.7rem}
.sb-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 0;border-top:1px solid var(--line);cursor:pointer}
.sb-toggle-row>span:first-child{display:grid;gap:.18rem}
.sb-toggle-row small,.sb-file-row small{display:block;color:var(--muted);font-size:.78rem}
.sb-toggle-row input{width:1.1rem;height:1.1rem;accent-color:var(--brand);cursor:pointer}
.sb-file-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 0;border-top:1px solid var(--line)}
.sb-file-row>div{min-width:0}
.sb-file-row label,.sb-test-controls label{display:grid;gap:.3rem;color:var(--muted);font-size:.75rem}
.sb-file-row select,.sb-test-controls select{max-width:100%;min-width:8.5rem}
.sb-test-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin:.85rem 0}
.sb-access-result{min-height:2.8rem;padding:.7rem .8rem;margin:.8rem 0 0;border:1px solid var(--line);border-radius:var(--radius-sm);color:var(--muted);font-size:.88rem}
.sb-access-result.is-allowed{border-color:color-mix(in srgb,var(--good) 45%,var(--line));color:var(--good)}
.sb-access-result.is-denied{border-color:color-mix(in srgb,var(--bad) 45%,var(--line));color:var(--bad)}
.sb-check-list{display:grid;gap:.45rem;list-style:none;padding:0;margin:.85rem 0}
.sb-check-row{display:grid;grid-template-columns:1.3rem minmax(0,1fr) auto;gap:.5rem;align-items:center;padding:.55rem .65rem;border:1px solid var(--line);border-radius:var(--radius-sm);font-size:.84rem}
.sb-check-row>b{font-size:.7rem;color:var(--muted);font-weight:600}
.sb-check-mark{color:var(--muted);font-size:1rem}
.sb-check-row.is-done{border-color:color-mix(in srgb,var(--good) 42%,var(--line));background:color-mix(in srgb,var(--good) 5%,transparent)}
.sb-check-row.is-done .sb-check-mark,.sb-check-row.is-done>b{color:var(--good)}
.sb-actions{display:flex;flex-wrap:wrap;gap:.55rem}
.sb-feedback{min-height:1.4rem;margin:.7rem 0 0;color:var(--muted);font-size:.85rem}
.sb-footnote{font-size:.78rem;margin:.1rem 0 0}
@media(max-width:760px){.sb-grid{grid-template-columns:1fr}.sb-test-controls{grid-template-columns:1fr}.sb-file-row{align-items:flex-start;flex-direction:column}.sb-file-row select{width:100%}}
@media(max-width:480px){.sb-machine{align-items:flex-start;flex-direction:column}.sb-panel{padding:.9rem}.sb-check-row{grid-template-columns:1.2rem minmax(0,1fr)}.sb-check-row>b{grid-column:2}}
@media(prefers-reduced-motion:reduce){.sb-progress-track span{transition:none}}


/* BUILD · Security Builder */
.secb-view{display:grid;gap:1rem}
.secb-machine{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.15rem 1.25rem;background:linear-gradient(115deg,rgba(255,176,0,.07),transparent 58%),var(--surface)}
.secb-machine h2{margin:.15rem 0;font-size:1.45rem}
.secb-machine p{margin:.25rem 0;color:var(--muted)}
.secb-machine-state{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.2rem .5rem;font-size:.82rem}
.secb-machine-state small{grid-column:2;color:var(--muted)}
.secb-machine-state .live-dot{width:.55rem;height:.55rem;border-radius:50%;background:var(--good);box-shadow:0 0 0 4px color-mix(in srgb,var(--good) 14%,transparent)}
.secb-progress{padding:1rem 1.2rem}
.secb-progress-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.secb-progress-head .eyebrow{margin:0 0 .2rem}
.secb-progress-head strong{font-size:1.25rem;font-variant-numeric:tabular-nums;color:var(--brand)}
.secb-progress-track{height:.45rem;border-radius:999px;background:var(--line);overflow:hidden;margin-top:.8rem}
.secb-progress-track span{display:block;height:100%;width:0;border-radius:inherit;background:var(--brand);transition:width .2s ease}
.secb-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:start}
.secb-panel{padding:1rem 1.1rem;min-width:0}
.secb-panel-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.65rem}
.secb-panel-head .eyebrow{margin:0 0 .2rem}
.secb-panel-head h2{margin:0;font-size:1.15rem}
.secb-count{font:600 .65rem/1 var(--font-mono);letter-spacing:.06em;color:var(--muted);white-space:nowrap}
.secb-control-list{display:grid;gap:0;margin-top:.7rem}
.secb-control-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 0;border-top:1px solid var(--line);cursor:pointer}
.secb-control-row>span{display:grid;gap:.18rem}
.secb-control-row small,.secb-rule-row small{display:block;color:var(--muted);font-size:.78rem}
.secb-control-row input{width:1.1rem;height:1.1rem;accent-color:var(--brand);cursor:pointer}
.secb-rule-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 0;border-top:1px solid var(--line)}
.secb-rule-row>div{min-width:0}
.secb-rule-row select{min-width:7.5rem}
.secb-traffic-label{display:grid;gap:.35rem;color:var(--muted);font-size:.78rem;margin:.85rem 0}
.secb-traffic-label select{max-width:100%}
.secb-traffic-result{min-height:2.8rem;padding:.7rem .8rem;margin:.8rem 0 0;border:1px solid var(--line);border-radius:var(--radius-sm);color:var(--muted);font-size:.88rem}
.secb-traffic-result.is-allowed{border-color:color-mix(in srgb,var(--good) 45%,var(--line));color:var(--good)}
.secb-traffic-result.is-denied{border-color:color-mix(in srgb,var(--bad) 45%,var(--line));color:var(--bad)}
.secb-check-list{display:grid;gap:.45rem;list-style:none;padding:0;margin:.85rem 0}
.secb-check-row{display:grid;grid-template-columns:1.3rem minmax(0,1fr) auto;gap:.5rem;align-items:center;padding:.55rem .65rem;border:1px solid var(--line);border-radius:var(--radius-sm);font-size:.84rem}
.secb-check-row>b{font-size:.7rem;color:var(--muted);font-weight:600}
.secb-check-mark{color:var(--muted);font-size:1rem}
.secb-check-row.is-done{border-color:color-mix(in srgb,var(--good) 42%,var(--line));background:color-mix(in srgb,var(--good) 5%,transparent)}
.secb-check-row.is-done .secb-check-mark,.secb-check-row.is-done>b{color:var(--good)}
.secb-actions{display:flex;flex-wrap:wrap;gap:.55rem}
.secb-feedback{min-height:1.4rem;margin:.7rem 0 0;color:var(--muted);font-size:.85rem}
.secb-footnote{font-size:.78rem;margin:.1rem 0 0}
@media(max-width:760px){.secb-grid{grid-template-columns:1fr}}
@media(max-width:480px){.secb-machine{align-items:flex-start;flex-direction:column}.secb-panel{padding:.9rem}.secb-check-row{grid-template-columns:1.2rem minmax(0,1fr)}.secb-check-row>b{grid-column:2}}
@media(prefers-reduced-motion:reduce){.secb-progress-track span{transition:none}}


/* Keep terminal input at iOS's 16px focus-zoom threshold on phones.
   The native keyboard remains available; this prevents Safari magnifying the whole page when a command is entered. */
@media (max-width: 600px) {
  .term-in, .term-in input { font-size: 16px; }
}

/* "No picture" fault (25 Nov): the lesson's photograph and pins; a ring marks the checked part, green if fine, red if the
   fault. Clues are a drawn status panel with the board's four diagnostic lights. */
.pcf-lab { display: grid; gap: 16px; }
.pcf-clues ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.pcf-clue { display: grid; gap: 6px; align-content: start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); border-left: 3px solid var(--good); background: var(--surface); font-size: 0.92rem; }
.pcf-clue.pcf-warn { border-left-color: var(--sun); } .pcf-clue.pcf-bad { border-left-color: var(--bad); }
.pcf-lights { display: flex; gap: 10px; flex-wrap: wrap; }
.pcf-led { display: inline-flex; align-items: center; gap: 5px; font: 600 0.72rem var(--font-mono); color: var(--muted); }
.pcf-led i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.pcf-led.lit { color: var(--ink); } .pcf-led.lit i { background: #ff8a3d; box-shadow: 0 0 8px #ff8a3d; }
.pcf-main h2 { margin: 0; }
.pcf-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pcf-side { display: grid; gap: 12px; min-width: 0; }
.pcf-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pcf-part { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 0.86rem var(--font-body); cursor: pointer; min-height: 40px; }
.pcf-part > span { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--brand); font: 700 0.72rem var(--font-mono); color: var(--brand); }
.pcf-part .pcf-mark { margin-left: auto; font-style: normal; font-weight: 700; }
.pcf-part.ok .pcf-mark::after { content: "✓"; color: var(--good); } .pcf-part.bad .pcf-mark::after { content: "!"; color: var(--bad); }
.pcf-part.on { border-color: var(--brand); background: var(--brand-soft); }
.pc-pin.tried.ok { border-color: var(--good); } .pc-pin.tried.bad { border-color: var(--bad); background: #3a0f17; }
.pcf-ring { position: absolute; z-index: 1; width: 54px; height: 54px; transform: translate(-50%, -50%); border-radius: 50%; border: 3px solid var(--good); pointer-events: none; box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.35); }
.pcf-ring.fault { border-color: #ff4d6a; box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.35), 0 0 22px #ff4d6a; }
@media (prefers-reduced-motion: no-preference) { .pcf-ring.fault { animation: pcf-pulse 1.6s ease-in-out infinite; } @keyframes pcf-pulse { 50% { box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.35), 0 0 4px #ff4d6a; } } }
.pcf-card { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); border-left: 3px solid var(--good); background: var(--surface); }
.pcf-card.fault { border-left-color: var(--bad); }
.pcf-card h3, .pcf-card p { margin: 0; }
.pcf-sum { font-weight: 600; }
@media (max-width: 860px) { .pcf-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .pcf-list { grid-template-columns: 1fr; } }

/* "Press power" experiment (26 Nov): switches for each connection, a pin turns red when its part is out, and the result
   as a status panel (power light, fans, the four diagnostic lights) over a drawn monitor. */
.pcp-toggles { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pcp-t { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.pcp-t small { display: block; color: var(--muted); font-size: 0.78rem; }
.pcp-t em { font: 600 0.72rem var(--font-mono); font-style: normal; color: var(--good); }
.pcp-t.off em { color: var(--bad); }
.pcp-sw { width: 34px; height: 20px; border-radius: 999px; background: var(--good); position: relative; }
.pcp-sw::after { content: ""; position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: right 0.15s ease; }
.pcp-t.off .pcp-sw { background: color-mix(in srgb, var(--ink) 25%, transparent); } .pcp-t.off .pcp-sw::after { right: 17px; }
.pc-pin.off { border-color: var(--bad); background: #3a0f17; }
.pcp-out { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.pcp-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.pcp-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.pcp-ind { display: inline-flex; align-items: center; gap: 6px; font: 600 0.78rem var(--font-mono); color: var(--muted); }
.pcp-ind::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.pcp-ind.lit { color: var(--ink); } .pcp-ind.lit::before { background: var(--good); box-shadow: 0 0 8px var(--good); }
.pcp-mon { aspect-ratio: 16 / 7; border-radius: 8px; border: 6px solid #1b222b; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 6px 10px; text-align: center; overflow-wrap: anywhere; font: 600 0.86rem var(--font-body); }
.pcp-mon.off { background: #000; color: #8a95a5; } .pcp-mon.off span { padding: 4px 10px; border: 1px solid #3a4452; border-radius: 4px; }
.pcp-mon.fw { background: #050a14; color: #d7dde6; font: 500 0.8rem var(--font-mono); }
.pcp-mon.on { background: linear-gradient(135deg, #0b3a5c, #12577a); color: #fff; }
.pcp-say { margin: 0; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .pcp-sw::after { transition: none; } }
/* Python workshop help (26 Nov): hint, shape, then the answer on screen. */
.py-help { display: grid; gap: 8px; }
.py-help:empty { display: none; }
.py-help p { margin: 0; }
.py-help-code { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--slab); color: var(--slab-ink); border: 1px solid var(--line); font: 0.88rem/1.5 var(--font-mono); white-space: pre; overflow-x: auto; }
.py-help .btn { justify-self: start; }
/* One strong action per screen (26 Nov, the owner): the filled cyan button. Card action lines and the "← back" links
   were cyan too, so every screen had a dozen cyan bits and nothing stood out. They now rest in ink (muted for back
   links) and turn cyan on hover or focus. Links inside text stay cyan. */
.start-cta, .how-go { color: var(--ink); transition: color 0.15s ease; }
a:hover .start-cta, a:focus-visible .start-cta, a:hover .how-go, a:focus-visible .how-go { color: var(--brand); }
:is(.view, .view-head, .article) > a.link-btn:first-child { color: var(--muted); transition: color 0.15s ease; }
:is(.view, .view-head, .article) > a.link-btn:first-child:hover, :is(.view, .view-head, .article) > a.link-btn:first-child:focus-visible { color: var(--brand); }
@media (prefers-reduced-motion: reduce) { .start-cta, .how-go, :is(.view, .view-head, .article) > a.link-btn:first-child { transition: none; } }
/* Tool-path stop cards: the tool card's prompt screen, filling the picture slot (07-labs toolArt). */
.card-art.tool-art { display: block; height: auto; aspect-ratio: 2 / 1; padding: 14px 14px 0; background: var(--surface-2); }
.card-art.tool-art .tool-screen { width: 100%; height: 100%; align-content: start; border-radius: 10px 10px 0 0; }
.card-art.tool-art .ps { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Exam objectives (26 Nov): a long activity list folds to one line, so a domain reads as objectives, not a wall of chips. */
.cert-fold > summary { cursor: pointer; width: fit-content; font: 600 0.82rem var(--font-mono); color: var(--muted); padding: 2px 0; }
.cert-fold > summary:hover, .cert-fold[open] > summary { color: var(--ink); }
.cert-fold > .cert-acts { margin-top: 8px; }
/* Practise (26 Nov): categories after the first three fold to one row each under "All". */
.pr-fold { border-top: 1px solid var(--line); }
.pr-fold > summary { display: flex; align-items: center; gap: 12px; padding: 14px 2px; cursor: pointer; list-style: none; }
.pr-fold > summary::-webkit-details-marker { display: none; }
.pr-fold > summary::before { content: "›"; font: 700 1.1rem var(--font-mono); color: var(--muted); transition: transform 0.15s ease; }
.pr-fold[open] > summary::before { transform: rotate(90deg); }
.pr-fold > summary .cat-h { margin: 0; }
.pr-fold > summary .cat-h::after { display: none; }
.pr-fold-n { margin-left: auto; font: 600 0.78rem var(--font-mono); color: var(--muted); }
.pr-fold > summary:hover .cat-h, .pr-fold > summary:hover::before { color: var(--brand); }
.pr-fold[open] { padding-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .pr-fold > summary::before { transition: none; } }
/* Build: the Python workshop's card shows its prompt, like the tool cards (no photo of a script exists). */
.build-card-media .build-prompt { position: absolute; inset: 40px 18px 0; min-height: 0; border-radius: 10px 10px 0 0; align-content: start; }
/* Learn's map (26 Nov): the page's live top, like the home hero. One stop per topic area on a route line, a dot per
   lesson (filled when done, ringed for the next one); a stop filters the lessons below. */
.lmap { position: relative; display: grid; gap: 18px; padding: 22px 22px 24px; border-radius: 22px; border: 1px solid var(--line); overflow: hidden;
  background: radial-gradient(70% 120% at 85% -10%, rgba(var(--brand-rgb), 0.14), transparent 60%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.lmap-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.lmap-head h2 { margin: 0; font: 700 1.5rem/1.2 var(--font-display); }
.lmap-head p { margin: 4px 0 0; }
.lmap-route { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.lmap-route::before { content: ""; position: absolute; left: 24px; right: 24px; top: 27px; height: 2px; background: linear-gradient(90deg, rgba(var(--brand-rgb), 0.5), color-mix(in srgb, var(--line) 80%, transparent)); }
.lmap-stop { position: relative; width: 100%; height: 100%; display: grid; gap: 6px; justify-items: start; text-align: left; padding: 14px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink); font: inherit; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.lmap-stop::before { content: ""; position: absolute; top: 9px; right: 12px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.lmap-stop.full::before { background: var(--good); border-color: var(--good); }
.lmap-stop b { font: 700 1rem/1.25 var(--font-display); padding-right: 16px; }
.lmap-n { font: 600 0.74rem var(--font-mono); color: var(--muted); }
.lmap-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.lmap-dots i { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.lmap-dots i.on { background: var(--brand); box-shadow: 0 0 6px rgba(var(--brand-rgb), 0.6); }
.lmap-dots i.next { background: transparent; box-shadow: 0 0 0 2px var(--brand); }
.lmap-stop:hover, .lmap-stop:focus-visible { border-color: var(--brand); box-shadow: 0 10px 26px -14px rgba(var(--brand-rgb), 0.6); }
.lmap-stop[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
@media (prefers-reduced-motion: no-preference) { .lmap-stop:hover { transform: translateY(-2px); } }
@media (max-width: 640px) { .lmap-route { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lmap-route::before { display: none; } .lmap-head .btn { width: 100%; text-align: center; } }
/* The bar above the lesson grid: heading, level filter and view toggle together. */
.lessons-bar { align-items: center; gap: 10px 16px; justify-content: flex-start; }
.lessons-bar .cat-h { flex: 1 1 auto; margin: 0; }
.lessons-bar .level-filter { margin: 0; }
/* Featured card: the next lesson to do in each section is shown wide, marked "Up next". */
.lcard .lfeat { position: absolute; top: 10px; left: 10px; z-index: 1; font: 700 0.68rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand); background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--brand); border-radius: var(--radius-sm); padding: 3px 8px; }
@media (min-width: 720px) { .lessons .lcard.feature { grid-column: span 2; } .lessons .lcard.feature h3 { font-size: 1.3rem; } }
.lmap-stop[aria-pressed="true"] .lmap-n { color: var(--ink); }  /* the tinted background drops muted text under 4.5:1 */
/* Narrow screens (26 Nov): a fade on whichever side of the tab row has more tabs out of view (09-shell tabEdges). */
@media (max-width: 999px) {
  .mast-inner .tabs-inner.more-right { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .mast-inner .tabs-inner.more-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%); mask-image: linear-gradient(90deg, transparent, #000 18%); }
  .mast-inner .tabs-inner.more-left.more-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
}
/* Phones: Patch slides out of the way while reading downwards (09-shell), back on a scroll up. */
.pn-companion { transition: transform 0.25s ease, opacity 0.25s ease; }
.pn-companion.pn-tucked { transform: translateY(140%); opacity: 0; pointer-events: none; }
.pn-companion.pn-tucked * { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .pn-companion { transition: none; } }
/* News on phones (26 Nov): the 17 topic chips took a screen and a half before the first story. One row that scrolls
   sideways instead, with a fade at the right edge to show there are more. */
@media (max-width: 600px) {
  #ntopics { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-inline: -16px; padding-inline: 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  #ntopics::-webkit-scrollbar { display: none; }
  #ntopics .chip { flex: 0 0 auto; }
}
/* Practise's live top (27 Nov): one activity shown large, its own card laid out wide (picture left, words right). */
.pr-feature { display: grid; gap: 10px; }
.pr-feature > .eyebrow { margin: 0; color: var(--brand); }
.pr-feature .lcard { padding-bottom: 20px; }
.pr-feature .lcard h3 { font-size: 1.45rem; }
.pr-feature .pr-feature-go { margin-top: 8px; color: var(--brand); font-size: 0.95rem; }
@media (min-width: 760px) {
  .pr-feature .lcard { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 28px; align-content: center; padding: 0 28px 0 0; }
  .pr-feature .lcard > .card-art { grid-column: 1; grid-row: 1 / span 6; margin: 0; height: 100%; min-height: 260px; aspect-ratio: auto; }
  .pr-feature .lcard > .card-art .card-img { height: 100%; }
  .pr-feature .lcard > :not(.card-art):not(.done) { grid-column: 2; }
  .pr-feature .lcard > .eyebrow { margin-top: 28px; }
  .pr-feature .lcard > .pr-feature-go { margin-bottom: 28px; }
}
/* Exams' live top (27 Nov): a readiness dial per exam (06-learn examDial). */
.xdials { display: grid; gap: 14px; padding: 20px 22px; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(70% 120% at 85% -10%, rgba(var(--brand-rgb), 0.12), transparent 60%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.xdials h2 { margin: 0; font: 700 1.3rem var(--font-display); }
.xdials-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.xdial { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 16px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); transition: border-color 0.15s ease, transform 0.15s ease; }
.xdial:hover, .xdial:focus-visible { border-color: var(--brand); }
@media (prefers-reduced-motion: no-preference) { .xdial:hover { transform: translateY(-2px); } }
.xdial svg { width: 76px; height: 76px; }
.xd-trk { fill: none; stroke: color-mix(in srgb, var(--ink) 14%, transparent); stroke-width: 7; }
.xd-val { fill: none; stroke: var(--brand); stroke-width: 7; stroke-linecap: round; }
.xdial text { fill: var(--ink); font: 700 15px var(--font-mono); }
.xdial b { font: 700 1rem var(--font-display); }
.xdial span { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 600px) { .xdials { padding: 16px; } .xdials-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .xdial { padding: 10px 6px; } .xdial svg { width: 56px; height: 56px; } .xdial .xd-objs { display: none; } }
/* Learn on phones (27 Nov): 33 lesson cards one per row ran to ~16,000 px. Two per row with the short line hidden;
   the "Up next" card stays full width with its line, so each section still has a focal point. */
@media (max-width: 600px) {
  #lgrid .lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #lgrid .lcard:not(.feature) { padding: 0 10px 10px; gap: 4px; }
  #lgrid .lcard:not(.feature) > .card-art { margin-inline: -10px; }
  #lgrid .lcard:not(.feature) h3 { font-size: 0.95rem; line-height: 1.25; }
  #lgrid .lcard:not(.feature) > p { display: none; }
  #lgrid .lcard:not(.feature) .lmeta { font-size: 0.7rem; }
  #lgrid .lcard.feature { grid-column: 1 / -1; }
  #lgrid .lcard .done { top: 6px; right: 6px; font-size: 0.62rem; padding: 2px 6px; }
}

/* Bits on the wire (static/js/labs/bits.js): a word crossing a cable as ones and zeros, then a byte built by hand. */
.bw-lab { display: grid; gap: 18px; }
.bw-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bw-form label { font-weight: 600; }
.bw-form input { flex: 1 1 160px; min-width: 0; font: 600 1.1rem var(--font-mono); padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.bw-bad { color: var(--sun); font-size: 0.88rem; margin: 6px 0 0; }
.bw-stage { display: grid; gap: 6px; margin-top: 10px; }
.bw-wire { width: 100%; height: auto; display: block; overflow: visible; }
.bw-cable { fill: none; stroke: var(--dg-strong); stroke-width: 6; stroke-linecap: round; }
.bw-cable-shadow { fill: none; stroke: rgba(var(--brand-rgb), 0.12); stroke-width: 16; stroke-linecap: round; }
.bw-bit rect { stroke-width: 1.5; }
.bw-bit text { font: 700 13px var(--font-mono); text-anchor: middle; }
.bw-bit.one rect { fill: var(--brand); stroke: var(--brand); filter: drop-shadow(0 0 6px rgba(var(--brand-rgb), 0.7)); }
.bw-bit.one text { fill: var(--brand-ink); }
.bw-bit.zero rect { fill: var(--surface-2); stroke: var(--dg-strong); }
.bw-bit.zero text { fill: var(--muted); }
.bw-now { min-height: 96px; }
.bw-now-h { display: flex; gap: 10px; align-items: baseline; font-family: var(--font-mono); }
.bw-now-h b { font-size: 1.4rem; color: var(--brand); }
.bw-now-h span { color: var(--muted); font-size: 0.85rem; }
.bw-sig { width: 100%; max-width: 420px; height: auto; display: block; overflow: visible; }
.bw-sig-base { stroke: var(--line); stroke-dasharray: 3 4; }
.bw-sig-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; }
.bw-cell { fill: transparent; stroke: var(--line); stroke-width: 0.6; transition: fill 0.2s; }
.bw-cell.gone { fill: rgba(var(--brand-rgb), 0.1); }
.bw-cell-t { font: 600 10px var(--font-mono); fill: var(--muted); text-anchor: middle; }
.bw-ends { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; margin-top: 8px; }
.bw-ends h3 { font-size: 0.9rem; margin: 0 0 8px; color: var(--muted); font-weight: 600; }
.bw-tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.bw-tbl th, .bw-tbl td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.bw-tbl th { color: var(--muted); font-weight: 600; font-size: 0.78rem; }
.bw-tbl tr.now td { background: rgba(var(--brand-rgb), 0.1); color: var(--ink); }
.bw-recv { font: 700 1.8rem var(--font-mono); min-height: 2.4rem; color: var(--ink); word-break: break-all; }
.bw-recv .muted { font: 400 0.95rem var(--font-body); }
.bw-recv.bw-popped .bw-rtext { animation: bw-pop 0.35s ease-out; }
.bw-rbyte { font-size: 1rem; color: var(--brand); letter-spacing: 0.12em; min-height: 1.4em; }
@keyframes bw-pop { from { text-shadow: 0 0 14px rgba(var(--brand-rgb), 0.9); } to { text-shadow: none; } }
.bw-switches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; max-width: 520px; margin: 10px 0 14px; }
.bw-sw { display: grid; justify-items: center; gap: 4px; padding: 8px 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font: inherit; }
.bw-sw small { font: 600 0.72rem var(--font-mono); }
.bw-sw b { font: 700 1.3rem var(--font-mono); }
.bw-sw.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); box-shadow: 0 0 12px rgba(var(--brand-rgb), 0.25); }
.bw-sw:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.bw-nib { display: flex; gap: 10px; margin-bottom: 12px; }
.bw-nib span { display: grid; justify-items: center; gap: 2px; padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.bw-nib b { font-size: 1.1rem; letter-spacing: 0.1em; }
.bw-nib i { font: 700 1.2rem var(--font-mono); font-style: normal; color: var(--sun); }
.bw-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.bw-dl div { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.bw-dl dt { font-size: 0.75rem; color: var(--muted); }
.bw-dl dd { margin: 2px 0 0; font: 700 1.3rem var(--font-mono); color: var(--ink); }
.bw-dl dd small { display: block; font: 400 0.76rem var(--font-body); color: var(--muted); margin-top: 3px; }
@media (max-width: 640px) {
  .bw-ends, .bw-dl { grid-template-columns: minmax(0, 1fr); }
  .bw-sw b { font-size: 1.05rem; }
  .bw-sw small { font-size: 0.62rem; }
}

/* Man in the middle (static/js/labs/mitm.js): frames on the wires, live ARP caches, arp -a to read. */
.mm-lab { display: grid; gap: 18px; }
.mm-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.mm-net { width: 100%; height: auto; display: block; overflow: visible; }
.mm-wire { fill: none; stroke: var(--dg-strong); stroke-width: 4; stroke-linecap: round; }
.mm-rev { fill: none; stroke: none; }
.mm-chip rect { fill: var(--brand); stroke: var(--brand); }
.mm-chip text { font: 700 10px var(--font-mono); fill: var(--brand-ink); text-anchor: middle; }
.mm-chip.back rect { fill: var(--good); stroke: var(--good); }
.mm-chip.arp rect { fill: var(--sun); stroke: var(--sun); }
.mm-chip.arp text { fill: var(--sun-ink); }
.mm-chip.dropped rect { fill: var(--bad); stroke: var(--bad); }
.mm-chip.dropped text { fill: #fff; }
.mm-chip { filter: drop-shadow(0 0 5px rgba(var(--brand-rgb), 0.55)); }
.mm-shield circle { fill: var(--surface-2); stroke: var(--faint); stroke-width: 1.5; }
.mm-shield text { font: 700 7px var(--font-mono); fill: var(--muted); text-anchor: middle; }
.mm-shield.on circle { fill: var(--good-tint); stroke: var(--good); }
.mm-shield.on text { fill: var(--good); }
.mm-attacker { transition: filter 0.3s; }
.mm-attacker.lurk { filter: drop-shadow(0 0 8px rgba(var(--bad-rgb), 0.55)); }
.mm-attacker.seen { filter: drop-shadow(0 0 14px rgba(var(--bad-rgb), 0.95)); }
.mm-side { display: grid; gap: 12px; }
.mm-ctl { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.mm-ctl h3 { margin: 0 0 8px; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.mm-ctl.mm-bad { border-left: 3px solid var(--bad); }
.mm-ctl.mm-good { border-left: 3px solid var(--good); }
.mm-tog { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 600 0.82rem var(--font-body); cursor: pointer; }
.mm-tog em { font: 700 0.72rem var(--font-mono); font-style: normal; color: var(--muted); }
.mm-tog.on { border-color: var(--brand); }
.mm-tog.on em { color: var(--brand); }
.mm-tog:disabled { opacity: 0.6; cursor: default; }
.mm-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.mm-table h3 { margin: 0 0 6px; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.mm-table table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.mm-table th, .mm-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mm-table th { font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.mm-table small { display: block; font: 400 0.74rem var(--font-body); color: var(--muted); }
.mm-table tr.bad td { background: var(--bad-tint); color: var(--ink); }
.mm-table tr.bad small { color: var(--bad); font-weight: 600; }
.mm-table tr.changed td { animation: mm-flash 1s ease-out; }
@keyframes mm-flash { from { box-shadow: inset 0 0 0 2px var(--sun); } to { box-shadow: none; } }
.mm-log p { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; }
.mm-log p.bad { border-color: var(--bad); }
.mm-log p.good { border-color: var(--good); }
.mm-arp { margin-top: 14px; }
.mm-arp-q { font-weight: 600; margin: 0 0 8px; }
.mm-term { background: var(--slab); color: var(--slab-ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 0; overflow-x: auto; }
.mm-term-l { display: block; width: 100%; min-width: max-content; padding: 1px 12px; font: 0.82rem/1.5 var(--font-mono); white-space: pre; text-align: left; background: none; border: 0; color: inherit; }
button.mm-row { cursor: pointer; }
button.mm-row:hover, button.mm-row:focus-visible { background: rgba(var(--brand-rgb), 0.12); outline: none; box-shadow: inset 3px 0 0 var(--brand); }
button.mm-row.right { background: var(--good-tint); box-shadow: inset 3px 0 0 var(--good); }
button.mm-row.wrong { background: var(--bad-tint); box-shadow: inset 3px 0 0 var(--bad); }
.mm-note { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-size: 0.88rem; }
.mm-note.good { border-color: var(--good); }
@media (max-width: 860px) { .mm-grid, .mm-tables { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .mm-net .tap-lbl { font-size: 21px; }
  .mm-term-l { font-size: 2.3vw; padding: 1px 6px; }
}

/* Hold the door: SYN flood (static/js/labs/synflood.js): SYNs on the wires, the half-open queue as cells, a 40 s history. */
.sf-lab { display: grid; gap: 18px; }
.sf-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.sf-net { width: 100%; height: auto; display: block; overflow: visible; }
.sf-wire { fill: none; stroke: var(--dg-strong); stroke-width: 3.5; stroke-linecap: round; }
.sf-wire.bad { stroke: rgba(var(--bad-rgb), 0.45); }
.sf-chip rect { fill: var(--brand); }
.sf-chip text { font: 700 8.5px var(--font-mono); fill: var(--brand-ink); text-anchor: middle; }
.sf-chip.spoof rect { fill: var(--sun); }
.sf-chip.spoof text { fill: var(--sun-ink); }
.sf-chip.refused rect { fill: var(--bad); }
.sf-chip.refused text { fill: #fff; }
.sf-side { display: grid; gap: 12px; }
.sf-q-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 0.88rem; }
.sf-q-h .mono { color: var(--muted); }
.sf-cells { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.sf-cells i { aspect-ratio: 1; border-radius: 2px; background: var(--surface-2); transition: background 0.15s; }
.sf-cells i.on { background: var(--sun); }
.sf-cells.full { border-color: var(--bad); box-shadow: 0 0 14px rgba(var(--bad-rgb), 0.3); }
.sf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sf-stats div { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.sf-stats span { display: block; font-size: 0.72rem; color: var(--muted); }
.sf-stats b { font: 700 1.25rem var(--font-mono); }
.sf-hist { display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 2px; height: 26px; align-items: end; }
.sf-hist i { height: 6px; border-radius: 1px; background: var(--surface-2); }
.sf-hist i.ok { height: 100%; background: var(--good); }
.sf-hist i.cookie { height: 100%; background: var(--brand); }
.sf-hist i.bad { height: 100%; background: var(--bad); }
.sf-ctl { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: end; margin-top: 16px; }
.sf-pick > span { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 5px; }
.sf-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.sf-seg button { padding: 7px 11px; background: var(--surface); color: var(--ink); border: 0; border-right: 1px solid var(--line); font: 600 0.8rem var(--font-body); cursor: pointer; }
.sf-seg button:last-child { border-right: 0; }
.sf-seg button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.sf-seg button:disabled { cursor: default; opacity: 0.7; }
.sf-seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.sf-log { margin: 14px 0 0; padding: 10px 12px; background: var(--slab); color: var(--slab-ink); border: 1px solid var(--line); border-radius: var(--radius-sm); font: 0.8rem/1.5 var(--font-mono); white-space: pre-wrap; word-break: break-word; }
.sf-say { margin: 12px 0 0; font-size: 0.92rem; }
@media (max-width: 860px) { .sf-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .sf-net .tap-lbl { font-size: 17px; } .sf-hist { grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 1px; } }

/* Talk to the API (static/js/labs/api.js): request builder, the request and response on the wire, JSON with colour. */
.api-lab { display: grid; gap: 18px; }
.api-net { width: 100%; max-width: 640px; height: auto; display: block; margin: 0 auto 6px; overflow: visible; }
.api-wire { fill: none; stroke: var(--dg-strong); stroke-width: 4; stroke-linecap: round; }
.api-rev { fill: none; stroke: none; }
.api-chip rect { fill: var(--brand); }
.api-chip text { font: 700 10px var(--font-mono); fill: var(--brand-ink); text-anchor: middle; }
.api-chip.ok rect { fill: var(--good); }
.api-chip.err rect { fill: var(--bad); }
.api-chip.err text { fill: #fff; }
.api-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.api-form { display: grid; gap: 8px; }
.api-line { display: flex; gap: 8px; }
.api-line select, .api-line input, .api-form textarea { font: 600 0.92rem var(--font-mono); padding: 9px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.api-line input { flex: 1; min-width: 0; }
.api-form textarea { width: 100%; resize: vertical; font-weight: 500; }
.api-body-l { font-size: 0.8rem; color: var(--muted); }
.api-auth { display: flex; gap: 8px; align-items: center; font-size: 0.86rem; }
.api-form .btn { justify-self: start; }
.api-docs { margin-top: 12px; font-size: 0.86rem; }
.api-docs summary { cursor: pointer; font-weight: 600; }
.api-docs ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.api-docs li small { display: block; color: var(--muted); margin: 2px 0 0 4px; }
.api-doc { display: flex; gap: 8px; align-items: center; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 5px 8px; color: var(--ink); cursor: pointer; font: inherit; max-width: 100%; }
.api-doc:hover, .api-doc:focus-visible { border-color: var(--brand); outline: none; }
.api-doc .mono { overflow-wrap: anywhere; text-align: left; }
.api-verb { font: 700 0.7rem var(--font-mono); padding: 2px 6px; border-radius: 4px; background: var(--good-tint); color: var(--good); }
.api-verb.patch { background: rgba(var(--sun-rgb), 0.14); color: var(--sun); }
.api-res { min-height: 160px; }
.api-status { display: inline-flex; gap: 8px; align-items: baseline; padding: 4px 12px; border-radius: 999px; font-weight: 600; margin-bottom: 8px; border: 1px solid var(--line); }
.api-status b { font: 700 1.1rem var(--font-mono); }
.api-status.ok { color: var(--good); border-color: var(--good); }
.api-status.err { color: var(--bad); border-color: var(--bad); }
.api-headers, .api-json, .api-raw pre { margin: 0; padding: 10px 12px; background: var(--slab); color: var(--slab-ink); border: 1px solid var(--line); border-radius: var(--radius-sm); font: 0.8rem/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.api-headers { color: var(--muted); border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.api-json { border-top-left-radius: 0; border-top-right-radius: 0; max-height: 360px; overflow: auto; }
.api-json:focus-visible { outline: 2px solid var(--brand); }
.j-key { color: var(--brand); }
.j-str { color: #C3E88D; }
.j-num { color: var(--sun); }
.j-lit { color: #C792EA; }
.api-raw { margin-top: 14px; font-size: 0.86rem; }
.api-raw summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.api-fixes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.api-fix { display: grid; gap: 6px; text-align: left; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.api-fix code { font: 0.74rem var(--font-mono); color: var(--muted); overflow-wrap: anywhere; }
.api-fix em { font: 700 0.74rem var(--font-mono); font-style: normal; color: var(--muted); }
.api-fix.on { border-color: var(--good); background: var(--good-tint); }
.api-fix.on em { color: var(--good); }
.api-hint { margin-top: 4px; font-weight: 400; }
.api-hint p { margin: 4px 0; color: var(--muted); font-size: 0.86rem; }
.sq-hint { margin-top: 6px; }
.sq-hint p { margin: 4px 0; color: var(--muted); font-size: 0.86rem; }
.fd-next, .pl-ops .pl-next, .bw-sw.bw-next { outline: 3px solid rgb(var(--sun-rgb)); outline-offset: 2px; }
.api-tip { margin: 8px 0 0; padding: 8px 10px; border-left: 3px solid rgb(var(--sun-rgb)); background: rgba(var(--sun-rgb), 0.08); font-size: 0.9rem; }
@media (max-width: 860px) { .api-grid, .api-fixes { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .api-net .tap-lbl { font-size: 15px; } }
:root[data-theme="light"] .j-str { color: #2E7D32; } :root[data-theme="light"] .j-lit { color: #7B1FA2; }

/* Three ways to root (static/js/labs/privesc.js): paths to root that close as you fix them, and a small terminal. */
.pe-lab { display: grid; gap: 18px; }
.pe-map { width: 100%; max-width: 680px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.pe-node circle { fill: var(--surface-2); stroke: var(--dg-strong); stroke-width: 2; }
.pe-node text { font: 700 13px var(--font-mono); fill: var(--ink); text-anchor: middle; }
.pe-node .pe-sm { font-size: 9px; font-weight: 500; fill: var(--muted); }
.pe-node.root circle { fill: var(--bad-tint); stroke: var(--bad); }
.pe-path > path { fill: none; stroke: var(--bad); stroke-width: 3; stroke-dasharray: 7 5; transition: stroke 0.4s, opacity 0.4s; }
.pe-path text { font: 600 11px var(--font-mono); fill: var(--bad); text-anchor: middle; }
.pe-block { opacity: 0; transition: opacity 0.4s; }
.pe-block circle { fill: var(--good); }
.pe-block path { fill: none; stroke: var(--brand-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pe-path.shut > path { stroke: var(--faint); stroke-dasharray: 2 6; }
.pe-path.shut text { fill: var(--muted); text-decoration: line-through; }
.pe-path.shut .pe-block { opacity: 1; }
.pe-dot circle { fill: var(--bad); filter: drop-shadow(0 0 6px rgba(var(--bad-rgb), 0.9)); }
.pe-legend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-size: 0.82rem; }
.pe-legend li { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--bad); color: var(--bad); }
.pe-legend li.shut { border-color: var(--good); color: var(--good); }
.pe-out { background: var(--slab); color: var(--slab-ink); border: 1px solid var(--line); border-radius: var(--radius-sm) var(--radius-sm) 0 0; padding: 10px 12px; height: 320px; overflow-y: auto; font: 0.82rem/1.5 var(--font-mono); }
.pe-l { white-space: pre-wrap; overflow-wrap: anywhere; }
.pe-l.cmd { color: var(--brand); margin-top: 6px; }
.pe-l.err { color: var(--bad); }
.pe-l.tip { color: var(--sun); }
.pe-in { display: flex; gap: 8px; align-items: center; background: var(--slab); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 8px 12px; }
.pe-prompt { font: 600 0.82rem var(--font-mono); color: var(--good); white-space: nowrap; }
.pe-in input { flex: 1; min-width: 0; background: none; border: 0; color: var(--slab-ink); font: 0.86rem var(--font-mono); padding: 4px 0; }
.pe-in input:focus { outline: none; }
.pe-in:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.pe-hint { margin-top: 4px; font-weight: 400; display: grid; gap: 4px; justify-items: start; }
.pe-hint p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.pe-hint p.mono { color: var(--ink); }
@media (max-width: 560px) { .pe-out { height: 260px; font-size: 0.76rem; } .pe-map text { font-size: 15px; } .pe-node .pe-sm { font-size: 11px; } }

/* Peel the payload (static/js/labs/peel.js): the layers as an onion that loses a ring each step, the value and its bytes. */
.pl-lab { display: grid; gap: 18px; }
.pl-alert { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--bad); background: var(--bad-tint); border-radius: var(--radius-sm); font-size: 0.9rem; }
.pl-alert b { color: var(--bad); margin-right: 6px; }
.pl-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.pl-onion { width: 100%; height: auto; display: block; overflow: visible; }
.pl-ring circle { fill: rgba(var(--sun-rgb), 0.06); stroke: var(--sun); stroke-width: 1.5; transition: opacity 0.5s, transform 0.5s; transform-origin: 110px 110px; }
.pl-ring.cur circle { fill: rgba(var(--sun-rgb), 0.14); stroke-width: 2.5; }
.pl-ring:last-child circle { fill: var(--good-tint); stroke: var(--good); }
.pl-ring.gone circle { opacity: 0; transform: scale(1.15); }
.pl-ring.peel circle { animation: pl-peel 0.6s ease-out forwards; }
@keyframes pl-peel { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.2); } }
.pl-ring text { font: 700 10px var(--font-mono); fill: var(--sun); text-anchor: middle; text-transform: uppercase; letter-spacing: 0.06em; }
.pl-ring:last-child text { fill: var(--good); }
.pl-now-h { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.pl-now-h .mono { color: var(--muted); font-size: 0.78rem; }
.pl-val { margin: 0; padding: 10px 12px; background: var(--slab); color: var(--slab-ink); border: 1px solid var(--line); border-radius: var(--radius-sm); font: 0.8rem/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow-y: auto; }
.pl-val.found { border-color: var(--good); color: var(--good); font-size: 1rem; font-weight: 700; }
.pl-val:focus-visible { outline: 2px solid var(--brand); }
.pl-ops { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.pl-note { min-height: 1.4em; margin: 10px 0 0; font-size: 0.88rem; }
.pl-note.bad { color: var(--bad); }
.pl-trail { margin: 8px 0 0; font-size: 0.82rem; line-height: 1.7; }
.pl-trail b { font: 600 0.78rem var(--font-mono); padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; white-space: nowrap; }
.pl-acts { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; gap: 8px; }
.pl-acts label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.pl-acts input { margin-top: 3px; }
.pl-acts small { display: block; margin: 3px 0 0 26px; font-size: 0.82rem; }
.pl-acts small.good { color: var(--good); }
.pl-acts small.bad { color: var(--bad); }
@media (max-width: 700px) { .pl-grid { grid-template-columns: minmax(0, 1fr); } .pl-onion { max-width: 180px; margin: 0 auto; } }
@media (prefers-reduced-motion: reduce) { .pl-ring.peel circle { animation: none; opacity: 0; } .pl-ring circle { transition: none; } }

/* OSI lab animation (29 Nov): bits stream along a full-width cable on the wire step; headers slide on and off the packet. */
.osi-cable { width: 100%; max-width: 640px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.osi-cable-line { fill: none; stroke: var(--dg-strong); stroke-width: 5; stroke-linecap: round; }
.osi-cable text { font: 600 13px var(--font-mono); fill: var(--muted); text-anchor: middle; }
.osi-bit text { font: 700 11px var(--font-mono); text-anchor: middle; }
.osi-bit.one rect { fill: var(--sun); }
.osi-bit.one text { fill: var(--sun-ink); }
.osi-bit.zero rect { fill: var(--surface-2); stroke: var(--dg-strong); }
.osi-bit.zero text { fill: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .pdu-h.new { animation: osi-on 0.5s ease-out; }
  .pdu-h.going { animation: osi-off 0.9s ease-in forwards; }
}
.pdu-h.going { opacity: 0.35; text-decoration: line-through; }
@keyframes osi-on { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes osi-off { from { opacity: 1; transform: none; } to { opacity: 0.35; transform: translateY(-10px); } }

/* Write the finding (static/js/labs/finding.js): choices on the left, the report filling in on the right, a CVSS gauge. */
.fd-lab { display: grid; gap: 18px; }
.fd-ev { margin: 0; padding: 10px 12px; background: var(--slab); color: var(--slab-ink); border: 1px solid var(--line); border-radius: var(--radius-sm); font: 0.78rem/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.fd-ev:focus-visible { outline: 2px solid var(--brand); }
.fd-notes { margin: 10px 0 0; font-size: 0.88rem; color: var(--muted); }
.fd-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.fd-doc { position: sticky; top: 76px; }
.fd-field { border: 0; padding: 0; margin: 0 0 18px; }
.fd-field legend { font-weight: 700; margin-bottom: 8px; }
.fd-opt { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 0.88rem; }
.fd-opt input { margin-top: 3px; flex: none; }
.fd-opt span { overflow-wrap: anywhere; }
.fd-opt:hover { border-color: var(--faint); }
.fd-opt.right { border-color: var(--good); background: var(--good-tint); }
.fd-opt.wrong { border-color: var(--bad); background: var(--bad-tint); }
.fd-note { margin: 4px 0 0; font-size: 0.84rem; min-height: 0; }
.fd-note.good { color: var(--good); }
.fd-note.bad { color: var(--bad); }
.fd-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.fd-steps li { font-size: 0.88rem; }
.fd-steps li > span:first-child { display: inline; }
.fd-move { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.fd-move .btn { padding: 2px 9px; min-height: 0; }
.fd-docbody { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.84rem; }
.fd-dochead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--muted); }
.fd-sev { font: 700 0.74rem var(--font-mono); padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.fd-sev.low { color: var(--good); } .fd-sev.medium { color: var(--sun); } .fd-sev.high { color: var(--likely); } .fd-sev.critical { color: var(--bad); }
.fd-sec { border-top: 1px solid var(--line); padding: 8px 0; }
.fd-sec h3 { margin: 0 0 4px; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fd-sec p { margin: 0; }
.fd-sec ol { margin: 0; padding-left: 1.2em; }
.fd-sec.in p:not(.muted) { animation: fd-in 0.4s ease-out; }
.fd-off { color: var(--bad); text-decoration: line-through; }
.fd-vec { font-size: 0.72rem; color: var(--muted); overflow-wrap: anywhere; }
@keyframes fd-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.fd-gauge { width: 160px; height: auto; display: block; margin: 4px auto; overflow: visible; }
.fd-band { fill: none; stroke-width: 10; }
.fd-band.low { stroke: var(--good); } .fd-band.med { stroke: var(--sun); } .fd-band.high { stroke: var(--likely); } .fd-band.crit { stroke: var(--bad); }
.fd-needle { transform-box: view-box; transform-origin: 80px 84px; transition: transform 0.9s cubic-bezier(.3, 1.4, .5, 1); }
.fd-needle path { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.fd-hub { fill: var(--ink); }
.fd-score { font: 700 15px var(--font-mono); fill: var(--ink); text-anchor: middle; }
.fd-msg { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.fd-msg img { border-radius: 50%; flex: none; }
.fd-msg p { margin: 0; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); font-size: 0.9rem; max-width: 640px; }
.fd-msg p b { display: block; font-size: 0.76rem; color: var(--muted); margin-bottom: 2px; }
.fd-msg.you { justify-content: flex-end; }
.fd-msg.you p { background: var(--brand-soft); }
.fd-replies { display: grid; gap: 6px; margin: 6px 0 0 46px; }
.fd-reply { text-align: left; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.88rem; cursor: pointer; }
.fd-reply:hover, .fd-reply:focus-visible { border-color: var(--brand); outline: none; }
.fd-reply.wrong { border-color: var(--bad); }
.fd-debrief .fd-note { margin-left: 46px; }
@media (max-width: 900px) { .fd-grid { grid-template-columns: minmax(0, 1fr); } .fd-doc { position: static; } }
@media (max-width: 560px) { .fd-replies, .fd-debrief .fd-note { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .fd-needle { transition: none; } .fd-sec.in p:not(.muted) { animation: none; } }

/* The attack path (static/js/labs/attackpath.js): the intrusion hopping host to host, shields where defences sit. */
.ap-lab { display: grid; gap: 18px; }
.ap-net { width: 100%; max-width: 720px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.ap-wire { fill: none; stroke: var(--dg-strong); stroke-width: 3; stroke-linecap: round; }
.ap-hop { fill: none; stroke: none; }
.ap-node { transition: filter 0.3s; }
.ap-node.hit { filter: drop-shadow(0 0 8px rgba(var(--bad-rgb), 0.8)); }
.ap-node.stop { filter: drop-shadow(0 0 10px rgba(var(--good-rgb), 0.9)); }
.ap-shield { opacity: 0; transition: opacity 0.3s; }
.ap-shield.on { opacity: 1; }
.ap-shield circle { fill: var(--good); }
.ap-shield path { fill: none; stroke: var(--brand-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ap-mark circle { fill: var(--bad); filter: drop-shadow(0 0 7px rgba(var(--bad-rgb), 0.9)); }
.ap-mark.stopped circle { fill: var(--good); filter: drop-shadow(0 0 7px rgba(var(--good-rgb), 0.9)); }
.ap-stages { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.ap-stages li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.86rem; }
.ap-stages li p { margin: 2px 0 0; color: var(--muted); }
.ap-stages li em { display: block; margin-top: 4px; font: 600 0.78rem var(--font-mono); font-style: normal; }
.ap-stages li.done { border-color: var(--bad); } .ap-stages li.done em { color: var(--bad); }
.ap-stages li.blocked, .ap-stages li.caught { border-color: var(--good); background: var(--good-tint); } .ap-stages li.blocked em, .ap-stages li.caught em { color: var(--good); }
.ap-stages li.never { opacity: 0.55; }
.ap-time { color: var(--muted); }
.ap-tech { font-size: 0.74rem; color: var(--muted); }
.ap-defs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.ap-def { display: grid; gap: 4px; text-align: left; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.ap-def span { font-size: 0.82rem; color: var(--muted); }
.ap-def.on { border-color: var(--good); background: var(--good-tint); }
.ap-def:disabled:not(.on) { opacity: 0.55; cursor: default; }
.ap-run { gap: 12px; align-items: center; flex-wrap: wrap; }
.ap-out { margin: 12px 0 4px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.ap-out.missed, .ap-out.late { border-color: var(--bad); }
.ap-out.early, .ap-out.contained { border-color: var(--good); }
@media (max-width: 560px) { .ap-net .tap-lbl { font-size: 15px; } }

/* Address classes ruler under the subnet calculator's badges (static/js/labs/subnet.js CLASS_BANDS). */
.sc-classes { margin: 10px 0 4px; }
.sc-classes small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 4px; }
.sc-cl-bar { position: relative; display: flex; height: 38px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.sc-cl { display: grid; place-content: center; text-align: center; border-right: 1px solid var(--line); background: var(--surface); color: var(--muted); min-width: 0; transition: background 0.3s, color 0.3s; }
.sc-cl:last-of-type { border-right: 0; }
.sc-cl b { font: 700 0.8rem var(--font-mono); }
.sc-cl i { font: 0.62rem var(--font-mono); font-style: normal; white-space: nowrap; overflow: hidden; }
.sc-cl.on { background: var(--brand-soft); color: var(--brand); }
.sc-cl-mark { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--sun); box-shadow: 0 0 8px rgba(var(--sun-rgb), 0.8); transition: left 0.5s cubic-bezier(.3, 1.3, .5, 1); }
@media (prefers-reduced-motion: reduce) { .sc-cl-mark, .sc-cl { transition: none; } }

/* Shared responsibility (static/js/shared.js): the you/provider line slides up the stack, row by row. */
.shr-seg { margin: 6px 0 14px; flex-wrap: wrap; }
.shr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.shr-stack { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.shr-stack li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 7px; border: 1px solid var(--line); font-size: 0.88rem; transition: background 0.35s calc(var(--i) * 45ms), border-color 0.35s calc(var(--i) * 45ms), color 0.35s calc(var(--i) * 45ms); }
.shr-stack li em { font: 700 0.72rem var(--font-mono); font-style: normal; }
.shr-stack li.you { background: rgba(var(--sun-rgb), 0.14); border-color: var(--sun); }
.shr-stack li.you em { color: var(--sun); }
.shr-stack li.provider { background: var(--brand-soft); border-color: var(--brand); }
.shr-stack li.provider em { color: var(--brand); }
.shr-stack li.edge { margin-bottom: 10px; box-shadow: 0 8px 0 -6px var(--ink); }
.shr-read b { display: block; font-size: 1.1rem; }
.shr-read p { margin: 8px 0 0; font-size: 0.9rem; }
.shr-q { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
@media (max-width: 700px) { .shr-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .shr-stack li { transition: none; } }
.sc-cl-key { display: none !important; font-family: var(--font-mono); }
@media (max-width: 900px) { .sc-cl i { display: none; } .sc-cl-key { display: block !important; } }  /* the D and E bands are too narrow for their ranges below ~950 px (box check, 30 Nov) */

/* Recon scan sweep (static/js/labs/nettools.js sweepPlan): the /24 as 256 cells; a beam sweeps them, live hosts light up. */
.scan-map { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-bg); }
.scan-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 8px; font-size: 0.86rem; }
.scan-head b { font-family: var(--font-mono); color: var(--brand); }
.scan-head span { color: var(--muted); }
.scan-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: stretch; }
.scan-grid { display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 2px; }
.scan-grid i { aspect-ratio: 1; border-radius: 2px; background: var(--surface-2); transition: background 0.25s, box-shadow 0.25s; }
.scan-grid i.edge { background: transparent; outline: 1px dashed var(--line); outline-offset: -1px; }
.scan-grid i.me { background: var(--sun); }
.scan-grid i.swept { background: rgba(var(--brand-rgb), 0.28); }
.scan-grid i.up { background: var(--good); box-shadow: 0 0 6px rgba(var(--good-rgb), 0.9); }
.scan-grid i.me.swept { background: var(--sun); }
.scan-fence { display: grid; align-content: center; gap: 4px; padding: 6px 10px; border-left: 3px dashed var(--bad); font-size: 0.74rem; color: var(--muted); }
.scan-fence em { font-style: normal; color: var(--ink); }
.scan-fence.hit { animation: scan-hit 0.7s ease-out; }
@keyframes scan-hit { 0%, 100% { background: transparent; } 30% { background: var(--bad-tint); box-shadow: inset 3px 0 0 var(--bad); } }
.scan-hosts { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.scan-hosts li { display: flex; gap: 6px; align-items: center; padding: 4px 10px; border: 1px solid var(--good); border-radius: 999px; font-size: 0.8rem; animation: scan-in 0.4s ease-out backwards; }
.scan-hosts li span { display: inline-flex; gap: 4px; color: var(--muted); }
.scan-hosts em { font-style: normal; padding: 0 5px; border-radius: 4px; background: var(--good-tint); color: var(--good); font-size: 0.72rem; }
@keyframes scan-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .scan-wrap { grid-template-columns: minmax(0, 1fr); } .scan-grid { grid-template-columns: repeat(16, minmax(0, 1fr)); } .scan-fence { border-left: 0; border-top: 3px dashed var(--bad); } }
@media (prefers-reduced-motion: reduce) { .scan-grid i { transition: none; } .scan-hosts li, .scan-fence.hit { animation: none; } }

/* Network builder: DHCP switch on a PC, pools on a router, and live hints (static/js/labs/netbuilder.js nextStep). */
.nb-dhcp { margin: 4px 0 8px; font-weight: 600; }
.nb-dhcp-say { margin: 0 0 8px; font-size: 0.84rem; }
.nb-auto input[readonly] { opacity: 0.65; cursor: default; }
.nb-pools { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 4px; font-size: 0.84rem; }
.nb-next { margin: 6px 0 4px; }
.nb-next b { color: var(--brand); }
.nb-cli { margin: 0 0 6px; font-size: 0.84rem; color: var(--muted); }
.nb-cli .mono { color: var(--ink); }
.nb-plan { margin-top: 4px; font-size: 0.84rem; }
.nb-plan summary { cursor: pointer; color: var(--muted); }

/* Hints everywhere (30 Nov): the objective ladder (static/js/labs/hints.js) and "Stuck?" on lab questions (07-labs). */
.hl { margin-top: 4px; font-weight: 400; display: grid; gap: 4px; justify-items: start; }
.hl-step { margin: 0; font-size: 0.86rem; color: var(--muted); }
.hl-step b { color: var(--ink); font-weight: 600; }
.hl-2 { color: var(--ink); }
.hl-step:focus { outline: none; }
.stuck { margin-top: 8px; display: grid; gap: 4px; justify-items: start; }
.stuck-said p { margin: 4px 0 0; font-size: 0.88rem; }
.stuck-said p:focus { outline: none; }
.opt.reveal { border-color: var(--good) !important; box-shadow: 0 0 0 2px var(--good), 0 0 14px rgba(var(--good-rgb), 0.35); }
@media (prefers-reduced-motion: no-preference) { .opt.reveal { animation: stuck-pulse 1.2s ease-out 2; } }
@keyframes stuck-pulse { 50% { box-shadow: 0 0 0 4px var(--good), 0 0 22px rgba(var(--good-rgb), 0.5); } }

/* Network builder modes (30 Nov): Step by step (net/course.js) and Free build (bulk add, Quick build). */
.nb-modes { display: inline-flex; gap: 6px; }
.nb-modes .chip[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.nb-stepmode .nb-free, .nb-stepmode .nb-free-only { display: none !important; }
.nb-course { border-color: var(--brand); }
.nb-c-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: baseline; }
.nb-c-top .mono { color: var(--muted); font-size: 0.82rem; }
.nb-c-bar { height: 6px; border-radius: 3px; background: var(--surface-2); margin: 8px 0 12px; overflow: hidden; }
.nb-c-bar i { display: block; height: 100%; background: var(--brand); transition: width 0.4s; }
.nb-c-text { font-size: 1.02rem; margin: 0 0 6px; }
.nb-c-text:focus, .nb-c-done:focus { outline: none; }
.nb-c-done { margin: 0 0 10px; }
.nb-c-done b { color: var(--good); }
.nb-c-fresh { margin: 0 0 10px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: var(--radius-sm); font-size: 0.9rem; }
.nb-c-act { margin-top: 10px; gap: 12px; align-items: center; }
.nb-gdo { margin: 8px 0 4px; }
.nb-free { gap: 8px; align-items: center; flex-wrap: wrap; }
.nb-bulk { display: inline-flex; gap: 6px; align-items: center; }
.nb-bulk input, .nb-quick input[type="number"] { width: 3.6em; padding: 6px 6px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.nb-bulk select, .nb-quick input#nb-qip { padding: 6px 8px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.nb-quick { flex-basis: 100%; }
.nb-quick:not([open]) { flex-basis: auto; }
.nb-quick summary { cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: 600 0.8rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; list-style: none; }
.nb-quick summary::-webkit-details-marker { display: none; }
.nb-quick-f { margin-top: 8px; width: min(420px, 100%); display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--elev); font-size: 0.88rem; }
.nb-quick-f .btn { justify-self: start; }

/* Help on quiz and drill questions (labs/hints.js helpHtml): one more level per press, below the options. */
.qh { margin-top: 6px; display: grid; gap: 4px; justify-items: start; }
.qh p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.qh p b { color: var(--ink); }
.qh p:focus { outline: none; }
.vp-opt.reveal { border-color: var(--good) !important; box-shadow: 0 0 0 2px var(--good); }
.vp-help .qh p { color: inherit; opacity: 0.85; }

/* The lab brief and documents read as documents (30 Nov, the owner: the first Foundations lab looked like a terminal).
   docBlocks/docHtml in 07-labs. Logs and scripts keep .evidence (monospace). */
.lab-brief { margin: 4px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); background: var(--surface); display: grid; gap: 6px; }
.lab-brief p { margin: 0; line-height: 1.5; }
.lb-intro { font-size: 1.02rem; }
.lb-why { color: var(--ink); }
.lb-how { color: var(--muted); font-size: 0.9rem; }
#lab-doc { outline: none; }
#lab-doc:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: var(--radius-sm); }
.doc-view { font-family: var(--font-body); line-height: 1.55; display: grid; gap: 10px; max-width: 72ch; overflow-wrap: anywhere; }
.doc-view p, .doc-view ul, .doc-view h3, .doc-view h4 { margin: 0; }
.dv-title { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.01em; }
.dv-kv { color: var(--muted); font-size: 0.92rem; }
.dv-kv b { color: var(--ink); font-weight: 600; }
.dv-h { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.dv-list { padding-left: 1.2em; display: grid; gap: 4px; }
.dv-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 10px 12px; display: grid; gap: 4px; }
.dv-ihead { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dv-id { font: 700 0.8rem var(--font-mono); color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 1px 7px; }
.dv-meta { font-size: 0.8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; }
.dv-text { font-weight: 500; }
.dv-body { color: var(--ink); }
.doc-view .hit { box-shadow: 0 0 0 2px rgba(var(--sun-rgb), 0.85); }
.dv-item.hit, .dv-table tr.hit td { background: rgba(var(--sun-rgb), 0.08); }
.doc-view mark { background: rgba(var(--sun-rgb), 0.3); color: inherit; border-radius: 2px; }
.dv-tablewrap { max-width: 100%; }
.dv-table { border-collapse: collapse; font-size: 0.9rem; width: 100%; }
.dv-table th { text-align: left; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding: 6px 8px; }
.dv-table td { border-bottom: 1px solid var(--line); padding: 7px 8px; vertical-align: top; }
.dv-table td:first-child { font: 700 0.82rem var(--font-mono); color: var(--brand); white-space: nowrap; }
@media (max-width: 640px) {
  .dv-table thead { display: none; }  /* each cell carries its column name instead (data-label, read aloud too) */
  .dv-table, .dv-table tbody, .dv-table tr, .dv-table td { display: block; width: 100%; }
  .dv-table tr { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 6px 10px; margin-bottom: 8px; }
  .dv-table td { border: 0; padding: 2px 0; }
  .dv-table td:not(:first-child)::before { content: attr(data-label) " "; color: var(--muted); font-size: 0.8rem; }
}

/* Guard your account (labs/account.js, 30 Nov). */
.ga-pw { gap: 8px; flex-wrap: wrap; }
.ga-pw input { flex: 1 1 260px; min-width: 0; font: 1rem var(--font-body); padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); }
.ga-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 12px 0 6px; }
.ga-times div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2); }
.ga-times dt { font-size: 0.8rem; color: var(--muted); }
.ga-times dd { margin: 4px 0 0; font: 600 1.15rem var(--font-display); }
.ga-note { margin: 0; color: var(--muted); }
.ga-accts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 10px 0; }
.ga-acct { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 10px 12px; display: grid; gap: 6px; min-width: 0; }
.ga-acct small { font-size: 0.78rem; }
.ga-mfa { color: var(--good); }
.ga-res { margin: 0; min-height: 1.2em; font-size: 0.9rem; }
.ga-say { margin: 6px 0 0; }
.ga-phone { max-width: 340px; border: 1px solid var(--line); border-radius: 22px; padding: 18px 14px; background: var(--surface-2); }
.ga-notif { border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 6px; }
.ga-notif p { margin: 0; }
.ga-notif .row { flex-wrap: wrap; gap: 6px; }
.ga-out { margin: 0 0 6px; }
.ga-out.good { color: var(--good); }
.ga-out.bad { color: var(--bad); }

/* Card sort (labs/sort.js, 30 Nov). */
.so-c { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 16px 18px; display: grid; gap: 8px; }
.so-c p { margin: 0; font-size: 1.08rem; line-height: 1.5; }
.so-ch { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.so-multi { color: var(--muted); font-size: 0.92rem !important; }
.so-bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 14px 0 8px; }
.so-bin { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.so-bin:hover:not(:disabled), .so-bin:focus-visible { border-color: var(--brand); }
.so-bin[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.so-bin.reveal { box-shadow: 0 0 0 3px var(--good); }
.so-bin.ruled { opacity: 0.45; text-decoration: line-through; }
.so-bin small { color: var(--muted); font-size: 0.82rem; }
.so-ic { width: 30px; height: 30px; fill: none; stroke: var(--brand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.so-col h3 .so-ic { width: 18px; height: 18px; vertical-align: -3px; }
.so-say { margin-top: 6px; }
.so-done { font: 600 1.05rem var(--font-display); }
.so-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.so-col h3 { font-size: 0.95rem; margin: 0 0 6px; }
.so-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.so-col li { border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 0.88rem; background: var(--surface-2); }
.so-col li b { color: var(--brand); font: 700 0.78rem var(--font-mono); margin-right: 4px; }
