/* Arbiter Control · core: design tokens, base elements and the app shell.
   Theme: a dark trading-desk console with a light twin.
   Layout: sticky header + tabs, single 1120px column of panels, tables scroll inside their own frames. */
:root {
  --bg: #f4f5f7; --panel: #ffffff; --soft: #eef0f4; --line: #dfe2e8; --ink: #161a23; --muted: #646b7c;
  --accent: #3355e0; --accent-ink: #ffffff; --good: #0e8a5a; --warn: #a96b12; --bad: #c4314b;
  --s-long: #0e8a5a; --s-short: #0b7aa8; --s-thr: #a96b12; --s-dl: #7a4fd0; --s-bet: #646b7c;
  --shadow: 0 1px 2px rgba(15, 20, 35, .05), 0 6px 18px rgba(15, 20, 35, .06);
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1016; --panel: #141922; --soft: #1a202b; --line: #252c3a; --ink: #e5e8f0; --muted: #8b93a7;
    --accent: #7aa2f7; --accent-ink: #0d1016; --good: #4cd39a; --warn: #e7b04f; --bad: #ff6b7a;
    --s-long: #4cd39a; --s-short: #5cc8f0; --s-thr: #e7b04f; --s-dl: #b49bff; --s-bet: #8b93a7;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, td.n, .tile b, .money { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
h1, h2, h3 { letter-spacing: -.01em; line-height: 1.25; text-wrap: balance; margin: 0; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

/* shell */
.wrap { max-width: 1120px; margin: 0 auto; padding-block: 20px 72px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); outline: none; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding-block: 10px 6px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.spacer { flex: 1; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand.big { font-size: 24px; }
.mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink) center/16px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M5 7h14M5 7l-3 7a3.5 3.5 0 0 0 6 0zM19 7l-3 7a3.5 3.5 0 0 0 6 0zM8 21h8'/%3E%3C/svg%3E"); }
.brand.big .mark { width: 34px; height: 34px; background-size: 20px; }
.tabs { max-width: 1120px; margin: 0 auto; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { color: var(--muted); padding: 8px 10px 9px; font-weight: 500; font-size: 14px; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }

/* utilities (inline style attributes are blocked by the CSP) */
.m0 { margin: 0; } .mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; } .mt6 { margin-top: 6px; } .mt12 { margin-top: 12px; }
.mb6 { margin-bottom: 6px; } .ml8 { margin-left: 8px; } .fs125 { font-size: 12.5px; } .fs13 { font-size: 13px; }
.fs135 { font-size: 13.5px; } .sub { margin: 4px 0 0; font-size: 13.5px; } .full { grid-column: 1 / -1; }
.grow { flex: 1; min-width: 200px; } .plain-link { display: block; color: inherit; text-decoration: none; }
.plain-link:hover { text-decoration: none; border-color: var(--muted); }
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }

