/* ===== Tokens =====
   Taken from the game's key art: warm charcoal walls, the burnt-orange to amber "ATLANTA" letters, bone-white "LIFE". */
:root {
  --bg: #0D0B0A;
  --side-bg: #0A0908;
  --panel: #141110;
  --panel-2: #1A1614;
  --raise: #221D19;
  --field: #0F0C0B;
  --line: #241F1B;
  --line-2: #312A24;
  --line-3: #463B32;
  --text: #EDE6DA;
  --sub: #A89E92;
  --faint: #776D64;
  --accent: #E8701A;
  --accent-hi: #F5A524;
  --accent-ink: #1C0E03;
  --accent-dim: rgba(232, 112, 26, 0.13);
  --focus: rgba(245, 165, 36, 0.6);
  --green: #5BC57D;
  --green-dim: rgba(91, 197, 125, 0.11);
  --red: #E5483B;
  --red-dim: rgba(229, 72, 59, 0.12);
  --amber: #EBC24F;
  --amber-dim: rgba(235, 194, 79, 0.11);
  --blue: #86AFD6;
  --blue-dim: rgba(134, 175, 214, 0.12);
  --navy: #1B120B;
  --hover: rgba(245, 190, 140, 0.04);
  --radius: 6px;
  --radius-lg: 10px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Oswald", "Arial Narrow", "Inter", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --side: 240px;
  --top: 56px;
  --lift: inset 0 1px 0 rgba(255, 236, 214, 0.03);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 .05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--grain), var(--bg);
  color: var(--text);
  font: 400 13px/1.5 var(--sans);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; transition: text-decoration-color .15s, color .15s; }
a.link:hover { color: var(--accent-hi); text-decoration-color: var(--accent); }
::selection { background: rgba(232, 112, 26, .38); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2A241F; border: 3px solid var(--bg); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #3A322B; }
::-webkit-scrollbar-track { background: transparent; }
svg.ico { flex: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.011em; line-height: 1.3; }
h1 { font: 600 27px/1.15 var(--display); letter-spacing: .005em; color: var(--text); }
h2 { font: 500 15px/1.3 var(--display); text-transform: uppercase; letter-spacing: .07em; }
h3 { font-size: 13px; }
.label { font-size: 12px; font-weight: 500; color: var(--faint); line-height: 1.4; }
.sub { color: var(--sub); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: -0.01em; }
.green { color: var(--green); }
.red { color: var(--red); }
.amber { color: var(--amber); }
.num, .price, .money { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.caps { font: 600 11px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }

/* ===== Boot ===== */
.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 22px; background: radial-gradient(ellipse at 50% 40%, #1E140D, var(--bg) 65%); }
.boot-logo { width: 220px; height: auto; opacity: .92; }
.boot-bar { width: 160px; height: 2px; background: rgba(237, 230, 218, .1); position: relative; overflow: hidden; border-radius: 2px; }
.boot-bar::after { content: ""; position: absolute; inset: 0; width: 35%; background: var(--accent); border-radius: 2px; animation: boot 1.1s ease-in-out infinite; }
@keyframes boot { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* ===== Shell ===== */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, #120E0B 0, var(--side-bg) 200px), var(--side-bg);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 30;
}
.brand { position: relative; display: block; padding: 10px 18px 13px; border-bottom: 1px solid var(--line); }
.brand:focus-visible { outline-offset: -4px; }
.brand-logo { display: block; width: 100%; max-width: 192px; height: auto; aspect-ratio: 2000 / 745; margin: -4px auto -6px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55)); transition: transform .2s var(--ease-out); }
.brand:hover .brand-logo { transform: scale(1.02); }
.brand-sub { text-align: center; font: 500 10.5px/1 var(--display); letter-spacing: .34em; text-transform: uppercase; color: var(--faint); padding-left: .34em; }
.brand-mark { display: flex; align-items: center; gap: 11px; min-width: 0; }
.nav { position: relative; padding: 6px 10px 14px; flex: 1; overflow-y: auto; display: grid; gap: 1px; align-content: start; scrollbar-width: thin; scrollbar-color: #2A241F transparent; }
.nav .nav-group { padding: 14px 10px 6px; font: 500 11px/1 var(--display); text-transform: uppercase; letter-spacing: .16em; color: #5F564E; }
.nav .nav-group:first-child { padding-top: 8px; }
.nav a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; height: 33px; padding: 0 10px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; color: var(--sub); transition: background .15s var(--ease), color .15s var(--ease);
}
.nav a:hover { color: var(--text); background: rgba(255, 236, 214, 0.035); }
.nav a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.nav a.active { color: var(--text); font-weight: 600; }
.nav a.active:hover { background: transparent; }
.nav a.active svg { color: var(--accent-hi); }
.nav:not(.has-ind) a.active { background: var(--accent-dim); }
.nav svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; transition: color .15s; }
/* the active item's highlight slides between items (positions set by ui.js) */
.nav::before, .nav::after { content: ""; position: absolute; top: 0; pointer-events: none; opacity: var(--ind-o, 0); }
.nav::before { left: 10px; right: 10px; height: var(--ind-h, 34px); transform: translateY(var(--ind-y, 0)); border-radius: var(--radius); background: linear-gradient(90deg, rgba(232, 112, 26, .17), rgba(232, 112, 26, .05)); }
.nav::after { left: 0; width: 3px; height: calc(var(--ind-h, 34px) - 14px); transform: translateY(calc(var(--ind-y, 0px) + 7px)); border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); }
.nav.ind-live::before, .nav.ind-live::after { transition: transform .22s var(--ease-out), height .22s var(--ease-out), opacity .15s; }

.side-foot { padding: 10px 10px 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.side-env { padding: 0 6px; display: flex; }
.side-env .badge { max-width: 100%; overflow: hidden; }
.side-user { display: flex; align-items: center; gap: 4px; min-width: 0; }
.side-me { flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius); min-width: 0; transition: background .15s; }
.side-me:hover { background: var(--panel-2); }
.side-av { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 7px; background: var(--raise); border: 1px solid var(--line-2); font: 600 13px/1 var(--display); color: var(--text); text-transform: uppercase; }
.side-me-t { display: grid; min-width: 0; gap: 2px; line-height: 1.2; }
.side-me-t b { font-size: 13px; font-weight: 600; }
.side-me-t .role-chip { justify-self: start; }
.side-user .btn.icon { width: 32px; height: 32px; }

.main { min-width: 0; display: flex; flex-direction: column; background: radial-gradient(1100px 380px at 70% -120px, rgba(232, 112, 26, .06), transparent 70%) no-repeat; }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 0 28px; height: var(--top);
  background: rgba(13, 11, 10, .9); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(10px);
}
.top-logo { display: none; height: 30px; width: auto; aspect-ratio: 2000 / 745; margin: 0 -6px; }
.top .crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--faint); }
.top .crumbs b { color: var(--text); font-weight: 600; }
.top .crumbs a { transition: color .15s; white-space: nowrap; }
.top .crumbs a:hover { color: var(--text); }
.top .crumbs .sep { color: var(--line-3); }
.top .spacer { flex: 1; }
.top .menu-btn { display: none; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border: 1px solid rgba(91, 197, 125, .22); border-radius: 13px; background: var(--green-dim); color: #9EDDB2; font: 600 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; transition: background .2s, border-color .2s, color .2s; }
.live-dot i { position: relative; width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
.live-dot i::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid var(--green); opacity: 0; animation: ping 2.4s var(--ease) infinite; }
.live-dot.stale { border-color: rgba(229, 72, 59, .25); background: var(--red-dim); color: #F2A097; }
.live-dot.stale i { background: var(--red); }
.live-dot.stale i::after { display: none; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
.kbd-hint { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 11px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--field); color: var(--faint); cursor: pointer; font: 400 13px var(--sans); min-width: 270px; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.kbd-hint:hover { border-color: var(--line-3); color: var(--sub); background: #13100E; }
.kbd-hint:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.kbd-hint svg { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; }
.kbd-hint kbd { margin-left: auto; }

.page { padding: 28px 32px 64px; max-width: 1440px; width: 100%; animation: pageIn .2s var(--ease-out); }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; min-height: 38px; }
.page-head .grow { flex: 1; min-width: 0; }
.page-head .sub, .page-head > .sub { font-size: 13px; }
.page-head > .sub { color: var(--faint); font-variant-numeric: tabular-nums; }
.page-head p { margin: 4px 0 0; color: var(--sub); max-width: 680px; }
.page-head h1 + .sub, .page-head h1 + div.sub { margin-top: 4px; }

/* ===== Layout helpers ===== */
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.split.rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split > :only-child { grid-column: 1 / -1; width: 100%; max-width: 760px; }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.tight { gap: 4px; }
.row .grow, .grow { flex: 1; }
.stack > .row > h2 { font-size: 15px; }

/* ===== Panels ===== */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); position: relative; min-width: 0; box-shadow: var(--lift); }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 8px 16px; min-height: 48px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h3 { font: 600 13.5px/1.3 var(--sans); letter-spacing: -.005em; color: var(--text); }
.panel-head .grow { flex: 1; }
.panel-head .label { font-weight: 400; }
.panel-body { padding: 16px; }
.panel-body.flush { padding: 0; }
.panel-foot { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* metrics: separate tiles with the number in the display face */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.metrics > div, .stat {
  position: relative; padding: 14px 16px 13px; min-width: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--lift);
}
.metrics .label, .stat .label { font: 500 11px/1.3 var(--display); text-transform: uppercase; letter-spacing: .13em; color: var(--faint); }
.metrics .v, .stat .v { font: 500 28px/1.15 var(--display); letter-spacing: .005em; margin-top: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metrics .d, .stat .d { font-size: 12px; color: var(--faint); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.compact .v { font-size: 20px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 32px; padding: 0 13px;
  font: 600 13px/1 var(--sans); color: var(--text);
  background: #1D1915; border: 1px solid var(--line-2); border-radius: var(--radius);
  cursor: pointer; white-space: nowrap; user-select: none; box-shadow: var(--lift);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { background: #26201B; border-color: var(--line-3); }
.btn:active { transform: scale(.97); }
.btn:focus-visible, .input:focus-visible, select:focus-visible, textarea:focus-visible, .seg button:focus-visible, .tabs button:focus-visible, .tabs a:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { background: linear-gradient(180deg, #EF7D22, #E0661A); border-color: #E06A1A; color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 214, 160, .35), 0 1px 2px rgba(0, 0, 0, .4); }
.btn.primary:hover { background: linear-gradient(180deg, #F69232, #E8701A); border-color: #EE7A22; }
.btn.danger { color: #F0786C; background: transparent; border-color: rgba(229, 72, 59, 0.34); box-shadow: none; }
.btn.danger:hover { background: var(--red-dim); border-color: rgba(229, 72, 59, 0.6); color: #F69085; }
.btn.good { color: var(--green); background: transparent; border-color: rgba(91, 197, 125, 0.32); box-shadow: none; }
.btn.good:hover { background: var(--green-dim); border-color: rgba(91, 197, 125, 0.55); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--sub); box-shadow: none; }
.btn.ghost:hover { color: var(--text); background: rgba(255, 236, 214, 0.05); }
.btn.lg { height: 42px; padding: 0 18px; font-size: 14px; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.xs { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 5px; gap: 5px; }
.btn.block { width: 100%; }
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.btn.sm svg { width: 14px; height: 14px; }
.btn.icon { width: 28px; padding: 0; }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--text); border-radius: 50%; animation: spin .7s linear infinite; }
.btn.primary.busy::after { border-color: rgba(28, 14, 3, .25); border-top-color: var(--accent-ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Forms ===== */
.field { display: grid; gap: 6px; min-width: 0; }
.field > .label { display: flex; justify-content: space-between; gap: 8px; }
.input, select, textarea {
  width: 100%; height: 34px; padding: 0 11px;
  font: 400 13px var(--sans); color: var(--text);
  background: var(--field); border: 1px solid var(--line-2); border-radius: var(--radius);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
textarea { height: auto; min-height: 80px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
select {
  appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23A89E92' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
select option, select optgroup { background: var(--panel-2); color: var(--text); }
.input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 112, 26, 0.18); background: #110E0C; }
.input::placeholder, textarea::placeholder { color: #5E564F; }
.input.big { height: 40px; font-size: 14px; padding: 0 13px; }
.input.num, input[type=number].input { font-variant-numeric: tabular-nums; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--sub); font-size: 13px; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=color].input { padding: 2px; height: 30px; }
.form-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.seg { display: inline-flex; border: 1px solid var(--line-2); background: var(--field); border-radius: var(--radius); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { height: 26px; padding: 0 11px; border: 0; border-radius: 4px; background: transparent; color: var(--sub); font: 500 12.5px var(--sans); cursor: pointer; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); background: rgba(255, 236, 214, .03); }
.seg button.on { color: var(--text); background: #2A231D; box-shadow: inset 0 0 0 1px var(--line-3), 0 1px 3px rgba(0, 0, 0, .3); font-weight: 600; }

/* ===== Status pills / tags / keys ===== */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; vertical-align: middle;
  font: 600 11.5px/1 var(--sans); color: var(--sub); white-space: nowrap;
  background: rgba(255, 236, 214, .04); border: 1px solid var(--line-2); border-radius: 11px;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.badge.on { color: #9EDDB2; background: var(--green-dim); border-color: rgba(91, 197, 125, .26); }
.badge.on::before { background: var(--green); box-shadow: 0 0 6px rgba(91, 197, 125, .7); }
.badge.off { color: var(--faint); background: transparent; }
.badge.off::before { background: #4E463F; }
.badge.bad { color: #F4A198; background: var(--red-dim); border-color: rgba(229, 72, 59, .3); }
.badge.bad::before { background: var(--red); }
.badge.blue { color: var(--accent-hi); background: var(--accent-dim); border-color: rgba(232, 112, 26, .3); }
.badge.blue::before { background: var(--accent); }
.badge.warn, .badge.mock { color: #F0D586; background: var(--amber-dim); border-color: rgba(235, 194, 79, .28); }
.badge.warn::before, .badge.mock::before { background: var(--amber); }
.badge.plain::before { display: none; }
.badge.faint { color: var(--faint); }
.badge a { color: inherit; }
h1 .badge { font-family: var(--sans); letter-spacing: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; font-size: 12px; color: var(--sub); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 5px; white-space: nowrap; }
kbd, .kc {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  font: 600 10.5px/1 var(--sans); letter-spacing: .03em; text-transform: uppercase; color: var(--sub);
  background: linear-gradient(180deg, #221D19, #1A1613); border: 1px solid var(--line-3); border-bottom-width: 2px; border-radius: 5px; white-space: nowrap;
}

/* ===== Avatars ===== */
.av { width: 30px; height: 30px; flex: none; background: var(--raise); border-radius: 7px; display: grid; place-items: center; overflow: hidden; font: 600 12px var(--display); text-transform: uppercase; color: rgba(0, 0, 0, .55); box-shadow: inset 0 0 0 1px rgba(255, 236, 214, .06); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; background: #201B17; }
.av.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 12px; }
.av.sm { width: 24px; height: 24px; font-size: 10px; border-radius: 5px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .n { font-weight: 600; }
.who .d { color: var(--faint); font-size: 12px; }
a.who:hover .n { color: var(--accent-hi); }

/* ===== Responsive ===== */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split.rev, .split.even { grid-template-columns: 1fr; }
  .split > .panel[style*="sticky"] { position: static !important; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(280px, 86vw); transform: translateX(-100%); visibility: hidden; transition: transform .22s var(--ease-out), visibility 0s linear .22s, box-shadow .22s var(--ease); box-shadow: none; }
  .shell.nav-open .side { transform: none; visibility: visible; transition: transform .22s var(--ease-out), visibility 0s, box-shadow .22s var(--ease); box-shadow: 24px 0 60px rgba(0, 0, 0, .55); }
  .shell::after { content: ""; position: fixed; inset: 0; background: rgba(5, 4, 3, .62); z-index: 25; opacity: 0; pointer-events: none; transition: opacity .2s var(--ease); }
  .shell.nav-open::after { opacity: 1; pointer-events: auto; }
  .top .menu-btn { display: inline-flex; width: 34px; height: 34px; margin-left: -6px; }
  .top .menu-btn svg { width: 19px; height: 19px; }
  .top-logo { display: block; }
  .top { padding: 0 16px; gap: 8px; }
  .top .crumbs { display: none; }
  .kbd-hint { min-width: 0; width: 34px; padding: 0; justify-content: center; }
  .kbd-hint .t, .kbd-hint kbd { display: none; }
  .page { padding: 20px 16px 48px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  h1 { font-size: 23px; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metrics .v, .stat .v { font-size: 22px; }
  .live-dot span { display: none; }
  .live-dot { padding: 0 8px; }
  .panel-body { padding: 12px; }
  .panel-head { padding: 8px 12px; }
  .page-head { margin-bottom: 16px; }
  .page-head > .grow { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
