/* ITS Roads CV2X training simulator (/sim) */
.sim-hero { padding: 26px 0 8px; }
.sim-hero h1 { margin-bottom: .3em; }
.scen-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 18px 0 30px; }
@media (min-width: 760px) { .scen-grid { grid-template-columns: repeat(3, 1fr); } }
.scen { display: flex; flex-direction: column; gap: 8px; text-align: left; border-top: 4px solid var(--yellow); cursor: pointer; font: inherit; color: var(--ink); }
.scen:hover:not([disabled]) { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(11,27,43,.12); }
.scen[disabled] { opacity: .6; cursor: default; border-top-color: var(--line); }
.scen .pic { height: 96px; border-radius: 6px; background: var(--paper-2); position: relative; overflow: hidden; }
.scen .pic svg { width: 100%; height: 100%; display: block; }
.scen h3 { margin: 4px 0 0; }
.scen ul { margin: 0; padding-left: 1.1em; font-size: .9rem; color: var(--ink-2); }
.scen .go { margin-top: auto; font-family: var(--font-display); font-weight: 700; color: var(--accent-ink); }
.sim-studio { margin-top: 0; padding-block: 12px 28px; }
.sim-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.sim-top h2 { margin: 0; font-size: 1.3rem; }
.sim-layout { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .sim-layout { grid-template-columns: minmax(0, 1fr) 350px; } }
.sim-rail { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 10px; grid-column: 1 / -1; }
@media (min-width: 1000px) { .sim-rail .rail-step { flex: 1 1 0; min-width: 0; } }
.rail-step { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; min-width: 160px; flex: 0 0 auto; }
.rail-step[disabled] { opacity: .55; cursor: not-allowed; }
.rail-step.active { border-color: var(--yellow-deep); box-shadow: 0 0 0 2px rgba(233,203,78,.35); }
.rail-step.done .rs-n { background: var(--ok); color: #fff; }
.rs-n { width: 26px; height: 26px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: .85rem; flex: 0 0 26px; }
.rail-step.active .rs-n { background: var(--primary); color: var(--primary-ink); }
.rs-t { display: grid; line-height: 1.15; } .rs-t strong { font-family: var(--font-display); font-size: .92rem; } .rs-t small { color: var(--ink-2); font-size: .75rem; }
.sim-main { min-width: 0; }
.sim-stage { position: relative; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: clamp(360px, 62vh, 720px); box-shadow: var(--shadow); }
.sim-stage.wz { height: clamp(320px, 50vh, 560px); }
@media (max-width: 700px) { .sim-stage, .sim-stage.wz { height: 55vh; min-height: 300px; } }
.kbd-note { margin: 6px 0 0; font-size: .78rem; color: var(--ink-3); }
.kbd-note kbd { font: 600 .72rem var(--font-mono); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; background: var(--paper-2); }
/* coach strip */
.coach { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line-2); border-left: 5px solid var(--yellow); border-radius: 8px; padding: 7px 12px; margin: 0 0 8px; min-height: 48px; box-shadow: var(--shadow); }
.coach.flash { animation: coachin .45s ease-out; }
@keyframes coachin { from { background: var(--paper-2); transform: translateY(-3px); } to { background: var(--card); transform: none; } }
.coach-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); flex: 0 0 10px; box-shadow: 0 0 0 0 rgba(233,203,78,.6); animation: coachpulse 1.6s infinite; }
@keyframes coachpulse { 0% { box-shadow: 0 0 0 0 rgba(233,203,78,.55); } 70% { box-shadow: 0 0 0 8px rgba(233,203,78,0); } 100% { box-shadow: 0 0 0 0 rgba(233,203,78,0); } }
.coach-t { flex: 1 1 auto; min-width: 0; font-size: .86rem; line-height: 1.3; color: var(--ink-2); }
.coach-t strong { display: block; font-family: var(--font-display); font-size: .95rem; color: var(--ink); }
.coach .btn { flex: 0 0 auto; }
@media (max-width: 700px) { .coach { flex-wrap: wrap; } .coach-t { flex-basis: calc(100% - 24px); } .coach .btn { margin-left: 20px; } }
/* mini legend */
.minilegend { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 2px 9px; flex-wrap: wrap; justify-content: flex-end; max-width: 70%; background: var(--card); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 7px; font-size: .66rem; line-height: 1.5; color: var(--ink-2); z-index: 3; opacity: .9; }
.minilegend i { display: inline-block; width: 11px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; background: #4e6e8e; border: 2px solid transparent; }
.minilegend .sw-eq { border-color: #1b4f7a; } .minilegend .sw-un { border-color: #9aa0a6; } .minilegend .sw-sel { border-color: #e9cb4e; }
.minilegend .sw-rsu { background: #14283c; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px rgba(20,40,60,.3); } .minilegend .sw-srm { background: #e9cb4e; border-radius: 6px; } .minilegend .sw-ssm { background: #36c15a; border-radius: 6px; }
.minilegend .sw-head { background: linear-gradient(90deg, #e23b2e 33%, #f0c419 33% 66%, #36c15a 66%); border-color: #2c2f33; }
.sim-stage.wz .minilegend { bottom: 60px; }
@media (max-width: 700px) { .minilegend { display: none; } }
/* tour */
.tour { position: absolute; inset: 0; z-index: 9; background: rgba(11,27,43,.55); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(2px); }
.tour-card { background: var(--card); color: var(--ink); border-radius: 10px; padding: 16px 18px 14px; max-width: 420px; width: 100%; box-shadow: 0 16px 40px rgba(0,0,0,.35); border-top: 4px solid var(--yellow); }
.tour-card h3 { margin: 2px 0 6px; font-size: 1.15rem; } .tour-card p { margin: 0 0 10px; font-size: .92rem; line-height: 1.45; color: var(--ink-2); }
.tour-dots { display: flex; gap: 5px; margin-bottom: 10px; } .tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); } .tour-dots i.on { background: var(--yellow-deep); }
.sim-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.sim-stage, .sim-stage * { user-select: none; -webkit-user-select: none; }
.stage-ctl { position: absolute; top: 10px; left: 10px; display: flex; gap: 4px; }
.stage-ctl button, .runbar button { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 700 .95rem var(--font-display); cursor: pointer; box-shadow: var(--shadow); }
.runbar { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; align-items: center; }
.runbar button.accent { background: var(--yellow); color: #22231f; border-color: var(--yellow-deep); }
.runbar #rb-play { width: 44px; }
.runbar button.wide { width: auto; padding: 0 8px; font-size: .8rem; }
.runbar .rb-clock { height: 34px; display: flex; align-items: center; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: .82rem; box-shadow: var(--shadow); white-space: nowrap; }
.sim-tip { position: absolute; z-index: 5; background: var(--navy); color: #fff; font-size: .8rem; line-height: 1.35; padding: 6px 9px; border-radius: 6px; max-width: 300px; pointer-events: none; box-shadow: var(--shadow); }
.hmi { position: absolute; left: 10px; top: 52px; width: min(300px, calc(100% - 20px)); background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--primary); border-radius: 8px; padding: 9px 12px; box-shadow: 0 10px 28px rgba(0,0,0,.22); font-size: .88rem; z-index: 4; pointer-events: auto; }
.hmi.dock { top: auto; bottom: 30px; }
.sim-stage.wz .hmi.dock { bottom: 62px; }
.hmi .x-btn { border: 0; background: none; color: var(--ink-3); font-size: 1.1rem; cursor: pointer; padding: 0 2px; line-height: 1; }
.hmi.lvl-warn { border-left-color: var(--warn); } .hmi.lvl-alert { border-left-color: var(--err); } .hmi.uneq { border-left-color: var(--ink-3); }
.hmi-head { display: flex; align-items: center; gap: 8px; } .hmi-head strong { flex: 1; font-family: var(--font-display); font-size: .9rem; }
.hmi-speed { font-family: var(--font-display); font-size: 1rem; margin: 2px 0 6px; } .hmi-speed b { font-size: 1.5rem; }
.hmi-msg { background: var(--paper-2); border-radius: 6px; padding: 8px 10px; }
.hmi-t { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; } .hmi.lvl-alert .hmi-t { color: var(--err); } .hmi.lvl-warn .hmi-t { color: var(--warn); }
.pill.cyan { background: var(--paper-2); color: var(--accent-ink); border-color: var(--line); } .pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.on { background: var(--navy); color: #fff; border-color: var(--navy); } .pill[role=button], .pill[aria-pressed] { cursor: pointer; }
/* inspector */
.sim-inspector { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); max-height: clamp(360px, 62vh, 720px); overflow: auto; }
@media (max-width: 999px) { .sim-inspector { max-height: none; } }
.insp-head h2 { font-size: 1.25rem; margin: 0 0 8px; } .insp-head .eyebrow { margin-bottom: .2em; }
.insp-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.insp-nav .btn:only-child { margin-left: auto; }
.sf { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; min-width: 0; }
.sf-l { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }
.sf input[type=number], .sf input[type=text], .sf select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); max-width: 100%; min-width: 0; }
.sf input[type=number] { width: 100%; }
.sr { display: flex; align-items: center; gap: 8px; } .sr input { flex: 1; min-width: 0; } .sr output { font-family: var(--font-mono); font-size: .85rem; min-width: 56px; text-align: right; }
.sc { display: flex; align-items: center; gap: 6px; font-size: .9rem; } .sc input { width: 16px; height: 16px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cls-card .checks { flex-direction: column; gap: 4px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.sh { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-2); font: 700 11px/1 var(--font-display); cursor: help; padding: 0; display: inline-grid; place-items: center; flex: 0 0 18px; vertical-align: middle; }
.sh:hover { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.sh-pop { position: absolute; z-index: 90; background: var(--navy); color: #fff; font-size: .84rem; line-height: 1.45; padding: 9px 11px; border-radius: 6px; max-width: min(360px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.lanegrid { display: grid; gap: 6px; } .lg-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 6px; align-items: center; font-size: .85rem; }
.lg-row select { font: inherit; font-size: .85rem; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); min-width: 0; }
.pe-grid { display: grid; gap: 0 10px; grid-template-columns: 1fr 1fr; } .pe-grid .span2 { grid-column: 1 / -1; }
.cls-card { border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--paper); }
.cls-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
/* ring-barrier */
.ring { display: grid; gap: 6px; margin: 4px 0 10px; }
.ring-row { display: grid; grid-template-columns: 48px 1fr; gap: 6px; align-items: center; }
.ring-l { font-size: .75rem; font-weight: 700; color: var(--ink-2); font-family: var(--font-display); }
.ring-bar { display: flex; gap: 3px; align-items: stretch; height: 44px; }
.ring-bar .ph { flex: 1 1 0; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-2); color: var(--ink); font: inherit; cursor: pointer; display: grid; place-content: center; line-height: 1; padding: 0 2px; min-width: 0; }
.ring-bar .ph b { font-family: var(--font-display); font-size: .9rem; } .ring-bar .ph small { font-size: .65rem; color: var(--ink-2); }
.ring-bar .ph.off { opacity: .45; border-style: dashed; }
.ring-bar .ph.sel { border-color: var(--yellow-deep); box-shadow: 0 0 0 2px rgba(233,203,78,.45); }
.ring-bar .ph.green { background: #36c15a; color: #0b2a12; } .ring-bar .ph.yellow { background: #f0c419; color: #2b2300; } .ring-bar .ph.red { background: #e23b2e; color: #fff; }
.ring-bar .ph.green small, .ring-bar .ph.yellow small, .ring-bar .ph.red small { color: inherit; }
.ring-bar .barrier { width: 4px; background: var(--ink); border-radius: 2px; flex: 0 0 4px; }
.ring.live .ph { cursor: default; }
.phase-ed { border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; background: var(--paper); }
.phase-ed h3 { font-size: 1rem; margin: 0 0 8px; }
.cycle { display: grid; gap: 3px; margin: 4px 0 10px; }
.cy-row { display: grid; grid-template-columns: 30px 1fr; gap: 6px; align-items: center; }
.cy-l { font-size: .72rem; font-family: var(--font-display); font-weight: 700; color: var(--ink-2); }
.cy-bar { position: relative; height: 10px; background: var(--paper-2); border-radius: 3px; overflow: hidden; }
.cy-bar span { position: absolute; top: 0; bottom: 0; } .cy-bar .g { background: #36c15a; } .cy-bar .y { background: #f0c419; } .cy-bar .r { background: #e23b2e; }
.runctl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.clock { font-size: .95rem; color: var(--ink-2); margin-bottom: 8px; }
/* bottom: tabbed panels (Signals / In-vehicle display / Console / Score) */
.sim-bottom { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 14px; }
.panel-tabs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; grid-column: 1 / -1; }
.panel-tabs .tab { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink-2); font: 700 .85rem var(--font-display); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.panel-tabs .tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.panel-tabs .tab.on .sh { background: rgba(255,255,255,.15); color: #fff; border-color: transparent; }
.panel-tabs .tab-gap { flex: 1 1 auto; }
.panel { display: none; min-width: 0; }
.panel.active { display: block; }
.panel.console.active { display: flex; }
.sim-bottom .panel:not(.active) { display: none !important; }
.sig-two > div { min-width: 0; } .sig-log .sl-row code { display: inline; margin-right: 4px; } .sig-two .tbl td, .sig-two .tbl th { padding: 3px 5px; white-space: normal; }
@media (min-width: 1000px) { .sim-bottom { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .panel.active { grid-column: 1; } .panel.active.side { grid-column: 2; } .panel-tabs .tab-gap { flex: 0 0 18px; border-left: 1px solid var(--line); height: 20px; margin: 0 6px; } }
@media (max-width: 999px) { .panel-tabs .tab-gap { display: none; } }
.console { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.con-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.con-top h3 { margin: 0; font-size: 1rem; flex: 1 1 auto; }
#con-filters { display: flex; flex-wrap: wrap; gap: 4px; } #con-filters .pill { padding: 2px 8px; font-size: .78rem; border: 1px solid var(--line); background: none; color: var(--ink-2); font-family: inherit; cursor: pointer; } #con-filters .pill.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.con-list { height: 360px; overflow: auto; padding: 6px 8px; font-size: .86rem; }
.con-row { border-bottom: 1px solid var(--line-2); padding: 5px 4px; }
.con-head { display: grid; grid-template-columns: 52px 92px 1fr; gap: 8px; align-items: baseline; cursor: pointer; }
.con-type { font-family: var(--font-display); font-weight: 800; font-size: .78rem; padding: 1px 6px; border-radius: 4px; background: var(--paper-2); text-align: center; }
.t-spat .con-type { background: #d8f3de; color: #14532d; } .t-map .con-type { background: #ece6d2; color: #5c4a10; } .t-bsm .con-type { background: #e2e7ec; color: #1b4f7a; } .t-srm .con-type, .t-ssm .con-type { background: #fef3c7; color: #78350f; } .t-tim .con-type { background: #ffedd5; color: #7c2d12; } .t-psm .con-type { background: #ede9fe; color: #4c1d95; } .t-tam .con-type, .t-tum .con-type, .t-tumack .con-type { background: #d7f0e0; color: #0f5132; } .t-event .con-type { background: var(--err-bg); color: var(--err); }
:root[data-theme=dark] .t-spat .con-type, :root[data-theme=dark] .t-map .con-type, :root[data-theme=dark] .t-bsm .con-type, :root[data-theme=dark] .t-srm .con-type, :root[data-theme=dark] .t-ssm .con-type, :root[data-theme=dark] .t-tim .con-type, :root[data-theme=dark] .t-psm .con-type { filter: brightness(.85) saturate(.9); }
.con-clock { font-size: .78rem; color: var(--ink-3); } .con-sum { min-width: 0; overflow-wrap: anywhere; }
.con-det { display: none; padding: 6px 0 2px 52px; } .con-det.open { display: block; }
.con-fields { margin-top: 6px; max-height: 240px; overflow: auto; }
.hexout { margin-top: 6px; display: grid; gap: 6px; } .hexout .hex { display: block; font-size: .78rem; overflow-wrap: anywhere; background: var(--code-bg); padding: 6px 8px; border-radius: 6px; max-height: 120px; overflow: auto; }
.con-foot { padding: 6px 12px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; font-size: .82rem; color: var(--ink-2); }
.scorebox, .panel.signals, .panel.display, .panel.survey { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; min-width: 0; }
.scorebox h3 { font-size: 1rem; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.score { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .score { grid-template-columns: 1fr; } }
.tile { background: var(--paper); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.tile-t { font-size: .8rem; color: var(--ink-2); margin-bottom: 4px; }
.tile-v { display: flex; gap: 14px; } .tile-v span { display: grid; line-height: 1.1; } .tile-v b { font-family: var(--font-display); font-size: 1.35rem; color: var(--accent-ink); } .tile-v span + span b { color: var(--ink-2); } .tile-v small { font-size: .7rem; color: var(--ink-3); }
/* export */
.exp-card { border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: var(--paper); }
.exp-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.exp-json { font-size: .72rem; max-height: 180px; overflow: auto; margin: 0 0 8px; }
.snmp-row { margin: 8px 0; } .snmp-cmd { font-size: .72rem; white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; }
.checklist { display: grid; gap: 8px; } .ck { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; } .ck input { margin-top: 4px; }
.saved { margin-top: 10px; } .saved h4 { margin: 10px 0 4px; } .saved-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; } .saved-row span:first-child { flex: 1; }

/* compass (look-at) */
.compass { position: absolute; left: 10px; top: 50px; z-index: 3; display: grid; gap: 2px; }
.compass.grid { grid-template-columns: repeat(3, 26px); }
.compass.row { grid-template-columns: repeat(5, 26px); }
.compass button { width: 26px; height: 26px; border-radius: 5px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 700 .72rem var(--font-display); cursor: pointer; box-shadow: var(--shadow); padding: 0; }
.compass button:hover { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
@media (max-width: 700px) { .compass { top: 48px; } .compass.grid { grid-template-columns: repeat(3, 24px); } .compass button { width: 24px; height: 24px; } }
/* Signals dashboard */
.sig-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .sig-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.sig-cards { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-content: start; }
.sig-card { position: relative; background: var(--paper); border: 1px solid var(--line-2); border-left: 6px solid var(--line); border-radius: 8px; padding: 8px 10px 6px; min-width: 0; transition: border-color .2s; }
.sig-card.st-green { border-left-color: #36c15a; } .sig-card.st-yellow { border-left-color: #f0c419; } .sig-card.st-red { border-left-color: #e23b2e; }
.sig-card.st-walk { border-left-color: #fff; box-shadow: inset 0 0 0 1px var(--line); } .sig-card.st-fdw { border-left-color: #ff8c1a; }
.sig-card.snap { animation: sigsnap .9s ease-out; }
@keyframes sigsnap { 0% { background: var(--warn-bg); transform: scale(1.03); box-shadow: 0 0 0 3px rgba(233,203,78,.6); } 100% { background: var(--paper); transform: none; box-shadow: none; } }
.sig-card.snap .fill { transition: width .35s cubic-bezier(.2,1.4,.4,1); }
.sc-head { display: flex; align-items: center; gap: 6px; } .sc-head b { font-family: var(--font-display); font-size: 1rem; } .sc-mv { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lamp { display: inline-grid; grid-auto-flow: column; gap: 2px; background: #2c2f33; padding: 2px 3px; border-radius: 4px; }
.lamp i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.12); display: block; }
.st-red .lamp .r { background: #e23b2e; box-shadow: 0 0 4px #e23b2e; } .st-yellow .lamp .y { background: #f0c419; box-shadow: 0 0 4px #f0c419; } .st-green .lamp .g { background: #36c15a; box-shadow: 0 0 4px #36c15a; }
.walkicon { width: 16px; height: 16px; border-radius: 3px; background: #2c2f33; position: relative; } .walkicon::after { content: ''; position: absolute; left: 5px; top: 3px; width: 6px; height: 10px; border-radius: 2px; background: #fff; } .st-fdw .walkicon::after { background: #ff8c1a; width: 8px; left: 4px; }
.sc-count { display: flex; align-items: baseline; gap: 4px; margin: 2px 0; flex-wrap: wrap; } .sc-count .cnt { font: 800 2.1rem/1 var(--font-display); font-variant-numeric: tabular-nums; min-width: 2.2ch; } .sc-count .unit { font-size: .85rem; color: var(--ink-2); } .sc-int { font-size: .78rem; color: var(--ink-2); flex-basis: 100%; }
.st-green .cnt { color: #2e7d32; } :root[data-theme=dark] .st-green .cnt { color: #7fd48a; } .st-yellow .cnt { color: #9a6b00; } :root[data-theme=dark] .st-yellow .cnt { color: #f0d070; } .st-red .cnt { color: var(--err); }
.sc-bars { display: grid; gap: 3px; margin: 4px 0; } .sc-bars .bar { position: relative; height: 12px; background: var(--paper-2); border-radius: 3px; overflow: hidden; } .sc-bars .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--primary); opacity: .55; } .sc-bars .fill.max { background: var(--ink-3); } .sc-bars small { position: absolute; left: 5px; top: 0; font-size: .66rem; line-height: 12px; color: var(--ink); }
.sc-spat { color: var(--ink-2); overflow-wrap: anywhere; margin-top: 2px; }
.sc-reset { color: var(--warn); font-weight: 700; margin-top: 2px; } .sc-reset[hidden] { display: none; }
.sig-empty { padding: 20px; }
.sig-timers { display: grid; gap: 4px; font-size: .82rem; } .tm-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 4px 6px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 6px; } .tm-row b { font-family: var(--font-display); } .tm-row small { color: var(--ink-3); } .tm-row code { font-size: .78rem; }
.sig-timeline { display: block; width: 100%; height: 78px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 6px; }
.sig-two { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 760px) { .sig-two { grid-template-columns: 1.2fr 1fr; } }
.sig-log { display: grid; gap: 3px; font-size: .82rem; } .sl-row { padding: 3px 6px; border-left: 3px solid var(--line); background: var(--paper); border-radius: 4px; }
.sl-row.k-extend, .sl-row.k-grant, .sl-row.k-release, .sl-row.k-ok { border-left-color: var(--ok); } .sl-row.k-truncate, .sl-row.k-hold, .sl-row.k-shortfall { border-left-color: var(--err); } .sl-row.k-request { border-left-color: var(--primary); } .sl-row.k-reject { border-left-color: var(--warn); }
.tbl tr.in-service td { font-weight: 700; }
.ring-bar .ph.hold { box-shadow: inset 0 0 0 3px var(--err); }
/* in-vehicle display (dash mock) */
.obu-top { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; }
.dash { background: #14181d; color: #f1f3f5; border-radius: 14px; padding: 12px 14px; border: 3px solid #2a3139; box-shadow: inset 0 0 0 1px #000, 0 10px 30px rgba(0,0,0,.35); font-family: var(--font-body); }
.dash.lvl-warn { border-color: #b8860b; } .dash.lvl-alert { border-color: #d9342b; animation: dashpulse 1.2s infinite; } .dash.uneq { border-color: #3a3f45; opacity: .9; }
@keyframes dashpulse { 0%, 100% { box-shadow: inset 0 0 0 1px #000, 0 0 0 0 rgba(217,52,43,.5); } 50% { box-shadow: inset 0 0 0 1px #000, 0 0 0 8px rgba(217,52,43,0); } }
.dash-head { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: #c7ccd2; } .dash-head strong { flex: 1; font-family: var(--font-display); color: #fff; } .dash-head .pill { background: rgba(255,255,255,.08); color: #cfe9f7; border-color: transparent; } .dash-head .x-btn { border: 0; background: none; color: #9aa3ad; font-size: 1.2rem; cursor: pointer; line-height: 1; }
.dash-main { display: grid; grid-template-columns: auto 64px minmax(0, 1fr); gap: 10px; align-items: center; margin: 8px 0; }
.dash-speed { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; } .dash-speed b { font: 800 2.6rem/1 var(--font-display); font-variant-numeric: tabular-nums; } .dash-speed small { color: #9aa3ad; } .dash-adv { display: grid; line-height: 1; margin-left: 10px; text-align: center; border: 2px solid #f1f3f5; border-radius: 6px; padding: 3px 6px; } .dash-adv small { font-size: .55rem; color: #c7ccd2; text-transform: uppercase; } .dash-adv b { font: 800 1.2rem/1 var(--font-display); }
.dash-icon { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; font-size: 2rem; background: #22282f; color: #f1f3f5; }
.dash.lvl-warn .dash-icon { background: #b8860b; color: #111; } .dash.lvl-alert .dash-icon { background: #d9342b; color: #fff; } .ic-green { color: #44e070 !important; } .ic-toll { color: #7ee2a8 !important; } .ic-dnpw { color: #f4c95d !important; } .ic-ima { color: #8ec5ff !important; } .ic-none { opacity: .3; }
.dash-title { font: 800 1.15rem/1.2 var(--font-display); } .dash-dist { color: #c7ccd2; font-size: .95rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stagebar { position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px; margin: 6px 0 4px; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; }
.stagebar span { padding: 3px 0; text-align: center; border-radius: 3px; background: #22282f; color: #7d8791; } .stagebar .s0.on { background: #3a4653; color: #fff; } .stagebar .s1.on { background: #b8860b; color: #111; } .stagebar .s2.on { background: #d9342b; color: #fff; }
.stagemark { position: absolute; top: -4px; width: 2px; height: calc(100% + 8px); background: #fff; }
.dash-audio { color: #c7ccd2; margin: 4px 0; } .dash-detail { color: #dfe4e8; margin: 6px 0; line-height: 1.4; } .dash-detail.muted { color: #9aa3ad; }
.dash-src { margin-top: 8px; padding-top: 8px; border-top: 1px solid #2a3139; display: grid; gap: 6px; } .dash-src .pill { background: rgba(255,255,255,.08); color: #fff; border-color: transparent; } .dash-src .btn { background: #22282f; color: #fff; border-color: #3a4653; } .dash-src .hexout .hex { background: #0b0e12; color: #cfe9f7; } .dash-src .con-fields { background: #fff; color: var(--ink); border-radius: 6px; padding: 4px; } :root[data-theme=dark] .dash-src .con-fields { background: var(--card); }
.obu-empty { padding: 14px 4px; color: #c7ccd2; } .obu-empty p { margin: 0 0 6px; }
.hmi .h-stage { color: var(--ink-3); margin-top: 4px; }
/* RF link moved onto the card header while the card covers the vehicle's signal bars */
.h-link { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; font-size: .72rem; color: var(--ink-2); white-space: nowrap; }
.h-link i { display: block; width: 3px; border-radius: 1px; background: var(--line); } .h-link i:nth-child(1) { height: 5px; } .h-link i:nth-child(2) { height: 8px; } .h-link i:nth-child(3) { height: 11px; } .h-link i:nth-child(4) { height: 14px; }
.h-link.n1 i:nth-child(1) { background: var(--err); } .h-link.n2 i:nth-child(-n+2) { background: var(--yellow); } .h-link.n3 i:nth-child(-n+3), .h-link.n4 i { background: var(--ok); }
.h-link.down i { background: rgba(226,59,46,.35); } .h-link.down .h-link-t { color: var(--err); }
.h-link .h-link-t { margin-left: 4px; align-self: center; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.replay-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .replay-wrap { display: inline-block; } #sim-replay[disabled] { opacity: .5; cursor: not-allowed; } .replay-hint[hidden] { display: none; }
/* ranking editor, scheduler, TIM frames, RSU list */
.ranking { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; } .ranking li { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; background: var(--paper); border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 8px; }
.rk-n { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font: 800 .75rem var(--font-display); } .rk-t { display: grid; line-height: 1.2; font-size: .85rem; } .rk-t small { color: var(--ink-2); font-size: .72rem; } .rk-b { display: flex; gap: 2px; } .rk-b .btn { padding: 2px 6px; }
.sched { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; background: var(--paper); margin-bottom: 8px; } .sched-top { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: end; } .sched-top .sf { margin-bottom: 4px; }
.sched-rows { display: grid; gap: 4px; margin: 6px 0; } .sched-row { display: grid; grid-template-columns: minmax(0, 1fr) 54px auto 54px auto; gap: 6px; align-items: center; font-size: .85rem; opacity: .7; } .sched-row.on { opacity: 1; } .sched-row input[type=number] { width: 54px; padding: 3px 4px; font: inherit; border: 1px solid var(--line); border-radius: 5px; background: var(--card); color: var(--ink); }
.sched.compact .sched-row { font-size: .8rem; } .sched select { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); }
.focus-box { display: grid; gap: 6px; margin: 6px 0 10px; } .focus-box select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); }
.frame-card { border: 1px solid var(--line-2); border-left: 6px solid var(--fc, var(--line)); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; background: var(--paper); opacity: .8; } .frame-card.on { opacity: 1; }
.frame-head { display: flex; align-items: center; gap: 8px; cursor: pointer; flex-wrap: wrap; } .frame-head strong { font-family: var(--font-display); font-size: .92rem; } .frame-card .pe-grid { margin-top: 6px; }
.fi { width: 14px; height: 14px; border-radius: 3px; background: var(--fc, var(--line)); display: inline-block; }
.rsu-list { display: grid; gap: 6px; margin-bottom: 8px; } .rsu-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; font-size: .9rem; }

/* RF: obstacles editor, coverage summary, site survey */
.rfbox { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; background: var(--paper); }
.obs-list { display: grid; gap: 4px; margin: 4px 0 6px; }
.obs-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; font-size: .85rem; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--card); }
.obs-row strong { font-family: var(--font-display); font-size: .85rem; grid-column: 1; }
.obs-row .obs-in { display: flex; flex-wrap: wrap; gap: 4px 10px; grid-column: 1; font-size: .78rem; color: var(--ink-2); } .obs-in label { display: inline-flex; align-items: center; gap: 4px; } .obs-in input { width: 58px; padding: 2px 4px; font: inherit; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); }
.obs-row .btn { grid-column: 2; grid-row: 1 / span 2; }
.survey-sum { margin-top: 4px; } .survey-sum .cov b { font: 800 1.4rem/1 var(--font-display); color: var(--accent-ink); margin-right: 4px; } .survey-sum .cov { font-size: .88rem; }
.dead { margin: 6px 0 0; padding-left: 1.1em; font-size: .85rem; } .dead li { margin-bottom: 2px; }
.whatif { display: grid; gap: 6px; } .survey-ck { padding-left: 1.1em; margin: 4px 0 8px; } .survey-ck li { margin-bottom: 3px; }

/* ---- single-screen layout (run step, wide screens): drawing left, in-vehicle display / counters / console in a right dock, no page scroll.
   The classic stacked layout is one click away (Classic layout) and is what narrow screens always get. */
body.sim-single { overflow: hidden; }
body.sim-single .top-strip, body.sim-single .site-footer, body.sim-single .kbd-note, body.sim-single .panel-tabs, body.sim-single .panel.survey, body.sim-single .sim-rail, body.sim-single #sim-intro, body.sim-single .cookie-bar { display: none !important; }
body.sim-single .site-header .bar { min-height: 48px; }
body.sim-single .sim-single-wrap { max-width: none !important; padding-inline: 0 !important; }
body.sim-single #sim-studio { height: calc(100vh - 51px); max-width: none; box-sizing: border-box; padding: 6px 10px 8px; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) 392px; grid-template-rows: auto auto auto minmax(0, 1fr) auto; grid-template-areas: "top disp" "main disp" "main score" "main con" "sig con"; }
body.sim-single .sim-top { grid-area: top; margin: 0; }
body.sim-single .sim-top h2 { font-size: 1.05rem; }
body.sim-single .sim-layout, body.sim-single .sim-bottom { display: contents; }
body.sim-single .sim-main { grid-area: main; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
body.sim-single .coach { margin: 0 0 6px; padding: 4px 10px; min-height: 0; }
body.sim-single .coach-t { font-size: .8rem; line-height: 1.25; } body.sim-single .coach-t strong { display: inline; margin-right: 6px; font-size: .86rem; }
body.sim-single .sim-stage, body.sim-single .sim-stage.wz { flex: 1 1 auto; height: auto; min-height: 0; }
body.sim-single .sim-inspector { display: none; position: fixed; left: 12px; top: 108px; bottom: 14px; width: 372px; z-index: 45; max-height: none; overflow: auto; box-shadow: 0 18px 48px rgba(0,0,0,.4); border-color: var(--yellow-deep); }
body.sim-single.sim-drawer .sim-inspector { display: block; }
body.sim-single .panel.display { grid-area: disp; display: block !important; padding: 8px 10px; min-height: 0; }
body.sim-single .scorebox { grid-area: score; display: block !important; max-height: 29vh; overflow: auto; padding: 8px 10px; }
body.sim-single .panel.console { grid-area: con; display: flex !important; min-height: 0; }
body.sim-single .panel.signals:not([hidden]) { grid-area: sig; display: block !important; max-height: 240px; overflow: auto; padding: 6px 10px; }
body.sim-single .con-list { height: auto; flex: 1 1 auto; min-height: 0; }
body.sim-single .con-top { padding: 6px 10px; } body.sim-single .con-top h3 { font-size: .9rem; } body.sim-single .con-foot { padding: 4px 10px; font-size: .76rem; }
body.sim-single .score { gap: 6px; } body.sim-single .tile { padding: 5px 8px; } body.sim-single .tile-t { font-size: .72rem; margin-bottom: 2px; } body.sim-single .tile-v b { font-size: 1.05rem; } body.sim-single .tile-v small { font-size: .68rem; }
body.sim-single .scorebox h3 { font-size: .9rem; margin-bottom: 6px; }
body.sim-single .hmi { display: none !important; }
body.sim-single .dash { padding: 10px 12px; } body.sim-single .dash-speed b { font-size: 2.2rem; } body.sim-single .dash-icon { width: 54px; height: 54px; font-size: 1.7rem; } body.sim-single .dash-main { grid-template-columns: auto 54px minmax(0, 1fr); margin: 6px 0; }
body.sim-single .dash-detail { font-size: .8rem; line-height: 1.3; max-height: 4.2em; overflow: auto; }
body.sim-single .obu-top { margin-bottom: 4px; font-size: .82rem; }
body.sim-single .minilegend { display: none; }
body.sim-single .crumbs { display: none !important; }
body.sim-single .cv2x-notice { display: none !important; }

/* send strip above the drawing (run step): one click introduces a vehicle; colour dot per class; sound switch at the end */
.sendbar { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0 0 8px; }
.sendbar .sb-l { font-size: .8rem; color: var(--ink-3); margin-right: 2px; font-family: var(--font-display); }
.sendbar .btn { padding: 4px 9px; font-size: .78rem; display: inline-flex; align-items: center; gap: 6px; }
.sendbar .btn i { width: 9px; height: 9px; border-radius: 50%; background: #8c9bab; flex: 0 0 9px; box-shadow: 0 0 0 1px rgba(0,0,0,.25) inset; }
.sendbar .sb-ems i { background: #ffffff; } .sendbar .sb-fire i { background: #d7262e; } .sendbar .sb-police i { background: #1d2a44; } .sendbar .sb-bus i { background: #f0b24a; } .sendbar .sb-plow i { background: #f58a2b; }
.sendbar .sb-truck i { background: #e3e4e0; } .sendbar .sb-car i { background: #4e6e8e; } .sendbar .sb-moto i { background: #2b2f36; } .sendbar .sb-bike i { background: #6ab187; } .sendbar .sb-x i { display: none; }
.sendbar .sb-sound { margin-left: auto; }
body.sim-single .sendbar { margin: 0 0 6px; gap: 4px; } body.sim-single .sendbar .btn { padding: 3px 8px; font-size: .74rem; }
.ic-bike { color: #8fe0b0 !important; }

/* time-space diagram (arterial scenario) */
.ts-canvas { display: block; width: 100%; height: 280px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--paper); }
body.sim-single .panel.tspace:not([hidden]) { grid-area: sig; display: block !important; max-height: 250px; overflow: hidden; padding: 6px 10px; }
body.sim-single .ts-canvas { height: 206px; }
