/* Layout: an airfield operations manual. Sticky masthead, a rail of taxiway-sign
   module markers, one lesson on stage at a time with sign-style wayfinding. */
:root {
  --bg: #eceff2;
  --surface: #fbfcfd;
  --tint: #e1e7ed;
  --zebra: #f2f5f7;
  --ink: #15202a;
  --muted: #46525d;
  --rule: #cdd5dc;
  --accent: #8a5d00;
  --accent-fill: #ffc629;
  --ok: #1d7a44;
  --warn: #9c5c00;
  --bad: #b3261e;

  /* Fixed-colour worlds: airfield signs and the night scene look the same in both themes */
  --sign-black: #111417;
  --sign-yellow: #ffcc00;
  --sign-red: #c8102e;
  --sign-white: #ffffff;
  --night: #09121a;
  --night-2: #142231;
  --night-line: #2a3b4c;
  --night-ink: #d5dee6;
  --night-muted: #93a3b1;
  --pavement: #26323d;
  --grass: #0d1a15;
  --l-white: #fff6dc;
  --l-yellow: #ffd23f;
  --l-red: #ff4b4b;
  --l-green: #3ddc84;
  --l-blue: #4f8dff;
  --c-a: #ffae00;
  --c-b: #2fc6f0;
  --c-s: #c99bff;

  --f-display: "Barlow Condensed", "Heebo", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "IBM Plex Sans", "IBM Plex Sans Hebrew", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", "IBM Plex Sans Hebrew", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Type scale: 15 / 17 / 20 / 26 / 36 / 44 px. Nothing on the page is set below 14px. */
  --step--2: 0.875rem;
  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-4: 2.75rem;
  --lh: 1.65;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 40px;
  --sp-7: 64px;

  --measure: 66ch;
  --radius: 6px;
  --tap: 44px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b131a;
    --surface: #111c26;
    --tint: #1a2836;
    --zebra: #142130;
    --ink: #e6ecf1;
    --muted: #a7b5c2;
    --rule: #2a3a48;
    --accent: #ffc629;
    --ok: #4cc47d;
    --warn: #f2a93b;
    --bad: #ff6b5e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b131a;
  --surface: #111c26;
  --tint: #1a2836;
  --zebra: #142130;
  --ink: #e6ecf1;
  --muted: #a7b5c2;
  --rule: #2a3a48;
  --accent: #ffc629;
  --ok: #4cc47d;
  --warn: #f2a93b;
  --bad: #ff6b5e;
  color-scheme: dark;
}
/* Hebrew reads smaller than Latin at the same size, so it gets a larger scale and looser lines */
:root[dir="rtl"] {
  --step--2: 0.9375rem;
  --step--1: 1rem;
  --step-0: 1.125rem;
  --step-1: 1.3125rem;
  --lh: 1.75;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 150px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: var(--lh);
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--sign-black);
}
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.masthead :focus-visible, .scene :focus-visible, .sim-wrap :focus-visible { outline-color: var(--sign-yellow); }
h1, h2, h3, h4 { font-family: var(--f-display); text-wrap: balance; margin: 0; }
h2 { font-size: var(--step-4); font-weight: 700; line-height: 1.05; letter-spacing: 0.005em; }
h3 { font-size: var(--step-2); font-weight: 700; line-height: 1.15; letter-spacing: 0.01em; }
h4 { font-size: var(--step-1); font-weight: 600; line-height: 1.25; letter-spacing: 0.01em; }
:root[dir="rtl"] h2, :root[dir="rtl"] h3, :root[dir="rtl"] h4 { letter-spacing: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0; }
code, .mono { font-family: var(--f-mono); font-size: 0.92em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 50;
  background: var(--sign-yellow);
  color: var(--sign-black);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius);
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

/* Masthead */
.masthead {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--sign-black);
  color: var(--sign-yellow);
  border-bottom: 3px solid var(--sign-yellow);
}
.masthead-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding-block: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand {
  min-width: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.brand small {
  display: block;
  font-family: var(--f-body);
  font-weight: 400;
  font-size: var(--step--2);
  letter-spacing: 0.02em;
  color: var(--sign-white);
  margin-top: 5px;
  text-transform: none;
}
.masthead .spacer { flex: 1; }
.masthead .std {
  font-family: var(--f-mono);
  font-size: var(--step--2);
  line-height: 1.4;
  color: #c9d1d8;
  text-align: end;
}

/* Shell */
.shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: var(--sp-6);
  max-width: 1360px;
  margin: 0 auto;
  padding-block: var(--sp-6) var(--sp-7);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Rail: module signs, with the active module's lessons opened beneath it */
.rail {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 84px);
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rail-label {
  font-size: var(--step--2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--sp-2);
}
.rail a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 48px;
  padding: 4px 8px;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.25;
}
.rail a:hover { background: var(--tint); }
.rail .chip {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.375rem;
  background: var(--sign-yellow);
  color: var(--sign-black);
  border-radius: 3px;
}
.rail > a[aria-current] { background: var(--tint); font-weight: 600; }
.rail > a[aria-current] .chip {
  background: var(--sign-black);
  color: var(--sign-yellow);
  box-shadow: inset 0 0 0 2px var(--sign-black), inset 0 0 0 4px var(--sign-yellow);
}
.sublessons {
  list-style: none;
  margin: 2px 0 8px;
  padding: 0;
  padding-inline-start: 22px;
  border-inline-start: 2px dashed var(--rule);
  margin-inline-start: 25px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sublessons a { min-height: 44px; font-weight: 400; font-size: var(--step--1); }
.subchip {
  flex: none;
  min-width: 34px;
  padding: 2px 5px;
  text-align: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--rule);
}
.sublessons a.seen .subchip { background: var(--tint); }
.sublessons a.seen .subchip::after { content: " ✓"; font-size: 0.8em; color: var(--ok); }
.sublessons a[aria-current] { background: var(--tint); font-weight: 600; }
.sublessons a[aria-current] .subchip { background: var(--sign-yellow); color: var(--sign-black); box-shadow: none; }
.sublessons a[aria-current] .subchip::after { content: ""; }
.rail-note { margin-top: var(--sp-4); font-size: var(--step--2); color: var(--muted); line-height: 1.5; }

/* Lesson stage */
main { min-width: 0; outline: none; }
.module { display: flex; flex-direction: column; gap: var(--sp-5); }
.lesson { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.lesson > h3 { font-size: var(--step-3); }
.lesson > .module-head + h3 { margin-top: var(--sp-4); font-size: var(--step-2); }
.module-head { display: flex; flex-direction: column; gap: var(--sp-4); }
.lede { font-size: var(--step-1); line-height: 1.55; max-width: var(--measure); }
.lede-small { max-width: var(--measure); }
.prose { display: flex; flex-direction: column; gap: var(--sp-4); max-width: var(--measure); }
.prose ul, .prose ol, ol.prose { margin: 0; padding-inline-start: 1.3em; display: flex; flex-direction: column; gap: var(--sp-3); }
.narrow { max-width: 640px; display: flex; flex-direction: column; gap: var(--sp-3); }
.section { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }

/* Numbered steps read like a checklist */
ol.steps { list-style: none; padding: 0; counter-reset: step; gap: var(--sp-4); }
ol.steps li { counter-increment: step; position: relative; padding-inline-start: 52px; min-height: 38px; }
ol.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.25rem;
  background: var(--sign-black);
  color: var(--sign-yellow);
  border-radius: 3px;
  margin-top: 1px;
}

/* Wayfinding: sign breadcrumb, progress line, direction-sign pager */
.crumb { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.sign {
  display: inline-flex;
  align-items: stretch;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  line-height: 1;
  border-radius: 2px;
  overflow: hidden;
  text-decoration: none;
}
.sign span { padding: 6px 10px; display: grid; place-items: center; }
.sign .loc { background: var(--sign-black); color: var(--sign-yellow); box-shadow: inset 0 0 0 2px var(--sign-yellow); }
.sign .dir { background: var(--sign-yellow); color: var(--sign-black); }
.sign .mand { background: var(--sign-red); color: var(--sign-white); }
.crumb-sign { font-size: 1.375rem; }
.crumb-sign span { min-width: 40px; padding: 8px 12px; }
.crumb-text { display: flex; flex-direction: column; line-height: 1.3; }
.crumb-module { font-weight: 600; }
.crumb-count { font-size: var(--step--1); color: var(--muted); }
.crumb-bar { height: 4px; background: var(--tint); border-radius: 2px; overflow: hidden; margin-top: calc(-1 * var(--sp-2)); }
.crumb-bar i { display: block; height: 100%; background: var(--accent-fill); }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule);
}
.pg {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 64px;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--sign-yellow);
  color: var(--sign-black);
  text-decoration: none;
  min-width: 0;
}
.pg:hover { filter: brightness(1.05); }
.pg.next { justify-content: flex-end; text-align: end; grid-column: 2; }
.pg.next .arr { order: 2; }
.pg .arr { font-family: var(--f-display); font-weight: 700; font-size: 2rem; line-height: 1; }
:root[dir="rtl"] .pg .arr { transform: scaleX(-1); }
.pg-text { display: flex; flex-direction: column; min-width: 0; }
.pg-label { font-size: var(--step--2); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
:root[dir="rtl"] .pg-label { text-transform: none; letter-spacing: 0; }
.pg-title { font-family: var(--f-display); font-weight: 600; font-size: 1.3rem; line-height: 1.2; }
.pg-title b { font-weight: 700; margin-inline-end: 4px; }
.resume { max-width: 460px; justify-content: flex-start; text-align: start; }
.resume .arr { order: 2; margin-inline-start: auto; }

/* Panels and grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
}
.panel.narrow { max-width: 760px; }
.panel h4 { font-size: 1.375rem; }
.panel .small { font-size: var(--step-0); }
.track { gap: var(--sp-3); }
.track .who, .tag {
  font-size: var(--step--2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
:root[dir="rtl"] .track .who, :root[dir="rtl"] .tag { text-transform: none; letter-spacing: 0; }
.track ol { margin: 0; padding-inline-start: 1.2em; display: flex; flex-direction: column; gap: var(--sp-2); }
.try { border-inline-start: 6px solid var(--accent-fill); max-width: 820px; }
.try ol { margin: 0; padding-inline-start: 1.3em; display: flex; flex-direction: column; gap: var(--sp-2); }

details.more { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); max-width: 820px; }
details.more summary {
  cursor: pointer;
  min-height: 52px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-weight: 600;
  list-style: none;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "▸"; color: var(--accent); transition: transform 0.15s; }
:root[dir="rtl"] details.more summary::before { transform: scaleX(-1); }
details.more[open] summary::before { transform: rotate(90deg); }
details.more > div { padding: 0 18px 18px; }

/* Callouts */
.callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
  padding: 18px 20px;
  border: 2px solid color-mix(in srgb, var(--bad) 55%, var(--rule));
  border-radius: var(--radius);
  background: var(--surface);
  max-width: 820px;
}
.callout .sign { margin-top: 3px; }
.callout p + p { margin-top: var(--sp-3); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: var(--step-0); line-height: 1.5; }
th, td { text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; background: var(--tint); }
thead th { white-space: nowrap; }
tbody tr:nth-child(even) td { background: var(--zebra); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.panel table th { white-space: normal; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-inline-end: 8px; vertical-align: -1px; box-shadow: 0 0 0 1px var(--muted); }

/* Controls */
.controls { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); align-items: center; }
.ctl-label { max-width: 100%; min-width: 0; font-size: var(--step--1); color: var(--muted); display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.seg { display: inline-flex; min-width: 0; max-width: 100%; overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.seg button {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 500;
  min-height: var(--tap);
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
}
.seg button + button { border-inline-start: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--sign-black); color: var(--sign-yellow); }
.btn {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 500;
  min-height: var(--tap);
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn:hover { background: var(--tint); }
.btn.primary { background: var(--accent-fill); color: var(--sign-black); border-color: var(--accent-fill); font-weight: 600; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--rule)); }
.btn[aria-pressed="true"] { background: var(--sign-black); color: var(--sign-yellow); border-color: var(--sign-black); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: var(--step--1); font-weight: 500; color: var(--ink); min-width: 0; }
label.field.search { max-width: 460px; }
input[type="number"], input[type="text"], input[type="date"], input[type="search"], select {
  font: inherit;
  font-size: max(16px, var(--step-0));
  font-weight: 400;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--muted) 55%, var(--rule));
  border-radius: 4px;
  padding: 9px 12px;
  min-height: var(--tap);
  min-width: 0;
  width: 100%;
}
input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="range"] { accent-color: var(--accent-fill); min-height: var(--tap); }

/* Night scene (airfield map) */
.scene {
  background: var(--night);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--night-ink);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.scene-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--night-2);
}
.scene-bar .ctl-label { color: var(--night-muted); }
.scene .seg { background: var(--night-2); border-color: var(--night-line); }
.scene .seg button { color: var(--night-ink); }
.scene .seg button + button { border-inline-start-color: var(--night-line); }
.scene .seg button[aria-pressed="true"] { background: var(--sign-yellow); color: var(--sign-black); }
.scene .btn { background: var(--night-2); color: var(--night-ink); border-color: var(--night-line); }
.scene .btn[aria-pressed="true"] { background: var(--sign-yellow); color: var(--sign-black); border-color: var(--sign-yellow); }
.scene-svg { overflow-x: auto; direction: ltr; }
.scene-svg svg { display: block; width: 100%; min-width: 760px; height: auto; }
.scene-legend { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 14px 16px; border-top: 1px solid var(--night-2); }
.scene-legend button, .scene-legend .pill {
  font: inherit;
  font-size: var(--step--1);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--tap);
  border: 1px solid var(--night-line);
  background: var(--night-2);
  color: var(--night-ink);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  cursor: pointer;
}
.scene-legend .pill { cursor: default; background: transparent; }
.scene-legend button[aria-pressed="true"] { border-color: var(--sign-yellow); color: var(--sign-yellow); }
.scene-legend .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.scroll-hint { display: none; font-size: var(--step--2); color: var(--muted); }
.scene .scroll-hint { color: var(--night-muted); padding: 8px 16px 0; }
.light { cursor: pointer; }
.light-group.dim { opacity: 0.18; }
.rgl-a { animation: rgl 1.4s steps(1) infinite; }
.rgl-b { animation: rgl 1.4s steps(1) infinite 0.7s; }
.light.unlit { animation: none; }
.fail-group { display: inline-flex; flex-wrap: wrap; gap: var(--sp-2); }
@keyframes rgl { 0% { opacity: 1; } 50% { opacity: 0.08; } }

.map-below { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.info-card h4 { font-size: var(--step-2); }
.info-card dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-2) var(--sp-4); margin: 0; }
.info-card dt { color: var(--muted); font-weight: 500; }
.info-card dd { margin: 0; }
.info-card .ref { font-family: var(--f-mono); font-size: var(--step--2); color: var(--muted); }

.papi { display: flex; gap: 12px; padding: 14px; background: var(--night); border-radius: var(--radius); justify-content: center; direction: ltr; }
.papi i { width: 30px; height: 30px; border-radius: 50%; display: block; }

/* Readouts */
.readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); }
.readout {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.readout .k { font-size: var(--step--2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
:root[dir="rtl"] .readout .k { text-transform: none; letter-spacing: 0; }
.readout .v { font-family: var(--f-mono); font-size: 1.5rem; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.25; }
.readout .v small { font-size: 0.9rem; color: var(--muted); margin-inline-start: 4px; }
.alarms { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--step--1);
  font-weight: 500;
  border-radius: 999px;
  padding: 4px 12px;
  border: 1px solid var(--rule);
  color: var(--muted);
  background: var(--surface);
}
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--rule); }
.scene-legend .pill::before { display: none; }
.pill.on-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, var(--rule)); }
.pill.on-ok::before { background: var(--ok); }
.pill.on-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, var(--rule)); }
.pill.on-warn::before { background: var(--warn); }
.pill.on-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--rule)); }
.pill.on-bad::before { background: var(--bad); }

.sim-wrap { overflow-x: auto; background: var(--night); border-radius: var(--radius); direction: ltr; }
.sim-wrap svg { display: block; width: 100%; min-width: 680px; height: auto; }
.log {
  font-family: var(--f-mono);
  font-size: var(--step--2);
  line-height: 1.6;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 900px;
}
:root[dir="rtl"] .log { font-family: var(--f-body); font-size: var(--step--1); }
.log p { white-space: pre-wrap; }
.log p:first-child { color: var(--ink); }
.log p:not(:first-child) { color: var(--muted); }

/* Calculators */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: var(--sp-5); align-items: start; }
.calc-rows { display: flex; flex-direction: column; gap: var(--sp-3); }
.calc-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-3);
  align-items: end;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.calc-row .desc { grid-column: 1 / -1; }
.calc-row .x { grid-column: 1 / -1; justify-self: start; color: var(--bad); }
.result { position: sticky; top: 100px; }
.result-table td { padding: 8px 10px; }
.result-table td:first-child { color: var(--muted); }
.result-big { font-family: var(--f-display); font-size: var(--step-4); font-weight: 700; line-height: 1; }
.note-list { margin: 0; padding-inline-start: 1.2em; display: flex; flex-direction: column; gap: var(--sp-2); }
.note-list .bad { color: var(--bad); }
.note-list .warn { color: var(--warn); }
.chart { direction: ltr; }
.chart svg { display: block; width: 100%; height: auto; }
.entry { max-width: 560px; }

/* Scenarios, quiz, glossary */
.scenario-pick { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.step-card { display: flex; flex-direction: column; gap: var(--sp-4); max-width: 820px; }
.step-card h4 { font-size: var(--step-2); }
.choices { display: flex; flex-direction: column; gap: var(--sp-3); }
.choice {
  font: inherit;
  text-align: start;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  min-height: 56px;
  padding: 12px 14px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: center;
}
.choice:hover:not([disabled]) { background: var(--tint); }
.choice .letter {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 3px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.125rem;
  background: var(--tint);
}
.choice.right { border-color: var(--ok); border-width: 2px; }
.choice.right .letter { background: var(--ok); color: var(--surface); }
.choice.wrong { border-color: var(--bad); border-width: 2px; }
.choice.wrong .letter { background: var(--bad); color: var(--surface); }
.choice[disabled] { cursor: default; }
.feedback { padding: 14px 16px; border-radius: var(--radius); background: var(--tint); }
.feedback strong { display: block; margin-bottom: 4px; }
.progress { height: 6px; background: var(--tint); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent-fill); }

.gloss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--sp-6); margin: 0; }
.gloss div { padding: 14px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.gloss dt { font-weight: 600; font-size: var(--step-1); font-family: var(--f-display); }
.gloss dd { margin: 4px 0 0; color: var(--ink); }

.foot { font-size: var(--step--1); color: var(--muted); max-width: var(--measure); border-top: 1px solid var(--rule); padding-top: var(--sp-4); margin-top: var(--sp-6); }

.flow { animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -40; } }
@media (prefers-reduced-motion: reduce) {
  .rgl-a, .rgl-b, .flow { animation: none; }
  details.more summary::before { transition: none; }
}

/* Language switch on the black masthead */
.masthead .lang { flex: none; background: transparent; border-color: #3a3f44; }
.masthead .lang button { color: var(--sign-white); font-size: var(--step--2); min-height: 40px; padding: 6px 14px; }
.masthead .lang button + button { border-inline-start-color: #3a3f44; }
.masthead .lang button[aria-pressed="true"] { background: var(--sign-yellow); color: var(--sign-black); }

:root[dir="rtl"] .brand { letter-spacing: 0; }

@media (max-width: 1240px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-below { grid-template-columns: minmax(0, 1fr); }
  .calc-layout { grid-template-columns: minmax(0, 1fr); }
  .result { position: static; }
}
@media (max-width: 860px) {
  :root { --step-3: 1.875rem; --step-4: 2.125rem; }
  html { scroll-padding-top: 170px; }
  .shell { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); padding-top: 0; }
  .rail {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 56px);
    z-index: 15;
    max-height: none;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    background: var(--bg);
    padding-block: 10px;
    border-bottom: 1px solid var(--rule);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 28px), transparent);
  }
  .rail a { flex: none; scroll-snap-align: center; padding: 4px; }
  .rail-label, .rail-note, .sublessons { display: none; }
  .rail .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .rail > a[aria-current] { padding-inline-end: 12px; }
  .rail > a[aria-current] .label { position: static; width: auto; height: auto; clip-path: none; }
  .masthead .std, .brand small { display: none; }
  .brand { font-size: 1.375rem; }
  .grid-2, .grid-3, .gloss { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pg.next { grid-column: auto; }
  .pg.prev { order: 2; }
  .scroll-hint { display: block; }
  .scene-svg svg { min-width: 900px; }
  .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .callout { grid-template-columns: minmax(0, 1fr); }

  /* Wide tables become stacked cards */
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--rule); }
  table.stack tbody tr:nth-child(even) td { background: transparent; }
  table.stack th, table.stack td { padding: 2px 0; border: 0; background: transparent; }
  table.stack td:first-child, table.stack th { font-weight: 600; font-size: var(--step-1); font-family: var(--f-display); }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: var(--step--2); font-weight: 600; color: var(--muted); margin-top: 6px; }
}

/* 3D installation details */
.d3d { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.d3d-stage {
  --scene-a: #f3f5f7;
  --scene-b: #d5dce2;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, var(--scene-a), var(--scene-b));
  min-width: 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .d3d-stage { --scene-a: #1c2a37; --scene-b: #0c141b; }
}
:root[data-theme="dark"] .d3d-stage { --scene-a: #1c2a37; --scene-b: #0c141b; }
.d3d-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.d3d-toggles, .d3d-zoom { display: inline-flex; flex-wrap: wrap; gap: var(--sp-2); }
.d3d-zoom { margin-inline-start: auto; }
.d3d-zoom [data-z="in"], .d3d-zoom [data-z="out"] { min-width: var(--tap); font-size: 1.25rem; padding: 4px 10px; line-height: 1; }
.d3d-svg { display: block; width: 100%; height: auto; touch-action: none; cursor: grab; user-select: none; direction: ltr; }
.d3d-svg:active { cursor: grabbing; }
.d3d-faces path { stroke-width: 0.6; stroke-linejoin: round; }
.d3d-svg:focus-visible { outline-offset: -3px; }
.d3d-hint { margin: 0; padding: 8px 14px 10px; font-size: var(--step--2); color: var(--muted); background: var(--surface); border-top: 1px solid var(--rule); }
.d3d-labels .lead { fill: none; stroke: var(--ink); stroke-opacity: 0.55; stroke-width: 1.2; }
.d3d-labels .dot { fill: var(--accent-fill); stroke: var(--sign-black); stroke-width: 1.2; }
.d3d-labels rect { fill: var(--surface); stroke: var(--rule); stroke-width: 1; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.18)); }
.d3d-labels .t { font-family: var(--f-display); font-weight: 700; fill: var(--ink); }
.d3d-labels .s { font-family: var(--f-body); fill: var(--muted); }
.d3d-labels .nb { fill: var(--sign-yellow); stroke: var(--sign-black); stroke-width: 1; }
.d3d-labels .n { font-family: var(--f-display); font-weight: 700; font-size: 14px; fill: var(--sign-black); }
.d3d-bubble:hover rect, .d3d-bubble.on rect { stroke: var(--accent-fill); stroke-width: 2.5; }
.d3d-pin .pin { fill: var(--sign-yellow); stroke: var(--sign-black); stroke-width: 1.5; }
.d3d-pin text { font-family: var(--f-display); font-weight: 700; font-size: 16px; fill: var(--sign-black); }
.d3d-pin.on .pin { fill: var(--sign-black); stroke: var(--sign-yellow); }
.d3d-pin.on text { fill: var(--sign-yellow); }
.d3d-tip rect { fill: var(--sign-black); }
.d3d-tip text { fill: var(--sign-yellow); font-family: var(--f-body); font-weight: 600; font-size: 14px; }
.d3d-below { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--sp-5); align-items: start; }
.d3d-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.d3d-parts button {
  font: inherit;
  font-size: var(--step--1);
  width: 100%;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  text-align: start;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.d3d-parts button:hover { background: var(--tint); }
.d3d-parts button[aria-pressed="true"] { border-color: var(--sign-black); background: var(--sign-black); color: var(--sign-yellow); }
.d3d-parts .pn {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sign-yellow);
  color: var(--sign-black);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.95rem;
}
.d3d-info dl, #vault-sld-info dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-2) var(--sp-4); margin: 0; }
.d3d-info dt, #vault-sld-info dt { color: var(--muted); font-weight: 500; }
.d3d-info dd, #vault-sld-info dd { margin: 0; }
.d3d-info .btn { align-self: flex-start; }
@media (max-width: 1240px) {
  .d3d-below { grid-template-columns: minmax(0, 1fr); }
  .d3d-below > aside { order: -1; }
}
@media (max-width: 860px) {
  .d3d-bar { gap: var(--sp-2); padding: 10px; }
  .d3d-toggles { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; }
  .d3d-toggles .btn { flex: none; }
  .d3d-zoom { margin-inline-start: auto; }
  .d3d-parts { grid-template-columns: minmax(0, 1fr); }
}

/* The vault: single-line diagram and floor plan */
:root { --live: #d99a00; --dead: #9aa4ab; --lit: #ffe27a; --plan-room: #f6f8f9; --eq: #dfe5ea; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --live: #ffc629; --dead: #4d5b67; --lit: #ffd84d; --plan-room: #0f1922; --eq: #24323f; }
}
:root[data-theme="dark"] { --live: #ffc629; --dead: #4d5b67; --lit: #ffd84d; --plan-room: #0f1922; --eq: #24323f; }
.sld-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); direction: ltr; }
.sld-wrap svg { display: block; width: 100%; min-width: 760px; height: auto; }
.sld .ln { fill: none; stroke-width: 3; stroke-linejoin: round; }
.sld .ln.live { stroke: var(--live); }
.sld .ln.dead { stroke: var(--dead); stroke-dasharray: 6 5; }
.sld .ln.out { stroke-width: 2.5; }
.sld .arrow.live { fill: var(--live); }
.sld .arrow.dead { fill: var(--dead); }
.sld .bus { fill: none; stroke-width: 7; stroke-linecap: round; }
.sld .bus.live { stroke: var(--live); }
.sld .bus.dead { stroke: var(--dead); }
.sld .ctl { fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-dasharray: 3 4; }
.sld .box, .plan .eq { fill: var(--eq); stroke: var(--ink); stroke-width: 1.5; }
.sld .box.see { fill-opacity: 0.6; }
.sld .gen.starting { fill: #ffd9a0; }
.sld .gen.on { fill: var(--lit); }
.sld .ccr { fill: var(--eq); stroke: var(--ink); stroke-width: 1.5; }
.sld .ccr.lit { fill: var(--lit); }
.sld .ccr.spare { stroke-dasharray: 5 4; fill: var(--surface); }
.sld .batt { stroke: var(--ink); stroke-width: 2; fill: none; }
.sld .surge { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.sld .earthbar, .plan .earthbar { fill: #2e8b57; }
.sld .hit { fill: transparent; }
.sld .lab, .plan .lab { fill: var(--ink); font-family: var(--f-body); font-size: 15px; font-weight: 600; }
.sld .lab.small, .plan .lab.small { font-size: 13px; font-weight: 500; }
.sld .lab.tiny, .plan .lab.tiny { font-size: 11.5px; font-weight: 500; }
.sld .lab.strong { font-weight: 700; }
.sld .lab.big { font-size: 22px; font-weight: 700; font-family: var(--f-display); }
.sld .lab.state { fill: var(--accent); font-weight: 600; }
.sld .ccr.lit + .lab, .sld .ccr.lit ~ .lab { fill: #1a1a1a; }
.sld .vp, .plan .vp { cursor: pointer; }
.sld .vp:hover .box, .sld .vp:hover .ccr, .sld .vp.on .box, .sld .vp.on .ccr { stroke: var(--accent); stroke-width: 3; }
.sld .vp.on .bus { stroke-width: 10; }
.sld .vp:focus, .plan .vp:focus { outline: none; }
.sld .vp:focus-visible .box, .sld .vp:focus-visible .ccr, .plan .vp:focus-visible .pin { stroke: var(--accent); stroke-width: 3.5; }
.plan .room { fill: var(--plan-room); stroke: var(--ink); stroke-width: 4; }
.plan .wall { stroke: var(--ink); stroke-width: 3; fill: none; }
.plan .room-name { font-family: var(--f-display); font-size: 17px; font-weight: 700; fill: var(--muted); }
.plan .eq.light { fill: var(--surface); }
.plan .trench { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 8 5; }
.plan .mat { fill: #2b3035; }
.plan .clear { fill: url(#hatch); stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 3; }
.plan .hatch-line { stroke: var(--accent); stroke-opacity: 0.35; stroke-width: 2; }
.plan .board { fill: #1d6fb8; }
.plan .fan { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.plan .det { fill: var(--surface); stroke: #c8102e; stroke-width: 2; }
.plan .ext { fill: #c8102e; }
.plan .gap { fill: var(--plan-room); }
.plan .door { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.plan .emerg { fill: #2e8b57; }
.plan .bund { fill: none; stroke: var(--muted); stroke-width: 2; }
.plan .pin { fill: var(--sign-yellow); stroke: var(--sign-black); stroke-width: 1.5; }
.plan .pin-n { font-family: var(--f-display); font-weight: 700; font-size: 15px; fill: var(--sign-black); }
.plan .vp.on .pin { fill: var(--sign-black); stroke: var(--sign-yellow); }
.plan .vp.on .pin-n { fill: var(--sign-yellow); }
.plan .vp.on .eq { stroke: var(--accent); stroke-width: 3; }
#vault-sim-table .pill { white-space: nowrap; }
@media (max-width: 860px) {
  .sld-wrap svg { min-width: 820px; }
}

/* 3D vault tour */
.v3-view { position: relative; }
.v3-tip {
  position: absolute;
  z-index: 5;
  max-width: 280px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--sign-black);
  color: var(--sign-white);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.3);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--step--1);
  line-height: 1.4;
}
.v3-tip strong { color: var(--sign-yellow); font-family: var(--f-display); font-size: 1.05rem; letter-spacing: 0.01em; }
.v3-tourbar { display: inline-flex; gap: var(--sp-2); }
.v3 .d3d-faces path, .v3 svg path { stroke-width: 0.5; stroke-linejoin: round; }

/* Fault-finding game */
.fg-game { display: flex; flex-direction: column; gap: var(--sp-4); }
.fg-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fg-stats .readout.warn .v { color: var(--bad); }
.fg-msg { margin: 0; min-height: 3.2em; }
.fg-msg.bad { border-inline-start: 5px solid var(--bad); }
.fg-msg.ok { border-inline-start: 5px solid var(--ok); }
.fg-msg.info { border-inline-start: 5px solid var(--accent-fill); }
.fg-map svg.fg { min-width: 900px; user-select: none; -webkit-user-select: none; }
.fg-log { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); max-height: 320px; overflow-y: auto; font-size: var(--step--1); }
.fg-log li { display: flex; gap: var(--sp-2); align-items: baseline; }
.fg-log .pill { flex: none; }
/* Map */
.fg .rwy { fill: var(--tint); stroke: var(--rule); }
.fg .cl { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 18 14; }
.fg .span { fill: none; stroke: var(--ink); stroke-opacity: 0.55; stroke-width: 3; stroke-linejoin: round; }
.fg .span.ok { stroke: var(--ok); stroke-opacity: 1; stroke-width: 5; }
.fg .span.low { stroke: var(--bad); stroke-opacity: 1; stroke-width: 6; }
.fg .vault { fill: var(--eq); stroke: var(--ink); stroke-width: 1.5; }
.fg .lock { fill: var(--sign-yellow); stroke: var(--sign-black); }
.fg .lockbow { fill: none; stroke: var(--sign-black); stroke-width: 2.5; }
.fg .pit { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.fg .pit.open { fill: #1d2125; }
.fg .pit.ok { stroke: var(--ok); stroke-width: 3; }
.fg .pit.low { stroke: var(--bad); stroke-width: 3; }
.fg .gap { stroke: var(--sign-yellow); stroke-width: 4; stroke-linecap: round; }
.fg .light { fill: var(--l-white); stroke: var(--muted); }
.fg .here { fill: var(--accent-fill); stroke: var(--sign-black); stroke-width: 1.5; }
.fg .num { font-family: var(--f-display); font-weight: 700; font-size: 14px; fill: var(--ink); }
.fg .lab { font-family: var(--f-body); font-weight: 600; font-size: 15px; fill: var(--ink); }
.fg .lab.small { font-size: 13px; font-weight: 500; fill: var(--muted); }
.fg .lab.tiny { font-size: 11.5px; font-weight: 500; fill: var(--muted); }
.fg .lab.hint { fill: var(--accent); font-weight: 600; }
.fg .lab.okt { fill: var(--ok); font-weight: 600; }
.fg .lab.warnt { fill: var(--bad); }
.fg .hit { fill: transparent; }
.fg [data-act] { cursor: pointer; }
.fg [data-act]:focus { outline: none; }
.fg .pick:hover .pit, .fg .pick:hover .vault, .fg .pick:focus-visible .pit, .fg .pick:focus-visible .vault { stroke: var(--accent); stroke-width: 3; }
.fg .pick.on .pit, .fg .pick.on .vault { stroke: var(--accent-fill); stroke-width: 4; }
.fg .fault circle { fill: var(--bad); fill-opacity: 0.25; stroke: var(--bad); stroke-width: 2; }
.fg .fault path { fill: var(--bad); }
/* Close-up */
.fg .ins-bg { fill: var(--tint); stroke: var(--rule); }
.fg .ins-title { font-family: var(--f-display); font-weight: 700; font-size: 17px; fill: var(--ink); }
.fg .cab { fill: var(--eq); stroke: var(--ink); stroke-width: 1.5; }
.fg .ccr-disp { fill: #0d1b14; }
.fg .ccr-t { font-family: var(--f-display); font-size: 15px; font-weight: 700; fill: #6fe39b; }
.fg .alarm { fill: var(--l-red); stroke: var(--sign-black); animation: fg-blink 1s steps(2) infinite; }
@keyframes fg-blink { 50% { fill-opacity: 0.25; } }
.fg .brk { fill: var(--surface); stroke: var(--ink); }
.fg .brk-h { fill: var(--muted); stroke: var(--ink); }
.fg .brk-h.on { fill: var(--sign-red); }
.fg .wire, .fg .cable, .fg .lead-w { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.fg .cable { stroke-width: 6; }
.fg .lead-w { stroke-width: 3.5; }
.fg .cut-base { fill: #2a3138; stroke: var(--ink); }
.fg .cut-plug { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; }
.fg .cut-handle { fill: var(--sign-black); }
.fg .earthbar, .fg .lug { fill: #c27a3a; stroke: #6b3d14; }
.fg .plate { fill: #9aa5ae; stroke: var(--ink); stroke-width: 2; }
.fg .bolt { fill: #6d7880; stroke: var(--ink); }
.fg .fixture { fill: #f2c14e; stroke: var(--ink); }
.fg .lens { fill: var(--l-white); stroke: var(--ink); }
.fg .can-in { fill: #aab3ba; stroke: #6d7880; stroke-width: 8; }
.fg .water { fill: #2f7fd0; fill-opacity: 0.45; }
.fg .txr { fill: #2a3138; stroke: #8b959d; stroke-width: 2; }
.fg .txr + text, .fg .txr ~ text { fill: #e8edf1; }
.fg .can-in ~ .lab { fill: #15202a; }
.fg .can-in ~ .lab.hint { fill: #6b4500; }
.fg .can-in ~ .wire, .fg .can-in ~ .lead-w { stroke: #15202a; }
.fg .conn { fill: #111; stroke: #9aa5ae; }
.fg .conn.t { fill: #2c2c2c; }
.fg .scorch { fill: #3a1a08; fill-opacity: 0.7; pointer-events: none; }
.fg .scorch.on-txr { fill: #7a3410; fill-opacity: 0.9; }
.fg .crack { fill: none; stroke: #ff9a4d; stroke-width: 2.5; stroke-linejoin: round; pointer-events: none; }
.fg .crack.thin { stroke-width: 1.6; stroke: #f6e3c8; }
.fg .track { fill: none; stroke: #0a0a0a; stroke-width: 2.5; stroke-linecap: round; pointer-events: none; }
.fg .tar { fill: #6b4513; stroke: #2b1a08; }
.fg .look .lab { fill: #e8edf1; }
.fg .tape { fill: #6b6f73; pointer-events: none; }
.fg .rust circle { fill: #b5561c; fill-opacity: 0.85; }
.fg .mud { fill: #6b4a2b; fill-opacity: 0.7; }
.fg .act-g:hover .plate, .fg .act-g:focus-visible .plate, .fg .act-g:hover .cut-plug, .fg .act-g:focus-visible .cut-plug, .fg .act-g:hover .brk, .fg .act-g:focus-visible .brk { stroke: var(--accent); stroke-width: 3; }
.fg .plug:hover .conn, .fg .plug:focus-visible .conn { stroke: var(--accent-fill); stroke-width: 2.5; }
.fg .chip rect { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.fg .chip text { font-family: var(--f-body); font-size: 12.5px; font-weight: 600; fill: var(--ink); }
.fg .chip:hover rect, .fg .chip:focus-visible rect { fill: var(--accent-fill); }
.fg .chip:hover text, .fg .chip:focus-visible text { fill: var(--sign-black); }
.fg .chip.primary rect { fill: var(--accent-fill); stroke: var(--sign-black); }
.fg .chip.primary text { fill: var(--sign-black); font-size: 14px; }
.fg .term-hit { fill: transparent; }
.fg .term-dot { fill: var(--sign-yellow); stroke: var(--sign-black); stroke-width: 2; }
.fg .term.ready .term-dot { animation: fg-pulse 0.9s ease-in-out infinite alternate; }
.fg .term:hover .term-dot, .fg .term:focus-visible .term-dot { stroke: var(--accent); stroke-width: 4; }
@keyframes fg-pulse { to { stroke-width: 5; stroke: var(--accent-fill); } }
.fg-stars { font-size: 30px; fill: var(--accent-fill); stroke: var(--sign-black); stroke-width: 1; letter-spacing: 0.1em; }
/* Insulation tester: a fixed-colour instrument in both themes */
.fg .ins-body { fill: #f4b400; stroke: var(--sign-black); stroke-width: 2; }
.fg .ins-name { font-family: var(--f-display); font-weight: 700; font-size: 15px; fill: var(--sign-black); }
.fg .ins-body ~ .lab.tiny, .fg .lab.tiny.ink { fill: var(--sign-black); }
.fg .g-lcd { pointer-events: none; }
.fg .lcd { fill: #c9d6b8; stroke: var(--sign-black); stroke-width: 2; }
.fg .lcd-big { font-family: var(--f-display); font-weight: 700; font-size: 40px; fill: #1b2410; }
.fg .lcd-s { font-family: var(--f-body); font-size: 13px; font-weight: 600; fill: #1b2410; }
.fg .lcd-s.live { fill: #b3261e; }
.fg .graph { fill: #1b2410; }
.fg .grid { stroke: #4d5c3d; stroke-width: 1; }
.fg .grid.t { stroke-dasharray: 3 4; }
.fg .gl { font-family: var(--f-body); font-size: 10px; fill: #a9b996; }
.fg .curve { fill: none; stroke: #b6f06a; stroke-width: 2.5; stroke-linejoin: round; }
.fg .knob circle { fill: #2a2f33; stroke: var(--sign-black); stroke-width: 2; }
.fg .knob-p { stroke: var(--sign-white); stroke-width: 4; stroke-linecap: round; }
.fg .vsel text { font-family: var(--f-display); font-weight: 700; font-size: 13px; fill: var(--sign-black); }
.fg .vsel.on text { fill: var(--sign-red); font-size: 15px; }
.fg .vsel:hover text, .fg .vsel:focus-visible text { text-decoration: underline; }
.fg .knob:hover circle, .fg .knob:focus-visible circle { stroke: var(--sign-white); }
.fg .testbtn circle { fill: #2a2f33; stroke: var(--sign-black); stroke-width: 3; }
.fg .testbtn text { font-family: var(--f-display); font-weight: 700; font-size: 15px; fill: var(--sign-white); }
.fg .testbtn.on circle { fill: var(--sign-red); }
.fg .testbtn:hover circle, .fg .testbtn:focus-visible circle { stroke: var(--sign-white); }
.fg .jack { stroke: var(--sign-black); stroke-width: 3; }
.fg .jack.red, .fg .clip.red .boot, .fg .clip.red .jaw { fill: #d42a1f; }
.fg .jack.black, .fg .clip.black .boot, .fg .clip.black .jaw { fill: #1a1a1a; }
.fg .lead { fill: none; stroke-width: 4; stroke-linecap: round; pointer-events: none; }
.fg .lead.red { stroke: #d42a1f; }
.fg .lead.black { stroke: #1a1a1a; }
.fg .clip { cursor: grab; touch-action: none; }
.fg .clip:focus { outline: none; }
.fg .clip-hit { fill: transparent; }
.fg .clip .jaw, .fg .clip .boot { stroke: var(--sign-white); stroke-width: 1.5; }
.fg .clip.armed .clip-hit, .fg .clip:focus-visible .clip-hit { fill: var(--accent-fill); fill-opacity: 0.5; stroke: var(--sign-black); }
@media (prefers-reduced-motion: reduce) { .fg .alarm, .fg .term.ready .term-dot { animation: none; } }
/* Safety incidents flash on the drawing where they happen */
.fg .g-alert { pointer-events: none; }
.fg .al-card { pointer-events: auto; cursor: pointer; animation: fg-drop 0.35s cubic-bezier(.2, 1.4, .4, 1); }
.fg .al-flash { fill: #ff2a1a; opacity: 0; animation: fg-flash 0.9s ease-out; }
.fg .al-spark { animation: fg-pop 0.5s ease-out, fg-flicker 0.15s steps(2) 0.5s 6; }
.fg .al-ring { fill: #ff2a1a; fill-opacity: 0.35; stroke: #ff2a1a; stroke-width: 3; animation: fg-ring 0.9s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.fg .al-rays { stroke: #ffe14d; stroke-width: 4; stroke-linecap: round; fill: none; }
.fg .al-bolt { fill: #ffe14d; stroke: #111417; stroke-width: 1.5; }
.fg .al-border { stroke: #111417; stroke-width: 2; }
.fg .al-body { fill: #fffdf5; }
.fg .al-tri { fill: #ffcc00; stroke: #111417; stroke-width: 2.5; stroke-linejoin: round; }
.fg .al-excl { font-family: var(--f-display); font-weight: 800; font-size: 20px; fill: #111417; }
.fg .al-title { font-family: var(--f-display); font-weight: 700; font-size: 24px; letter-spacing: 0.04em; text-transform: uppercase; fill: #b3261e; }
.fg .al-text { font-family: var(--f-body); font-weight: 600; font-size: 16px; fill: #15202a; }
.fg .al-hint { font-family: var(--f-body); font-size: 12px; fill: #46525d; }
@keyframes fg-flash { 0% { opacity: 0.45; } 100% { opacity: 0; } }
@keyframes fg-pop { 0% { transform: scale(0.2); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes fg-flicker { 50% { opacity: 0.35; } }
@keyframes fg-ring { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
@keyframes fg-drop { from { transform: translateY(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fg-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes fg-alarm { 0%, 100% { background: var(--surface); } 30% { background: color-mix(in srgb, var(--bad) 30%, var(--surface)); } }
.fg-map.fg-shake { animation: fg-shake 0.45s ease-in-out; }
.fg-stats.fg-shake .readout.warn { animation: fg-alarm 0.6s ease-in-out 3; }
@media (prefers-reduced-motion: reduce) {
  .fg .al-card, .fg .al-spark, .fg .al-ring, .fg-map.fg-shake { animation: none; }
  .fg .al-flash { animation: none; opacity: 0.12; }
}
/* Open-circuit game: earthing jumpers, pulled and burnt connectors, breaks */
.fg .clip.jumper .jaw, .fg .clip.jumper .boot { fill: #2e9e44; stroke: #ffd400; stroke-width: 2; }
.fg .jlead { fill: none; stroke: #2e9e44; stroke-width: 4; stroke-dasharray: 9 6; stroke-linecap: round; pointer-events: none; }
.fg .jtray { fill: var(--ink); }
.fg .jmark path { fill: none; stroke: #2e9e44; stroke-width: 2.5; stroke-linecap: round; }
.fg .fault .brk { fill: none; stroke: var(--bad); stroke-width: 3; stroke-linecap: round; }
.fg .pullgap { fill: #aab3ba; pointer-events: none; }
.fg .pin { stroke: #c9a24a; stroke-width: 2.5; pointer-events: none; }
.fg .burntpin { fill: #1a0d05; stroke: #e0662b; stroke-width: 1.5; pointer-events: none; }
.fg .gl.big { font-size: 15px; font-weight: 600; fill: #b6f06a; }
@media (max-width: 860px) { .fg-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Lights on a curve */
label.field.inline { flex-direction: row; align-items: center; gap: var(--sp-3); }
label.field.inline select { min-width: 180px; }
.result-table tr.cv-head td { color: var(--ink); font-weight: 700; padding-top: 14px; border-bottom: 1px solid var(--rule); }
.cv-draw svg { display: block; width: 100%; height: auto; max-height: 440px; }
.cv-draw .cv-c { fill: var(--muted); }
.cv-draw .cv-tan { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 6 5; }
.cv-draw .cv-arc { fill: none; stroke: var(--rule); stroke-width: 3; }
.cv-draw .cv-arc.cl { stroke: var(--ink); stroke-opacity: 0.35; }
.cv-draw .cv-rad { stroke: var(--muted); stroke-width: 1.2; }
.cv-draw .cv-light { stroke: var(--sign-black); stroke-width: 1.2; }
.cv-draw .cv-light.cl { fill: var(--l-green); }
.cv-draw .cv-light.in, .cv-draw .cv-light.out { fill: var(--l-blue); }
.cv-draw .cv-light.tp { stroke: var(--accent); stroke-width: 3; }
.cv-draw .cv-lab { font-family: var(--f-body); font-size: 14px; font-weight: 600; fill: var(--ink); }
.cv-draw .cv-lab.tp { fill: var(--accent); }
.cv-table td.num, .cv-table th.num { text-align: end; font-variant-numeric: tabular-nums; }

/* Troubleshooting flowcharts: checks are yellow like mandatory signs, actions black like location signs */
.fl-charts { margin-block: var(--sp-3) var(--sp-4); }
.fl-panel { display: flex; flex-direction: column; gap: var(--sp-4); }
.fl-title { font-size: var(--step-2); }
.fl-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: var(--step--1); color: var(--muted); }
.fl-key .mini { display: inline-block; width: 22px; height: 14px; padding: 0; border-radius: 3px; }
.fl-key .mini + * { margin-inline-end: 8px; }
.fl-spine { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fl-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 64px; align-items: center; }
.fl-node { grid-column: 1; position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 8px; border: 2px solid var(--sign-black); }
.fl-node p { margin: 0; font-weight: 600; line-height: 1.45; }
.fl-node.q { background: var(--sign-yellow); color: var(--sign-black); }
.fl-node.do { background: var(--sign-black); color: var(--sign-yellow); }
.fl-node.end { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.fl-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-family: var(--f-display); font-weight: 700; background: var(--sign-black); color: var(--sign-yellow); }
.fl-node.do .fl-n { background: var(--sign-yellow); color: var(--sign-black); }
.fl-node.end .fl-n { background: var(--ink); color: var(--surface); }
.fl-node .fl-link { color: inherit; font-weight: 700; white-space: nowrap; }
.fl-branch { grid-column: 2; position: relative; display: flex; align-items: center; min-width: 0; }
.fl-branch::before { content: ""; position: absolute; inset-inline-start: -64px; width: 56px; top: 50%; border-top: 2px solid var(--ink); }
.fl-branch::after { content: ""; position: absolute; inset-inline-start: -10px; top: calc(50% - 6px); border: 6px solid transparent; border-inline-start-color: var(--ink); }
.fl-ans { position: absolute; inset-inline-start: -58px; top: calc(50% - 26px); font-size: var(--step--1); font-weight: 700; }
.fl-ans.yes { color: var(--ok); }
.fl-ans.no { color: var(--bad); }
.fl-fix { flex: 1; padding: 12px 14px; border-radius: 8px; background: var(--tint); border-inline-start: 5px solid var(--accent-fill); }
.fl-fix p { margin: 0; line-height: 1.45; }
.fl-fix .fl-link { font-weight: 700; white-space: nowrap; }
.fl-down { grid-column: 1; justify-self: center; position: relative; display: block; height: 40px; padding-inline-start: 14px; padding-top: 10px; font-size: var(--step--1); font-weight: 700; color: var(--muted); }
.fl-down::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 6px; border-inline-start: 2px solid var(--ink); }
.fl-down::after { content: ""; position: absolute; inset-inline-start: -6px; bottom: -4px; border: 6px solid transparent; border-top-color: var(--ink); }
.fl-row.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--sp-4); row-gap: 28px; }
.fl-row.two .fl-node { grid-column: 1 / -1; }
.fl-row.two .fl-branch { grid-column: auto; flex-direction: column; align-items: stretch; gap: 6px; }
.fl-row.two .fl-branch::before { inset-inline-start: 50%; width: 0; top: -26px; height: 20px; border-top: 0; border-inline-start: 2px solid var(--ink); }
.fl-row.two .fl-branch::after { display: none; }
.fl-row.two .fl-ans { position: static; }
.fl-key .fl-node.mini, .fl-key .fl-fix.mini { border-width: 2px; }
@media (max-width: 760px) {
  .fl-row { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .fl-branch { grid-column: 1; margin-inline-start: 34px; flex-direction: column; align-items: stretch; gap: 4px; }
  .fl-branch::before { inset-inline-start: -20px; width: 14px; top: -10px; height: calc(50% + 10px); border-top: 0; border-inline-start: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
  .fl-branch::after { display: none; }
  .fl-ans { position: static; }
  .fl-row.two { grid-template-columns: minmax(0, 1fr); }
  .fl-row.two .fl-branch { margin-inline-start: 34px; }
}
.fl-key .fl-fix.mini { flex: none; }

/* Event log and newly fitted parts */
.fg-log .fg-at { flex: none; min-width: 3.2em; font-family: var(--f-mono, monospace); color: var(--muted); font-variant-numeric: tabular-nums; }
.fg .conn.fresh { fill: #20262b; stroke: #e6edf2; stroke-width: 1.5; }
.fg .txr.fresh { fill: #2f3942; stroke: #e6edf2; }
.fg .can-in ~ .lab.newtag { fill: #136b37; font-weight: 700; letter-spacing: 0.06em; }

/* Lighting fault simulator: live lights, the CCR panel, interleaved circuits */
.fg .light.lit { fill: #fff3b0; stroke: #e0b400; stroke-width: 1.5; filter: drop-shadow(0 0 4px rgba(255, 214, 64, var(--glow, 1))); opacity: var(--glow, 1); }
.fg .light.dark { fill: #4d5761; stroke: var(--sign-black); }
.fg .light.flick, .fg .lens.flick { animation: fg-flick 0.7s steps(3) infinite; }
@keyframes fg-flick { 0% { opacity: 1; } 40% { opacity: 0.25; } 70% { opacity: 0.85; } }
.fg .lens.lit { fill: #fff3b0; filter: drop-shadow(0 0 10px rgba(255, 214, 64, 0.9)); opacity: var(--glow, 1); }
.fg .lens.dark { fill: #59636c; }
.fg .lenscrack { fill: none; stroke: #15202a; stroke-width: 1.6; }
.fg .span.ca { stroke: var(--c-a); stroke-opacity: 0.9; }
.fg .span.cb { stroke: var(--c-b); stroke-opacity: 0.9; }
.fg .span.ca.ok, .fg .span.cb.ok { stroke: var(--ok); }
.fg .span.ca.low, .fg .span.cb.low { stroke: var(--bad); }
.fg .pit.ca { stroke: var(--c-a); stroke-width: 2.5; }
.fg .pit.cb { stroke: var(--c-b); stroke-width: 2.5; }
.fg .num.small { font-size: 12px; }
.fg .ccr-disp.dead { fill: #1a1f24; }
.fg .stepbtn rect { fill: var(--surface); stroke: var(--ink); stroke-width: 1.2; }
.fg .stepbtn text { font-family: var(--f-display); font-weight: 700; font-size: 14px; fill: var(--ink); }
.fg .stepbtn.on rect { fill: var(--sign-black); }
.fg .stepbtn.on text { fill: var(--sign-yellow); }
.fg .stepbtn:hover rect, .fg .stepbtn:focus-visible rect { stroke: var(--accent); stroke-width: 2.5; }
.fg .fuse { fill: #d7dde2; stroke: #15202a; }
.fg .fuse-cap { fill: #3a4148; }
.fg .fuse-flag { fill: var(--sign-red); stroke: #15202a; }
.fg .clamp-lcd { fill: #c9d6b8; stroke: #15202a; }
.fg .clamp-t { font-family: var(--f-display); font-weight: 700; font-size: 15px; fill: #1b2410; }
.fg .clamp-jaw { fill: none; stroke: #f4b400; stroke-width: 6; }
.fg .clamp-jaw.idle { stroke: var(--muted); stroke-dasharray: 4 3; stroke-width: 3; }
.fg .clampm:hover .clamp-jaw, .fg .clampm:focus-visible .clamp-jaw { stroke: var(--accent); }
.fg .shortlink { stroke: var(--sign-yellow); stroke-width: 5; stroke-linecap: round; }
.fg .heat { fill: #8a5a2b; fill-opacity: 0.55; pointer-events: none; }
.fg .corrode { fill: #9fd6a8; stroke: #3c8a54; stroke-width: 1.5; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .fg .light.flick, .fg .lens.flick { animation: none; opacity: 0.6; } }

/* How a CCR works */
.cd { display: flex; flex-direction: column; gap: var(--sp-4); }
.cd-diagram svg { display: block; width: 100%; min-width: 820px; height: auto; }
.cd-block rect { stroke-width: 2; cursor: pointer; }
.cd-block.pwr rect { fill: var(--sign-black); stroke: #5b6670; }
.cd-block.pwr text { fill: var(--sign-yellow); }
.cd-block.ctl rect { fill: var(--sign-yellow); stroke: var(--sign-black); }
.cd-block.ctl text { fill: var(--sign-black); }
.cd-block text { font-family: var(--f-body); font-size: 13.5px; font-weight: 600; pointer-events: none; }
.cd-block:hover rect, .cd-block:focus-visible rect { stroke: var(--accent); stroke-width: 4; }
.cd-block:focus { outline: none; }
.cd-block.on rect { stroke: var(--accent-fill); stroke-width: 5; filter: drop-shadow(0 0 6px rgba(255, 198, 41, 0.6)); }
.cd-power { stroke: var(--ink); stroke-width: 5; fill: none; }
.cd-sig { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 4; fill: none; }
.cd-arrhead { fill: var(--muted); }
.cd-earth { stroke: var(--muted); stroke-width: 2; }
.cd-row { font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; fill: var(--muted); }
.cd-lab { font-family: var(--f-body); font-size: 12px; font-weight: 600; fill: var(--muted); }
.cd-info h4 { margin: 6px 0 4px; font-size: var(--step-1); }
.cd-info p { margin: 0 0 8px; }
.cd-fail { color: var(--ink); }
.cd-wave-host svg { display: block; width: 100%; height: auto; }
.cd-axis { stroke: var(--rule); stroke-width: 1.5; fill: none; }
.cd-ref { fill: none; stroke: var(--rule); stroke-width: 2; stroke-dasharray: 4 4; }
.cd-wave { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }
.cd-note { margin-top: var(--sp-3); }
.cd input[type="range"] { width: 100%; accent-color: var(--accent-fill); }

/* CCR schematic: standard symbols, black on the sheet, the selected component highlighted */
.cd-diagram svg { font-family: var(--f-body); }
.cd-sheet { fill: var(--surface); stroke: var(--rule); }
.cd-div { stroke: var(--rule); stroke-dasharray: 2 4; }
.cd-diagram .wire { fill: none; stroke: var(--ink); stroke-width: 2; }
.cd-diagram .sym { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.cd-diagram .sym.thick { stroke-width: 4; }
.cd-diagram .sym.fillw { fill: var(--surface); }
.cd-diagram .sym.fillk { fill: var(--ink); }
.cd-diagram .term { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.cd-diagram .dot { fill: var(--ink); }
.cd-diagram .mech { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.cd-diagram .mech.dash { stroke-dasharray: 6 4; }
.cd-diagram .sig { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-dasharray: 7 4; }
.cd-diagram .cd-arrhead { fill: var(--accent); }
.cd-diagram .pin { font-size: 15px; font-weight: 700; fill: var(--ink); }
.cd-diagram .pin.small { font-size: 13px; }
.cd-diagram .slab { font-size: 12px; font-weight: 600; fill: var(--accent); }
.cd-diagram .des { font-family: var(--f-mono); font-size: 13px; font-weight: 600; fill: var(--ink); }
.cd-diagram .cap { font-size: 12px; fill: var(--muted); }
.cd-diagram .cap.in { font-size: 13px; font-weight: 600; fill: var(--ink); }
.cd-diagram .box { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.cd-comp { cursor: pointer; }
.cd-comp:focus { outline: none; }
.cd-comp .hl { fill: var(--accent-fill); fill-opacity: 0; stroke: none; }
.cd-comp:hover .hl, .cd-comp:focus-visible .hl { fill-opacity: 0.18; }
.cd-comp.on .hl { fill-opacity: 0.32; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 3; }
.cd-comp.on .sym, .cd-comp.on .box { stroke: var(--accent); }
.cd-comp.on .sym.fillk { fill: var(--accent); }
.cd-comp.on .des { fill: var(--accent); }
