/* Tari supply tracker — raddish.io styling.
 * Tokens and the shared pieces (topbar, page head, cards, footer, background) are copied from
 * yat-market/web/styles.css so /stats looks like the rest of raddish.io. Copied rather than linked so the
 * tracker still renders on its own (dev-server, or a standalone deploy). Keep the two in sync. */
/* Fonts are self-hosted (fonts/, SIL OFL 1.1) so visitors' browsers never contact Google. Same families and weights
 * yat-market/web/styles.css loads from Google; switch that file too when yat-market goes public. */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/poppins-latin-400-normal.woff2") format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/poppins-latin-500-normal.woff2") format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/poppins-latin-600-normal.woff2") format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/poppins-latin-700-normal.woff2") format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format('woff2'); }

:root {
  --bg: #0c0c0e;
  --navy: #141233;
  --panel: rgba(255,255,255,0.04);
  --panel-2: rgba(255,255,255,0.07);
  --line: rgba(255,255,255,0.1);
  --ink: #ffffff;
  --muted: #8f91a1;
  --accent: #9330ff;
  --accent-soft: #d4acff;
  --lime: #c9eb00;
  --ok: #10c671;
  --orange: #f1a93d;
  --radius: 20px;
  --sans: "Poppins", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  /* chart series: purple, mint, orange — distinct on the dark background */
  --s1: #b07bff; --s2: #10c671; --s3: #f1a93d;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(147,48,255,0.28), transparent 60%),
    radial-gradient(1100px 640px at 0% -20%, var(--navy), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
a { color: var(--accent-soft); }
.dot { color: var(--orange); }

/* --- shared with yat-market --- */
.topbar { position: sticky; top: 0; z-index: 10; padding: 14px 16px; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 8px 16px;
  background: rgba(12,12,14,0.72); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar a { color: var(--ink); text-decoration: none; }
.topbar .brand { font-weight: 700; font-size: 20px; letter-spacing: -0.03em; }
/* Logo: the sticker radish (raddish/brand) tilted right and tucked behind the "r", lifted so its leaves
   rise above the letters. Chosen 2026-11-09 as "1c1-r3"; sizes are in em so it scales with the name. */
.topbar .brand { display: inline-flex; align-items: baseline; }
.brand-mark { align-self: center; width: 1.33em; height: 1.33em; margin: 0 -0.165em 0 -0.0817em; position: relative; z-index: 0;
  transform: translateY(-0.1458em); filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); } /* the tilt and mirror live in favicon.svg (raddish/brand/favicons.mjs) */
.brand-name { position: relative; z-index: 1; }
.topbar .links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.topbar .links a { color: var(--muted); font-weight: 500; font-size: 14px; }
.topbar .links a:hover, .topbar .links a[aria-current] { color: var(--ink); }
.topbar .links a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }
.page-head { text-align: center; padding: 36px 16px 8px; }
.page-head h1 { margin: 0; font-size: clamp(30px, 6vw, 52px); font-weight: 700; letter-spacing: -0.035em; }
.tag { color: var(--muted); margin: 10px auto 20px; max-width: 62ch; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; backdrop-filter: blur(8px); min-width: 0; }
footer { text-align: center; color: var(--muted); padding: 32px 16px; font-size: 13px; border-top: 1px solid var(--line); margin-top: 32px; }

/* --- tracker --- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 500 14px var(--sans); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: linear-gradient(90deg, #8931ff, #523df1); color: #fff; box-shadow: 0 4px 16px rgba(137,49,255,0.35); }
.fresh { font: 12px var(--mono); color: var(--muted); margin: 14px 0 0; }
.fresh .stale { color: var(--orange); font-weight: 600; }
.banner { background: rgba(241,169,61,0.12); color: var(--orange); border: 1px solid rgba(241,169,61,0.35);
  border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 16px 0 0; }

section { margin: 36px 0; }
h2 { font-size: 22px; font-weight: 600; margin: 0 0 14px; letter-spacing: -0.02em; }
h2 .sub { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.explain { color: var(--muted); font-size: 15px; max-width: 70ch; margin: -6px 0 14px; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { padding: 16px 18px; }
.tile h3 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 8px; }
.win { font: 500 10px var(--mono); color: var(--accent-soft); border: 1px solid rgba(212,172,255,0.35); border-radius: 6px; padding: 1px 5px; margin-left: 2px; }
.big { font-size: clamp(20px, 3.2vw, 30px); font-weight: 700; margin: 0; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.note { font-size: 12px; color: var(--muted); margin: 6px 0 0; }

.chart-card { margin: 14px 0 0; padding: 18px 18px 12px; }
.chart-card figcaption { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.chart { position: relative; height: 250px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.axis text { fill: var(--muted); font: 11px var(--mono); }
.grid line { stroke: var(--line); }
.line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.cursor { stroke: var(--muted); stroke-dasharray: 3 3; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }

.tip { position: fixed; pointer-events: none; z-index: 20; background: #1b1a2e; color: var(--ink); border: 1px solid var(--line);
  font: 12px/1.5 var(--mono); padding: 8px 10px; border-radius: 10px; white-space: pre; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 16px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
td:first-child { font-family: var(--mono); color: var(--accent-soft); }
thead th { font-weight: 500; color: var(--muted); font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }

.method ul { padding-left: 18px; color: var(--muted); font-size: 15px; max-width: 78ch; }
.method li { margin: 8px 0; }
.method b { color: var(--ink); font-weight: 600; }
.downloads { font-size: 15px; color: var(--muted); }

/* fine print: the link to the method page and the CSV downloads, quiet, at the end of the data */
.fineprint { font-size: 13px; color: var(--muted); margin: 28px 0 0; padding-top: 14px; border-top: 1px solid var(--line); line-height: 1.8; }
.fineprint a { color: var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.page-head .tag a { color: var(--accent-soft); }
