/* Layout: one "switchboard" stage with three lit extensions; picking one shifts the stage into that room. CV below for skimmers. */
/* Themes: light is the default; html[data-theme="dark"] (Theme button, main.js) switches to the dark set.
   Every colour on the page and in the canvases comes from these tokens. *-rgb tokens are "r, g, b" triplets for
   rgba(); --glow scales halos (strong light on dark, faint shadow on light). */
:root {
  color-scheme: light;
  --void: #f3f6f4;
  --stage: #e8eeeb;
  --panel: #ffffff;
  --line: #d2dcd8;
  --ink: #0e1b18;
  --mute: #5c6b67;
  --signal: #0a8f5c;
  --signal-soft: rgba(10, 143, 92, 0.12);
  --white-light: #1d2b27;
  --lamp: #f4fbf8;
  --text-2: #2f3f3b;
  --text-3: #44544f;
  --card: rgba(255, 255, 255, 0.9);
  --glass: rgba(255, 255, 255, 0.82);
  --shade: rgba(243, 246, 244, 0.6);
  --scan: rgba(14, 27, 24, 0.05);
  --stage-glow-a: #d3e9df;
  --stage-glow-b: #e1ece7;
  --room-stage-a: #cbe5d9;
  --room-stage-b: #eaf1ee;
  --signal-rgb: 10, 143, 92;
  --light-rgb: 29, 43, 39;
  --ink-rgb: 14, 27, 24;
  --dust-rgb: 60, 80, 74;
  --glow: 0.35;
  --font-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
html[data-theme="dark"] {
  color-scheme: dark;
  --void: #040708;
  --stage: #071012;
  --panel: #0b1618;
  --line: #1c2b2d;
  --ink: #e9f2ef;
  --mute: #84948f;
  --signal: #43f5ac;
  --signal-soft: rgba(var(--signal-rgb), 0.16);
  --white-light: #f4fbf8;
  --text-2: var(--text-2);
  --text-3: var(--text-3);
  --card: var(--card);
  --glass: var(--glass);
  --shade: rgba(4, 7, 8, 0.55);
  --scan: rgba(4, 7, 8, 0.22);
  --stage-glow-a: #0f2421;
  --stage-glow-b: #0a1a1a;
  --room-stage-a: #12302a;
  --room-stage-b: #061513;
  --signal-rgb: 67, 245, 172;
  --light-rgb: 244, 251, 248;
  --ink-rgb: 233, 242, 239;
  --dust-rgb: 220, 240, 232;
  --glow: 1;
}
* { box-sizing: border-box; }* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ---------- Stage ---------- */
.stage {
  position: relative;
  min-height: min(800px, 92svh);
  overflow: hidden;
  background:
    radial-gradient(60% 38% at 50% 100%, var(--stage-glow-a) 0%, transparent 70%),
    radial-gradient(50% 60% at 50% 30%, var(--stage-glow-b) 0%, transparent 75%),
    var(--stage);
  display: grid;
  grid-template-rows: auto 1fr auto;
  transition: background-color 0.8s ease;
}
.stage::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 34%;
  background: linear-gradient(to bottom, transparent, var(--shade));
  pointer-events: none;
}
#fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.topbar {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 24px;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.status { display: flex; align-items: center; gap: 10px; min-width: 0; }
.led {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal), 0 0 24px var(--signal);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }
.top-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.btn-outline {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--ink);
  padding: 9px 16px; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--ink); color: var(--void); }
/* Topbar switches (Motion, Dark) */
.toggle {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  background: none; border: 0; padding: 6px; cursor: pointer; color: var(--mute);
}
.toggle-dot { width: 22px; height: 12px; border: 1px solid var(--mute); border-radius: 6px; position: relative; flex: none; }
.toggle-dot::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--mute); transition: transform 0.2s, background 0.2s;
}
.toggle[aria-pressed="true"] { color: var(--ink); }
.toggle[aria-pressed="true"] .toggle-dot { border-color: var(--signal); }
.toggle[aria-pressed="true"] .toggle-dot::after { background: var(--signal); transform: translateX(10px); box-shadow: 0 0 6px var(--signal); }
.lang { display: flex; gap: 2px; }
.lang button {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  background: none; border: 0; padding: 6px 6px; cursor: pointer; color: var(--mute);
}
.lang button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--signal); }

/* Exhibits */
.floor {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end; gap: clamp(8px, 4vw, 64px);
  width: min(920px, 100%); margin-inline: auto;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  padding-block: 8px 0;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1), opacity 0.5s;
}
.exhibit {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  background: none; border: 0; cursor: pointer; padding: 0 0 8px;
  transition: opacity 0.5s, filter 0.5s, transform 0.5s;
}
.tube {
  position: relative; display: flex; gap: 7px; justify-content: center;
  height: clamp(170px, 30svh, 290px);
}
.tube i {
  display: block; width: 6px; border-radius: 3px;
  background: var(--white-light);
  box-shadow: 0 0 12px rgba(var(--light-rgb), calc(0.6 * var(--glow))), 0 0 34px rgba(var(--light-rgb), calc(0.25 * var(--glow)));
}
.tube i:nth-child(2) {
  width: 14px; background: var(--signal);
  box-shadow: 0 0 16px var(--signal), 0 0 46px rgba(var(--signal-rgb), 0.45);
}
.tube i:nth-child(3) { height: 58%; align-self: flex-end; opacity: 0.85; }
.exhibit:nth-child(2) .tube { height: clamp(200px, 36svh, 340px); }
.exhibit:nth-child(2) .tube i:nth-child(3) { height: 74%; }
.exhibit:nth-child(3) .tube i:nth-child(1) { height: 66%; align-self: flex-end; }
.exhibit:nth-child(3) .tube i:nth-child(3) { height: 100%; }
.glyph {
  position: absolute; left: 50%; top: 42%;
  width: clamp(76px, 15vw, 128px); aspect-ratio: 1; max-width: 100%;
  transform: translate(-50%, -50%);
  background: var(--glass);
  border: 1px solid rgba(var(--ink-rgb), 0.22);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  animation: hover 5s ease-in-out infinite;
}
.exhibit:nth-child(2) .glyph { animation-delay: -1.6s; }
.exhibit:nth-child(3) .glyph { animation-delay: -3.1s; }
@keyframes hover { 50% { transform: translate(-50%, calc(-50% - 10px)); } }
.glyph svg { width: 62%; height: 62%; overflow: visible; }
.glyph svg * { fill: none; stroke: var(--signal); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.glyph svg .solid { fill: var(--signal); stroke: none; }
.exhibit-meta { display: grid; gap: 4px; justify-items: center; text-align: center; }
.exhibit-ext { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--signal); }
.exhibit-name {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(17px, 2.6vw, 26px); line-height: 1; letter-spacing: 0.02em;
}
.exhibit-tag { font-family: var(--font-mono); font-size: 11px; color: var(--mute); }
.exhibit:hover .glyph, .exhibit:focus-visible .glyph { border-color: var(--signal); box-shadow: 0 0 30px var(--signal-soft); }
.floor:hover .exhibit:not(:hover) { opacity: 0.55; }

/* Nameplate */
.nameplate {
  position: relative; z-index: 3;
  display: grid; justify-items: center; gap: 12px; text-align: center;
  padding-block: 26px 34px;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.plate {
  font-family: var(--font-display); font-weight: 900; font-style: italic;
  font-size: clamp(30px, 6vw, 56px); line-height: 1; text-transform: uppercase;
  letter-spacing: 0.03em; border: 3px solid var(--ink);
  padding: 8px 18px 6px; text-wrap: balance;
  transform: skewX(-6deg);
}
.plate span { display: inline-block; transform: skewX(6deg); }
.role { font-size: 14px; color: var(--ink); opacity: 0.85; max-width: 60ch; }

/* ---------- Room ---------- */
.room {
  position: absolute; z-index: 4; inset: 88px 0 0 0;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center; gap: 24px;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  padding-block: 0 28px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s 0.15s;
}
.room-light { position: relative; display: grid; place-items: center; height: 100%; min-height: 260px; }
.room-light .tube { height: min(64svh, 520px); gap: 12px; }
.room-light .tube i { width: 10px; }
.room-light .tube i:nth-child(2) { width: 26px; }
.room-light .glyph { width: clamp(110px, 18vw, 170px); top: 46%; }
.room-card {
  min-width: 0; max-width: 600px;
  background: var(--card);
  border: 1px solid var(--line);
  --card-pad: clamp(20px, 3.5vw, 36px);
  padding: var(--card-pad);
  display: grid; gap: 16px;
  max-height: calc(100% - 8px); overflow-y: auto;
  transform: translateY(14px); transition: transform 0.6s 0.15s cubic-bezier(.2,.7,.2,1);
}
/* Back to stage stays pinned at the top of the card while its text scrolls */
.room-top {
  position: sticky; top: calc(-1 * var(--card-pad)); z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 0;
  padding: var(--card-pad) var(--card-pad) 14px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.call-state { display: flex; align-items: center; gap: 10px; }
.room-title {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(30px, 4.4vw, 50px); line-height: 0.98; margin: 0; text-wrap: balance;
}
.room-lede { margin: 0; color: var(--ink); max-width: 60ch; }
.room-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.room-points li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; color: var(--text-2); }
.room-points li::before { content: ""; width: 8px; height: 2px; background: var(--signal); margin-top: 0.8em; }
.diff { margin: 0; border: 1px solid var(--line); font-family: var(--font-mono); font-size: 13px; }
.diff figcaption {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.diff-stat { font-size: 12px; }
.diff-stat b { font-weight: 500; }
.diff-stat .add { color: var(--signal); }
.diff-stat .del { color: var(--mute); }
.diff-body { padding: 6px 0; }
.diff-hunk { padding: 4px 12px; color: var(--mute); }
.diff-line {
  display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; padding: 3px 12px;
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.4s, transform 0.4s; transition-delay: calc(var(--i) * 140ms + 350ms);
}
.diff-line ins, .diff-line del { text-decoration: none; }
.diff-line.del { color: var(--mute); }
.diff-line.del del { text-decoration: line-through; text-decoration-color: var(--mute); }
.diff-line.add { color: var(--signal); background: var(--signal-soft); }
body[data-room] .diff-line { opacity: 1; transform: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--font-mono); font-size: 12px; padding: 4px 9px;
  border: 1px solid var(--line); color: var(--text-2);
}
.chip.lit { border-color: rgba(var(--signal-rgb), 0.45); color: var(--signal); background: var(--signal-soft); }
.chip-group { display: grid; gap: 8px; }
.room-nav { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.btn-solid {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--signal); color: var(--void); border: 1px solid var(--signal);
  padding: 9px 16px; cursor: pointer;
}
.btn-solid:hover { filter: brightness(1.1); }

body[data-room] .floor { opacity: 0; pointer-events: none; transform: translateY(30px) scale(0.96); }
body[data-room] .nameplate { opacity: 0; pointer-events: none; }
body[data-room] .room { opacity: 1; pointer-events: auto; }
body[data-room] .room-card { transform: none; }
body[data-room] .stage {
  background:
    radial-gradient(45% 55% at 28% 55%, rgba(var(--signal-rgb), 0.2) 0%, transparent 70%),
    radial-gradient(60% 38% at 50% 100%, var(--room-stage-a) 0%, transparent 70%),
    var(--room-stage-b);
}
.nameplate { transition: opacity 0.4s; }

/* Worlds: past (legacy CRT), present (live line, the default above), future (clean light) */
body[data-room="migration"] .stage {
  background:
    radial-gradient(45% 55% at 28% 55%, rgba(var(--light-rgb), 0.07) 0%, transparent 70%),
    var(--void);
}
body[data-room="migration"] .room-light .tube i:nth-child(2) { background: var(--mute); box-shadow: 0 0 14px rgba(var(--light-rgb), 0.18); }
body[data-room="migration"] .room-light .tube i { opacity: 0.7; }
body[data-room="ai"] .stage {
  background:
    radial-gradient(55% 45% at 28% 20%, rgba(var(--light-rgb), 0.1) 0%, transparent 70%),
    radial-gradient(45% 55% at 28% 60%, rgba(var(--signal-rgb), 0.1) 0%, transparent 70%),
    var(--stage);
}
body[data-room="ai"] .room-light .tube i { box-shadow: 0 0 18px rgba(var(--light-rgb), calc(0.75 * var(--glow))), 0 0 60px rgba(var(--light-rgb), calc(0.3 * var(--glow))); }

/* 3D hero (room-3d.js): one canvas fixed to the viewport, above the stage background and ambient canvas, below the
   extensions and the page text, so the knot can follow the reader down. It stands in for the room's CSS tubes. */
.stage-3d { position: fixed; z-index: 1; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; animation: patch 1.2s backwards; }
main { position: relative; z-index: 2; }
.room-light.has-3d .tube { display: none; }

/* Switching rooms: a band of light sweeps the stage, the card patches back in */
.sweep {
  position: absolute; z-index: 5; inset: 0; pointer-events: none; overflow: hidden;
}
.sweep::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(90deg, transparent, var(--signal-soft) 40%, rgba(var(--signal-rgb), 0.35) 50%, var(--signal-soft) 60%, transparent);
  transform: translateX(-110%);
}
.sweep.run::before { animation: sweep 0.75s cubic-bezier(.5,0,.3,1); }
@keyframes sweep { to { transform: translateX(260%); } }
.room-card.swap { animation: patch 0.6s 0.2s cubic-bezier(.2,.7,.2,1) backwards; }
@keyframes patch { from { opacity: 0; transform: translateY(12px); } }

/* Close-up: the room's glyph draws itself in, stroke by stroke */
.room-light .glyph svg * { stroke-dasharray: 1; }
body[data-room] .room-light .glyph svg *:not(.solid) { animation: draw 1.4s 0.35s cubic-bezier(.6,0,.2,1) backwards; }
body[data-room] .room-light .glyph svg .solid { animation: patch 0.4s 1.4s backwards; }
@keyframes draw { from { stroke-dashoffset: 1; } }

/* ---------- Below stage ---------- */
.wrap {
  width: min(1040px, 100%); margin-inline: auto;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.section { padding-block: 72px 8px; display: grid; gap: 28px; }
.section:last-of-type { padding-bottom: 88px; }
.sec-head { display: grid; gap: 6px; }
.sec-title {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(32px, 5vw, 48px); line-height: 1; margin: 0;
}
.summary { font-size: 18px; line-height: 1.6; max-width: 62ch; margin: 0; color: var(--text-2); }
.summary b { color: var(--ink); font-weight: 600; }
.log { display: grid; border-top: 1px solid var(--line); }
.log-row {
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px;
  padding-block: 22px; border-bottom: 1px solid var(--line);
}
.log-when { font-family: var(--font-mono); font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; padding-top: 4px; }
.log-what { display: grid; gap: 4px; min-width: 0; }
.log-role { font-weight: 600; font-size: 17px; }
.log-org { color: var(--signal); font-family: var(--font-mono); font-size: 13px; }
.log-note { color: var(--text-3); margin: 4px 0 0; max-width: 62ch; }
.certs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cert { border: 1px solid var(--line); padding: 18px; display: grid; gap: 10px; align-content: start; background: var(--panel); }
.cert-name { font-weight: 600; line-height: 1.35; }
.cert-meta { font-family: var(--font-mono); font-size: 12px; color: var(--mute); }
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.contact-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); padding: 16px 18px; min-width: 0;
}
.contact-item > div { display: grid; gap: 2px; min-width: 0; }
.contact-value { font-family: var(--font-mono); font-size: 14px; overflow-wrap: anywhere; color: var(--ink); text-decoration: none; }
a.contact-value:hover { color: var(--signal); }
.copy {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  background: none; border: 1px solid var(--line); padding: 6px 10px; cursor: pointer; color: var(--mute); flex: none;
}
.copy:hover { color: var(--ink); border-color: var(--ink); }
.foot { padding-block: 24px 32px; border-top: 1px solid var(--line); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stat { display: grid; gap: 6px; align-content: start; padding: 22px 16px 4px 0; }
.stat-num {
  font-family: var(--font-display); font-weight: 900; line-height: 1;
  font-size: clamp(44px, 7vw, 72px); color: var(--signal); font-variant-numeric: tabular-nums;
}

/* Expandable call log */
/* CDR: each call log row carries a call record (id, period, length, state) */
.log-when { display: grid; gap: 3px; align-self: start; }
.cdr-head { display: flex; justify-content: space-between; gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.cdr-id { color: var(--ink); letter-spacing: 0.08em; }
.cdr-dur { color: var(--ink); }
.cdr-state { display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.14em; font-size: 11px; }
.cdr-state.live { color: var(--signal); }
.log-toggle {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 4px;
  width: 100%; padding: 0; background: none; border: 0; text-align: left; cursor: pointer;
}
.log-toggle .log-org { grid-column: 1; }
.log-plus { grid-column: 2; grid-row: 1 / span 2; align-self: center; position: relative; width: 14px; height: 14px; }
.log-plus::before, .log-plus::after {
  content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 2px;
  background: var(--mute); transition: transform 0.35s, background 0.2s;
}
.log-plus::after { transform: rotate(90deg); }
.log-toggle:hover .log-plus::before, .log-toggle:hover .log-plus::after { background: var(--signal); }
.log-toggle[aria-expanded="true"] .log-plus::after { transform: rotate(0deg); }
.log-toggle:hover .log-role { color: var(--signal); }
.log-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s cubic-bezier(.2,.7,.2,1); }
.log-detail > div { overflow: hidden; }
.log-toggle[aria-expanded="true"] + .log-detail { grid-template-rows: 1fr; }

/* Scroll reveal: each section patches in with a signal line, then its parts follow in order */
.section::before {
  content: ""; height: 1px;
  background: linear-gradient(90deg, var(--signal), transparent) no-repeat 0 0 / 0% 100%, var(--line);
  transition: background-size 1.1s cubic-bezier(.2,.7,.2,1);
}
.section.is-lit::before { background-size: 100% 100%; }
.fx .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.6s, transform 0.7s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 90ms + 150ms);
}
.fx .is-lit .reveal { opacity: 1; transform: none; }

/* IVR menu in Contact */
.ivr { border: 1px solid var(--line); background: var(--panel); padding: clamp(18px, 3vw, 28px); display: grid; gap: 18px; }
.ivr-greet { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 17px; }
.ivr-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ivr-key {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: none; border: 1px solid var(--line); padding: 12px 14px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.ivr-key kbd {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px;
  font-family: var(--font-display); font-weight: 900; font-size: 22px; line-height: 1;
  border: 1px solid var(--signal); color: var(--signal);
}
.ivr-key:hover, .ivr-key.hit { border-color: var(--signal); background: var(--signal-soft); }
.ivr-key.hit kbd { background: var(--signal); color: var(--void); }
.ivr-tip { margin: 0; }
.dial-hint { opacity: 0.7; }
@media (hover: none) { .dial-hint, .ivr-tip { display: none; } }

/* Dialer readout: shows digits as they are dialed */
.dialer {
  position: fixed; z-index: 11; left: 50%; top: 18px;
  display: flex; align-items: baseline; gap: 12px;
  padding: 10px 16px; background: var(--panel); border: 1px solid var(--signal);
  box-shadow: 0 0 24px var(--signal-soft);
  opacity: 0; transform: translate(-50%, -8px); pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.dialer.show { opacity: 1; transform: translate(-50%, 0); }
.dialer .label { color: var(--ink); white-space: nowrap; }
.dialer-num { font-family: var(--font-mono); font-size: 18px; letter-spacing: 0.2em; color: var(--signal); }

/* Signal meter: scroll depth + back to top */
.meter {
  position: fixed; z-index: 10;
  right: var(--gutter-r); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: 44px; height: 44px; padding: 10px 9px;
  display: flex; align-items: flex-end; gap: 3px;
  background: var(--panel); border: 1px solid var(--line); cursor: pointer;
  opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s, border-color 0.2s;
}
.meter.show { opacity: 1; transform: none; }
.meter:hover { border-color: var(--signal); }
.meter i { flex: 1; background: var(--line); transition: background 0.3s, box-shadow 0.3s; }
.meter i:nth-child(1) { height: 20%; }
.meter i:nth-child(2) { height: 40%; }
.meter i:nth-child(3) { height: 60%; }
.meter i:nth-child(4) { height: 80%; }
.meter i:nth-child(5) { height: 100%; }
.meter i.on { background: var(--signal); box-shadow: 0 0 8px var(--signal-soft); }

/* ---------- Narrow ---------- */
@media (max-width: 760px) {
  .room { grid-template-columns: minmax(0, 1fr); inset: 76px 0 0 0; align-items: start; }
  .room-light { display: none; }
  .room-card { max-height: calc(100% - 4px); }
  .log-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .log-when { display: flex; flex-wrap: wrap; align-items: center; column-gap: 14px; }
  .certs, .contact { grid-template-columns: minmax(0, 1fr); }
  .stats, .ivr-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status .label { font-size: 10px; letter-spacing: 0.1em; }
  .btn-outline.hide-sm { display: none; }
}
@media (max-width: 460px) {
  .exhibit-tag { display: none; }
  .tube { gap: 5px; }
  .tube i { width: 4px; }
  .tube i:nth-child(2) { width: 9px; }
  .toggle-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Motion off: set by the Motion button (main.js); motion is on by default */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important;
}
