/* Shared shell for the fleet pages (q.arhum.club, s.arhum.club): the usage page's tokens and base, copied from
   web/index.html (not moved: those files ship in the standalone export). Dark by default; the header's theme button
   sets data-theme="light", kept per device. */
:root {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --ink: #ffffff; --ink2: #c3c2b7; --muted: #a3a198;
  --grid: #2c2c2a; --axis: #4a4944; --ring: rgba(255,255,255,0.12); --wash: rgba(255,255,255,0.06);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --track: #184f95; --link: #6aa6f0; --on-fill: #0d0d0d; --hatch-a: #2c2c2a; --hatch-b: #6e6d67;
  --good: #3fbf3f; --warning: #fab219; --serious: #f0956d; --critical: #f47272; --good-ink: #3fbf3f;
}
:root[data-theme="light"] {
  color-scheme: light;
  --page: #f9f9f7; --surface: #fcfcfb; --ink: #0b0b0b; --ink2: #52514e; --muted: #6f6e69;
  --grid: #e1e0d9; --axis: #c3c2b7; --ring: rgba(11,11,11,0.10); --wash: rgba(11,11,11,0.04);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --track: #cde2fb; --link: #1f66c2; --on-fill: #ffffff; --hatch-a: #e1e0d9; --hatch-b: #8f8e85;
  --good: #0ca30c; --warning: #fab219; --serious: #b04a1a; --critical: #c42f2f; --good-ink: #087a08;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 32px max(12px, env(safe-area-inset-left)); }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
main { max-width: 1180px; margin: 0 auto; display: grid; gap: 12px; grid-template-columns: 1fr; }
h1 { font-size: 20px; margin: 0; font-weight: 650; }
h2 { font-size: 15px; margin: 0; font-weight: 600; }
.card { background: var(--surface); border-radius: 12px; box-shadow: 0 0 0 1px var(--ring); padding: 14px; min-width: 0; }
.muted { color: var(--muted); } .ink2 { color: var(--ink2); } .small { font-size: 13px; } .tnum { font-variant-numeric: tabular-nums; }

/* Top bar: the three pages, the title, the data stamp and the theme button. */
.topbar { max-width: 1180px; margin: 0 auto 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.topbar nav { display: inline-flex; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--ring); }
.topbar nav a { padding: 5px 12px; border-radius: 999px; font-size: 14px; color: var(--ink2); }
.topbar nav a[aria-current] { background: var(--wash); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ring); }
.topbar nav a:hover { text-decoration: none; color: var(--ink); }
.topbar .grow { flex: 1 1 auto; }
.stamp { font-size: 13px; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px; }
.stamp::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.stamp.amber::before { background: var(--warning); } .stamp.red::before { background: var(--critical); }
.stamp.red { color: var(--critical); }
button.ghost { font: inherit; font-size: 13px; color: var(--ink2); background: none; border: 0; border-radius: 999px;
  padding: 5px 10px; box-shadow: inset 0 0 0 1px var(--ring); cursor: pointer; }
button.ghost:hover { color: var(--ink); }
@media (pointer: coarse) { .topbar nav a, button.ghost { min-height: 38px; display: inline-flex; align-items: center; } }

/* Chips, pills and small tables used by both pages. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring); min-width: 96px; }
.chip b { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; } .chip span { font-size: 12px; color: var(--muted); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; line-height: 18px; white-space: nowrap;
  background: var(--wash); color: var(--ink2); box-shadow: inset 0 0 0 1px var(--ring); }
.pill.ok { color: var(--good-ink); } .pill.warn { color: var(--warning); } .pill.bad { color: var(--critical); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
td { padding: 6px 8px; border-bottom: 1px solid var(--grid); vertical-align: top; }
td.r, th.r { text-align: right; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -14px; padding: 0 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink2); margin-top: 6px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 10px; }
.tip { position: fixed; z-index: 30; pointer-events: none; background: var(--surface); color: var(--ink); font-size: 12px;
  padding: 6px 8px; border-radius: 8px; box-shadow: 0 0 0 1px var(--ring), 0 4px 16px rgba(0,0,0,.3); max-width: 280px; display: none; }
