/* ================= ALARM STATE — Prairie Gold Processing ================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; }
body { font-family: "Segoe UI", Tahoma, Arial, sans-serif; user-select: none; }
.hidden { display: none !important; }
code { background:#222; color:#7fd4ff; padding:1px 4px; border-radius:3px; font-family: Consolas, monospace; }

#app, #app canvas { position: absolute; inset: 0; }

/* ================= HUD ================= */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 10; color: #e8e8e8; }
#crosshair { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  font-size:18px; color:rgba(255,255,255,.75); text-shadow:0 0 4px #000; }

#hud-topleft { position:absolute; top:14px; left:14px; }
.hud-box { background:rgba(8,12,16,.72); border:1px solid #2c3a45; border-left:3px solid #e8a020;
  padding:8px 12px; font-size:13px; min-width:190px; backdrop-filter: blur(2px); }
.hud-line { display:flex; justify-content:space-between; gap:14px; line-height:1.5; font-family:Consolas,monospace; }
.hud-label { color:#7fa0b8; font-size:11px; letter-spacing:1px; }
#hud-strikes { color:#ff5544; letter-spacing:3px; }
#hud-manager { color:#ff6a52; font-weight:800; }

#hud-crew { position:absolute; top:126px; right:14px; width:272px; border:1px solid #40505a; border-left:3px solid #56c7ff;
  color:#dce7ec; background:rgba(7,12,16,.86); font-family:Consolas,monospace; backdrop-filter:blur(2px); }
#hud-crew header { display:flex; justify-content:space-between; gap:12px; padding:6px 9px; border-bottom:1px solid #35434b;
  color:#8fa2ad; font-size:10px; }
#hud-role { color:#56c7ff; }
.hud-crew-row { display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:7px; min-height:25px;
  padding:3px 8px; border-bottom:1px solid rgba(64,80,90,.38); font-size:10px; }
.hud-crew-row:last-child { border-bottom:0; }
.hud-crew-row i { width:7px; height:7px; border-radius:50%; background:#53d381; box-shadow:0 0 5px currentColor; }
.hud-crew-row.offline { opacity:.45; }
.hud-crew-row.offline i { background:#707a80; }
.hud-crew-row strong { overflow:hidden; color:#edf3f5; text-overflow:ellipsis; white-space:nowrap; }
.hud-crew-row span { color:#788b95; }
.hud-crew-row.done span { color:#67d68b; font-weight:800; }

#hud-alarm { position:absolute; top:14px; right:14px; width:330px; text-align:center;
  border:2px solid #ffb300; background:rgba(40,28,0,.85); padding:8px 10px; }
#hud-alarm.crit { border-color:#ff2020; background:rgba(60,4,4,.88); animation: alarmflash .5s steps(2) infinite; }
#hud-alarm.shut { border-color:#ff2020; background:rgba(80,0,0,.95); }
@keyframes alarmflash { 50% { background:rgba(120,10,10,.92); } }
#hud-alarm-tier { font-weight:700; letter-spacing:2px; font-size:15px; color:#ffd040; }
#hud-alarm.crit #hud-alarm-tier, #hud-alarm.shut #hud-alarm-tier { color:#ff6055; }
#hud-alarm-text { font-family:Consolas,monospace; font-size:13px; margin:4px 0; color:#fff; }
#hud-alarm-timer { font-family:Consolas,monospace; font-size:12px; color:#ffce70; }

#hud-objective { position:absolute; top:132px; left:14px; width:350px; max-width:calc(100vw - 28px);
  color:#dce5e7; background:rgba(10,18,18,.88); padding:11px 12px; border:1px solid #41524d; border-left:3px solid #e8a020; }
#objective-kicker { display:block; color:#e8a020; font-size:9px; font-weight:800; text-transform:uppercase; }
#objective-title { display:block; margin-top:4px; color:#fff; font-size:16px; line-height:1.2; }
#objective-detail { margin-top:5px; color:#b8c5c7; font-size:11.5px; line-height:1.42; }
#objective-route { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:9px; padding-top:7px;
  border-top:1px solid #35433f; color:#d8e2df; font-family:Consolas,monospace; font-size:11px; }
#objective-route b { flex:0 0 auto; color:#ffc55a; }

#hud-waypoint { position:absolute; top:46px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:8px;
  min-width:106px; justify-content:center; padding:4px 9px; border:1px solid #8a6929; background:rgba(25,20,8,.8);
  color:#ffd477; font-family:Consolas,monospace; font-size:10px; font-weight:800; }
#hud-waypoint i { display:inline-block; color:#ffbd38; font-size:15px; font-style:normal; transform-origin:50% 50%; }

#hud-subtitles { position:absolute; bottom:120px; left:50%; transform:translateX(-50%);
  width:760px; max-width:86vw; text-align:center; font-size:15.5px; line-height:1.45;
  text-shadow:0 1px 3px #000, 0 0 8px #000; }
.sub-line { margin-top:5px; background:rgba(0,0,0,.55); display:inline-block; padding:3px 12px; border-radius:4px; }
.sub-name { color:#ffc862; font-weight:600; }
.sub-radio .sub-name { color:#7fd4ff; }

#hud-interact { position:absolute; left:50%; top:57%; transform:translateX(-50%);
  background:rgba(10,16,20,.8); border:1px solid #4a6; color:#cfe; padding:5px 14px; font-size:14px; }

#hud-keys { position:absolute; bottom:12px; left:14px; max-width:calc(100vw - 210px); font-size:11px; color:#9ab; display:flex; gap:13px;
  flex-wrap:wrap; background:rgba(8,12,16,.68); padding:4px 10px; }
#hud-keys b { color:#dfe; }

#hud-solve-hint { position:absolute; bottom:12px; right:14px; pointer-events:auto; cursor:pointer;
  background:#7a1010; border:2px solid #ff5040; color:#ffe; font-weight:700; letter-spacing:1px;
  padding:8px 16px; font-size:14px; box-shadow:0 0 14px rgba(255,60,40,.35); }
#hud-solve-hint:hover { background:#a01818; }

#hud-compass { position:absolute; top:14px; left:50%; transform:translateX(-50%); width:300px; overflow:hidden;
  background:rgba(8,12,16,.6); border:1px solid #2c3a45; height:22px; white-space:nowrap; }
#compass-tape { position:relative; font-family:Consolas,monospace; font-size:13px; color:#cde; line-height:22px; }

/* ================= Overlays / windows ================= */
.overlay { position:absolute; inset:0; z-index:50; background:rgba(4,8,12,.92); display:flex;
  align-items:center; justify-content:center; }
.overlay-light { position:absolute; inset:0; z-index:60; display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,.35); }
.panel-window { background:#1a2128; border:1px solid #3a4a58; box-shadow:0 8px 40px #000; width:92%; color:#cdd; }
.panel-titlebar { background:linear-gradient(#2c3e50,#1f2d3a); color:#fff; padding:7px 12px; font-size:13px;
  letter-spacing:1px; display:flex; justify-content:space-between; align-items:center; }
.panel-body { padding:18px 22px; font-size:14px; line-height:1.55; max-height:70vh; overflow-y:auto; }
.panel-body h3 { color:#ffc862; margin:10px 0 4px; font-size:15px; }
.panel-body ul { margin-left:20px; }
.panel-foot { padding:10px 22px 16px; text-align:center; }
.win-btn { background:#933; color:#fff; border:1px solid #c55; width:24px; height:22px; cursor:pointer; font-size:12px; }
.win-btn:hover { background:#c44; }
.tier-chip { padding:2px 8px; font-weight:700; font-size:12px; }
.tier-chip.warn { background:#806000; color:#ffe9a0; }
.tier-chip.crit { background:#7a1010; color:#ffc0b8; }
.tier-chip.shut { background:#300; color:#f66; border:1px solid #f44; }

/* ================= Main menu ================= */
#menu { background:rgba(3,8,7,.48); align-items:stretch; justify-content:flex-start; }
#menu-inner { width:min(530px,100vw); height:100%; padding:9vh 48px 28px; text-align:left; color:#eef2ef;
  background:rgba(12,22,19,.94); border-right:2px solid #b67c20; box-shadow:18px 0 55px rgba(0,0,0,.48); }
.logo-co { color:#e8a020; letter-spacing:4px; font-size:12px; font-weight:700; }
.logo-title { margin-top:4px; font-size:60px; font-weight:900; letter-spacing:0; color:#f2f4f1;
  text-shadow:0 3px 18px rgba(0,0,0,.75); font-family:Impact,"Arial Black",sans-serif; }
.logo-sub { max-width:410px; color:#9fb4ad; font-size:11px; letter-spacing:0; line-height:1.45; margin-top:4px; }
#menu-buttons { margin:34px 0 18px; display:flex; flex-direction:column; gap:9px; width:100%; }
.menu-section-label { color:#7fa0b8; font-size:11px; letter-spacing:3px; margin:8px 0 2px; }
.menu-btn { background:#1c2832; color:#dfe8ee; border:1px solid #34495e; padding:11px 16px; font-size:15px;
  cursor:pointer; text-align:left; letter-spacing:1px; }
.menu-btn:hover { background:#27384a; border-color:#5a7a96; }
.menu-btn.selected { border-color:#e8a020; background:#2a2616; box-shadow: inset 0 0 14px rgba(232,160,32,.15); }
.diff-desc { color:#8aa; font-size:12px; letter-spacing:0; }
#btn-course { display:grid; gap:5px; min-height:72px; align-content:center; padding:13px 16px; border-color:#d89a2f !important;
  color:#fff7e0 !important; background:#304d3e !important; text-align:left !important; }
#btn-course:hover { background:#3b614d !important; border-color:#ffc45d !important; }
#btn-course b { font-size:16px !important; }
#btn-course:disabled { opacity:.7; cursor:progress; background:#24352e !important; border-color:#53675e !important; }
.menu-btn.secondary { color:#c7d2ce; background:#18231f; border-color:#40534b; text-align:center; }
.menu-btn.secondary:disabled { opacity:.55; cursor:progress; }
.multiplayer-entry { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; min-height:55px;
  border-color:#397e94; color:#e6f8ff; background:#142b34; text-align:left; }
.multiplayer-entry:hover { border-color:#65bfd7; background:#1a3944; }
.multiplayer-entry b { font-size:14px; }
.multiplayer-entry span { color:#71b5c8; font-size:9px; font-weight:800; }
#campaign-menu-progress { display:grid; gap:6px; padding:3px 2px 10px; color:#9eafa9; font-size:10px; }
#campaign-menu-progress i { display:block; height:5px; overflow:hidden; background:#24332d; }
#campaign-menu-progress i b { display:block; width:0; height:100%; background:#d89a2f; transition:width .25s ease; }
#menu-foot { max-width:415px; margin-top:26px; color:#8ba098; font-size:11px; line-height:1.5; }
#voice-toggle-row { display:block; margin:10px 0; font-size:13px; color:#abc; cursor:pointer; }

/* ================= Live plant shift board ================= */
#live { background:rgba(3,7,9,.96); }
.mp-brief { margin:16px 18px 0; }
.mp-room-strip p { max-width:520px; color:#aebcc3; font-size:11px; line-height:1.45; text-align:right; }
.city-link { color:#7fd4ff; font-weight:800; text-decoration:underline; cursor:pointer; }
a.menu-btn.city-link { display:block; text-decoration:none; text-align:center; font-weight:400; }
.city-button { display:block; margin-top:8px; border:1px solid #3b6f84; border-radius:4px; padding:11px 12px; text-align:center;
  text-decoration:none; font-size:10px; background:#10242c; }
.board-rows { display:grid; gap:3px; margin:8px 0 12px; }
.board-rows div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:baseline; }
.board-rows dt { color:#7f949f; font-size:9px; font-weight:800; }
.board-rows dd { overflow:hidden; color:#edf3f5; font:700 10px Consolas,monospace; text-overflow:ellipsis; white-space:nowrap; }
.board-rows .down dd { color:#ff6a58; }
.board-rows .upset dd { color:#ffc14d; }
#hud-board { margin:0; padding:6px 9px; border-bottom:1px solid #35434b; }
#hud-guest, #hud-paid { padding:6px 9px; border-top:1px solid #35434b; color:#f0bd62; font-size:10px; line-height:1.4; }
#hud-paid { color:#67d68b; font-weight:800; }
#menu-identity { margin:-2px 0 8px; color:#8ba098; font-size:11px; line-height:1.5; }
.radio-chat-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; }
#radio-chat-input { min-height:32px; border:1px solid #445; padding:5px 9px; color:#eef; background:#0c1014; font:13px Consolas,monospace; outline:none; }
#radio-chat { margin-top:8px; }
.rl-crew .rl-who { color:#f0b84b; }
#scada { z-index:70; align-items:stretch; justify-content:stretch; padding:10px; background:#060a0c; }
#scada-shell { width:100%; min-height:0; display:flex; flex-direction:column; }
#scada-bar { flex:0 0 52px; display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid #3c4c56;
  border-bottom:0; border-radius:6px 6px 0 0; padding:8px 11px; color:#dce6eb; background:#11191e; }
#scada-bar span { display:block; color:#e8a020; font-size:8px; font-weight:800; }
#scada-bar b { color:#fff; font-size:14px; }
#scada-bar button { min-height:32px; border:1px solid #50616b; border-radius:4px; padding:0 10px; color:#d4e0e6;
  background:#1a252c; font-size:9px; font-weight:800; cursor:pointer; }
#scada-frame { flex:1 1 auto; min-height:0; width:100%; border:1px solid #3c4c56; border-radius:0 0 6px 6px; background:#11171b; }
#esco-reset { border-color:#8a3a30 !important; color:#ffd0c8 !important; background:#3a1612 !important; }
#mp-panel { width:min(1040px,calc(100vw - 28px)); max-height:calc(100vh - 28px); overflow:auto; border:1px solid #43535d;
  border-top:3px solid #d89a2f; color:#dce5e9; background:#0c1216; box-shadow:0 24px 80px #000; }
#mp-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 19px; border-bottom:1px solid #36434b;
  background:#151e24; }
#mp-head span, .mp-label, .mp-room-strip span { display:block; color:#7594a5; font-size:9px; font-weight:800; }
#mp-head h2 { margin-top:2px; color:#fff; font-size:25px; letter-spacing:0; }
#mp-connect-view { display:grid; grid-template-columns:minmax(0,1fr) 230px; gap:18px; align-items:end; padding:28px 24px 16px; }
.mp-brief { grid-column:1/-1; border-left:3px solid #d89a2f; padding:9px 13px; background:#161d1b; }
.mp-brief strong { color:#f0bd62; font-size:13px; }
.mp-brief p { max-width:780px; margin-top:5px; color:#aebcc3; font-size:12px; line-height:1.5; }
.mp-field { display:grid; gap:5px; color:#7f949f; font-size:9px; font-weight:800; }
.mp-field input { width:100%; min-height:40px; border:1px solid #4a5c67; border-radius:3px; padding:7px 10px; outline:none;
  color:#fff; background:#080d10; font:700 17px Consolas,monospace; text-transform:uppercase; }
.mp-field input:focus { border-color:#62b9d1; }
.mp-connect-actions { grid-column:1/-1; display:grid; grid-template-columns:minmax(150px,1fr) auto 190px minmax(150px,1fr); align-items:end; gap:10px; }
.mp-connect-actions > span { align-self:center; color:#61757f; font-size:10px; text-align:center; }
#mp-panel button:not(.win-btn) { min-height:40px; border:1px solid #4b616c; border-radius:4px; padding:7px 12px; cursor:pointer;
  color:#dce8ed; background:#18242b; font-size:10px; font-weight:800; }
#mp-panel button:not(.win-btn):hover:not(:disabled) { border-color:#6ec1d7; color:#fff; background:#21333c; }
#mp-panel button:disabled { opacity:.42; cursor:not-allowed; }
.mp-room-strip { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:13px 18px; border-bottom:1px solid #344149; background:#10181d; }
.mp-room-strip > div { display:flex; align-items:center; gap:12px; }
#mp-room-code { color:#fff; font:800 25px Consolas,monospace; letter-spacing:3px; }
.mp-layout { display:grid; grid-template-columns:minmax(0,1fr) 330px; min-height:390px; }
.mp-layout > div { padding:18px; }
.mp-roster-block { border-left:1px solid #344149; background:#0a0f12; }
#mp-roles { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-top:9px; }
#mp-roles button { position:relative; min-height:116px !important; display:grid; align-content:start; gap:6px; padding:14px !important; text-align:left; }
#mp-roles button::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:#56c7ff; }
#mp-roles button[data-mp-role="operator"]::before { background:#f0b84b; }
#mp-roles button[data-mp-role="field"]::before { background:#63d887; }
#mp-roles button[data-mp-role="maintenance"]::before { background:#d996ff; }
#mp-roles button.selected { border-color:#fff !important; background:#25333b !important; box-shadow:inset 0 0 0 1px #fff; }
#mp-roles b { color:#f1f5f7; font-size:11px; }
#mp-roles span { color:#95a7b0; font-size:10px; font-weight:400; line-height:1.35; }
#mp-roles small { align-self:end; color:#6f8792; font:800 9px Consolas,monospace; }
#mp-roster { display:grid; gap:5px; margin:9px 0 14px; }
.mp-roster-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; min-height:38px; align-items:center;
  border:1px solid #34424a; padding:7px 9px; background:#121a1f; }
.mp-roster-row.offline { opacity:.5; }
.mp-roster-row b { overflow:hidden; color:#edf3f6; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.mp-roster-row span { font-size:8px; font-weight:800; }
#mp-start { width:100%; margin-top:5px; border-color:#c7762b !important; color:#fff !important; background:#7e400f !important; }
#mp-start:hover:not(:disabled) { background:#9b5013 !important; }
#mp-reconnect { width:100%; margin-top:5px; border-color:#3b879d !important; color:#e7f9ff !important; background:#14313a !important; }
#mp-leave { width:100%; margin-top:8px; border-color:#593b3b !important; color:#bfa3a3 !important; background:#211717 !important; }
#mp-status { min-height:36px; border-top:1px solid #344149; padding:10px 18px; color:#82959e; background:#10171b;
  font:800 10px Consolas,monospace; }
#mp-status.good { color:#69d18b; }
#mp-status.error { color:#ff7567; }
#mp-status.busy { color:#f0bd62; }

/* ================= FactoryTalk HMI ================= */
#hmi-frame { width:min(1240px,97vw); height:min(820px,95vh); display:flex; flex-direction:column;
  background:#c0c0c0; border:2px outset #e8e8e8; box-shadow:0 10px 60px #000; }
#hmi-titlebar { background:linear-gradient(#0a246a,#3a6ea5); color:#fff; padding:4px 8px; font-size:13px;
  display:flex; align-items:center; gap:8px; }
#hmi-title-text { flex:1; }
#hmi-alarmbanner { background:#000; border:2px inset #888; margin:3px; height:74px; display:flex; }
#hmi-ab-rows { flex:1; overflow:hidden; font-family:Consolas,monospace; font-size:12.5px; }
.ab-row { display:flex; gap:10px; padding:1px 6px; white-space:nowrap; }
.ab-row.warn { color:#ffe000; } .ab-row.warn.unack { animation: blinktext .6s steps(2) infinite; }
.ab-row.crit { color:#ff3020; } .ab-row.crit.unack { animation: blinktext .35s steps(2) infinite; }
.ab-row.shut { color:#fff; background:#a00000; }
.ab-row.norm { color:#9f9; }
@keyframes blinktext { 50% { opacity:.15; } }
#hmi-ab-buttons { display:flex; flex-direction:column; gap:2px; padding:2px; }
.ft-btn { background:#d4d0c8; border:2px outset #fff; color:#000; font-size:12px; padding:4px 10px;
  cursor:pointer; font-family:Tahoma, sans-serif; }
.ft-btn:active { border-style:inset; }
.ft-btn.activenav { background:#ffe9a0; border-style:inset; }
#hmi-screen { flex:1; margin:0 3px; background:#9aa5ad; border:2px inset #888; position:relative; overflow:hidden; }
#hmi-nav { display:flex; gap:3px; padding:4px; align-items:center; }
#hmi-clock { margin-left:auto; font-family:Consolas,monospace; background:#000; color:#0f0; padding:3px 10px;
  border:2px inset #888; font-size:13px; }

/* HMI graphic elements */
.hmi-title-block { position:absolute; top:6px; left:50%; transform:translateX(-50%); background:#003366; color:#fff;
  padding:3px 26px; font-size:15px; letter-spacing:2px; border:1px solid #6699cc; }
.hmi-pv { position:absolute; background:#000; color:#00ff00; font-family:Consolas,monospace; font-size:13px;
  padding:1px 5px; border:1px solid #555; text-align:right; min-width:64px; cursor:pointer; }
.hmi-pv .pv-eu { color:#0a0; font-size:10px; }
.hmi-pv.alm-warn { color:#ffe000; border-color:#ffe000; animation: blinktext 1s steps(2) infinite; }
.hmi-pv.alm-crit { color:#ff3020; border-color:#ff3020; animation: blinktext .5s steps(2) infinite; }
.hmi-pv-label { position:absolute; color:#0a1620; font-family:Consolas,monospace; font-size:11px; font-weight:700; }
.hmi-equip-label { position:absolute; color:#06121c; font-size:11px; font-weight:700; text-align:center; }
.hmi-state { position:absolute; font-family:Consolas,monospace; font-size:11px; font-weight:700; padding:1px 6px;
  border:1px solid #333; text-align:center; }
.hmi-state.run { background:#00b000; color:#fff; }
.hmi-state.stop { background:#c00000; color:#fff; }
.hmi-state.off { background:#666; color:#ddd; }
.hmi-state.openv { background:#00b000; color:#fff; }
.hmi-state.closedv { background:#c00000; color:#fff; }
.hmi-faceplate-hint { position:absolute; bottom:4px; right:8px; color:#1a2a36; font-size:11px; }
#hmi-svg { position:absolute; inset:0; width:100%; height:100%; }

/* Alarm summary screen */
.alm-table { position:absolute; inset:40px 14px 12px; background:#000; border:2px inset #777; overflow-y:auto;
  font-family:Consolas,monospace; font-size:13px; }
.alm-table table { width:100%; border-collapse:collapse; }
.alm-table th { background:#1a3a5a; color:#fff; text-align:left; padding:3px 8px; font-size:12px; position:sticky; top:0; }
.alm-table td { padding:2px 8px; border-bottom:1px solid #222; }
.alm-table tr.warn td { color:#ffe000; } .alm-table tr.crit td { color:#ff3020; }
.alm-table tr.norm td { color:#8f8; } .alm-table tr.shut td { color:#fff; background:#800; }

/* Trend screen */
#trend-canvas { position:absolute; left:14px; top:46px; background:#000; border:2px inset #777; }
#trend-side { position:absolute; right:14px; top:46px; width:230px; bottom:12px; background:#d4d0c8;
  border:2px outset #fff; padding:8px; font-size:12px; overflow-y:auto; }
#trend-side .trend-pen { display:block; width:100%; text-align:left; margin-bottom:3px; padding:3px 6px;
  font-family:Consolas,monospace; font-size:12px; background:#efefef; border:1px solid #999; cursor:pointer; }
#trend-side .trend-pen.on { background:#003366; color:#7fd4ff; }

/* ================= Ladder / Logix Designer ================= */
#ld-frame { width:min(1280px,97vw); height:min(840px,95vh); display:flex; flex-direction:column;
  background:#d4d0c8; border:2px outset #eee; box-shadow:0 10px 60px #000; }
#ld-titlebar { background:linear-gradient(#0a246a,#3a6ea5); color:#fff; padding:4px 8px; font-size:13px;
  display:flex; justify-content:space-between; }
#ld-toolbar { background:#d4d0c8; border-bottom:1px solid #999; padding:4px 8px; font-size:12px; display:flex;
  gap:14px; align-items:center; font-family:Tahoma,sans-serif; }
.ld-mode { color:#080; font-weight:700; } .ld-run { background:#080; color:#fff; padding:1px 8px; }
.ld-path { color:#444; font-family:Consolas,monospace; font-size:11px; }
#ld-xref-banner { background:#ffe9a0; border:1px solid #b90; padding:2px 8px; cursor:pointer; }
#ld-main { flex:1; display:flex; min-height:0; }
#ld-tree { width:240px; background:#fff; border-right:2px solid #999; overflow-y:auto; font-size:12px; }
.ld-tree-head { background:#e0e0e0; padding:4px 8px; font-weight:700; border-bottom:1px solid #aaa; }
.ld-tree-item { padding:3px 8px 3px 22px; cursor:pointer; white-space:nowrap; color:#222; }
.ld-tree-item:hover { background:#cce4ff; }
.ld-tree-item.activeroutine { background:#316ac5; color:#fff; }
.ld-tree-group { padding:3px 8px; font-weight:700; color:#333; }
#ld-rungs-wrap { flex:1; display:flex; flex-direction:column; min-width:0; }
#ld-routine-tab { background:#ece9d8; border-bottom:2px solid #999; padding:4px 12px; font-size:12px; font-weight:700; }
#ld-rungs { flex:1; overflow:auto; background:#fff; padding:8px 0 60px; }
#ld-status { background:#d4d0c8; border-top:1px solid #999; padding:3px 10px; font-size:11px; color:#333; }

.rung { display:flex; border-bottom:1px solid #eee; padding:2px 0; }
.rung-num { width:42px; text-align:center; color:#666; font-family:Consolas,monospace; font-size:12px; padding-top:26px; }
.rung-body { flex:1; position:relative; padding:0 14px; }
.rung-comment { font-family:Consolas,monospace; font-size:12px; color:#060; background:#f4fff4;
  border-left:3px solid #0a0; margin:4px 0 2px; padding:2px 8px; white-space:pre-wrap; }
.rung-wire { display:flex; align-items:flex-start; position:relative; min-height:64px; }
.rung-wire::before { content:""; position:absolute; left:0; right:0; top:38px; border-top:2px solid #00f; z-index:0; }
.rung-wire.energized::before { border-color:#00c000; border-width:3px; }
.instr { position:relative; z-index:1; margin:0 7px; text-align:center; font-family:Consolas,monospace; }
.instr .i-tag { font-size:11.5px; color:#00a; max-width:130px; overflow:hidden; text-overflow:ellipsis;
  cursor:pointer; text-decoration:underline dotted; height:30px; display:flex; align-items:flex-end; justify-content:center; }
.instr .i-tag:hover { color:#f60; }
.instr .i-sym { font-size:17px; font-weight:700; color:#00f; background:#fff; padding:0 3px; letter-spacing:1px;
  white-space:nowrap; line-height:22px; }
.instr.on .i-sym { color:#fff; background:#00c000; box-shadow:0 0 0 2px #00c000; }
.instr .i-box { border:2px solid #00f; background:#fff; font-size:11px; padding:3px 8px; text-align:left; min-width:110px; }
.instr.on .i-box { border-color:#00c000; box-shadow:0 0 0 1px #00c000; background:#eaffea; }
.instr .i-box .b-head { font-weight:700; text-align:center; border-bottom:1px solid #99c; margin-bottom:2px; }
.instr .i-box .b-row { display:flex; justify-content:space-between; gap:10px; }
.instr .i-box .b-row .b-val { color:#a00; font-weight:600; }
.i-box .b-row .b-tag { color:#00a; cursor:pointer; text-decoration:underline dotted; }
.i-box .b-row .b-tag:hover { color:#f60; }
.rung.highlight-cause { background:#fffbe0; }

/* ================= Radio ================= */
#radio-frame { width:min(720px,94vw); background:#15191d; border:2px solid #444; box-shadow:0 8px 50px #000; color:#dde; }
#radio-head { background:#23282e; padding:7px 12px; font-size:13px; letter-spacing:1px; display:flex; justify-content:space-between; }
#radio-log { height:280px; overflow-y:auto; padding:10px 14px; font-size:13.5px; line-height:1.5;
  background:#0c0f12; font-family:Consolas,monospace; }
.rl-line { margin-bottom:7px; }
.rl-who { font-weight:700; }
.rl-me .rl-who { color:#8f8; }
.rl-them .rl-who { color:#7fd4ff; }
.rl-sys { color:#888; font-style:italic; }
#radio-ask { padding:10px 14px; border-top:1px solid #333; }
.radio-ask-label { font-size:10.5px; letter-spacing:2px; color:#789; margin:6px 0 4px; }
#radio-channels, #radio-questions { display:flex; flex-wrap:wrap; gap:6px; }
.radio-chan { background:#1f2730; border:1px solid #3a4a58; color:#cde; padding:5px 10px; font-size:12.5px; cursor:pointer; }
.radio-chan.sel { border-color:#7fd4ff; background:#163040; color:#bfeaff; }
.radio-q { background:#202824; border:1px solid #3a5848; color:#cec; padding:5px 10px; font-size:12.5px;
  cursor:pointer; text-align:left; }
.radio-q:hover { background:#2a3830; }
.radio-q:disabled { opacity:.35; cursor:default; }

/* ================= Solve ================= */
#solve-frame { width:min(560px,92vw); background:#1a2128; border:2px solid #804040; box-shadow:0 0 50px rgba(200,40,30,.3); color:#dde; }
#solve-head { background:#5a1410; color:#ffd9d2; padding:8px 12px; font-size:13px; letter-spacing:1px;
  display:flex; justify-content:space-between; }
#solve-body { padding:16px 20px; }
#solve-prompt { font-size:14px; margin-bottom:10px; }
#solve-input { width:100%; font-family:Consolas,monospace; font-size:24px; letter-spacing:3px; padding:8px 12px;
  background:#0a0f14; color:#7fffb0; border:2px solid #3a5848; text-transform:uppercase; outline:none; }
#solve-input:focus { border-color:#7fffb0; }
#solve-feedback { min-height:24px; margin:8px 0; font-size:13.5px; font-weight:600; }
#solve-feedback.bad { color:#ff7060; } #solve-feedback.good { color:#7fffb0; }
#solve-buttons { text-align:right; }
#solve-note { margin-top:10px; font-size:11.5px; color:#789; }

/* ================= Map ================= */
#map-frame { background:#10161c; border:2px solid #3a4a58; color:#cde; }
#map-head { padding:7px 12px; background:#1c2832; display:flex; justify-content:space-between; font-size:13px; letter-spacing:1px; }
#map-canvas { display:block; margin:8px; background:#0a0e12; }

/* ================= Misc ================= */
#flash-overlay { position:absolute; inset:0; pointer-events:none; z-index:40; opacity:0;
  background:radial-gradient(ellipse at center, transparent 40%, rgba(255,30,10,.35) 100%); }
#flash-overlay.warn { background:radial-gradient(ellipse at center, transparent 45%, rgba(255,180,0,.22) 100%); }
#toast { position:absolute; top:90px; left:50%; transform:translateX(-50%); z-index:70; background:rgba(10,14,18,.92);
  border:1px solid #e8a020; color:#ffe9c0; padding:10px 24px; font-size:15px; opacity:0; transition:opacity .3s;
  pointer-events:none; max-width:70vw; text-align:center; }
#toast.show { opacity:1; }

#result-body .res-big { font-size:30px; font-weight:800; text-align:center; margin:8px 0 14px; letter-spacing:2px; }
#result-body .res-big.win { color:#e8a020; } #result-body .res-big.fail { color:#ff7060; }
#result-body table { margin:0 auto; font-family:Consolas,monospace; font-size:14px; }
#result-body td { padding:3px 14px; }
#result-body td:last-child { text-align:right; color:#ffc862; }
#result-body .res-debrief { margin-top:14px; font-size:13.5px; color:#abc; border-top:1px solid #345; padding-top:10px; }
#result-body .res-debrief b { color:#7fd4ff; }

/* ================= FINAL QUALIFICATION ================= */
#qualification { background:rgba(3,7,9,.96); }
#qualification-panel { position:relative; z-index:1; width:min(860px,calc(100vw - 32px)); overflow:hidden; border:1px solid #52636c;
  border-top:3px solid #e8a020; border-radius:6px; color:#dce5e9; background:#0d1418;
  box-shadow:0 28px 90px rgba(0,0,0,.8); pointer-events:auto; }
#qualification-panel > header { padding:27px 30px 23px; border-bottom:1px solid #35434c; background:#151e24; }
#qualification-panel > header span, .qualification-decision > span { color:#e8a020; font-size:9px; font-weight:800; }
#qualification-panel h2 { margin:5px 0 7px; color:#fff; font-size:32px; line-height:1.1; letter-spacing:0; }
#qualification-panel > header p { color:#aebbc2; font-size:13px; }
.qualification-verdict { display:grid; grid-template-columns:250px minmax(0,1fr); border-bottom:1px solid #35434c; }
.qualification-stamp { display:flex; flex-direction:column; justify-content:center; min-height:178px; padding:24px 30px;
  border-right:1px solid #35434c; background:#111a16; }
.qualification-stamp span { color:#82968a; font-size:9px; font-weight:800; }
.qualification-stamp strong { margin:7px 0 4px; color:#67cc8b; font-size:29px; letter-spacing:0; }
.qualification-stamp small { color:#a3b8aa; font-size:9px; font-weight:700; }
.qualification-verdict dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; }
.qualification-verdict dl div { display:flex; flex-direction:column; justify-content:center; min-height:89px;
  padding:16px 22px; border-right:1px solid #2d3940; border-bottom:1px solid #2d3940; }
.qualification-verdict dl div:nth-child(2n) { border-right:0; }
.qualification-verdict dl div:nth-last-child(-n+2) { border-bottom:0; }
.qualification-verdict dt { color:#7f929c; font-size:8px; font-weight:800; }
.qualification-verdict dd { margin:5px 0 0; color:#f3f6f7; font-family:Consolas,monospace; font-size:20px; font-weight:800; }
.qualification-decision { padding:22px 30px 20px; border-bottom:1px solid #35434c; }
.qualification-decision p { max-width:760px; margin:8px 0 13px; color:#c1cdd2; font-size:13px; line-height:1.55; }
.qualification-decision small { color:#71848d; font-family:Consolas,monospace; font-size:9px; }
#qualification-panel footer { position:relative; z-index:2; display:flex; justify-content:flex-end; gap:9px; padding:14px 18px; background:#10171b; }
#qualification-panel footer button { min-height:38px; border:1px solid #53646d; border-radius:4px; padding:0 14px;
  color:#cbd6db; background:#182229; font-size:9px; font-weight:800; cursor:pointer; }
#qualification-panel footer button:hover { border-color:#e8a020; color:#fff; }
#qualification-continue { border-color:#a45f1e !important; color:#fff !important; background:#6d380e !important; }
#qualification-continue:hover { background:#8b4912 !important; }

/* ================= 12-WEEK ALARMSTATE PROGRAM ================= */
#btn-course { border-color:#3f8298; background:#122a33; color:#e7f8ff; text-align:center; }
#btn-course:hover { border-color:#6ac0d8; background:#173842; }
#btn-course b { font-size:14px; }

#course { background:rgba(4,8,11,.96); }
#course-frame { width:min(1220px,96vw); height:min(840px,95vh); display:flex; flex-direction:column;
  border:1px solid #3d4c56; border-radius:6px; overflow:hidden; color:#d9e2e7; background:#0d1317;
  box-shadow:0 28px 90px rgba(0,0,0,.75); }
#course-head { flex:0 0 62px; display:flex; align-items:center; justify-content:space-between; gap:18px;
  padding:9px 14px 9px 18px; border-bottom:1px solid #35434c; background:#151e24; }
#course-head > div:first-child { display:grid; gap:3px; }
#course-head span { color:#e8a020; font-size:9px; font-weight:800; letter-spacing:0; }
#course-head b { color:#fff; font-size:15px; letter-spacing:0; }
.course-head-actions { display:flex; align-items:center; gap:8px; }
#course-reset, #course-portfolio { border:1px solid #4d5b64; border-radius:4px; padding:6px 9px; color:#93a4ae;
  background:#10171b; font-size:9px; font-weight:700; cursor:pointer; }
#course-reset:hover { color:#fff; border-color:#b45b42; }
#course-portfolio { border-color:#3f8298; color:#b8e7f4; }
#course-portfolio:hover:not(:disabled) { border-color:#e8a020; color:#fff; }
#course-portfolio:disabled { opacity:.45; cursor:not-allowed; }
#course-body { flex:1 1 auto; min-height:0; display:grid; grid-template-columns:310px minmax(0,1fr); }
.course-rail { min-height:0; overflow-y:auto; border-right:1px solid #303c44; background:#0a0f12; }
.course-progress { position:sticky; top:0; z-index:2; padding:14px 15px; border-bottom:1px solid #303c44; background:#10171b; }
.course-progress > span { color:#8296a2; font-size:9px; font-weight:800; }
.course-progress > b { float:right; color:#6ac0d8; font-size:13px; }
.course-progress > div { height:4px; clear:both; margin:9px 0 5px; overflow:hidden; background:#263139; }
.course-progress > div i { display:block; height:100%; background:#3d9db5; }
.course-progress small { color:#6f818b; font-size:9px; }
.course-week { width:100%; min-height:56px; display:grid; grid-template-columns:42px minmax(0,1fr) auto;
  align-items:center; gap:8px; border:0; border-bottom:1px solid #202a30; padding:9px 12px; color:#aebbc2;
  background:#0c1216; text-align:left; cursor:pointer; }
.course-week:hover:not(:disabled) { background:#152129; }
.course-week.current { box-shadow:inset 3px 0 #e8a020; background:#1b211d; color:#fff; }
.course-week.complete { box-shadow:inset 3px 0 #4cae70; }
.course-week:disabled { opacity:.38; cursor:not-allowed; }
.course-week > span { color:#e8a020; font-family:Consolas,monospace; font-size:11px; font-weight:800; }
.course-week b { min-width:0; overflow:hidden; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.course-week i { color:#6f818b; font-size:8px; font-style:normal; }
.course-week.complete i { color:#69c58b; }
.course-detail { min-width:0; overflow-y:auto; }
.course-detail > header { padding:26px 28px 20px; border-bottom:1px solid #303c44; background:#12191e; }
.course-detail > header span { color:#6ac0d8; font-size:10px; font-weight:800; }
.course-detail h2 { margin:6px 0 8px; color:#fff; font-size:25px; line-height:1.1; letter-spacing:0; }
.course-detail > header p { max-width:720px; color:#aebbc2; font-size:13px; line-height:1.5; }
.course-skills { display:flex; flex-wrap:wrap; gap:6px; padding:13px 28px; border-bottom:1px solid #273139; }
.course-skills span { border:1px solid #3c4a53; border-radius:4px; padding:4px 7px; color:#9fb1bb; background:#111a20; font-size:9px; }
.course-missions { display:grid; gap:9px; padding:18px 28px 28px; }
.course-mission { min-height:92px; display:grid; grid-template-columns:28px minmax(0,1fr) auto; align-items:center; gap:12px;
  border:1px solid #34424b; border-radius:6px; padding:14px 14px 14px 16px; background:#11181d; }
.course-mission.complete { border-color:#315c40; background:#101b15; }
.cm-state { color:#71838d; font-size:18px; }
.course-mission.complete .cm-state { color:#64c486; }
.cm-copy { min-width:0; }
.cm-copy > span { color:#e8a020; font-size:8px; font-weight:800; }
.cm-copy h3 { margin:4px 0; color:#eef4f7; font-size:14px; letter-spacing:0; }
.cm-copy p { color:#9dadb6; font-size:11px; line-height:1.45; }
.course-mission > button { min-width:76px; min-height:34px; border:1px solid #4b7f90; border-radius:4px;
  color:#e3f6fc; background:#18313a; font-size:9px; font-weight:800; cursor:pointer; }
.course-mission > button:hover { border-color:#69bdd4; background:#214653; }
.course-mission.complete > button { border-color:#476154; color:#a8c5b2; background:#17231c; }
.course-mission > button:disabled { border-color:#3b474d; color:#708087; background:#151c20; cursor:default; }

/* Mandatory problem brief: context and one hint, never a rung answer. */
#workorder { z-index:72; background:rgba(2,5,7,.9); backdrop-filter:blur(5px); }
#workorder-panel { width:min(1040px,calc(100vw - 32px)); max-height:calc(100vh - 32px); overflow:auto;
  border:1px solid #465660; border-radius:6px; color:#e5edf1; background:#10171b; box-shadow:0 28px 90px #000; }
#workorder-panel > header { padding:22px 25px 19px; border-bottom:1px solid #35434c; background:#151e24; }
#wo-kicker { color:#e8a020; font-size:9px; font-weight:800; }
#workorder-panel h2 { margin:5px 0 7px; color:#fff; font-size:25px; line-height:1.1; letter-spacing:0; }
#workorder-panel header p { max-width:760px; color:#c3ced4; font-size:13px; line-height:1.5; }
#wo-story { margin:10px 0 8px; border-left:3px solid #d89a2f; padding:5px 9px; color:#f0d9ad !important; background:#1b201a; }
#wo-problem { color:#c3ced4; }
.wo-context { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-bottom:1px solid #35434c; }
.wo-context article { padding:18px 20px; border-right:1px solid #2f3a42; }
.wo-context article:last-child { border-right:0; }
.wo-context span { display:block; color:#6ac0d8; font-size:9px; font-weight:800; }
.wo-context article:nth-child(2) span { color:#e8a020; }
.wo-context article:nth-child(3) span { color:#68c88a; }
.wo-context p { margin-top:7px; color:#b4c1c8; font-size:11.5px; line-height:1.5; }
#wo-tag-bank { border-bottom:1px solid #35434c; background:#0d1418; }
#wo-tag-bank > header { display:flex; align-items:end; justify-content:space-between; gap:20px; padding:13px 19px 11px; }
#wo-tag-bank > header div { display:flex; flex-direction:column; gap:3px; }
#wo-tag-bank > header span, #esco-tag-drawer header span { color:#6ac0d8; font-size:8px; font-weight:800; }
#wo-tag-bank > header b, #esco-tag-drawer header b { color:#f2f6f8; font-size:11px; }
#wo-tag-bank > header p { max-width:430px; color:#8fa0a9; font-size:9.5px; text-align:right; }
.tag-bank-table { display:grid; min-width:0; }
.tag-bank-row { display:grid; grid-template-columns:minmax(155px,.85fr) 78px minmax(110px,.75fr) minmax(260px,2fr);
  align-items:center; min-width:0; border-top:1px solid #26333b; padding:8px 19px; column-gap:13px; }
.tag-bank-row code { overflow-wrap:anywhere; color:#f2c45e; font-family:Consolas,"Courier New",monospace; font-size:11px; font-weight:700; }
.tag-bank-type, .tag-bank-role { color:#8eb7c4; font-size:8px; font-weight:800; }
.tag-bank-role { color:#69d18c; }
.tag-bank-purpose { min-width:0; color:#b8c5cb; font-size:9.5px; line-height:1.35; }
#wo-tag-bank-list { max-height:188px; overflow:auto; }
.wo-actions { display:grid; grid-template-columns:auto minmax(240px,1fr) auto; align-items:center; gap:16px; padding:15px 18px; }
.wo-actions > button, #wo-hint button { min-height:38px; border:1px solid #526570; border-radius:4px; padding:0 13px;
  color:#cbd7dd; background:#182229; font-size:9px; font-weight:800; cursor:pointer; }
#wo-start { border-color:#df7929 !important; color:#fff !important; background:#8a460d !important; }
#wo-start:hover { background:#a95812 !important; }
#wo-back:hover, #wo-hint button:hover { border-color:#e8a020; color:#fff; }
#wo-hint { min-width:0; text-align:center; }
#wo-hint-text { color:#c8d3d8; font-size:11px; line-height:1.45; text-align:left; }

/* Full ESCO workspace owned by AlarmState during course practicals. */
#esco { z-index:70; align-items:stretch; justify-content:stretch; padding:10px; background:#060a0c; }
#esco-shell { position:relative; width:100%; min-height:0; display:flex; flex-direction:column; }
#esco-bar { flex:0 0 66px; display:grid; grid-template-columns:minmax(320px,1fr) auto auto auto auto auto; align-items:center;
  gap:12px; border:1px solid #3c4c56; border-bottom:0; border-radius:6px 6px 0 0; padding:8px 11px; color:#dce6eb; background:#11191e; }
#esco-bar > div { min-width:0; display:grid; grid-template-columns:auto minmax(0,1fr); gap:3px 10px; }
#esco-bar span { color:#e8a020; font-size:8px; font-weight:800; }
#esco-task-title { color:#fff; font-size:14px; }
#esco-task-problem { grid-column:1/-1; overflow:hidden; color:#aebcc4; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
#esco-status { color:#d8b86b; font-size:9px; white-space:nowrap; }
#esco-status.ready { color:#74bad0; }
#esco-status.accepted { color:#69d18c; }
#esco-bar button { min-height:32px; border:1px solid #50616b; border-radius:4px; padding:0 10px; color:#d4e0e6;
  background:#1a252c; font-size:9px; font-weight:800; cursor:pointer; }
#esco-bar button:hover:not(:disabled) { border-color:#e8a020; color:#fff; }
#esco-lock:disabled { border-color:#5a392d; color:#bb826d; background:#241813; cursor:not-allowed; }
#esco-frame { flex:1 1 auto; min-height:0; width:100%; border:1px solid #3c4c56; border-radius:0 0 6px 6px; background:#11171b; }
#esco-tag-drawer { position:absolute; z-index:2; top:66px; right:0; bottom:0; width:min(540px,calc(100vw - 20px)); overflow:auto;
  border:1px solid #465660; border-top:0; color:#dce6eb; background:#0d1418; box-shadow:-18px 0 44px rgba(0,0,0,.55); }
#esco-tag-drawer > header { position:sticky; top:0; z-index:1; display:flex; align-items:center; justify-content:space-between;
  gap:16px; border-bottom:1px solid #35434c; padding:13px 15px; background:#151e24; }
#esco-tag-drawer > header div { display:flex; flex-direction:column; gap:3px; }
#esco-tags-close { width:32px; height:32px; border:1px solid #50616b; border-radius:4px; color:#d4e0e6; background:#1a252c; cursor:pointer; }
#esco-tag-drawer > p { margin:0; border-bottom:1px solid #26333b; padding:10px 15px; color:#8fa0a9; font-size:9.5px; line-height:1.4; }
#esco-tag-drawer .tag-bank-row { grid-template-columns:minmax(140px,1fr) 72px minmax(100px,.8fr); padding:10px 15px; }
#esco-tag-drawer .tag-bank-purpose { grid-column:1/-1; margin-top:4px; }

@media (max-width:800px) {
  #menu-inner { width:100%; padding:8vh 24px 24px; border-right:0; }
  .logo-title { font-size:48px; }
  #course-head { flex-basis:auto; min-height:84px; align-items:flex-start; gap:8px; padding:9px 10px 8px 12px; }
  #course-head > div:first-child { min-width:0; padding-top:4px; }
  #course-head b { font-size:12px; }
  .course-head-actions { width:150px; display:grid; grid-template-columns:1fr auto; gap:5px; }
  #course-portfolio { grid-column:1/-1; }
  #hud-topleft, #hud-keys { display:none; }
  #hud-compass { top:10px; width:220px; }
  #hud-waypoint { top:40px; }
  #hud-objective { top:72px; left:8px; width:calc(100vw - 16px); }
  #hud-alarm { top:auto; right:8px; bottom:58px; width:min(330px,calc(100vw - 16px)); }
  #hud-crew { top:auto; right:8px; bottom:120px; width:min(272px,calc(100vw - 16px)); }
  #hud-solve-hint { right:8px; bottom:8px; }
  #map-frame { width:calc(100vw - 16px); }
  #map-canvas { width:calc(100% - 16px); height:auto; }
  #course-body { grid-template-columns:120px minmax(0,1fr); }
  .course-week { grid-template-columns:1fr; gap:2px; }
  .course-week b { white-space:normal; }
  .course-week i { display:none; }
  .course-detail > header, .course-missions { padding-right:16px; padding-left:16px; }
  .course-skills { padding-right:16px; padding-left:16px; }
  .wo-context { grid-template-columns:1fr; }
  .wo-context article { border-right:0; border-bottom:1px solid #2f3a42; }
  .wo-context article:last-child { border-bottom:0; }
  #wo-tag-bank > header { align-items:start; flex-direction:column; gap:5px; }
  #wo-tag-bank > header p { text-align:left; }
  .tag-bank-row { grid-template-columns:minmax(125px,1fr) 64px minmax(92px,.75fr); padding:9px 14px; }
  .tag-bank-purpose { grid-column:1/-1; margin-top:4px; }
  .wo-actions { grid-template-columns:1fr; }
  #esco { padding:0; }
  #esco-bar { grid-template-columns:minmax(0,1fr) auto; border-radius:0; }
  #esco-status { grid-column:1; }
  #esco-task-problem { white-space:normal; }
  #esco-tags { grid-column:2; grid-row:1; }
  #esco-review { grid-column:2; grid-row:2; }
  #esco-lock { grid-column:2; grid-row:3; }
  #esco-frame { border-right:0; border-bottom:0; border-left:0; border-radius:0; }
  #esco-tag-drawer { top:0; width:100%; }
  #mp-panel { width:100vw; max-height:100vh; border-right:0; border-bottom:0; border-left:0; }
  #mp-connect-view { grid-template-columns:1fr; padding:18px 14px 12px; }
  .mp-connect-actions { grid-template-columns:1fr; }
  .mp-connect-actions > span { display:none; }
  .mp-layout { grid-template-columns:1fr; }
  .mp-roster-block { border-top:1px solid #344149; border-left:0; }
  #mp-roles { grid-template-columns:1fr; }
  #mp-roles button { min-height:82px !important; }
  #qualification-panel { max-height:calc(100vh - 16px); overflow:auto; }
  #qualification-panel > header { padding:20px 18px 17px; }
  #qualification-panel h2 { font-size:25px; }
  .qualification-verdict { grid-template-columns:1fr; }
  .qualification-stamp { min-height:116px; border-right:0; border-bottom:1px solid #35434c; padding:18px; }
  .qualification-verdict dl div { min-height:72px; padding:12px 15px; }
  .qualification-decision { padding:18px; }
  #qualification-panel footer { display:grid; grid-template-columns:1fr; }
}
