/* Power Chain: the look of musetechnical.com (black, a faint grid, electric blue, Outfit and
   JetBrains Mono), plus the colours of the simulation: live blue, good green, amber warnings,
   red faults, and the heat-map scale (see floor.js). */
:root {
  --bg: #000000;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --blue: #00a8ff;
  --blue-soft: rgba(0, 168, 255, 0.14);
  --text: #e8e8e8;
  --text-secondary: #c0c0c0;
  --text-muted: #a0a0a0;
  --white: #ffffff;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #ff5a5f;
  --dead: #3a4049;
  --box: #080b10;
  --mono: 'JetBrains Mono', Consolas, monospace;
  --sans: 'Outfit', system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none; z-index: -1;
}
body::after {
  content: '';
  position: fixed; top: -20vh; right: -10vw; width: 60vw; height: 60vh;
  background: radial-gradient(closest-side, rgba(0, 168, 255, 0.08), transparent);
  pointer-events: none; z-index: -1;
}
a { color: inherit; }
.blue { color: var(--blue); }
.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 32px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---- top bar ---- */
nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
nav .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.hawk { width: 34px; height: 34px; fill: var(--blue); flex-shrink: 0; }
.wordmark { font-family: var(--mono); font-weight: 700; font-size: 1.15rem; color: var(--white); letter-spacing: -0.02em; }
.nav-link {
  font-family: var(--mono); font-size: 0.82rem; color: var(--text-muted);
  text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.3s ease;
}
.nav-link:hover { color: var(--blue); }
.nav-link .short { display: none; }

/* ---- heading ---- */
main { flex: 1; padding-bottom: 72px; }
.intro { padding: 44px 0 26px; }
.label {
  font-family: var(--mono); font-size: 0.8rem; color: var(--blue);
  letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 10px;
}
h1 { font-weight: 800; color: var(--white); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -0.035em; }
.lead { margin-top: 14px; max-width: 640px; color: var(--text-secondary); font-weight: 300; font-size: 1.08rem; }

/* ---- panels ---- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h2 {
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700; color: var(--blue);
  letter-spacing: 0.15em; text-transform: uppercase;
}
.hint { font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.06em; }

/* ---- controls ---- */
.controls { display: grid; gap: 14px; }
.pickers { display: flex; gap: 14px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; min-width: 0; }
.field span { font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; }
select {
  width: 100%; font: 500 0.98rem var(--sans); color: var(--white);
  background: #0b0f15; border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 9px 12px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--blue) 50%), linear-gradient(135deg, var(--blue) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 34px;
}
select:hover { border-color: rgba(0, 168, 255, 0.4); }
.transport { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn {
  font: 600 0.88rem var(--mono); letter-spacing: 0.02em; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 8px 14px; cursor: pointer; transition: border-color 0.2s, background 0.2s, color 0.2s;
  min-height: 38px;
}
.btn:hover { border-color: rgba(0, 168, 255, 0.5); color: var(--white); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #001522; min-width: 116px; }
.btn.primary:hover { background: #33baff; color: #001522; }
.speed { display: inline-flex; }
.btn.seg { border-radius: 0; margin-left: -1px; min-width: 52px; }
.btn.seg:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.btn.seg:last-child { border-radius: 0 8px 8px 0; }
.btn.seg[aria-pressed="true"] { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); position: relative; }
.clock { margin-left: auto; font-family: var(--mono); font-size: 1.05rem; color: var(--white); white-space: nowrap; }
.clock .of { color: var(--text-muted); font-size: 0.85rem; }
.blurb { color: var(--text-muted); font-size: 0.95rem; font-weight: 300; }
.blurb b { color: var(--text-secondary); font-weight: 600; }

/* ---- modes: levels, or watch a drill ---- */
.modebar { display: flex; justify-content: space-between; align-items: center; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.modes, .tools { display: flex; gap: 6px; flex-wrap: wrap; }
.mode {
  font: 700 0.78rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); background: transparent; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 16px; cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.mode:hover { color: var(--white); border-color: var(--border-strong); }
.mode[aria-pressed="true"] { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }
body[data-mode="levels"] #watchPickers, body[data-mode="levels"] .inspect .actions { display: none; }
body:not([data-mode="levels"]) #levelPanel { display: none; }
body:not([data-mode="sandbox"]) #sandboxPanel, body:not([data-mode="sandbox"]) #compare { display: none; }
body[data-mode="sandbox"] #designField { display: none; }

/* ---- the help guide ---- */
.help {
  margin: auto; width: min(760px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; overflow: auto;
  color: var(--text); background: #07090d; border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.help::backdrop { background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.help-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; background: #07090d; border-bottom: 1px solid var(--border); }
.help-head h2 { font-weight: 800; font-size: 1.3rem; color: var(--white); letter-spacing: -0.02em; line-height: 1.2; }
.help-body { padding: 4px 22px 22px; }
.help section { margin-top: 18px; }
.help h3 { font-family: var(--mono); font-size: 0.74rem; color: var(--blue); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 6px; }
.help p, .help li, .help dd { color: var(--text-secondary); font-size: 0.95rem; font-weight: 300; }
.help b { color: var(--white); font-weight: 600; }
.help ul { margin-left: 18px; display: grid; gap: 6px; }
.parts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.parts dt { font-family: var(--mono); font-size: 0.82rem; font-weight: 700; color: var(--white); padding-top: 2px; }
.noscript { padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--bad); border-radius: 10px; color: var(--white); }

/* ---- levels ---- */
.levels { display: grid; gap: 16px; }
.level-list { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
.level-list button {
  position: relative; min-width: 42px; height: 38px; padding: 0 10px;
  font: 700 0.9rem var(--mono); color: var(--text-secondary);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer;
}
.level-list button:hover { border-color: rgba(0, 168, 255, 0.5); color: var(--white); }
.level-list button[aria-current="step"] { background: var(--blue); border-color: var(--blue); color: #001522; }
.level-list button.passed::after {
  content: '✓'; position: absolute; top: -7px; right: -6px; width: 16px; height: 16px; border-radius: 50%;
  font-size: 0.62rem; line-height: 16px; text-align: center; background: var(--good); color: #02140c;
  box-shadow: 0 0 0 2px var(--bg);
}
.level-list button.par::after { content: '◆'; background: var(--blue); color: #001522; }
.level-list .part-gap { width: 10px; }
.level-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
.level-brief h2 { font-weight: 800; font-size: 1.45rem; color: var(--white); letter-spacing: -0.02em; line-height: 1.2; margin-top: -4px; }
.level-text { margin-top: 8px; color: var(--text-secondary); font-weight: 300; }
.targets { list-style: none; margin-top: 12px; display: grid; gap: 4px; }
.targets li { font-family: var(--mono); font-size: 0.82rem; color: var(--text); padding-left: 22px; position: relative; }
.targets li::before { content: '▸'; position: absolute; left: 4px; color: var(--blue); }
.build { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.build-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.build-head h3 { font-family: var(--mono); font-size: 0.75rem; font-weight: 700; color: var(--blue); letter-spacing: 0.15em; text-transform: uppercase; }
.spend { font-family: var(--mono); font-size: 0.95rem; font-weight: 700; color: var(--white); }
.spend.over { color: var(--bad); }
.slots { display: grid; gap: 12px; }
.slot { border: 0; min-width: 0; }
.slot legend { font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.option {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 36px;
  background: #0b0f15; border: 1px solid var(--border-strong); border-radius: 8px; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.option:hover { border-color: rgba(0, 168, 255, 0.5); }
.option input { position: absolute; left: 12px; top: 13px; accent-color: var(--blue); width: 15px; height: 15px; margin: 0; }
.option:has(input:checked) { border-color: var(--blue); background: rgba(0, 168, 255, 0.08); }
.option:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.o-name { font-weight: 600; color: var(--white); font-size: 0.93rem; line-height: 1.3; }
.o-spec { font-size: 0.8rem; color: var(--text-muted); font-weight: 300; line-height: 1.35; }
.o-price { font-family: var(--mono); font-size: 0.82rem; color: var(--blue); margin-top: 2px; }
.fine { margin-top: 10px; font-size: 0.78rem; color: var(--text-muted); font-weight: 300; }

/* ---- sandbox: the builder, and the compare table ---- */
.sandbox { display: grid; gap: 4px; }
.sb-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sb-group { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 14px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.sb-group legend { font-family: var(--mono); font-size: 0.7rem; font-weight: 700; color: var(--blue); letter-spacing: 0.15em; text-transform: uppercase; padding: 0 6px; }
.sb-group .field { flex: none; }
select:disabled { opacity: 0.45; cursor: not-allowed; }
.compare { margin-top: 16px; }
.compare .fine { margin: -4px 0 10px; }
.compare-actions { display: flex; gap: 8px; flex-wrap: wrap; }
table.scores { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.scores:has(thead) { min-width: 900px; }
.scores th { font: 700 0.64rem var(--mono); color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.scores td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.scores tr.current td { background: rgba(0, 168, 255, 0.06); }
.scores .d-name { font-weight: 600; color: var(--white); white-space: nowrap; }
.scores .d-sum { display: block; font-size: 0.74rem; color: var(--text-muted); font-weight: 300; max-width: 300px; line-height: 1.35; }
.scores .money, .scores .cell, .scores .total { font-family: var(--mono); font-size: 0.8rem; white-space: nowrap; }
.cell.ok { color: var(--good); } .cell.warm { color: var(--warn); } .cell.no { color: var(--bad); } .cell.wait { color: var(--text-muted); }
.scores .total { color: var(--white); font-weight: 700; }
.scores .row-actions { white-space: nowrap; text-align: right; }
.scores .row-actions .btn { min-height: 30px; padding: 4px 10px; font-size: 0.75rem; margin-left: 4px; }
.scores .empty { color: var(--text-muted); font-size: 0.9rem; padding: 14px 8px; }
.views.stack { grid-template-columns: minmax(0, 1fr); }

/* ---- status strip ---- */
.status { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; min-width: 0; }
.stat .k { font-family: var(--mono); font-size: 0.66rem; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; }
.stat .v { font-family: var(--mono); font-size: 1.15rem; font-weight: 700; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v.good { color: var(--good); } .v.warn { color: var(--warn); } .v.bad { color: var(--bad); }

/* ---- the two views ---- */
.tabs { display: none; gap: 6px; margin-bottom: 10px; }
.tab {
  flex: 1; font: 700 0.8rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }
.views, .lower { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; }
.lower { margin-top: 16px; align-items: start; }
.view { display: flex; flex-direction: column; min-width: 0; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
svg.sld, svg.floor { display: block; width: 100%; height: auto; }
svg.sld { min-width: 600px; margin: 0 auto; }
body.noroom #roomView, body.noroom .tabs { display: none; }
body.noroom .views { grid-template-columns: minmax(0, 1fr); }
svg.floor { min-width: 420px; margin: 0 auto; }
.noroom { color: var(--text-muted); font-size: 0.95rem; padding: 18px 4px; }
.rotate-hint { display: none; font-size: 0.82rem; color: var(--text-muted); margin: -2px 0 10px; }
@media (max-width: 620px) and (orientation: portrait) { .rotate-hint { display: block; } }

/* single-line diagram */
.sld .casing { stroke: var(--bg); stroke-width: 8; fill: none; }
.sld .wire { stroke: var(--dead); stroke-width: 2.5; fill: none; transition: stroke 0.25s; }
.sld .wire.live { stroke: var(--blue); filter: url(#glow); }
.comp { cursor: pointer; outline: none; }
.comp .box { fill: var(--box); stroke: var(--border-strong); stroke-width: 1.5; transition: stroke 0.25s; }
.comp .name { font: 600 13px var(--sans); fill: var(--white); }
.comp .state { font: 700 10.5px var(--mono); fill: var(--text-muted); letter-spacing: 0.04em; }
.comp .detail { font: 400 10px var(--mono); fill: var(--text-muted); }
.comp .meter-bg { fill: rgba(255, 255, 255, 0.08); }
.comp .meter { fill: var(--blue); }
.comp .port { fill: var(--box); stroke: var(--dead); stroke-width: 1.5; }
.comp .port.live { fill: var(--blue); stroke: var(--blue); }
.comp .kind { font: 500 8.5px var(--mono); fill: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.tone-live .box { stroke: rgba(0, 168, 255, 0.75); } .tone-live .state { fill: var(--blue); }
.tone-good .box { stroke: rgba(52, 211, 153, 0.7); } .tone-good .state { fill: var(--good); }
.tone-warn .box { stroke: var(--warn); } .tone-warn .state { fill: var(--warn); } .tone-warn .meter { fill: var(--warn); }
.tone-bad .box { stroke: var(--bad); fill: #1a0709; } .tone-bad .state { fill: var(--bad); } .tone-bad .meter { fill: var(--bad); }
.tone-idle .state { fill: var(--text-muted); }
.meter.low { fill: var(--bad) !important; }
.comp:hover .box { stroke-width: 2.5; }
.comp.selected .box { stroke: var(--white); stroke-width: 2.5; }
.comp:focus-visible .box { stroke: var(--white); stroke-width: 3; }

/* floor plan */
.floor .wall { fill: rgba(255, 255, 255, 0.015); stroke: var(--border-strong); stroke-width: 1.5; }
.floor .aisle { stroke: none; transition: fill 0.4s; }
.floor .aisle-name { font: 700 10px var(--mono); fill: rgba(255, 255, 255, 0.8); letter-spacing: 0.1em; text-transform: uppercase; }
.floor .aisle-temp { font: 700 12px var(--mono); fill: var(--white); }
.floor .contain { fill: none; stroke: var(--white); stroke-width: 1.5; stroke-dasharray: 6 4; opacity: 0.7; }
.floor .rack .body { stroke: rgba(0, 0, 0, 0.55); stroke-width: 1.5; transition: fill 0.4s; }
.floor .rack .front { fill: rgba(255, 255, 255, 0.85); }
.floor .rack .rname { font: 700 12px var(--sans); fill: #041018; }
.floor .rack .rtemp { font: 700 11px var(--mono); fill: #041018; }
.floor .rack .air { fill: none; stroke: rgba(4, 16, 24, 0.55); stroke-width: 1.6; }
.floor .rack.off .body { fill: #1b2027 !important; stroke: var(--dead); }
.floor .rack.off .rname, .floor .rack.off .rtemp { fill: var(--text-muted); }
.floor .rack.off .air { stroke: transparent; }
.floor .rack.hot .body { fill: #3a0b0e !important; stroke: var(--bad); stroke-width: 2; }
.floor .rack.hot .rname, .floor .rack.hot .rtemp { fill: var(--bad); }
.floor .unit .box { fill: var(--box); stroke: var(--border-strong); stroke-width: 1.5; }
.floor .unit .uname { font: 600 11px var(--sans); fill: var(--white); }
.floor .unit .ustate { font: 700 9.5px var(--mono); fill: var(--text-muted); }
.floor .unit.tone-live .box { stroke: rgba(0, 168, 255, 0.75); } .floor .unit.tone-live .ustate { fill: var(--blue); }
.floor .unit.tone-warn .box { stroke: var(--warn); } .floor .unit.tone-warn .ustate { fill: var(--warn); }
.floor .unit.tone-bad .box { stroke: var(--bad); } .floor .unit.tone-bad .ustate { fill: var(--bad); }
.floor .flow { fill: none; stroke: var(--dead); stroke-width: 2; stroke-dasharray: 5 4; }
.floor .flow.on { stroke-dasharray: none; }
.floor .room-temp { font: 500 10px var(--mono); fill: var(--text-muted); letter-spacing: 0.06em; }
.floor .rack, .floor .unit { cursor: pointer; outline: none; }
.floor .rack.selected .body, .floor .unit.selected .box { stroke: var(--white); stroke-width: 2.5; }
.floor .rack:focus-visible .body, .floor .unit:focus-visible .box { stroke: var(--white); stroke-width: 3; }

.legend { margin-top: 12px; }
.legend-bar { height: 8px; border-radius: 4px; }
.legend-ticks { position: relative; height: 18px; margin-top: 4px; font-family: var(--mono); font-size: 0.66rem; color: var(--text-muted); }
.legend-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.legend-ticks span:first-child { transform: none; }
.legend-ticks span:last-child { transform: translateX(-50%); }
.legend-cap { margin-top: 4px; font-size: 0.82rem; color: var(--text-muted); font-weight: 300; }

/* ---- the log ---- */
.log { list-style: none; max-height: 420px; overflow-y: auto; font-size: 0.92rem; padding-right: 4px; }
.log li { display: grid; grid-template-columns: 7.2em 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.log time { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted); text-align: right; padding-top: 2px; }
.log .k-good { color: var(--good); }
.log .k-warn { color: var(--warn); }
.log .k-bad { color: var(--bad); }
.log .k-fault { color: var(--white); font-weight: 600; }
.log .k-fault span::before { content: '⚡ '; color: var(--warn); }
.log .k-note { color: var(--text-muted); font-style: italic; }
.log:empty::before { content: 'Nothing yet: press Run.'; color: var(--text-muted); font-size: 0.9rem; }

/* ---- side: result and inspector ---- */
.side { display: grid; gap: 16px; min-width: 0; }
.result h2 { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--white); line-height: 1.2; }
.result.passed { border-color: rgba(52, 211, 153, 0.45); }
.result.failed { border-color: rgba(255, 90, 95, 0.5); }
.result .verdict { font-family: var(--mono); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 4px; }
.result.passed .verdict { color: var(--good); }
.result.failed .verdict { color: var(--bad); }
.result ul { margin: 12px 0 0 18px; color: var(--text-secondary); font-size: 0.93rem; }
.result li + li { margin-top: 4px; }
.result .lesson { margin-top: 12px; color: var(--text); font-size: 0.95rem; border-left: 2px solid var(--blue); padding-left: 12px; }
.result ul.goals { list-style: none; margin-left: 0; }
.result ul.goals li { padding-left: 24px; position: relative; }
.result ul.goals li::before { position: absolute; left: 2px; font-weight: 700; }
.result ul.goals li.ok::before { content: '✓'; color: var(--good); }
.result ul.goals li.no::before { content: '✗'; color: var(--bad); }
.result .par { margin-top: 10px; font-family: var(--mono); font-size: 0.82rem; color: var(--blue); }
.result .next { margin-top: 14px; }
.about { color: var(--text-secondary); font-size: 0.93rem; font-weight: 300; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin-top: 12px; font-size: 0.9rem; }
.facts:empty { display: none; }
.facts dt { font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; padding-top: 2px; }
.facts dd { color: var(--white); font-family: var(--mono); font-size: 0.85rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions:empty { display: none; }
.btn.fault { border-color: rgba(251, 191, 36, 0.5); color: var(--warn); }
.btn.fault:hover { background: rgba(251, 191, 36, 0.1); color: var(--warn); }
.btn.fix { border-color: rgba(52, 211, 153, 0.5); color: var(--good); }
.btn.fix:hover { background: rgba(52, 211, 153, 0.1); color: var(--good); }
.note-line { margin-top: 10px; font-size: 0.85rem; color: var(--text-muted); min-height: 1.2em; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--border); padding: 28px 0; }
footer .container { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
footer .hawk { width: 28px; height: 28px; }
footer .wordmark { font-size: 1rem; }
.copy { text-align: right; font-size: 0.85rem; color: var(--text-muted); }
.note { font-family: var(--mono); font-size: 0.72rem; color: var(--blue); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }

/* ---- smaller screens ---- */
@media (max-width: 1100px) {
  .views, .lower, .level-grid { grid-template-columns: minmax(0, 1fr); }
  .sb-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log { max-height: 320px; }
}
@media (max-width: 760px) {
  .tabs { display: flex; }
  .views[data-tab="power"] #roomView, .views[data-tab="room"] #powerView { display: none; }
  .status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clock { margin-left: 0; width: 100%; }
}
@media (max-width: 620px) {
  .sb-groups { grid-template-columns: minmax(0, 1fr); }
  .parts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .parts dd { margin-bottom: 8px; }
  .help-head, .help-body { padding-left: 16px; padding-right: 16px; }
  .container { padding: 0 16px; }
  .intro { padding: 28px 0 18px; }
  .nav-link .long { display: none; }
  .nav-link .short { display: inline; }
  .panel { padding: 14px; }
  .transport .btn:not(.seg):not(.primary) { flex: 1 1 auto; }
  .btn.primary { flex: 1 1 100%; }
  .copy { text-align: left; }
  .log li { grid-template-columns: 6.2em 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
