/* Orion Seer console v1 (OS-005). Mobile-first. Warm neutrals, Gem Gold
   #C39A3B as the single accent. No dark blue anywhere, by house law.
   Clean is the floor (mempool.space); interpretability is the win. */
:root {
  color-scheme: light;
  --paper: #faf7f1;
  --panel: #ffffff;
  --ink: #1d1a16;
  --ink-soft: #57534a;
  --line: #e4ddd0;
  --gold: #c39a3b;
  --gold-soft: #f3e9d2;
  --amber-bg: #fdf3d7;
  --amber-line: #d9b64a;
  --amber-ink: #6b5312;
  --good: #3f7a4e;
  --shadow: rgba(29, 26, 22, 0.08);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Dark theme: warm charcoal and warm paper tones, Gem Gold unchanged.
   No dark blue anywhere, by house law. */
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171310;
  --panel: #221c16;
  --ink: #f2ead9;
  --ink-soft: #c6b699;
  --line: #423a2d;
  --gold: #c39a3b;
  --gold-soft: #3a2e18;
  --amber-bg: #332b10;
  --amber-line: #a8862f;
  --amber-ink: #f3d98b;
  --good: #82c98f;
  --shadow: rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 16px 14px 40px; }
a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* header */
header.masthead { padding: 10px 0 14px; border-bottom: 2px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.brand .mark {
  min-width: 0; font-size: 26px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
}
.brand .mark .gold { color: var(--gold); }
/* Theme toggle, build 2026-11-09.2: a deliberate masthead pill with a
   full-size tap target. appearance is reset so Android Chrome/WebView
   cannot fall back to the grey native button if any part of the cascade
   is delayed, and the control is versioned with the stylesheet. */
.theme-toggle {
  appearance: none; -webkit-appearance: none;
  position: relative; z-index: 2; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 118px; min-height: 44px; margin-left: auto;
  font: inherit; font-size: 14px; font-weight: 700; line-height: 1;
  padding: 10px 16px; border: 1.5px solid var(--gold); border-radius: 999px;
  background: var(--panel); color: var(--ink); cursor: pointer;
  box-shadow: 0 1px 2px var(--shadow), inset 0 0 0 1px var(--gold-soft);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.theme-toggle::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); flex: 0 0 auto;
}
.theme-toggle:hover { border-color: var(--gold); background: var(--gold-soft); }
.theme-toggle:active { background: var(--gold-soft); transform: translateY(1px); }
.theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[data-theme="dark"] .theme-toggle { background: var(--gold-soft); border-color: var(--gold); color: var(--ink); }
[data-theme="dark"] .theme-toggle::before { background: var(--ink); box-shadow: 0 0 0 3px rgba(195, 154, 59, 0.28); }
@media (max-width: 430px) {
  .brand { gap: 8px; }
  .brand .mark { font-size: 22px; letter-spacing: 0.11em; }
  .theme-toggle { min-width: 106px; min-height: 44px; padding: 10px 12px; font-size: 13.5px; }
}
.tagline { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }
.fixture-banner {
  margin: 14px 0 0; padding: 10px 12px;
  background: var(--amber-bg); border: 1px solid var(--amber-line);
  color: var(--amber-ink); font-size: 13.5px; border-radius: 6px;
}
.fixture-banner strong { letter-spacing: 0.08em; }

/* panels */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
@media (min-width: 760px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .grid { grid-template-columns: 1fr 1fr 1fr; } .span2 { grid-column: span 2; } }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; min-width: 0;
}
.panel h2 {
  margin: 0 0 4px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700;
}
.panel .plain { font-size: 16.5px; margin: 6px 0 12px; }
.panel .plain strong { font-weight: 700; }
.stamp { font-size: 12px; color: var(--ink-soft); margin-top: 12px; }
.stamp .dot { color: var(--good); }
.big { font-size: 30px; font-weight: 800; line-height: 1.1; }
.sub { color: var(--ink-soft); font-size: 13.5px; }

/* gauges */
.gauge { margin: 10px 0; }
.gauge .g-label { display: flex; justify-content: space-between; font-size: 13.5px; gap: 8px; }
.gauge .g-label .num { font-weight: 700; }
.bar { height: 12px; background: var(--gold-soft); border-radius: 6px; overflow: hidden; margin-top: 4px; }
.bar > span { display: block; height: 100%; background: var(--gold); }
.bar.raw > span { background: var(--ink-soft); }

/* series spark */
.spark { width: 100%; height: 90px; display: block; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-soft); flex-wrap: wrap; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legend .sw.raw-sw { background: var(--ink-soft); }
.legend .sw.gold-sw { background: var(--gold); }

/* rules list */
.rules { margin: 10px 0 0; padding: 0; list-style: none; }
.rules li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rules li:first-child { border-top: none; }

/* tape */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
.filters select {
  font: inherit; font-size: 14px; padding: 6px 8px; max-width: 100%;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink);
}
.tape { list-style: none; margin: 0; padding: 0; }
.tape li {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 4px 10px;
  padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; min-width: 0;
}
.tape li:first-child { border-top: none; }
.tape .t-time { color: var(--ink-soft); font-family: var(--mono); font-size: 12.5px; }
.tape .t-main { min-width: 0; overflow-wrap: anywhere; }
.tape .t-amt { font-family: var(--mono); font-weight: 700; text-align: right; }
.tape .t-meta { grid-column: 2 / 4; color: var(--ink-soft); font-size: 12.5px; overflow-wrap: anywhere; }

/* tables (dive-ins) */
details.dive { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
details.dive summary { cursor: pointer; font-weight: 700; font-size: 14.5px; padding: 4px 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin-top: 6px; }
th, td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
th { color: var(--ink-soft); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; border-top: none; }
td.n, th.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* methodology page */
.doc h1 { font-size: 24px; margin: 8px 0 4px; }
.doc h2 { font-size: 17px; margin: 22px 0 6px; }
.doc p, .doc li { font-size: 15.5px; }
.doc .ver { color: var(--ink-soft); font-size: 13.5px; }
.doc code { font-family: var(--mono); font-size: 0.92em; background: var(--gold-soft); padding: 0 4px; border-radius: 3px; }

footer.colophon { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 13.5px; color: var(--ink-soft); }
.noscript, .load-error { padding: 12px; background: var(--amber-bg); border: 1px solid var(--amber-line); color: var(--amber-ink); border-radius: 6px; margin-top: 14px; font-size: 14px; }
