/*
 * theme.css — GETCO GIS Explorer.
 *
 * Direction: a control-room training simulator for transmission engineers —
 * dense and exact like a SCADA mimic, calm and readable like a good technical
 * manual. GETCO transmission blue is the brand; a saffron "energy" orange is
 * the second accent. The simulator panels (the HMI) stay dark in both modes,
 * the way a control room does; the page around them switches.
 *
 * :root opens LIGHT. html[data-theme="dark"] is the other mode.
 * Own tokens are --x-<name>, declared in both blocks.
 */

:root {
  --canvas: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #e9eef6;
  --border: #d3dbe7;
  --border-strong: #9fb0c8;
  --ink: #0f1c2e;
  --muted: #4f5f75;
  --accent: #0b4ea2;
  --accent-hover: #093f84;
  --accent-ink: #ffffff;
  --accent-text: #0b4ea2;
  --accent-strong: #083a7a;
  --accent-soft: #e1ebf8;
  --accent-border: #a9c4ea;
  --success: #157a3c;
  --success-ink: #ffffff;
  --success-soft: #dcefe2;
  --success-strong: #106232;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #fbecd9;
  --warning-strong: #92400e;
  --danger: #c0262d;
  --danger-ink: #ffffff;
  --danger-soft: #f9e0e0;
  --danger-strong: #a11d24;
  --chart-1: #0b4ea2;
  --chart-2: #e57c0b;
  --chart-3: #138a8a;
  --chart-4: #7b4fb8;
  --chart-5: #c0262d;
  --chart-6: #5b6b80;

  --font-display: "Archivo Variable", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display-weight: 750;
  --display-tracking: -0.025em;
  --eyebrow-tracking: 0.08em;

  --radius-btn: 6px;
  --radius-card: 10px;
  --radius-input: 6px;
  --border-w: 1px;
  --border-strong-w: 1px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-raised: 0 12px 32px rgba(0, 0, 0, 0.16);
  --shadow-btn: none;
  --card-pad: 1.25rem;
  --btn-weight: 600;
  --measure: 70ch;

  /* GETCO brand band */
  --x-brand-deep: #07264f;
  --x-brand-line: #12396f;
  --x-on-brand: #eef4ff;
  --x-on-brand-muted: #a9bedc;
  --x-saffron: #f39200;

  /* The HMI: the simulator's own dark ground, in both modes */
  --x-hmi: #0a1424;
  --x-hmi-2: #101e33;
  --x-hmi-line: #1d3150;
  --x-hmi-ink: #d9e5f5;
  --x-hmi-muted: #8ea3c0;

  /* Single-line diagram states (Indian SCADA convention: red = closed, green = open) */
  --x-live: #ffb02e;
  --x-flow: #ffe27a;
  --x-dead: #4b5d78;
  --x-earth: #b8dc3a;
  --x-closed: #ff4d4f;
  --x-open: #34c46a;
  --x-travel: #ffc53d;
  --x-fault: #ff3b3b;

  /* Materials */
  --x-gas: #37c3d9;
  --x-copper: #d4874a;
  --x-copper-dark: #9a5a2a;
  --x-alu: #aab6c6;
  --x-alu-dark: #6d7b8f;
  --x-alu-light: #e3e9f1;
  --x-epoxy: #e6b85c;
  --x-ptfe: #efeae0;
  --x-tungsten: #8c8f99;
  --x-arc: #fff6c8;
  --x-arc-glow: #8fb4ff;
  --x-trv: #7fd1ff;
}

html[data-theme="dark"] {
  --canvas: #0b1220;
  --surface: #111b2d;
  --surface-2: #17243a;
  --border: #24344f;
  --border-strong: #3b5072;
  --ink: #e8eef8;
  --muted: #9aabc4;
  --accent: #4d8fe8;
  --accent-hover: #6aa3ef;
  --accent-ink: #06142a;
  --accent-text: #7fb0f5;
  --accent-strong: #a9cbff;
  --accent-soft: #14294a;
  --accent-border: #2c4f80;
  --success: #2fa35c;
  --success-ink: #04140a;
  --success-soft: #10291b;
  --success-strong: #6fd497;
  --warning: #e08a1e;
  --warning-ink: #1a0e00;
  --warning-soft: #2f2110;
  --warning-strong: #f5b660;
  --danger: #d0343a;
  --danger-ink: #ffffff;
  --danger-soft: #3a1517;
  --danger-strong: #ff8a8d;
  --chart-1: #6aa3ef;
  --chart-2: #f5a442;
  --chart-3: #3cc4c4;
  --chart-4: #a98ae0;
  --chart-5: #ff7b7f;
  --chart-6: #94a3b8;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-raised: 0 16px 40px rgba(0, 0, 0, 0.55);

  --x-brand-deep: #071a35;
  --x-brand-line: #163763;
  --x-on-brand: #eef4ff;
  --x-on-brand-muted: #9fb4d4;
  --x-saffron: #ffa21f;

  --x-hmi: #060d19;
  --x-hmi-2: #0c182b;
  --x-hmi-line: #1a2c49;
  --x-hmi-ink: #d9e5f5;
  --x-hmi-muted: #8ea3c0;

  --x-live: #ffb02e;
  --x-flow: #ffe27a;
  --x-dead: #4b5d78;
  --x-earth: #b8dc3a;
  --x-closed: #ff4d4f;
  --x-open: #34c46a;
  --x-travel: #ffc53d;
  --x-fault: #ff3b3b;

  --x-gas: #37c3d9;
  --x-copper: #d4874a;
  --x-copper-dark: #9a5a2a;
  --x-alu: #9aa7b8;
  --x-alu-dark: #5f6d82;
  --x-alu-light: #cfd8e4;
  --x-epoxy: #e6b85c;
  --x-ptfe: #e7e1d4;
  --x-tungsten: #8c8f99;
  --x-arc: #fff6c8;
  --x-arc-glow: #8fb4ff;
  --x-trv: #7fd1ff;
}

/*
 * app.css — GETCO GIS Explorer's own screens: the GETCO bar and rating plate,
 * the dark HMI panels, the single-line diagram, the interrupter cut-away and
 * waveform, the density dials and alarm fascia, the PRPD plot, the bay
 * elevation and the quiz. Tokens only — every value lives in theme.css.
 */

/* ---------------------------------------------------------------- ground */
.page-ground { background: var(--canvas); }
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; padding: 0.5rem 1rem; border-radius: var(--radius-btn); background: var(--accent); color: var(--accent-ink); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ GETCO bar */
.getco-bar { background: var(--x-brand-deep); color: var(--x-on-brand); }
.getco-mark { display: flex; align-items: center; gap: 0.75rem; min-width: 0; color: var(--x-on-brand); text-decoration: none; }
.getco-mark:hover { text-decoration: none; }
.getco-tile { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; flex-shrink: 0; border-radius: 8px; background: var(--x-saffron); color: var(--x-brand-deep); }
.getco-tile .tower-glyph { width: 1.6rem; height: 1.6rem; }
.getco-tile-sm { width: 2rem; height: 2rem; border-radius: 6px; }
.getco-tile-sm .tower-glyph { width: 1.3rem; height: 1.3rem; }
.getco-word { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: 1; letter-spacing: 0.08em; }
.getco-sub { margin-top: 0.2rem; font-family: var(--font-mono); font-size: 0.66rem; line-height: 1; letter-spacing: 0.16em; text-transform: uppercase; color: var(--x-on-brand-muted); }

.nav-link { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border-radius: var(--radius-btn); font-size: 0.9rem; font-weight: 500; color: var(--x-on-brand-muted); white-space: nowrap; text-decoration: none; transition: background-color 0.15s, color 0.15s; }
.nav-link:hover { color: var(--x-on-brand); background: rgba(255, 255, 255, 0.08); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--x-on-brand); background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 -2px 0 var(--x-saffron); }
.dropdown-item[aria-current="page"] { font-weight: 600; color: var(--accent-text); }
.bar-btn { color: var(--x-on-brand-muted); border-color: transparent; background: transparent; }
.bar-btn:hover { color: var(--x-on-brand); background: rgba(255, 255, 255, 0.1); border-color: transparent; }

.rating-strip { background: var(--x-brand-line); color: var(--x-on-brand); border-bottom: 3px solid var(--x-saffron); }
.strip-label, .strip-unit { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--x-on-brand-muted); white-space: nowrap; }
.kv-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: rgba(0, 0, 0, 0.28); }
.kv-seg button { min-width: 3.1rem; height: 2rem; padding: 0 0.5rem; border-radius: 6px; font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; color: var(--x-on-brand-muted); transition: background-color 0.15s, color 0.15s; }
.kv-seg button:hover { color: var(--x-on-brand); background: rgba(255, 255, 255, 0.08); }
.kv-seg button[aria-checked="true"] { background: var(--x-saffron); color: var(--x-brand-deep); }
.plate > div { display: flex; flex-direction: column; min-width: 0; }
.plate dt { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--x-on-brand-muted); }
.plate dd { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; color: var(--x-on-brand); white-space: nowrap; font-variant-numeric: tabular-nums; }
.plate dd.is-updated { animation: plate-flash 0.8s ease-out; }

/* ------------------------------------------------------------ page head */
.kicker { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: var(--eyebrow-tracking); text-transform: uppercase; color: var(--accent-text); }
.kicker::before { content: ""; width: 1.5rem; height: 3px; flex-shrink: 0; border-radius: 2px; background: var(--x-saffron); }
.page-title { margin-top: 0.6rem; max-width: 24ch; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: clamp(2rem, 1.3rem + 2.8vw, 3.4rem); line-height: 1.03; text-wrap: balance; }
.page-title [data-r] { color: var(--accent-text); }
.lede { margin-top: 1rem; max-width: 74ch; font-size: 1.05rem; line-height: 1.6; color: var(--muted); }
.section-title { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.02em; font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem); line-height: 1.1; text-wrap: balance; }
.band { padding: 1.5rem; border-radius: var(--radius-card); background: var(--surface-2); }
@media (min-width: 768px) { .band { padding: 2rem; } }
.site-foot { border-top: 1px solid var(--border); background: var(--surface); }

/* --------------------------------------------------------------- the HMI */
.hmi { overflow: hidden; border: 1px solid var(--x-hmi-line); border-radius: var(--radius-card); color: var(--x-hmi-ink); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
  background-color: var(--x-hmi);
  background-image: linear-gradient(color-mix(in srgb, var(--x-hmi-line) 40%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--x-hmi-line) 40%, transparent) 1px, transparent 1px);
  background-size: 28px 28px; }
.hmi-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--x-hmi-line); background: var(--x-hmi-2); }
.hmi-title { min-width: 0; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--x-hmi-ink); }
.hmi-small { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--x-hmi-muted); white-space: nowrap; }
.hmi-clock { flex-shrink: 0; font-family: var(--font-mono); font-size: 0.78rem; color: var(--x-flow); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hmi-dot { width: 0.55rem; height: 0.55rem; flex-shrink: 0; border-radius: 999px; background: var(--x-open); box-shadow: 0 0 8px var(--x-open); }
.hmi-dot.is-alarm { background: var(--x-fault); box-shadow: 0 0 10px var(--x-fault); animation: blink 0.8s steps(2) infinite; }
.hmi-toggle span { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--x-hmi-muted); white-space: nowrap; }
.hmi-btn { color: var(--x-hmi-muted); }
.hmi-btn:hover { color: var(--x-hmi-ink); background: rgba(255, 255, 255, 0.06); }
.hmi-outline { border-color: var(--x-hmi-line); background: transparent; color: var(--x-hmi-ink); }
.hmi-outline:hover { border-color: var(--x-hmi-muted); background: rgba(255, 255, 255, 0.06); }
.hmi-outline[aria-pressed="true"] { border-color: var(--x-saffron); color: var(--x-saffron); }
.hmi-alert { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; font-size: 0.88rem; color: var(--x-hmi-ink); border-top: 1px solid color-mix(in srgb, var(--x-fault) 45%, transparent); background: color-mix(in srgb, var(--x-fault) 18%, var(--x-hmi)); }
.hmi-alert .icon { flex-shrink: 0; color: var(--x-fault); }
.hmi-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 0; height: 2.2rem; padding: 0 0.75rem; border: 1px solid var(--x-hmi-line); border-radius: var(--radius-btn); background: var(--x-hmi-2); color: var(--x-hmi-muted); font-size: 0.82rem; font-weight: 500; white-space: nowrap; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.hmi-chip:hover { color: var(--x-hmi-ink); border-color: var(--x-hmi-muted); }
.hmi-chip[aria-pressed="true"] { color: var(--x-brand-deep); background: var(--x-saffron); border-color: var(--x-saffron); }
.swipe-hint { display: flex; align-items: center; gap: 0.5rem; padding: 0 1rem 0.6rem; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--x-hmi-muted); }
@media (min-width: 768px) { .swipe-hint { display: none; } }

.legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem 1rem; padding: 0.75rem 1rem; border-top: 1px solid var(--x-hmi-line); background: var(--x-hmi-2); }
@media (min-width: 768px) { .legend { grid-template-columns: repeat(6, auto); justify-content: start; gap: 0.5rem 1.5rem; } }
.legend li { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--x-hmi-muted); white-space: nowrap; }
.sw { width: 1.1rem; height: 0.3rem; flex-shrink: 0; border-radius: 2px; }
.sw-closed { background: var(--x-closed); } .sw-open { background: var(--x-open); } .sw-live { background: var(--x-live); }
.sw-dead { background: var(--x-dead); } .sw-earth { background: var(--x-earth); }
.sw-flow { background: repeating-linear-gradient(90deg, var(--x-flow) 0 4px, transparent 4px 7px); }

/* --------------------------------------------------- single-line diagram */
.sld-wrap { overflow-x: auto; padding: 0.5rem 0.75rem; overscroll-behavior-x: contain; }
.sld { display: block; width: 100%; min-width: 560px; height: auto; }
.sld-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; fill: var(--x-hmi-muted); }
.sld-read { font-family: var(--font-mono); font-size: 12px; font-weight: 500; fill: var(--x-flow); font-variant-numeric: tabular-nums; }
.sld-read.is-dead { fill: var(--x-hmi-muted); }
.sld-note { font-family: var(--font-mono); font-size: 9.5px; fill: var(--x-hmi-muted); opacity: 0.85; }
.dev-label { font-family: var(--font-mono); font-size: 12px; font-weight: 600; fill: var(--x-hmi-ink); }

.cond { fill: none; stroke: var(--x-dead); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.35s; }
.cond.bus { stroke-width: 6; }
.cond.is-live { stroke: var(--x-live); }
.cond.is-earthed { stroke: var(--x-earth); stroke-dasharray: 9 4; }
.cond.is-fault { stroke: var(--x-fault); }
.cond-plain { fill: none; stroke: var(--x-hmi-muted); stroke-width: 2; }
.gnd line { stroke: var(--x-earth); stroke-width: 2; stroke-linecap: round; }

.dev { cursor: pointer; outline: none; }
.dev .hit { fill: transparent; stroke: transparent; transition: fill 0.15s; }
.dev:hover .hit, .dev:focus-visible .hit { fill: rgba(255, 255, 255, 0.06); stroke: var(--x-hmi-line); }
.dev .contact { stroke: var(--x-hmi-ink); stroke-width: 3; stroke-linecap: round; }
.dev .pivot { fill: var(--x-hmi-ink); }
.dev .blade { stroke-width: 4; stroke-linecap: round; transition: transform 1.4s cubic-bezier(0.6, 0, 0.3, 1), stroke 0.2s; }
.dev-es .blade { transition-duration: 0.9s; }
.dev[data-state="closed"] .blade { stroke: var(--x-closed); }
.dev[data-state="open"] .blade { stroke: var(--x-open); transform: rotate(-32deg); }
.dev.opens-right[data-state="open"] .blade { transform: rotate(32deg); }
.dev.is-moving .blade { stroke: var(--x-travel); animation: blink 0.35s steps(2) infinite; }
.dev-cb .cb-box { stroke-width: 3; transition: fill 0.12s, stroke 0.12s; }
.dev-cb[data-state="closed"] .cb-box { fill: var(--x-closed); stroke: var(--x-closed); }
.dev-cb[data-state="open"] .cb-box { fill: var(--x-hmi); stroke: var(--x-open); }
.dev-cb.is-moving .cb-box { stroke: var(--x-travel); }
.dev .ring { fill: none; stroke: var(--x-saffron); stroke-width: 2.5; opacity: 0; pointer-events: none; }
.dev.is-target .ring { opacity: 1; animation: ring-pulse 1.3s ease-out infinite; }
.dev.is-denied { animation: shake 0.38s ease-in-out; }
.dev.is-denied .ring { opacity: 1; stroke: var(--x-fault); animation: none; }

.flow { fill: none; stroke: var(--x-flow); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 6 14; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.flow.is-on { opacity: 0.95; animation: flow 0.9s linear infinite; }
.flow.is-slow { animation-duration: 1.8s; }
.flow.is-fault { stroke: var(--x-fault); stroke-width: 3.5; animation-duration: 0.22s; }

.ct, .vt { fill: none; stroke: var(--x-hmi-ink); stroke-width: 2; }
.wire { fill: none; stroke: var(--x-hmi-muted); stroke-width: 1.2; stroke-dasharray: 3 4; }
.trip-wire.is-firing { stroke: var(--x-fault); stroke-width: 2.2; animation: flow 0.3s linear infinite; }
.relay rect { fill: var(--x-hmi-2); stroke: var(--x-hmi-line); stroke-width: 1.5; transition: fill 0.15s, stroke 0.15s; }
.relay text { font-family: var(--font-mono); font-size: 11px; fill: var(--x-hmi-ink); }
.relay.is-picked rect { stroke: var(--x-travel); }
.relay.is-trip rect { fill: color-mix(in srgb, var(--x-fault) 38%, var(--x-hmi)); stroke: var(--x-fault); }
.bushing rect { fill: var(--x-hmi-2); stroke: var(--x-hmi-ink); stroke-width: 1.5; }
.bushing line { stroke: var(--x-hmi-ink); stroke-width: 2; stroke-linecap: round; }
.la, .la-arrow { fill: none; stroke: var(--x-hmi-ink); stroke-width: 1.5; }
.line-arrow { fill: var(--x-dead); transition: fill 0.3s; }
.line-arrow.is-live { fill: var(--x-live); }
.fault-mark { opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.fault-mark.is-on { opacity: 1; }
.bolt { fill: none; stroke: var(--x-flow); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px var(--x-flow)); }
.fault-mark.is-on .bolt { animation: blink 0.18s steps(2) infinite; }
.fault-burst { fill: var(--x-fault); filter: drop-shadow(0 0 8px var(--x-fault)); }

.gz-layer { opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.sld.show-gz .gz-layer { opacity: 1; }
.gz { fill: color-mix(in srgb, var(--x-gas) 9%, transparent); stroke: var(--x-gas); stroke-width: 1.2; stroke-dasharray: 4 3; }
.gz.is-alarm { stroke: var(--x-travel); fill: color-mix(in srgb, var(--x-travel) 14%, transparent); }
.gz.is-lock { stroke: var(--x-fault); fill: color-mix(in srgb, var(--x-fault) 16%, transparent); }
.gz-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em; fill: var(--x-gas); }
.spacers line { stroke: var(--x-epoxy); stroke-width: 4; stroke-linecap: round; }

/* ------------------------------------------------------- side-panel bits */
.readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem 1rem; }
.readings > div { min-width: 0; }
.readings dt { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.readings dd { margin-top: 0.15rem; font-family: var(--font-mono); font-size: 0.98rem; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.readings dd.is-bad { color: var(--danger-strong); }
.readings dd.is-warn { color: var(--warning-strong); }

.ctl-list { margin-top: 0.75rem; }
.ctl-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border); transition: padding 0.2s; }
.ctl-row:last-child { border-bottom: 0; }
.ctl-row.is-target { box-shadow: inset 3px 0 0 var(--x-saffron); padding-left: 0.6rem; }
.ctl-name { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600; }
.ctl-desc { font-size: 0.76rem; color: var(--muted); }
.ctl-btn { min-width: 4.4rem; }
.state-pill { flex-shrink: 0; padding: 0.15rem 0.5rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.state-pill[data-state="closed"] { background: var(--danger-soft); color: var(--danger-strong); }
.state-pill[data-state="open"] { background: var(--success-soft); color: var(--success-strong); }
.state-pill[data-state="moving"] { background: var(--warning-soft); color: var(--warning-strong); }

.prog-btn { justify-content: flex-start; }
.prog-box { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.prog-title { font-weight: 600; }
.prog-steps { margin-top: 0.5rem; }
.prog-steps li { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.35rem 0; font-size: 0.88rem; }
.step-mark { display: grid; place-items: center; width: 1.3rem; height: 1.3rem; flex-shrink: 0; margin-top: 0.05rem; border: 1.5px solid var(--border-strong); border-radius: 999px; font-family: var(--font-mono); font-size: 0.65rem; color: var(--muted); }
.prog-steps li.is-done { color: var(--muted); }
.prog-steps li.is-done .step-mark { background: var(--success); border-color: var(--success); color: var(--success-ink); }
.prog-steps li.is-current { font-weight: 600; }
.prog-steps li.is-current .step-mark { border-color: var(--x-saffron); color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--x-saffron) 30%, transparent); }

.soe { margin-top: 0.75rem; max-height: 19rem; overflow-y: auto; font-family: var(--font-mono); font-size: 0.78rem; }
.soe-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px dashed var(--border); }
.soe-row:last-child { border-bottom: 0; }
.soe-row time { color: var(--muted); font-variant-numeric: tabular-nums; }
.soe-tag { padding: 0.05rem 0.35rem; border-radius: 3px; font-weight: 600; background: var(--surface-2); color: var(--ink); }
.soe-ok .soe-tag { background: var(--success-soft); color: var(--success-strong); }
.soe-alarm .soe-tag { background: var(--warning-soft); color: var(--warning-strong); }
.soe-trip .soe-tag, .soe-deny .soe-tag { background: var(--danger-soft); color: var(--danger-strong); }
.soe-row.is-new { animation: soe-in 0.5s ease-out; }
@media (max-width: 30rem) { .soe-row { grid-template-columns: auto minmax(0, 1fr); } .soe-row time { grid-column: 1 / -1; } }
.rule-list li + li { margin-top: 0.75rem; }
.rule-list strong { color: var(--ink); }
.acc-head .icon { flex-shrink: 0; color: var(--accent-text); }

.range { width: 100%; accent-color: var(--accent); }

/* --------------------------------------------------------- the breaker */
.intr-wrap { overflow-x: auto; padding: 0.5rem 0.75rem 0; }
.intr { display: block; width: 100%; min-width: 620px; height: auto; }
.st-alu-light { stop-color: var(--x-alu-light); } .st-alu { stop-color: var(--x-alu); } .st-alu-dark { stop-color: var(--x-alu-dark); }
.st-copper { stop-color: var(--x-copper); } .st-copper-dark { stop-color: var(--x-copper-dark); }
.tank-wall { fill: url(#g-tank); }
.tank-gas { fill: color-mix(in srgb, var(--x-gas) 14%, var(--x-hmi)); transition: fill 0.4s; }
.tank-gas.is-low { fill: color-mix(in srgb, var(--x-gas) 6%, var(--x-hmi)); }
.epoxy { fill: var(--x-epoxy); opacity: 0.92; }
.copper { fill: url(#g-copper); }
.silver { fill: var(--x-alu-light); stroke: var(--x-alu-dark); stroke-width: 1; transition: filter 0.2s; }
.pin { fill: var(--x-copper); }
.tungsten { fill: var(--x-tungsten); }
.ptfe { fill: var(--x-ptfe); stroke: var(--x-alu-dark); stroke-width: 0.8; }
.bore { fill: color-mix(in srgb, var(--x-gas) 22%, var(--x-hmi)); }
.cylinder rect { fill: var(--x-alu); stroke: var(--x-alu-dark); }
.piston { fill: var(--x-alu-dark); }
.support { fill: var(--x-alu-dark); opacity: 0.85; }
.rod { fill: var(--x-alu-dark); }
.puffer-gas { fill: var(--x-gas); opacity: 0.16; }
.carry-main.is-carrying rect, .carry-arc.is-carrying rect { filter: drop-shadow(0 0 5px var(--x-live)); stroke: var(--x-live); stroke-width: 1.5; }
.arc-g { opacity: 0; }
.arc-g.is-on { opacity: 1; }
.arc-glow { fill: none; stroke: var(--x-arc-glow); stroke-width: 18; stroke-linecap: round; }
.arc-core { fill: none; stroke: var(--x-arc); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.particles circle { fill: var(--x-gas); }
.callouts line { stroke: var(--x-hmi-muted); stroke-width: 1; stroke-dasharray: 2 3; }
.callouts text, .callout-text { font-family: var(--font-mono); font-size: 11px; fill: var(--x-hmi-muted); }
.callouts .gas-note { fill: var(--x-gas); }
.intr-state { font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; fill: var(--x-hmi-ink); }
.intr-state.is-arc { fill: var(--x-flow); }
.intr-state.is-open { fill: var(--x-open); }
.intr-state.is-blocked { fill: var(--x-fault); }

.cb-controls { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem 1rem; border-top: 1px solid var(--x-hmi-line); background: var(--x-hmi-2); }
@media (min-width: 768px) { .cb-controls { flex-direction: row; align-items: center; justify-content: space-between; } }
.mini-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-btn); background: rgba(0, 0, 0, 0.3); }
.mini-seg button { height: 1.9rem; padding: 0 0.6rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--x-hmi-muted); }
.mini-seg button[aria-checked="true"] { background: var(--x-hmi-line); color: var(--x-hmi-ink); }
.scrub { padding: 0.75rem 1rem 0.25rem; }
.scrub input { display: block; width: 100%; accent-color: var(--x-saffron); }
.scrub-ticks { position: relative; height: 1.5rem; margin: 0 0.5rem; }
.scrub-ticks span { position: absolute; top: 0.2rem; transform: translateX(-50%); font-family: var(--font-mono); font-size: 0.6rem; color: var(--x-hmi-muted); white-space: nowrap; }
.scrub-ticks span::before { content: ""; display: block; width: 1px; height: 0.3rem; margin: 0 auto 0.1rem; background: var(--x-hmi-muted); }
.scrub-ticks .tick-end { transform: translateX(-100%); }
.scrub-ticks .tick-end::before { margin-right: 0; }
.wave-wrap { overflow-x: auto; padding: 0 0.75rem 0.75rem; }
.wave { display: block; width: 100%; min-width: 620px; height: auto; }
.wave-grid line { stroke: var(--x-hmi-line); stroke-width: 1; }
.wave-grid text { font-family: var(--font-mono); font-size: 10px; fill: var(--x-hmi-muted); }
.wave-axis { stroke: var(--x-hmi-muted); stroke-width: 1; }
.trace-i { fill: none; stroke: var(--x-live); stroke-width: 2.4; stroke-linejoin: round; }
.trace-v { fill: none; stroke: var(--x-trv); stroke-width: 1.8; stroke-linejoin: round; }
.cursor { stroke: var(--x-hmi-ink); stroke-width: 1.2; stroke-dasharray: 3 3; }
.wave-label { font-family: var(--font-mono); font-size: 11px; fill: var(--x-live); }
.wave-label-v { fill: var(--x-trv); }
.wave-marks line { stroke: var(--x-saffron); stroke-width: 1; stroke-dasharray: 2 3; }
.wave-marks text { font-family: var(--font-mono); font-size: 10px; fill: var(--x-saffron); }
.wave-trv { font-family: var(--font-mono); font-size: 11px; fill: var(--x-trv); }
@media (max-width: 639px) {
  .intr, .wave { min-width: 0; }
  .intr .callouts, .intr .callout-text, .wave-marks text { display: none; }
  .intr-state { font-size: 24px; }
  .wave-grid text { font-size: 22px; }
  .wave-label, .wave-trv { font-size: 24px; }
  .scrub-ticks .tick-arc { display: none; }
}

.stage-list { display: flex; flex-direction: column; gap: 0.15rem; }
.stage-btn { display: flex; align-items: flex-start; gap: 0.75rem; width: 100%; padding: 0.45rem 0.5rem; border-radius: var(--radius-btn); text-align: left; transition: background-color 0.15s; }
.stage-btn:hover { background: var(--surface-2); }
.stage-num { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; flex-shrink: 0; border: 1px solid var(--border-strong); border-radius: 999px; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; transition: background-color 0.2s, color 0.2s; }
.stage-title { display: block; font-size: 0.9rem; font-weight: 600; line-height: 1.3; }
.stage-t { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.stage-text { display: none; padding: 0 0.5rem 0.6rem 2.75rem; font-size: 0.86rem; line-height: 1.55; color: var(--muted); }
.stage[aria-current="step"] .stage-text { display: block; }
.stage[aria-current="step"] .stage-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stage.is-past .stage-num { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-strong); }

/* ------------------------------------------------------ gas & diagnostics */
.dial-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; padding: 1rem; }
@media (min-width: 640px) { .dial-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dial-card { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; min-width: 0; padding: 0.7rem 0.5rem 0.8rem; border: 1px solid var(--x-hmi-line); border-radius: 8px; background: var(--x-hmi-2); color: var(--x-hmi-ink); transition: border-color 0.2s, box-shadow 0.2s; }
.dial-card:hover { border-color: var(--x-hmi-muted); }
.dial-card[aria-pressed="true"] { border-color: var(--x-saffron); box-shadow: inset 0 0 0 1px var(--x-saffron); }
.dial-card.is-leaking { animation: leak-pulse 1.1s ease-in-out infinite; }
.dial { display: block; width: 100%; max-width: 9.5rem; }
.dial-track { fill: none; stroke: var(--x-hmi-line); stroke-width: 11; }
.dial-red, .dial-amber, .dial-green { fill: none; stroke-width: 5; }
.dial-red { stroke: var(--x-fault); } .dial-amber { stroke: var(--x-travel); } .dial-green { stroke: var(--x-open); }
.dial-tick { stroke: var(--x-hmi-ink); stroke-width: 1.5; }
.needle line { stroke: var(--x-hmi-ink); stroke-width: 2.6; stroke-linecap: round; }
.dial-hub { fill: var(--x-hmi-ink); }
.dial-num { font-family: var(--font-mono); font-size: 15px; font-weight: 600; fill: var(--x-hmi-ink); font-variant-numeric: tabular-nums; }
.dial-name { font-family: var(--font-mono); font-size: 0.68rem; text-align: center; color: var(--x-hmi-muted); }
.dial-state { padding: 0.1rem 0.45rem; border-radius: 4px; font-family: var(--font-mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: color-mix(in srgb, var(--x-open) 18%, transparent); color: var(--x-open); }
.dial-state[data-level="alarm"] { background: color-mix(in srgb, var(--x-travel) 20%, transparent); color: var(--x-travel); }
.dial-state[data-level="lock"] { background: color-mix(in srgb, var(--x-fault) 24%, transparent); color: var(--x-fault); }

.fascia-wrap { padding: 0 1rem 1rem; }
.fascia { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
@media (min-width: 768px) { .fascia { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ann { display: grid; place-items: center; min-height: 3.4rem; padding: 0.5rem; border: 1px solid var(--x-hmi-line); border-radius: 4px; background: var(--x-hmi-2); color: var(--x-hmi-muted); text-align: center; font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em; opacity: 0.7; }
.ann[data-st="flash"] { opacity: 1; animation: ann-flash 0.7s steps(2) infinite; }
.ann[data-st="on"] { opacity: 1; border-color: var(--x-fault); background: color-mix(in srgb, var(--x-fault) 70%, var(--x-hmi)); color: var(--x-arc); }
.ann[data-tone="amber"][data-st="on"] { border-color: var(--x-travel); background: var(--x-travel); color: var(--x-hmi); }
.ann[data-tone="amber"][data-st="flash"] { animation-name: ann-flash-amber; }
.ann[data-st="clear"] { opacity: 1; border-color: var(--x-fault); color: var(--x-hmi-ink); background: color-mix(in srgb, var(--x-fault) 18%, var(--x-hmi-2)); }
.ann[data-st="test"] { opacity: 1; background: var(--x-arc); color: var(--x-hmi); }

.trend-wrap { margin-top: 0.25rem; }
.trend { display: block; width: 100%; height: auto; }
.trend-grid line { stroke: var(--border); stroke-width: 1; }
.trend-grid text { font-family: var(--font-mono); font-size: 10px; fill: var(--muted); }
.trend-alarm { stroke: var(--warning); stroke-width: 1.4; stroke-dasharray: 5 4; }
.trend-lock { stroke: var(--danger); stroke-width: 1.4; stroke-dasharray: 5 4; }
.trend-tag { font-family: var(--font-mono); font-size: 10px; }
.trend-tag-alarm { fill: var(--warning-strong); }
.trend-tag-lock { fill: var(--danger-strong); }
.trend-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.trend-dot { fill: var(--accent); }

.leak-chip { justify-content: space-between; width: 100%; height: auto; min-height: 2.5rem; padding: 0.4rem 0.8rem; }
.chip-meta { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); }

.pd-wrap { padding: 0.5rem 0.75rem; }
.prpd { display: block; width: 100%; height: auto; }
.prpd-grid line { stroke: var(--x-hmi-line); stroke-width: 1; }
.prpd-grid text { font-family: var(--font-mono); font-size: 10px; fill: var(--x-hmi-muted); }
.prpd-sine { fill: none; stroke: var(--x-hmi-muted); stroke-width: 1.2; stroke-dasharray: 4 4; }
.pd-dot { fill: var(--x-gas); }
.pd-dot.mid { fill: var(--x-live); }
.pd-dot.hi { fill: var(--x-fault); }
.pd-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; padding: 0 1rem 1rem; }
.pd-chips > :first-child { grid-column: span 2; }
@media (min-width: 768px) { .pd-chips { grid-template-columns: repeat(5, minmax(0, 1fr)); } .pd-chips > :first-child { grid-column: auto; } }
.pd-action { padding: 0.75rem; border-radius: var(--radius-btn); background: var(--surface-2); }
.pd-action > * + * { margin-top: 0.25rem; }
@media (max-width: 639px) {
  .trend-grid text, .trend-tag, .prpd-grid text { font-size: 18px; }
}

/* ------------------------------------------------------- explore: the bay */
.cut-wrap { overflow-x: auto; padding: 0.5rem 0.75rem; }
.cut-wrap::after { content: "Swipe the drawing sideways for the whole bay"; display: none; margin-top: 0.4rem; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--x-hmi-muted); }
@media (max-width: 767px) { .cut-wrap::after { display: block; position: sticky; left: 0; } }
.cutaway { display: block; width: 100%; min-width: 620px; height: auto; }
.floor { stroke: var(--x-hmi-muted); stroke-width: 2; }
.encl { fill: color-mix(in srgb, var(--x-alu) 82%, var(--x-hmi)); stroke: var(--x-alu-light); stroke-width: 1.5; transition: fill 0.35s, stroke 0.2s; }
.cutaway.is-xray .encl { fill: color-mix(in srgb, var(--x-gas) 13%, var(--x-hmi)); stroke: var(--x-alu); }
.cond-in { fill: none; stroke: var(--x-copper); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.cond-in-fill { fill: var(--x-copper); }
.blade-in { stroke: var(--x-alu-light); stroke-width: 4; stroke-linecap: round; }
.ptfe-in { fill: var(--x-ptfe); }
.winding { fill: var(--x-copper-dark); stroke: var(--x-copper); }
.cond-in, .cond-in-fill, .blade-in, .ptfe-in, .winding { transition: opacity 0.35s; }
.cutaway:not(.is-xray) .cond-in, .cutaway:not(.is-xray) .cond-in-fill, .cutaway:not(.is-xray) .blade-in,
.cutaway:not(.is-xray) .ptfe-in, .cutaway:not(.is-xray) .winding, .cutaway:not(.is-xray) .part-tag-in { opacity: 0; }
.ph3 { display: none; }
.cutaway.three-phase .ph1 { display: none; }
.cutaway.three-phase .ph3 { display: inline; }
.ct-ring { fill: var(--x-alu-dark); stroke: var(--x-alu-light); stroke-width: 1.2; }
.drive-box { fill: var(--x-alu-dark); stroke: var(--x-alu); }
.spring { fill: none; stroke: var(--x-alu-light); stroke-width: 2; stroke-linejoin: round; }
.part[data-part="drive"] .part-tag { transform: translate(-34px, 19px); }
.prd-disc { fill: var(--x-fault); opacity: 0.85; }
.deflector { stroke: var(--x-alu-light); stroke-width: 3; stroke-linecap: round; }
.bellows { fill: none; stroke: var(--x-alu-light); stroke-width: 2; stroke-linejoin: round; }
.bush-body { fill: var(--x-alu-dark); }
.shed { fill: var(--x-alu-dark); stroke: var(--x-alu); stroke-width: 1; }
.terminal { fill: var(--x-alu-light); }
.lcc-box { fill: var(--x-hmi-2); stroke: var(--x-alu); stroke-width: 1.5; }
.lcc-screen { fill: var(--x-hmi); stroke: var(--x-hmi-line); }
.lamp-r { fill: var(--x-closed); } .lamp-g { fill: var(--x-open); } .lamp-a { fill: var(--x-travel); }
.spacer-cone, .spacer-flat { fill: var(--x-epoxy); }
.gdm circle { fill: var(--x-hmi); stroke: var(--x-hmi-ink); stroke-width: 1.5; }
.gdm line { stroke: var(--x-open); stroke-width: 1.5; stroke-linecap: round; }
.part-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; fill: var(--x-hmi-muted); }
.part-tag-in { fill: var(--x-hmi-ink); }
[data-explode] { transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1); }
.part { cursor: pointer; transition: opacity 0.25s; }
.cutaway.has-sel .part { opacity: 0.3; }
.cutaway.has-sel .part.is-sel { opacity: 1; }
.part.is-sel .encl { stroke: var(--x-saffron); stroke-width: 2.5; }
.hotspot { cursor: pointer; outline: none; }
.hotspot circle { fill: var(--x-saffron); stroke: var(--x-hmi); stroke-width: 2.5; transition: stroke 0.15s; }
.hotspot text { font-family: var(--font-mono); font-size: 12px; font-weight: 700; fill: var(--x-brand-deep); pointer-events: none; }
.hotspot:hover circle, .hotspot:focus-visible circle { stroke: var(--x-hmi-ink); }
.part.is-sel .hotspot circle { stroke: var(--x-hmi-ink); animation: hot-pulse 1.4s ease-out infinite; }

.part-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; padding: 0.75rem 1rem 1rem; border-top: 1px solid var(--x-hmi-line); }
@media (min-width: 768px) { .part-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.part-btn { display: flex; align-items: center; gap: 0.5rem; min-width: 0; padding: 0.4rem 0.5rem; border: 1px solid var(--x-hmi-line); border-radius: var(--radius-btn); background: var(--x-hmi-2); color: var(--x-hmi-ink); font-size: 0.8rem; text-align: left; transition: border-color 0.15s, background-color 0.15s; }
.part-btn:hover { border-color: var(--x-hmi-muted); }
.part-btn[aria-pressed="true"] { border-color: var(--x-saffron); background: color-mix(in srgb, var(--x-saffron) 14%, var(--x-hmi-2)); }
.part-num { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; flex-shrink: 0; border-radius: 999px; background: var(--x-saffron); color: var(--x-brand-deep); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; }
.part-info > * + * { margin-top: 1rem; }
.part-info.is-new { animation: soe-in 0.35s ease-out; }
.part-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.watch { display: flex; gap: 0.6rem; padding: 0.75rem; border-radius: var(--radius-btn); background: var(--warning-soft); color: var(--warning-strong); font-size: 0.88rem; line-height: 1.5; }
.watch .icon { flex-shrink: 0; margin-top: 0.15rem; }

.footprint { display: block; width: 100%; max-width: 18rem; height: auto; }
.fp-ais { fill: color-mix(in srgb, var(--accent) 7%, transparent); stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 6 4; }
.fp-gis { fill: var(--x-saffron); transition: width 0.6s, height 0.6s, y 0.6s; }
.fp-label { font-family: var(--font-mono); font-size: 12px; font-weight: 600; fill: var(--accent-text); }
.fp-label-gis { fill: var(--ink); transition: y 0.6s; }

/* ----------------------------------------------------------------- quiz */
.quiz > * + * { margin-top: 1rem; }
.quiz-bar { transition: width 0.4s; }
.quiz-q { font-family: var(--font-display); font-size: 1.2rem; font-weight: 650; line-height: 1.35; }
.quiz-opts { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.quiz-opt { display: flex; align-items: flex-start; gap: 0.75rem; width: 100%; padding: 0.75rem 0.9rem; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--ink); text-align: left; line-height: 1.45; transition: border-color 0.15s, background-color 0.15s; }
.quiz-opt:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt:disabled { cursor: default; }
.opt-key { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; flex-shrink: 0; border-radius: 4px; background: var(--surface-2); font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; }
.quiz-opt.is-right { border-color: var(--success); background: var(--success-soft); color: var(--success-strong); }
.quiz-opt.is-right .opt-key { background: var(--success); color: var(--success-ink); }
.quiz-opt.is-wrong { border-color: var(--danger); background: var(--danger-soft); color: var(--danger-strong); }
.quiz-opt.is-wrong .opt-key { background: var(--danger); color: var(--danger-ink); }
.quiz-why { margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); font-size: 0.92rem; line-height: 1.55; }
[data-quiz-next] { margin-top: 1rem; }
.quiz-done { padding: 1.5rem 0 0.5rem; text-align: center; }
.quiz-done > * + * { margin-top: 0.75rem; }
.quiz-big { font-family: var(--font-display); font-size: 3.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--accent-text); }

/* ------------------------------------------------------------- keyframes */
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes flow { to { stroke-dashoffset: -20; } }
@keyframes ring-pulse { 0% { stroke-opacity: 1; stroke-width: 2.5; } 70% { stroke-opacity: 0.2; stroke-width: 7; } 100% { stroke-opacity: 1; stroke-width: 2.5; } }
@keyframes hot-pulse { 0% { stroke-width: 2.5; } 60% { stroke-width: 6; } 100% { stroke-width: 2.5; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes soe-in { from { transform: translateY(-6px); background: var(--accent-soft); } to { transform: none; background: transparent; } }
@keyframes plate-flash { from { color: var(--x-saffron); } to { color: var(--x-on-brand); } }
@keyframes leak-pulse { 50% { border-color: var(--x-travel); } }
@keyframes ann-flash { 0% { background: color-mix(in srgb, var(--x-fault) 75%, var(--x-hmi)); color: var(--x-arc); border-color: var(--x-fault); } 50% { background: var(--x-hmi-2); color: var(--x-hmi-muted); border-color: var(--x-hmi-line); } }
@keyframes ann-flash-amber { 0% { background: var(--x-travel); color: var(--x-hmi); border-color: var(--x-travel); } 50% { background: var(--x-hmi-2); color: var(--x-hmi-muted); border-color: var(--x-hmi-line); } }

/* --------------------------------------------------------- reduced motion */
html.reduced-motion .flow.is-on { animation: none; stroke-dasharray: none; opacity: 0.6; }
html.reduced-motion .dev .blade, html.reduced-motion [data-explode] { transition-duration: 0.01ms; }
html.reduced-motion .dev.is-target .ring { animation: none; }
html.reduced-motion .ann[data-st="flash"] { animation: none; border-color: var(--x-fault); }
html.reduced-motion .fault-mark.is-on .bolt, html.reduced-motion .dev.is-moving .blade { animation: none; }
