:root {
  --bg: #f5f5f7; --bg2: #ececf0; --card: rgba(255,255,255,.86); --card-solid:#fff;
  --text: #1d1d1f; --muted: #6e6e73; --sep: rgba(0,0,0,.08); --sep2: rgba(0,0,0,.14);
  --accent: #0071e3; --accent-soft: rgba(0,113,227,.12);
  --green: #28cd41; --orange: #ff9f0a; --red: #ff3b30; --purple: #af52de; --teal:#30b0c7;
  --side: rgba(236,236,240,.72); --input: rgba(0,0,0,.045);
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  --radius: 14px;
  --font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, "JetBrains Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg:#000; --bg2:#121214; --card: rgba(28,28,30,.86); --card-solid:#1c1c1e; --text:#f5f5f7; --muted:#98989d;
  --sep: rgba(255,255,255,.08); --sep2: rgba(255,255,255,.16); --accent:#0a84ff; --accent-soft: rgba(10,132,255,.18);
  --side: rgba(30,30,32,.72); --input: rgba(255,255,255,.07); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.35);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg:#000; --bg2:#121214; --card: rgba(28,28,30,.86); --card-solid:#1c1c1e; --text:#f5f5f7; --muted:#98989d;
  --sep: rgba(255,255,255,.08); --sep2: rgba(255,255,255,.16); --accent:#0a84ff; --accent-soft: rgba(10,132,255,.18);
  --side: rgba(30,30,32,.72); --input: rgba(255,255,255,.07); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 30px rgba(0,0,0,.35);
  color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 13.5px;
  -webkit-font-smoothing: antialiased; letter-spacing: -.005em;
  background-image: radial-gradient(1200px 600px at 85% -10%, var(--accent-soft), transparent 60%); }
code { font-family: var(--mono); font-size: 12px; background: var(--input); padding: 1px 5px; border-radius: 5px; }
.window { display: flex; height: 100vh; }

/* ---------- sidebar ---------- */
.sidebar { width: 236px; flex: none; background: var(--side); backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px); border-right: 1px solid var(--sep);
  display: flex; flex-direction: column; padding: 14px 10px; }
.traffic { display: flex; gap: 8px; padding: 2px 8px 14px; }
.traffic span { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.15); }
.traffic span:nth-child(2) { background: #febc2e; } .traffic span:nth-child(3) { background: #28c840; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.app-icon svg { width: 36px; height: 36px; display: block; filter: drop-shadow(0 2px 4px rgba(10,132,255,.35)); }
.brand-title { font-weight: 700; font-size: 15px; } .brand-sub { color: var(--muted); font-size: 11.5px; }
nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--muted); padding: 12px 10px 4px; }
nav a { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 8px; cursor: default;
  color: var(--text); font-weight: 500; user-select: none; }
nav a svg { width: 17px; height: 17px; fill: var(--accent); stroke: var(--accent); }
nav a:hover { background: var(--sep); }
nav a.active { background: var(--accent); color: #fff; }
nav a.active svg { fill: #fff; stroke: #fff; }
.badge { margin-left: auto; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 0 7px; line-height: 18px; }
.sidebar-foot { margin-top: auto; padding: 10px 8px 2px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.status-row { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--green); box-shadow: 0 0 6px var(--green); } .dot.warn { background: var(--orange); } .dot.bad { background: var(--red); }

/* ---------- main ---------- */
main { flex: 1; overflow-y: auto; padding: 26px 34px 60px; }
.page { display: none; max-width: 1280px; margin: 0 auto; animation: fade .25s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
header { margin-bottom: 18px; }
header.with-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 4px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 12px; } h4 { margin: 4px 0 10px; font-size: 13px; }
.sub, .muted { color: var(--muted); } .sub { margin: 0; font-size: 14px; } .small { font-size: 12px; }
.card { background: var(--card); border: 1px solid var(--sep); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 16px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .card-head h3 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .grid2 > .card { margin-bottom: 0; } .grid2 { margin-bottom: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid-side { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.grid-results { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.stack > .card:last-child { margin-bottom: 0; }
.runlist { position: sticky; top: 0; }
hr { border: 0; border-top: 1px solid var(--sep); margin: 16px 0; }
.row { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.row.small { font-size: 12.5px; color: var(--muted); gap: 8px; } .row.small .switch { margin-left: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- controls ---------- */
.field input, .field select { width: 100%; }
.field .seg { margin-bottom: 0; align-self: flex-start; }
.two > * { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 12px; color: var(--muted); font-weight: 500; }
input, select { font: inherit; color: var(--text); background: var(--input); border: 1px solid transparent; border-radius: 8px;
  padding: 7px 10px; outline: none; transition: box-shadow .15s, border-color .15s; min-width: 0; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 13px) 52%, calc(100% - 9px) 52%; background-size: 4px 4px; background-repeat: no-repeat; }
.btn { font: inherit; font-weight: 500; border: 0; border-radius: 8px; padding: 7px 14px; background: var(--input); color: var(--text); cursor: pointer; transition: transform .08s, filter .15s, background .15s; }
.btn:hover { filter: brightness(.96); } .btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 1px 3px rgba(0,113,227,.35); }
.btn.wide { width: 100%; } .btn.big { padding: 11px 14px; font-size: 14.5px; font-weight: 600; border-radius: 10px; }
.btn.danger { color: var(--red); } .btn:disabled { opacity: .5; pointer-events: none; }
.seg { display: inline-flex; background: var(--input); border-radius: 9px; padding: 2px; gap: 2px; margin-bottom: 12px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: 12.5px; font-weight: 500; border: 0; background: transparent; color: var(--text); padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--card-solid); box-shadow: 0 1px 3px rgba(0,0,0,.15), 0 0 0 .5px var(--sep2); }
.seg.mini { margin: 6px 0 0; } .seg.mini button { padding: 3px 10px; }
.switch { position: relative; display: inline-block; width: 34px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--sep2); border-radius: 20px; transition: .2s; cursor: pointer; }
.switch i::before { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--green); } .switch input:checked + i::before { transform: translateX(14px); }
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; padding: 0; height: 22px; width: 100%; border: 0; box-shadow: none; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--p,50%), var(--sep2) var(--p,50%)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--sep2); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3), 0 0 0 .5px rgba(0,0,0,.08); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.err { color: var(--red); font-size: 12px; min-height: 1em; margin: 8px 0 0; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.tile { background: var(--input); border-radius: 11px; padding: 10px 12px; }
.tile .l { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.tile .v { font-size: 21px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.tiles.big .tile { background: var(--card); border: 1px solid var(--sep); box-shadow: var(--shadow); padding: 14px 16px; }
.tiles.big .tile .v { font-size: 26px; }

/* ---------- plots ---------- */
.plot { height: 340px; } .plot.sm { height: 230px; } .plot.sm2 { height: 290px; }

/* ---------- coils ---------- */
.group-title { font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 4px 8px; text-transform: none; }
.coil-list { padding: 4px 0; }
.coil { display: grid; grid-template-columns: 120px 1fr 92px 26px; align-items: center; gap: 14px; padding: 9px 16px; border-bottom: 1px solid var(--sep); }
.coil:last-child { border-bottom: 0; }
.coil .nm { font-weight: 600; } .coil .nm small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.coil input[type=number] { text-align: right; font-variant-numeric: tabular-nums; padding: 5px 8px; }
.unit { display: flex; align-items: center; gap: 5px; min-width: 0; } .unit input { flex: 1; width: 100%; min-width: 0; }
.unit::after { content: attr(data-u); color: var(--muted); font-size: 11.5px; }
.reset { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; border-radius: 6px; }
.reset:hover { background: var(--input); color: var(--accent); }
.card.flush { padding: 4px 0; }

/* ---------- electrodes ---------- */
.strip { position: relative; height: 26px; margin: 4px 56px 6px 52px; border-radius: 6px; overflow: hidden; background: var(--input); }
.strip div { position: absolute; top: 0; bottom: 0; border-right: 1px solid var(--card-solid); cursor: pointer; }
.strip div:hover { outline: 2px solid var(--accent); z-index: 2; }
.el-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; }
.el { background: var(--card); border: 1px solid var(--sep); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); transition: box-shadow .2s; }
.el.flash { box-shadow: 0 0 0 3px var(--accent); }
.el .top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.el .top b { font-size: 13.5px; display: block; } .el .top .z { font-size: 11px; color: var(--muted); }
.el .top .unit { width: 92px; flex: none; }
.el input[type=number] { text-align: right; padding: 4px 7px; font-variant-numeric: tabular-nums; }
.el.mod { border-color: var(--accent); }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; }
.item + .item { border-top: 1px solid var(--sep); }
.list.sel .item { cursor: pointer; border-top: 0; } .list.sel .item:hover { background: var(--input); }
.list.sel .item.on { background: var(--accent); color: #fff; } .list.sel .item.on .muted { color: rgba(255,255,255,.8); } .list.sel .item.on .pill { background: rgba(255,255,255,.22); color: #fff; }
.list.sel .item.cmp { box-shadow: inset 0 0 0 2px var(--accent); }
.item .grow { flex: 1; min-width: 0; } .item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--input); color: var(--muted); white-space: nowrap; }
.pill.running { background: rgba(255,159,10,.16); color: var(--orange); } .pill.done { background: rgba(40,205,65,.15); color: #1f9d35; }
.pill.failed, .pill.incomplete { background: rgba(255,59,48,.14); color: var(--red); }
.progress { height: 5px; border-radius: 5px; background: var(--sep); overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; background: var(--input); border-radius: 7px; padding: 4px 9px; font-family: var(--mono); }
.chip.hl { background: var(--accent-soft); color: var(--accent); }

/* ---------- overview ---------- */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; position: relative; }
.stage { background: var(--card); border: 1px solid var(--sep); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); position: relative; cursor: pointer; transition: transform .15s; }
.stage:hover { transform: translateY(-2px); }
.stage:not(:last-child)::after { content: "›"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 20px; z-index: 2; }
.stage .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 700; margin-bottom: 10px; font-size: 15px; }
.stage .tt { font-weight: 650; } .stage .ds { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.4; }
.stage .st { margin-top: 10px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 0; font-size: 12.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-family: var(--mono); font-size: 12px; word-break: break-all; }
.log, .code { font-family: var(--mono); font-size: 11.5px; background: var(--input); border-radius: 9px; padding: 10px 12px; white-space: pre-wrap; max-height: 260px; overflow: auto; margin: 8px 0; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 30px); opacity: 0; background: var(--card-solid); color: var(--text);
  border: 1px solid var(--sep); box-shadow: var(--shadow); padding: 10px 18px; border-radius: 12px; font-weight: 500; transition: .25s; pointer-events: none; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) { .pipeline { grid-template-columns: repeat(2, 1fr); } .stage::after { display: none; }
  .grid-side, .grid-results, .grid2 { grid-template-columns: 1fr; } .runlist { position: static; } }
@media (max-width: 760px) { .sidebar { display: none; } main { padding: 18px 16px; } .grid3 { grid-template-columns: 1fr; }
  .coil { grid-template-columns: 90px 1fr 80px; } .coil .reset { display: none; } }

/* ---------- event display ---------- */
#page-display { max-width: none; margin: -26px -34px -60px; height: 100vh; }
.viewport { position: relative; height: 100vh; overflow: hidden; background: radial-gradient(1400px 800px at 60% 30%, #1d2230 0%, #0b0c10 55%, #000 100%); color: #f5f5f7; }
.viewport canvas { display: block; }
.labels3d { position: absolute; inset: 0; z-index: 1; }
.labels3d.hide-labels .lbl { display: none; }
.lbl { font: 500 11px var(--font); color: rgba(235,235,245,.75); pointer-events: none; white-space: nowrap; text-shadow: 0 1px 3px #000; }
.lbl.grp { font-weight: 650; color: rgba(255,255,255,.9); } .lbl.hv { color: #e0b24a; font-size: 10px; }
.lbl.mag { color: #f0a070; font-weight: 600; } .lbl.sc { color: #5be37a; font-size: 10px; } .lbl.tick { color: rgba(235,235,245,.4); font-size: 10px; }
.lbl.foil { color: #fff; font-size: 10px; }
.lbl.cryo { font-size: 10.5px; font-weight: 600; } .lbl.cryo.lhe { color: #5ac8fa; } .lbl.cryo.ln2 { color: #a5a3ff; } .lbl.ovc { color: rgba(235,235,245,.6); font-size: 10.5px; }
.glass { position: absolute; background: rgba(30,30,34,.55); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid rgba(255,255,255,.1); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.45); color: #f5f5f7; z-index: 3; }
.glass select, .glass input:not([type=range]):not([type=checkbox]) { background: rgba(255,255,255,.08); color: #f5f5f7; width: 100%; }
.glass .btn { background: rgba(255,255,255,.1); color: #f5f5f7; } .glass .btn:hover { background: rgba(255,255,255,.16); }
.glass .btn.small { font-size: 12px; padding: 6px 10px; } .glass .btn.icon { padding: 5px 11px; font-size: 16px; line-height: 1; }
.hud-left { top: 16px; left: 16px; width: 250px; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.hud-title { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.ev-row { display: flex; gap: 6px; align-items: center; }
.hud-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 2px; }
.hud-stats div { background: rgba(255,255,255,.06); border-radius: 9px; padding: 6px 8px; }
.hud-stats .l { font-size: 10.5px; color: rgba(235,235,245,.6); } .hud-stats .v { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.hud-right { top: 16px; right: 16px; width: 222px; padding: 12px 14px; max-height: calc(100vh - 120px); overflow: auto; }
.hud-sub { font-size: 11px; font-weight: 600; color: rgba(235,235,245,.55); margin: 10px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.hud-sub:first-child { margin-top: 0; }
.species { display: flex; flex-direction: column; gap: 2px; }
.sp { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: pointer; font-size: 12.5px; user-select: none; }
.sp:hover { background: rgba(255,255,255,.07); } .sp.off { opacity: .38; }
.sp i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 8px currentColor; flex: none; }
.sp b { width: 22px; font-weight: 650; } .sp span { flex: 1; color: rgba(235,235,245,.7); } .sp em { font-style: normal; font-variant-numeric: tabular-nums; color: rgba(235,235,245,.55); font-size: 11.5px; }
.tg { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; padding: 3px 0; }
.glass .switch i { background: rgba(255,255,255,.2); }
.hud-views { top: 16px; left: 50%; transform: translateX(-50%); display: flex; padding: 3px; gap: 2px; border-radius: 11px; }
.hud-views button { font: inherit; font-size: 12.5px; font-weight: 500; border: 0; background: transparent; color: #f5f5f7; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.hud-views button:hover { background: rgba(255,255,255,.12); }
.hud-info { left: 16px; bottom: 96px; width: 290px; padding: 14px; font-size: 12.5px; }
.hud-info h4 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 8px; } .hud-info h4 i { width: 11px; height: 11px; border-radius: 50%; }
.hud-info dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; } .hud-info dt { color: rgba(235,235,245,.6); } .hud-info dd { margin: 0; font-variant-numeric: tabular-nums; }
.hud-info .x { position: absolute; top: 8px; right: 10px; cursor: pointer; color: rgba(235,235,245,.6); border: 0; background: none; font-size: 16px; }
.timeline { left: 50%; bottom: 20px; transform: translateX(-50%); width: min(760px, calc(100% - 520px)); min-width: 420px; display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 18px; }
.timeline input[type=range] { flex: 1; } .timeline input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(to right, #0a84ff var(--p,100%), rgba(255,255,255,.18) var(--p,100%)); }
.play { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #f5f5f7; display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .1s; }
.play:active { transform: scale(.94); } .play svg { width: 16px; height: 16px; fill: #000; margin-left: 2px; } .play.on svg { margin-left: 0; }
.tread { font: 600 13px var(--mono); min-width: 120px; text-align: right; font-variant-numeric: tabular-nums; }
.timeline .seg { background: rgba(255,255,255,.08); margin: 0; } .timeline .seg button { color: #f5f5f7; } .timeline .seg button.on { background: rgba(255,255,255,.22); box-shadow: none; }
.empty { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; }
.empty-card { position: static; padding: 22px 26px; max-width: 420px; text-align: center; pointer-events: auto; } .empty-card p { color: rgba(235,235,245,.7); margin: 8px 0 0; } .empty-card a { color: #0a84ff; cursor: pointer; }
@media (max-width: 1100px) { .hud-right { display: none; } .timeline { width: calc(100% - 32px); min-width: 0; } }

.lbl.line { color: rgba(235,235,245,.7); font-size: 11px; } .lbl.del { color: #64d2ff; font-weight: 650; } .lbl.pot { color: #5ac8fa; font-size: 10.5px; }
.timeline .seg.mini { margin: 0; flex: none; } .timeline .seg.mini button { padding: 5px 10px; white-space: nowrap; }
.chapters { left: 50%; bottom: 92px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; border-radius: 13px; }
.chapters button { font: inherit; font-size: 12.5px; font-weight: 550; border: 0; background: transparent; color: rgba(235,235,245,.6); padding: 6px 14px; border-radius: 9px; cursor: pointer; position: relative; overflow: hidden; }
.chapters button .bar { position: absolute; left: 0; bottom: 0; height: 2px; background: #0a84ff; width: 0; transition: width .1s linear; }
.chapters button.done { color: rgba(235,235,245,.85); } .chapters button.done .bar { width: 100%; background: rgba(10,132,255,.5); }
.chapters button.on { background: rgba(255,255,255,.14); color: #fff; }
.caption { left: 50%; bottom: 142px; transform: translateX(-50%); padding: 12px 22px 13px; text-align: center; min-width: 420px; max-width: 640px; border-radius: 16px; animation: capin .5s ease; }
@keyframes capin { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cap-k { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: #64d2ff; }
.cap-t { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; }
.cap-s { font-size: 13px; color: rgba(235,235,245,.72); margin-top: 3px; font-variant-numeric: tabular-nums; }

.gifbtn { font-size: 12px !important; font-weight: 650; padding: 7px 10px !important; flex: none; }
.gifsheet { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 380px; padding: 18px 20px; z-index: 6; display: flex; flex-direction: column; gap: 10px; animation: capin .25s ease; }
.gs-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; gap: 10px; }
.gs-row .seg { margin: 0; background: rgba(255,255,255,.08); } .gs-row .seg button { color: #f5f5f7; } .gs-row .seg button.on { background: rgba(255,255,255,.22); box-shadow: none; }
.gs-est { font-size: 12px; color: rgba(235,235,245,.6); margin: 2px 0; }
.gs-prog { font-size: 12px; color: rgba(235,235,245,.8); } .gs-prog .progress { background: rgba(255,255,255,.12); margin-bottom: 6px; } .gs-prog .progress i { background: #0a84ff; }

.section-h { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 26px 2px 12px; }
.section-h h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.grid3w { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; } .grid3w > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .grid3w { grid-template-columns: 1fr; } }

.cbars { left: 16px; top: 440px; width: 250px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.cb-t { font-size: 12.5px; font-weight: 650; margin-bottom: 5px; } .cb-t span { font-weight: 500; color: rgba(235,235,245,.55); font-size: 11px; margin-left: 4px; }
.cb-bar { height: 10px; border-radius: 5px; }
.cb-bar.turbo { background: linear-gradient(to right, #30123b, #4662d7, #36aaf9, #1ae4b6, #72fe5e, #c8ef34, #faba39, #f66b19, #ca2a04, #7a0403); }
.cb-bar.div { background: linear-gradient(to right, #0a73ff, #6aa6ff 25%, #d9e6ff 50%, #ffe6e0 50%, #ff8a7a 75%, #ff4538); }
.cb-l { display: flex; justify-content: space-between; font: 500 11px var(--mono); color: rgba(235,235,245,.7); margin-top: 3px; }
.cb-s { font-size: 10.5px; color: rgba(235,235,245,.45); line-height: 1.35; }
@media (max-height: 820px) { .cbars { top: auto; bottom: 100px; } }

.lbl.potmin { color: #5ac8fa; font: 650 11px var(--mono); }
.cb-line { display: flex; align-items: center; gap: 8px; font: 500 11px var(--mono); color: rgba(235,235,245,.75); }
.cb-line i { width: 34px; height: 2px; background: #5ac8fa; box-shadow: 0 0 6px #5ac8fa; border-radius: 2px; }

.tg.master { font-weight: 650; padding: 4px 0 6px; } .tg.master em { font-style: normal; font: 600 10px var(--mono); color: rgba(235,235,245,.5); border: 1px solid rgba(255,255,255,.2); border-radius: 4px; padding: 0 4px; margin-left: 6px; }
.tg.sub span:first-child { padding-left: 12px; color: rgba(235,235,245,.8); }

.pill.queued { background: rgba(10,132,255,.14); color: var(--accent); } .pill.cancelled { background: var(--input); color: var(--muted); }
.user-row { color: var(--text); font-weight: 600; gap: 8px; } .user-row .av { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg,#5e5ce6,#0a84ff); color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; }
input[type=file] { padding: 6px; font-size: 12px; }
.ro-banner { background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; font-weight: 500; margin-bottom: 12px; }

.signin { background: var(--accent) !important; color: #fff !important; text-decoration: none; width: 100%; text-align: center; font-size: 12px; padding: 6px 10px; }
.ro-banner a { color: var(--accent); font-weight: 650; }

.pulse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; margin-top: 10px; }
.pulse-timeline { position: relative; height: 54px; margin-top: 6px; background: var(--input); border-radius: 10px; overflow: hidden; font-size: 11px; }
.pulse-timeline .bar { position: absolute; top: 0; bottom: 0; }
.pulse-timeline .lab { position: absolute; top: 4px; color: var(--muted); white-space: nowrap; transform: translateX(-50%); }
.pulse-timeline .ln { position: absolute; top: 0; bottom: 0; width: 2px; }
#catch-card .tg { gap: 12px; } #catch-card .tg span:first-child { font-size: 12.5px; }

.rm-bar { background: var(--input); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.rm-bar .row { margin: 0 0 6px; gap: 6px; } .rm-sum { font-size: 12px; color: var(--muted); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.btn.danger-fill { background: var(--red); color: #fff; } .btn.small { font-size: 12px; padding: 5px 10px; }
.item .ck { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--sep2); flex: none; display: grid; place-items: center; font-size: 11px; color: #fff; }
.item.picked .ck { background: var(--red); border-color: var(--red); }
.item .sz { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 20; animation: fade .15s; }
.sheet { background: var(--card-solid); border: 1px solid var(--sep); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); padding: 20px 22px; width: min(440px, calc(100% - 32px)); }
.sheet-x { max-height: 160px; overflow: auto; font: 12px var(--mono); color: var(--muted); margin: 8px 0 12px; }

.sg-knobs { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
.sg-knob { display: grid; grid-template-columns: 1.3fr 0.9fr 0.8fr 0.8fr 24px; gap: 6px; align-items: center; }
.sg-knob select, .sg-knob input { padding: 5px 7px; font-size: 12px; }
.sg-presets { margin: 4px 0 2px; }
.sg-opt-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; } .sg-opt-table td { padding: 4px 6px; border-bottom: 1px solid var(--sep); }
.sg-opt-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }

.viewport.mini { height: 460px; border-radius: 12px; margin-top: 6px; }
.mini-bar { left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 13px; }
.mini-bar input[type=range] { flex: 1; } .mini-ev { font-size: 12px; min-width: 120px; text-align: center; color: rgba(235,235,245,.85); }
.play.small { width: 30px; height: 30px; } .play.small svg { width: 13px; height: 13px; }
.mini-bar .tread { min-width: 80px; font-size: 12px; }
#page-surrogate .viewport.mini .labels3d .lbl.sc, #page-surrogate .viewport.mini .labels3d .lbl.tick { display: none; }

/* cryogen fill controls (Event Display) */
.cryo-ctl { margin: 2px 0 6px 12px; padding: 6px 0 4px 10px; border-left: 1px solid rgba(255,255,255,.12); }
.cryo-ctl[hidden] { display: none; }
.cryo-ctl .cr-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; color: rgba(235,235,245,.8); margin-top: 4px; }
.cryo-ctl .cr-row i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.cryo-ctl .cr-row b { font: 600 11px var(--mono); color: #fff; }
.cryo-ctl input[type=range] { height: 18px; }
.cryo-ctl input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--c, #5ac8fa) var(--p,100%), rgba(255,255,255,.18) var(--p,100%)); }
.cryo-ctl input[type=range]::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5px; }
.cryo-ctl .cr-sum { font-size: 10.5px; color: rgba(235,235,245,.55); margin-top: 6px; line-height: 1.45; }
.cryo-ctl .cr-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .cryo-ctl .cr-btns .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; font-size: 11px; padding: 4px 4px; overflow: hidden; text-overflow: ellipsis; }
.lbl.pulse { color: rgba(100,210,255,.55); font: 600 10.5px var(--mono); } .lbl.pulse.on { color: #64d2ff; text-shadow: 0 0 8px rgba(100,210,255,.8), 0 1px 3px #000; }

/* annihilation sound */
.sndbtn { font-size: 15px; min-width: 34px; } .sndbtn.on { background: rgba(255,214,10,.22) !important; color: #ffd60a; box-shadow: 0 0 14px rgba(255,214,10,.35); }
.sndbtn.on.ping { animation: sndping .25s ease; } @keyframes sndping { 50% { transform: scale(1.12); } }
/* explainer cards */
.chapters .explain { color: #ffd60a; border-left: 1px solid rgba(255,255,255,.12); border-radius: 0 9px 9px 0; } .chapters .explain.on { background: rgba(255,214,10,.18); }
.explainer { top: 70px; left: 50%; transform: translateX(-50%); width: 460px; max-width: calc(100% - 32px); padding: 16px 18px 14px; border-radius: 18px; animation: capin .45s ease; }
.explainer .ex-k { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: #ffd60a; }
.explainer h3 { margin: 3px 0 8px; font-size: 18px; letter-spacing: -.01em; }
.explainer p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: rgba(235,235,245,.86); }
.explainer .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.explainer .chips span { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.08); color: rgba(235,235,245,.9); }
.explainer .chips b { color: #fff; font-weight: 650; }
.explainer .row { display: flex; gap: 8px; justify-content: flex-end; align-items: center; } .explainer .src { margin-right: auto; font-size: 10.5px; color: rgba(235,235,245,.45); }

/* quench / boil-off alert */
.qalert { top: 70px; left: 50%; transform: translateX(-50%); padding: 10px 18px; border-radius: 14px; font-size: 13px; text-align: center; max-width: 620px; }
.qalert b { font-weight: 700; } .qalert.quench { background: rgba(255,59,48,.28); border: 1px solid rgba(255,69,58,.6); animation: qflash 1s ease 3; }
.qalert .qs { display: block; font-size: 11.5px; color: rgba(235,235,245,.75); margin-top: 3px; }
@keyframes qflash { 50% { box-shadow: 0 0 40px rgba(255,59,48,.7); } }
.cryo-ctl .cr-warn { color: #ff9f0a; }
.explainer, .qalert { z-index: 40; }

/* webcam hand control */
.handbtn { font-size: 15px; min-width: 34px; } .handbtn.on { background: rgba(100,210,255,.22) !important; color: #64d2ff; box-shadow: 0 0 14px rgba(100,210,255,.35); }
.handpanel { left: 16px; bottom: 20px; width: 250px; padding: 10px; border-radius: 16px; z-index: 35; }
.handpanel video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.handpanel canvas { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; background: #000; }
.handpanel .x { position: absolute; top: 14px; right: 14px; z-index: 2; }
.hp-status { margin: 7px 2px 5px; font-size: 13px; font-weight: 650; color: #64d2ff; }
.hp-help { display: grid; grid-template-columns: 1fr; gap: 1px; font-size: 11.5px; color: rgba(235,235,245,.78); }
.hp-priv { margin-top: 6px; font-size: 10px; color: rgba(235,235,245,.42); }
.hp-cursor { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 36; pointer-events: none; transition: transform .06s linear; }
.hp-cursor svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.hp-cursor .dot { fill: rgba(100,210,255,.35); stroke: #64d2ff; stroke-width: 2; }
.hp-cursor .ring { fill: none; stroke: #ffd60a; stroke-width: 3.5; stroke-dasharray: 0 100; stroke-linecap: round; }
.hp-cursor span { position: absolute; left: 48px; top: 12px; font: 650 12px var(--font); color: #fff; text-shadow: 0 1px 3px #000; white-space: nowrap; }
.hp-cursor.pinch .dot { fill: #64d2ff; }

/* positrons / antihydrogen */
.lbl.hb { color: #ffcf6e; font-size: 10.5px; } .lbl.hb.dim { color: rgba(255,207,110,.6); } .lbl.hb.strong { font-weight: 700; font-size: 12px; color: #ffd60a; }
.lbl.hb.laser { color: #c9a8ff; font-weight: 650; } .lbl.hb.pbar { color: #ff6482; font-weight: 650; }
.hud-views .gravbtn { color: #ffd60a; font-weight: 650; }
.gravpanel { top: 64px; left: 50%; transform: translateX(-50%); width: 720px; max-width: calc(100% - 32px); max-height: calc(100% - 150px); overflow: auto; padding: 16px 18px; border-radius: 18px; z-index: 45; }
.gravpanel .x { position: absolute; top: 12px; right: 12px; }
.gv-sub { font-size: 12.5px; color: rgba(235,235,245,.75); margin: 2px 0 10px; }
.gv-ctl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 10px; align-items: end; }
.gv-ctl label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: rgba(235,235,245,.7); }
.gv-ctl select { font-size: 12px; }
.gv-plot { height: 230px; margin-top: 10px; }
.gv-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.gv-out div { background: rgba(255,255,255,.06); border-radius: 10px; padding: 7px 10px; }
.gv-out .l { font-size: 10.5px; color: rgba(235,235,245,.6); } .gv-out .v { font: 650 14px var(--font); } .gv-out .v small { font-weight: 500; font-size: 11px; color: rgba(235,235,245,.6); }
.gv-out .wide { grid-column: span 3; font-size: 12px; color: rgba(235,235,245,.85); }
.gv-src { margin-top: 8px; font-size: 10.5px; color: rgba(235,235,245,.45); }
@media (max-width: 900px) { .gv-ctl { grid-template-columns: repeat(2, 1fr); } .gv-out { grid-template-columns: repeat(2, 1fr); } }

/* ballistic H̄ mode */
.ballistic-box { margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--fill, rgba(127,127,127,.08)); }
.rb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; }
.rb-plots { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; } .rb-plots .plot { height: 260px; }
@media (max-width: 900px) { .rb-plots { grid-template-columns: 1fr; } }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; } .tbl th, .tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--sep, rgba(127,127,127,.2)); vertical-align: top; } .tbl td.muted { font-size: 12px; }
