/* Layout: paper ground, ink type, cobalt for actions, marker-yellow only for "разгоняется" — the one loud thing on the page */
:root {
  --paper: #f2f3ee;
  --surface: #fbfbf8;
  --ink: #14161a;
  --muted: #5d636c;
  --rule: #d8dbd2;
  --rule-strong: #b9bdb2;
  --signal: #2340ff;
  --signal-ink: #ffffff;
  --marker: #eaff3a;
  --marker-ink: #14161a;
  --up: #0f7a3a;
  --down: #a33a2a;
  --shadow: 0 1px 0 rgba(20, 22, 26, .06);
  --f-display: "Tektur", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101215; --surface: #171a1f; --ink: #e9ebe6; --muted: #9aa0a8; --rule: #262a31; --rule-strong: #353a43;
    --signal: #7b8cff; --signal-ink: #0d0f14; --marker: #e3ff3a; --marker-ink: #101215; --up: #4fd486; --down: #ff8f7a;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101215; --surface: #171a1f; --ink: #e9ebe6; --muted: #9aa0a8; --rule: #262a31; --rule-strong: #353a43;
  --signal: #7b8cff; --signal-ink: #0d0f14; --marker: #e3ff3a; --marker-ink: #101215; --up: #4fd486; --down: #ff8f7a;
  --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.5 var(--f-body); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.muted { color: var(--muted); }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: .02em; }
.logo-mark { width: 26px; height: 26px; border-radius: 4px; background: var(--ink); position: relative; flex: none; }
.logo-mark::before, .logo-mark::after { content: ""; position: absolute; left: 6px; right: 6px; height: 3px; background: var(--paper); }
.logo-mark::before { top: 8px; right: 11px; }
.logo-mark::after { top: 15px; background: var(--marker); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: var(--radius); border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 3px; font-size: 12px; font-weight: 600; border: 1px solid var(--rule-strong); color: var(--muted); white-space: nowrap; }
.chip.up { background: var(--marker); color: var(--marker-ink); border-color: transparent; }
.chip.peak { border-color: var(--ink); color: var(--ink); }
.chip.shop { border-color: var(--signal); color: var(--signal); }
.chip.rank { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }

.spark { display: block; width: 100%; height: 34px; overflow: visible; }
.spark .line { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.spark .area { fill: var(--rule); opacity: .7; }
.spark .dot { fill: var(--ink); }
.spark .yday { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
