/* Slop Maxing design tokens (Paper). Source of truth: DESIGN.md */
@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300..800&family=Geist+Mono:wght@400;500&display=swap");

:root {
  --bg: #f3f1ec;         /* page */
  --surface: #e8e5de;    /* selector track, image wells */
  --bar: #1e1e22;        /* bars */
  --bar-hover: #000000;
  --text: #17171a;       /* primary */
  --text-2: #55524c;     /* summaries */
  --text-3: #8c8880;     /* axis, meta, inactive */
  --accent: #ff4a1c;     /* the leader. only. */
  --on-surface: #ffffff; /* active selector pill */
  --media-shadow: 0 24px 60px rgba(40, 30, 20, 0.14);
  color-scheme: light;
}


:root {
  /* type */
  --font: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --t-hero: 600 clamp(96px, 14vw, 184px)/0.86 var(--font);
  --t-score: 600 20px/1 var(--font);
  --t-title: 600 28px/1.15 var(--font);
  --t-body: 400 19px/1.55 var(--font);
  --t-ui: 500 14px/1 var(--font);
  --t-label: 500 13px/1 var(--font);
  --t-meta: 400 12px/1.4 var(--mono);

  /* space (8pt) */
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px;
  --s6: 48px; --s7: 64px; --s8: 96px; --s9: 144px;
  --gutter: clamp(20px, 5vw, 72px);

  /* shape: square data, softened containers */
  --r-ctl: 12px;
  --r-media: 8px;

  /* motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 160ms;
  --t-grow: 720ms;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); transition: background 300ms var(--ease); }
body {
  background: var(--bg);
  color: var(--text);
  font: var(--t-body);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
  transition: color 300ms var(--ease), background 300ms var(--ease);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

/* ---------- components ---------- */

.wordmark { font: 700 24px/1 var(--font); letter-spacing: -0.045em; }

/* segmented selector: no borders; the active item is a raised pill */
.seg { display: inline-flex; gap: 2px; padding: 4px; background: var(--surface); border-radius: var(--r-ctl); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { font: var(--t-ui); color: var(--text-3); padding: 11px 18px; border-radius: 9px; white-space: nowrap; transition: color var(--t-fast), background var(--t-fast); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--on-surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }

.meta { font: var(--t-meta); color: var(--text-3); letter-spacing: 0.01em; }

.logo { display: inline-flex; width: 18px; height: 18px; color: var(--text); flex: none; }
.logo svg { width: 100%; height: 100%; }

/* media (stream frame) */
.media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-media); overflow: hidden; background: var(--surface); box-shadow: var(--media-shadow); }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 900ms var(--ease); }
.media:hover img { transform: scale(1.02); }
.media .play { position: absolute; left: var(--s3); bottom: var(--s3); display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 12px; border-radius: 8px; background: rgba(15, 15, 17, 0.62); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font: var(--t-label); color: #fff; }
.media .play::before { content: ""; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }

/* ---------- chart ---------- */
.chart { --plot: 400px; --label: 196px; --axis: 40px; position: relative; display: flex; align-items: flex-end; gap: clamp(8px, 1.6vw, 26px); height: calc(var(--plot) + var(--label) + 40px); padding: 0 0 var(--label) calc(var(--axis) + 8px); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.chart::-webkit-scrollbar { display: none; }
.chart .axis { position: absolute; left: 0; bottom: var(--label); height: var(--plot); width: var(--axis); pointer-events: none; }
.chart .axis span { position: absolute; left: 0; transform: translateY(50%); font: var(--t-meta); color: var(--text-3); }
.col { position: relative; flex: 1 1 0; min-width: 36px; max-width: 120px; height: calc(var(--plot) + 40px); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; cursor: pointer; }
.col .val { font: var(--t-score); letter-spacing: -0.02em; margin-bottom: 12px; color: var(--text); transition: color var(--t-fast), transform var(--t-fast) var(--ease); }
.col .bar { width: min(100%, 64px); background: var(--bar); transition: height var(--t-grow) var(--ease), background var(--t-fast); }
.col .dots { position: absolute; bottom: -22px; display: flex; gap: 4px; }
.col .dots i { width: 4px; height: 4px; background: var(--surface); }
.col .dots i.on { background: var(--text-3); }
.col .foot { position: absolute; top: calc(100% + 34px); left: 50%; width: 0; }
.col .foot .logo { position: absolute; left: -9px; top: 0; }
.col .foot .name { position: absolute; right: 2px; top: 34px; transform-origin: 100% 50%; transform: rotate(-80deg); white-space: nowrap; font: var(--t-label); color: var(--text-2); transition: color var(--t-fast); }
.col.lead .bar { background: var(--accent); }
.col.lead .val { color: var(--accent); }
/* hover: only the hovered column changes; nothing else dims */
.col:hover .bar { background: var(--bar-hover); }
.col.lead:hover .bar { background: var(--accent); filter: saturate(1.15) brightness(1.04); }
.col:hover .val { transform: translateY(-3px); }
.col:hover .foot .name { color: var(--text); }
