/* ── Display face ───────────────────────────────────────────────────────────
   Cinzel (SIL OFL, self-hosted) — inscriptional Roman capitals that read as
   engraved gold. Carries champion identity + section headers, NOT data. It is
   deliberately NOT a Riot face (Beaufort/Spiegel are off-limits by ToS).
   One variable woff2, latin subset (champion names are ASCII incl. apostrophes). */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/static/fonts/cinzel.woff2') format('woff2');
}

:root {
  /* ── Hextech war-room palette ──────────────────────────────────────────
     Dual accent by canonical League UI: GOLD carries highlights/headers/CTAs,
     TEAL carries anything interactive (links, selected filters, hovers). Rank
     GEM colors (Iron→Challenger) are the language for elo/tiers. This resolves
     the old amber-vs-teal split: --accent aliases gold, --link aliases teal. */
  --bg: #0b0f15;
  --panel: #141922;
  --panel2: #1b2230;
  --panel3: #232c3c;        /* raised / hover surface */
  --border: #2a3140;
  --text: #d8dde6;
  --muted: #767f92;
  --faint: #59617240;       /* faint fills */

  --gold: #c8aa6e;          /* hextech gold — highlights, headers, primary CTA */
  --gold-bright: #e6c878;
  --gold-dim: #8a7442;
  --teal: #0ac8b9;          /* hextech teal — interactive */
  --teal-bright: #3ad6c8;
  --teal-dim: #0a6f68;

  --win: #4cc38a;
  --loss: #e5646e;
  --warn: #e0a852;

  /* rank gems */
  --gem-iron: #7d7d7d;
  --gem-bronze: #b07a4e;
  --gem-silver: #9fb0c4;
  --gem-gold: #e0b64d;
  --gem-platinum: #3fb6a8;
  --gem-emerald: #46b96a;
  --gem-diamond: #6aa6e6;
  --gem-master: #b96fe0;
  --gem-grandmaster: #e0555a;
  --gem-challenger: #f2d377;

  /* semantic aliases — keep names, migrate values (zero-churn re-skin) */
  --accent: var(--gold);
  --link: var(--teal-bright);

  --radius: 6px;
  --radius-lg: 10px;
  --pill-radius: 999px;

  --font-display: 'Cinzel', "Iowan Old Style", "Palatino", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--text); margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── accessibility floor ─────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 3px; }
a:focus-visible, .btn:focus-visible, .pill:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 2px; text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; border-bottom: 1px solid var(--border);
  background: var(--panel);
  position: sticky; top: 0; z-index: 5;
}
.brand {
  font-weight: 700; font-size: 16px; letter-spacing: 0.5px;
  color: var(--accent);
}
.patch { color: var(--muted); font-size: 12px; }

main {
  max-width: 1100px; margin: 0 auto; padding: 24px;
}

h1 { font-family: var(--font-display); font-size: 24px; margin: 6px 0 4px; font-weight: 700; letter-spacing: .02em; }
h2 { font-family: var(--font-display); font-size: 18px; margin: 28px 0 12px; font-weight: 700; letter-spacing: .03em; color: var(--accent); }
/* Convention: clickable = teal, non-clickable = gold. A `.drill` heading is a
   section title that navigates deeper — teal, with an arrow affordance that
   nudges on hover. Reuse anywhere a section opens into a fuller view. */
h2 a.drill, h3 a.drill { color: var(--teal); text-decoration: none; }
a.drill::after { content: "→"; margin-left: .4em; font-size: .8em; color: var(--teal-dim); display: inline-block; transition: transform .15s ease, color .15s ease; }
a.drill:hover { color: var(--teal-bright); }
a.drill:hover::after { color: var(--teal-bright); transform: translateX(3px); }
/* user-authored note headings stay in the body face — display caps would misread as UI */
.note-display.markdown h1, .note-display.markdown h2 { font-family: var(--font-body); letter-spacing: 0; font-weight: 600; }
h3 { font-size: 13px; margin: 0 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.win { color: var(--win); font-weight: 600; }
.loss { color: var(--loss); font-weight: 600; }

.crumbs {
  margin-bottom: 16px; color: var(--muted); font-size: 13px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }

.meta {
  display: flex; gap: 24px; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; color: var(--muted); margin-bottom: 16px;
}
.meta strong { color: var(--text); }

.page-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.page-head h1 { margin: 0; }
.page-head .meta {
  display: inline-flex; padding: 0; border: 0; background: transparent; color: var(--muted);
}
.vs { color: var(--muted); font-size: 14px; padding: 0 4px; }

table.grid {
  width: 100%; border-collapse: collapse;
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden;
}
table.grid th {
  text-align: left; padding: 8px 12px; background: var(--panel2);
  border-bottom: 1px solid var(--border); font-weight: 600; font-size: 12px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px;
}
table.grid td {
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.grid tr:last-child td { border-bottom: 0; }
table.grid tr.row-link { cursor: pointer; }
table.grid tr.row-link:hover { background: color-mix(in srgb, var(--teal) 8%, transparent); }
table.data tr.row-link { cursor: pointer; }
table.data tr.row-link:hover { background: color-mix(in srgb, var(--teal) 8%, transparent); }

.icon { width: 28px; height: 28px; border-radius: 4px; vertical-align: middle; }
.icon-sm { width: 22px; height: 22px; border-radius: 3px; vertical-align: middle; }
.icon-md { width: 36px; height: 36px; border-radius: 5px; vertical-align: middle; }
.icon-lg { width: 56px; height: 56px; border-radius: 8px; vertical-align: middle; }

.agg { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 16px; margin: 16px 0; }
.agg h2 { margin-top: 0; }
.agg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.agg-block {
  background: var(--panel2); border-radius: 6px; padding: 10px 12px;
  border: 1px solid var(--border);
}
.agg-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; border-bottom: 1px dashed var(--border);
}
.agg-row:last-child { border-bottom: 0; }
.agg-row .count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

.match-section { margin: 20px 0; padding: 14px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; }
.match-section h2 { margin-top: 0; }

.runes-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.tree-block {
  background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px;
}
.tree-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rune-list .rune-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }

.spells { display: flex; align-items: center; gap: 12px; }
.item-row { display: flex; gap: 8px; flex-wrap: wrap; }

table.build-order { width: 100%; border-collapse: collapse; }
table.build-order td, table.build-order th {
  padding: 6px 10px; border-bottom: 1px solid var(--border); vertical-align: middle;
  font-size: 13px;
}
table.build-order tr.component td { color: var(--muted); }
table.build-order tr.completed td:first-child { color: var(--accent); font-weight: 600; }

table.skill-order { border-collapse: collapse; }
table.skill-order td, table.skill-order th {
  width: 30px; height: 30px; text-align: center; padding: 0;
  border: 1px solid var(--border); font-size: 12px;
}
table.skill-order .skill-Q { background: rgba(108,184,255,0.18); }
table.skill-order .skill-W { background: rgba(76,195,138,0.18); }
table.skill-order .skill-E { background: rgba(255,184,107,0.18); }
table.skill-order .skill-R { background: rgba(255,107,107,0.22); font-weight: 700; }

code { background: var(--panel2); padding: 2px 6px; border-radius: 3px; font-size: 12px; }

.topnav { display: flex; gap: 16px; align-items: center; }
.topnav a { color: var(--text); padding: 4px 0; }
.topnav a:hover { color: var(--accent); text-decoration: none; }
.topnav .patch { margin-left: 12px; }

.btn {
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 6px 12px; cursor: pointer; font-size: 13px; font-family: inherit;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.btn:hover { background: var(--panel3); border-color: var(--teal-dim); }
.btn.primary { background: var(--accent); color: #12100a; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn.danger { background: transparent; border-color: var(--loss); color: var(--loss); }
.btn.danger:hover { background: var(--loss); color: #120a0b; }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

input[type="text"], input[type="number"], input[type="password"], select, textarea {
  background: var(--panel2); color: var(--text);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 6px 8px; font-family: inherit; font-size: 13px;
  transition: border-color 120ms;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus,
select:focus, textarea:focus { border-color: var(--teal); outline: none; }
textarea { width: 100%; resize: vertical; min-height: 100px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
/* Champion typeahead (Scout a player) */
.ac { position: relative; display: inline-block; }
.ac > input { width: 100%; }
.ac-menu {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0;
  margin: 0; padding: 4px; list-style: none;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); max-height: 320px; overflow-y: auto;
}
.ac-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 7px; border-radius: 4px; cursor: pointer; font-size: 13px; color: var(--text);
}
.ac-item img { width: 1.25em; height: 1.25em; object-fit: cover; border-radius: 3px; flex: 0 0 auto; }
.ac-item:hover, .ac-item.active { background: color-mix(in srgb, var(--teal) 14%, transparent); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.results { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.results li { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.results li:last-child { border-bottom: 0; }
.accent { color: var(--accent); }

.sort-h {
  color: var(--muted); text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.sort-h:hover { color: var(--text); text-decoration: none; }
.sort-h.active { color: var(--accent); }
.sort-h .arrow { font-size: 11px; }

.role-pills {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-top: 8px;
}
.role-pill {
  display: block;
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  padding: 16px 18px; text-decoration: none; color: var(--text);
  transition: border-color 120ms, transform 60ms;
}
.role-pill:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.role-pill.empty { opacity: 0.5; }
.role-pill.empty:hover { border-color: var(--border); }
.role-pill .role-label { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.6px; }
.role-pill .role-stats { display: flex; gap: 6px; align-items: baseline; font-size: 13px; }
.role-pill .role-matches { font-size: 18px; font-weight: 700; }

.keystone-list {
  display: flex; flex-direction: column; gap: 12px;
}
.keystone-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 6px; padding: 12px 14px;
}
.keystone-card:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.keystone-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.keystone-meta { display: flex; flex-direction: column; gap: 2px; }
.keystone-name { font-weight: 600; font-size: 15px; color: var(--text); }
.keystone-note-form { display: flex; flex-direction: column; gap: 8px; }
.keystone-note-form textarea {
  min-height: 90px; line-height: 1.5; font-family: inherit; font-size: 13px;
}
.keystone-note-actions {
  display: flex; align-items: center; gap: 12px;
}

.keystone-card.rare {
  border-left: 3px solid var(--accent);
}
.badge-rare {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 184, 107, 0.12);
  border: 1px solid var(--accent);
  border-radius: 10px;
  vertical-align: 2px;
}
.keystone-breakdown {
  margin: 8px 0 12px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
}
.keystone-breakdown summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0;
  user-select: none;
}
.keystone-breakdown summary:hover { color: var(--text); }
.keystone-breakdown[open] summary { color: var(--text); margin-bottom: 4px; }
.matchup-list {
  list-style: none; padding: 0; margin: 0 0 6px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px 16px;
}
.matchup-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}
.matchup-list li:last-child { border-bottom: 0; }
.matchup-list .matchup-link {
  display: flex; align-items: center; gap: 8px;
  color: var(--text); flex: 1;
}
.matchup-list .matchup-link:hover { text-decoration: none; color: var(--accent); }
.matchup-list .matchup-name { font-weight: 500; }

.match-mini-list {
  list-style: none; padding: 0; margin: 0 0 6px;
}
.match-mini-list li {
  border-bottom: 1px dashed var(--border);
}
.match-mini-list li:last-child { border-bottom: 0; }
.match-mini-link {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 4px;
  color: var(--text); font-size: 13px;
}
.match-mini-link:hover { background: color-mix(in srgb, var(--teal) 8%, transparent); text-decoration: none; }
.match-mini-link .result-win {
  display: inline-block; min-width: 22px; text-align: center;
  font-weight: 700; color: var(--win);
}
.match-mini-link .result-loss {
  display: inline-block; min-width: 22px; text-align: center;
  font-weight: 700; color: var(--loss);
}
.match-mini-opp { font-weight: 500; min-width: 110px; }
.match-mini-player { margin-left: auto; }
.match-mini-time { min-width: 70px; text-align: right; }

.ext-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 10px 14px; margin: 12px 0;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px;
}
.ext-links a {
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
}
.ext-links a:hover {
  border-color: var(--accent); color: var(--accent); text-decoration: none;
}
.ext-divider { color: var(--border); }

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.info-card {
  display: flex; flex-direction: column; gap: 12px;
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px 14px;
  color: var(--text); text-decoration: none;
  transition: border-color 140ms, transform 80ms, box-shadow 140ms;
  min-height: 170px;
}
.info-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.5;
}
.info-card-keystones::before { background: linear-gradient(90deg, #c8a256, transparent); }
.info-card-runes::before { background: linear-gradient(90deg, #9bafff, transparent); }
.info-card-spells::before { background: linear-gradient(90deg, #ffb86b, transparent); }

.info-card:hover {
  border-color: var(--accent); text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -8px rgba(255, 184, 107, 0.35);
}

.info-card-top {
  display: flex; align-items: center; justify-content: space-between;
}
.info-title {
  font-size: 13px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.8px;
}
.info-arrow {
  color: var(--muted); font-size: 16px; transition: transform 120ms, color 120ms;
}
.info-card:hover .info-arrow { color: var(--accent); transform: translateX(3px); }

.info-preview {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  min-height: 56px;
  padding: 8px 0;
}
.info-preview-item {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel2); border-radius: 6px; padding: 4px;
  border: 1px solid var(--border);
  transition: transform 120ms;
}
.info-preview-item img { width: 100%; height: 100%; object-fit: contain; border-radius: 3px; }
.info-card:hover .info-preview-item:nth-child(1) { transform: translateY(-1px); }
.info-card:hover .info-preview-item:nth-child(2) { transform: translateY(-1px) rotate(2deg); }
.info-card:hover .info-preview-item:nth-child(3) { transform: translateY(-1px) rotate(-2deg); }
.info-preview-empty {
  font-size: 12px; padding: 12px 0;
}

.info-card-bottom {
  margin-top: auto;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; flex-wrap: wrap;
}
.info-sub { font-size: 12px; }
.info-extra { font-size: 12px; color: var(--accent); font-weight: 500; }

.spell-add-form { display: flex; flex-direction: column; gap: 8px; }
.spell-add-form .row { gap: 16px; }
.spell-add-form select { min-width: 130px; }

.champion-add {
  margin: 8px 0 14px;
  padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
}
.champion-add-form {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.champion-add-form input[type="text"] { flex: 1; min-width: 180px; }
.champion-add-form input[name="note"] { flex: 1; min-width: 160px; }

.mu-search { width: 100%; max-width: 420px; margin: 0 0 10px; }
.row-action-form { margin: 0; padding: 0; display: inline-block; }

.matchup-notes {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 14px 16px;
  margin: 16px 0 20px;
}
.matchup-notes-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.matchup-notes-head h2 { margin: 0; color: var(--accent); }
.matchup-notes-meta { display: flex; align-items: center; gap: 12px; }
.matchup-notes textarea { min-height: 130px; }

.note-display {
  line-height: 1.55;
  font-size: 14px;
  color: var(--text);
}
.note-empty { font-style: italic; font-size: 13px; }

.note-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.note-block-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}
.note-block-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--accent); font-weight: 600;
}

.main-champ {
  display: inline-flex; align-items: center; gap: 6px;
}

.note-display.markdown > :first-child { margin-top: 0; }
.note-display.markdown > :last-child  { margin-bottom: 0; }
.note-display.markdown h1,
.note-display.markdown h2,
.note-display.markdown h3,
.note-display.markdown h4 {
  margin: 14px 0 6px; color: var(--accent); font-weight: 600;
}
.note-display.markdown h1 { font-size: 18px; }
.note-display.markdown h2 { font-size: 16px; }
.note-display.markdown h3 { font-size: 14px; }
.note-display.markdown h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; }
.note-display.markdown p  { margin: 6px 0; }
.note-display.markdown ul,
.note-display.markdown ol { margin: 6px 0; padding-left: 22px; }
.note-display.markdown li { margin: 2px 0; }
.note-display.markdown code {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}
.note-display.markdown pre {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  overflow-x: auto;
  margin: 8px 0;
}
.note-display.markdown pre code { background: none; border: none; padding: 0; }
.note-display.markdown blockquote {
  margin: 8px 0; padding: 2px 12px;
  border-left: 3px solid var(--border);
  color: var(--muted, #9aa0a6);
}
.note-display.markdown a { color: var(--accent); text-decoration: underline; }
.note-display.markdown table {
  border-collapse: collapse; margin: 8px 0; font-size: 13px;
}
.note-display.markdown th,
.note-display.markdown td {
  border: 1px solid var(--border); padding: 4px 8px;
}
.note-display.markdown hr {
  border: none; border-top: 1px solid var(--border); margin: 12px 0;
}
.note-display.markdown del { opacity: 0.65; }

.note-modal {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0;
  width: min(720px, 92vw);
  max-height: 86vh;
}
.note-modal::backdrop { background: rgba(0, 0, 0, 0.55); }
.note-modal-form {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px 18px;
}
.note-modal-head h3 { margin: 0; font-size: 15px; color: var(--accent); }
.note-modal textarea {
  font-family: inherit; font-size: 13px; line-height: 1.5;
  background: var(--bg, #111); color: var(--text);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 10px; resize: vertical; min-height: 220px;
}
.note-modal-actions {
  display: flex; align-items: center; gap: 10px;
  justify-content: flex-end;
}
.note-modal-hint { margin-right: auto; font-size: 12px; }

.rune-tree-section {
  margin: 22px 0 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  border-left-width: 4px;
}
.rune-tree-section.tree-precision   { border-left-color: #c8a256; }
.rune-tree-section.tree-domination  { border-left-color: #d04a4a; }
.rune-tree-section.tree-sorcery     { border-left-color: #9bafff; }
.rune-tree-section.tree-resolve     { border-left-color: #6caf6c; }
.rune-tree-section.tree-inspiration { border-left-color: #4ac4c0; }

.rune-tree-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.rune-tree-head h2 { margin: 0; font-size: 16px; color: var(--text); }
.rune-tree-head .muted { margin-left: auto; }

/* --- Ban board --- */
.ban-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.ban-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.ban-card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.ban-card-head:hover { text-decoration: none; }
.ban-card-head:hover .ban-champ-sub { color: var(--accent); }
.ban-card-head img { width: 38px; height: 38px; border-radius: 6px; }
.ban-champ-name { font-weight: 600; font-size: 15px; }
.ban-champ-sub { font-size: 12px; }
.ban-list { list-style: none; margin: 0; padding: 0; }
.ban-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; font-size: 13px;
}
.ban-row + .ban-row { border-top: 1px solid rgba(255, 255, 255, 0.04); }
.ban-score {
  flex: 0 0 auto; min-width: 30px; text-align: center;
  font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 2px 6px; border-radius: 6px; font-size: 13px;
}
.sev-high { background: rgba(255, 107, 107, 0.18); color: #ff8585; }
.sev-mid  { background: rgba(255, 184, 107, 0.16); color: var(--accent); }
.sev-low  { background: #222; color: var(--muted); }
.ban-opp-icon { width: 24px; height: 24px; border-radius: 4px; flex: 0 0 auto; }
.ban-opp-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ban-rec { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.ban-wr  { flex: 0 0 auto; font-variant-numeric: tabular-nums; color: var(--loss); }
.ban-gwr { flex: 0 0 auto; font-variant-numeric: tabular-nums; }

/* ─────────────── my-accounts feature ─────────────── */
.good { color: var(--win); font-weight: 600; }
.bad  { color: var(--loss); font-weight: 600; }
.tag {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px;
  background: var(--panel2); color: var(--muted); border: 1px solid var(--border);
  vertical-align: middle; margin-left: 6px; font-weight: 500;
}
.flash {
  background: var(--panel2); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 4px; padding: 8px 12px; color: var(--text); font-size: 13px;
}

/* generic data table (mirrors table.grid) */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border);
  color: var(--muted); font-weight: 600; white-space: nowrap;
}
table.data td { padding: 7px 10px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: color-mix(in srgb, var(--teal) 7%, transparent); }

.champ-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.champ-icon { width: 22px; height: 22px; border-radius: 4px; }

/* account header + rank */
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.acc-rank { display: flex; align-items: center; gap: 10px; }
.acc-rank .emblem { width: 52px; height: 52px; }
.rank-label { font-weight: 600; color: var(--text); }
.emblem-sm { width: 22px; height: 22px; vertical-align: middle; }

/* stat strip */
.stat-strip {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 8px;
}
.stat-strip .stat {
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 16px; min-width: 86px; text-align: center;
}
.stat-strip .stat .num { display: block; font-size: 20px; font-weight: 700; text-align: center; }
.stat-strip .stat .lbl { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }

/* recommendations */
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.rec {
  background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--border);
  border-radius: 6px; padding: 11px 14px;
}
.rec-title { font-weight: 600; margin-bottom: 4px; }
.rec-detail { font-size: 13px; color: var(--muted); line-height: 1.4; }
.rec-good { border-left-color: var(--win); }
.rec-bad  { border-left-color: var(--loss); }
.rec-warn { border-left-color: var(--accent); }
.rec-info { border-left-color: var(--link); }

/* lane outcome mini-record */
.lane-rec { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lane-rec .lo { font-weight: 600; }
.lo.stomp { color: #5fdc8e; }
.lo.won { color: #a8d96b; }
.lo.even { color: #bbb; }
.lo.lost { color: #e8a468; }
.lo.crushed { color: #e57373; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* Nav: dim the legacy watchlist links vs the primary product nav */
.topnav .nav-sep { opacity: .35; margin: 0 2px; }
.topnav .nav-legacy { opacity: .6; font-size: .95em; }
.topnav .nav-legacy:hover { opacity: 1; }

/* Bare auth pages (login / register) — centered card, no nav */
.auth-wrap {
  min-height: calc(100vh - 48px);   /* 48px = main's vertical padding */
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center;
}
.auth-brand { margin: 0 0 .3rem; font-size: 2rem; }
.auth-tag { margin: 0 0 1.5rem; font-size: .9rem; max-width: 320px; }
.auth-form { display: flex; flex-direction: column; gap: .6rem; width: 320px; max-width: 90vw; }
.auth-form input { padding: .6rem .7rem; font-size: 1rem; }
.auth-form .btn { padding: .6rem; font-size: 1rem; }
.auth-alt { margin-top: 1.2rem; }

/* ═══════════════ Tier-1 components (unify inline toggle drift) ═══════════
   One filter/pill language for every toggle (patch / elo / lane / keystone /
   sort). Active = teal fill (interactive), or a per-pill accent via `--pill`
   for semantic tiers (lane outcome, rank gems). Replaces ~5 copies of inline
   `background:#4a8` scattered across the toggle includes. */
.filter-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 10px 0; font-size: 13px;
}
.filter-row > .filter-label { color: var(--muted); }
.pill {
  --pill: var(--teal);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--pill-radius);
  background: var(--panel2); color: var(--muted);
  border: 1px solid var(--border);
  text-decoration: none; cursor: pointer; line-height: 1.7;
  transition: border-color 120ms, color 120ms, background 120ms;
}
.pill:hover { border-color: var(--pill); color: var(--text); text-decoration: none; }
.pill.active {
  background: var(--pill); color: #08130f; border-color: var(--pill); font-weight: 600;
}
.pill.active .pill-sub { color: #08130f; opacity: .85; }
.pill-sub { font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }
.pill img { width: 18px; height: 18px; border-radius: 3px; }
/* inactive-but-tinted (semantic tier pills keep their color when unselected) */
.pill--tint:not(.active) { color: var(--pill); }

/* nav: admin link uses the danger token, not an inline hex */
.topnav a.nav-admin { color: var(--loss); font-weight: 600; }
.topnav a.nav-admin:hover { color: var(--loss); }

/* tag variants (was inline #e57373) */
.tag.tag-admin {
  background: color-mix(in srgb, var(--loss) 20%, transparent);
  color: var(--loss); border-color: color-mix(in srgb, var(--loss) 45%, transparent);
}
.tag.tag-live {
  background: color-mix(in srgb, var(--teal) 18%, transparent);
  color: var(--teal-bright); border-color: color-mix(in srgb, var(--teal) 40%, transparent);
}

/* simple horizontal WR / progress meter (Tier-2 seed, used by admin_otp now) */
.meter { height: 8px; background: var(--panel2); border: 1px solid var(--border);
  border-radius: 5px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--teal); }

/* left-accented info callout (was inline border+bg on the OTP page) */
.callout-teal {
  border-left: 3px solid var(--teal); border-radius: var(--radius);
  padding: 8px 12px; margin: 10px 0;
  background: color-mix(in srgb, var(--teal) 8%, transparent);
}
.callout-gold {
  border-left: 3px solid var(--gold); border-radius: var(--radius);
  padding: 8px 12px; margin: 10px 0;
  background: color-mix(in srgb, var(--gold) 8%, transparent);
}

/* ═══════════════ Tier-2 data-viz primitives (_viz.html macros) ═══════════
   WR micro-bar: green win-fill over a loss-tinted track — the fill width IS
   the win rate, so the exposed track = loss share. Number carries the
   good/mid/bad threshold color. Small samples fade so 2-game 100% ≠ 200-game. */
.wrbar { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; vertical-align: middle; }
.wrbar .track {
  width: 46px; height: 6px; border-radius: 3px; overflow: hidden;
  background: color-mix(in srgb, var(--loss) 30%, var(--panel2));
  flex: 0 0 auto;
}
.wrbar .fill { display: block; height: 100%; border-radius: 3px; }
.wrbar .fill.wr-good { background: var(--win); }
.wrbar .fill.wr-mid  { background: var(--warn); }
.wrbar .fill.wr-bad  { background: var(--loss); }
.wrbar .val { font-variant-numeric: tabular-nums; font-weight: 600; }
.wrbar .val.good { color: var(--win); }
.wrbar .val.mid  { color: var(--text); }
.wrbar .val.bad  { color: var(--loss); }
/* small samples are no longer dimmed (it read as muddy red/green); the sample
   count is already shown alongside (Matches column / bar tooltip). */
.wrbar--faint { opacity: 1; }
/* right-align WR bars inside .num cells (table body) */
td.num .wrbar, th.num .wrbar { justify-content: flex-end; }

/* recent-form pips — newest first, W green / L loss */
.form-pips { display: inline-flex; gap: 3px; vertical-align: middle; }
.form-pips .pip { width: 9px; height: 9px; border-radius: 2px; flex: 0 0 auto; }
.form-pips .pip.w { background: var(--win); }
.form-pips .pip.l { background: color-mix(in srgb, var(--loss) 78%, transparent); }
/* recent-form strip riding next to an <h2> */
.form-inline { margin-left: 10px; vertical-align: middle; }

/* WR-by-game-length ramp — wider track than the inline wr_bar so the climb
   across duration buckets is visible at a glance (killer view for scalers). */
.dur-curve { margin: 6px 0 18px; }
.dur-rows { display: grid; gap: 6px; max-width: 440px; }
.dur-row { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 12px; font-size: 13px; }
.dur-label { color: var(--muted); font-variant-numeric: tabular-nums; }
.dur-n { font-size: 11px; text-align: right; }
.dur-curve .wrbar { width: 100%; }
.dur-curve .wrbar .track { width: auto; flex: 1 1 auto; height: 10px; border-radius: 4px; }
.dur-curve .wrbar .val { min-width: 38px; text-align: right; }

/* Lobby-elo histogram — distribution of the scouted cohort's games by lobby
   tier, gem-colored. Reads as a credibility strip: "these builds come from
   Master lobbies". Coverage is partial (avg_rank_score needs ranked lobbies). */
.elo-hist { margin: 6px 0 18px; }
.elo-rows { display: grid; gap: 5px; max-width: 460px; }
.elo-row { display: grid; grid-template-columns: 116px 1fr auto; align-items: center; gap: 12px; font-size: 13px; }
.elo-tier { display: inline-flex; align-items: center; gap: 7px; color: var(--text); white-space: nowrap; }
.elo-emblem { width: 20px; height: 20px; object-fit: contain; }
.elo-bar { height: 12px; border-radius: 4px; background: var(--panel2); overflow: hidden; }
.elo-fill { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.elo-n { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.gem-iron        { background: var(--gem-iron); }
.gem-bronze      { background: var(--gem-bronze); }
.gem-silver      { background: var(--gem-silver); }
.gem-gold        { background: var(--gem-gold); }
.gem-platinum    { background: var(--gem-platinum); }
.gem-emerald     { background: var(--gem-emerald); }
.gem-diamond     { background: var(--gem-diamond); }
.gem-master      { background: var(--gem-master); }
.gem-grandmaster { background: var(--gem-grandmaster); }
.gem-challenger  { background: var(--gem-challenger); }

/* Rank badge — emblem + gem-coloured tier label (players in scout / OTP tables) */
.rank-badge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; vertical-align: middle; }
.rank-badge-emblem { object-fit: contain; flex: 0 0 auto; }
.rank-badge-label { font-weight: 600; font-size: 13px; letter-spacing: .2px; }
.rank-badge-lp { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* Graded climb verdicts — severity drives a chip + tinted surface + accent bar
   so urgency is visible before reading. Upgrade of the flat .rec cards for the
   account Recommendations grid (consensus .rec-info cards are left untouched). */
.verdict {
  --v: var(--teal);
  background: color-mix(in srgb, var(--v) 7%, var(--panel));
  border: 1px solid var(--border);
  border-left: 3px solid var(--v);
  border-radius: var(--radius); padding: 11px 14px;
}
.v-good { --v: var(--win); }
.v-bad  { --v: var(--loss); }
.v-warn { --v: var(--warn); }
.v-info { --v: var(--teal); }
.verdict-top { margin-bottom: 6px; }
.verdict-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: var(--pill-radius);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--v);
  background: color-mix(in srgb, var(--v) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--v) 40%, transparent);
}
.verdict-glyph { font-size: 12px; line-height: 1; }
.verdict-title { font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.verdict-detail { font-size: 13px; color: var(--muted); line-height: 1.45; }

/* Build alternatives with WR — one row per option inside a consensus card. */
.alt-row { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 7px; margin: 3px 0; }
.alt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alt-n { font-size: 11px; font-variant-numeric: tabular-nums; }
.alt-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 1px 6px; border-radius: var(--pill-radius); }
.alt-tag.rec { color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 38%, transparent); }
.alt-tag.sit { color: var(--muted); background: var(--panel2); border: 1px solid var(--border); }

/* Anomaly rarity framing — grade chip by deviation score + per-line rarity tag. */
.anomaly-grade { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--pill-radius);
  color: var(--muted); background: var(--panel2); border: 1px solid var(--border); white-space: nowrap; }
.anomaly-grade.grade-2 { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.anomaly-grade.grade-3 { color: var(--gold-bright); border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.rarity-tag { font-size: 10.5px; font-weight: 600; padding: 0 6px; border-radius: var(--pill-radius);
  color: var(--teal-bright); background: color-mix(in srgb, var(--teal) 12%, transparent); margin-left: 4px; }
.rarity-tag.rarity-hot { color: var(--gold-bright); background: color-mix(in srgb, var(--gold) 15%, transparent); }

/* Inline match expansion (matchup Matches table) */
tr.match-row { cursor: pointer; }
.expand-caret { display: inline-block; color: var(--muted); font-size: 10px; transition: transform 120ms; }
tr.match-row.expanded .expand-caret { transform: rotate(90deg); color: var(--teal); }
tr.match-detail > td { background: color-mix(in srgb, var(--teal) 4%, var(--panel)); border-top: 0; padding: 10px 14px; }
.mdetail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 12px; }
.mdetail-block { display: inline-flex; align-items: center; gap: 5px; }
.mdetail-lbl { color: var(--muted); text-transform: uppercase; font-size: 10px; letter-spacing: .5px; margin-right: 2px; }
.mdetail-sep { color: var(--border); }
.mdetail-arrow { color: var(--muted); font-size: 13px; }
.mdetail-skill { font-weight: 600; letter-spacing: 1px; }
.mdetail .icon-sm { width: 22px; height: 22px; border-radius: 4px; vertical-align: middle; }

/* Weak-spot spotlight (account overview, above recommendations) */
.spotlight { border: 1px solid color-mix(in srgb, var(--loss) 38%, transparent);
  border-left: 3px solid var(--loss); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--loss) 8%, transparent); padding: 10px 14px; margin: 4px 0 14px; }
.spotlight-lbl { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--loss); margin-bottom: 4px; }
.spotlight-body { display: flex; align-items: center; gap: 10px; font-size: 13.5px; line-height: 1.4; }
.spotlight-body .champ-icon { width: 34px; height: 34px; border-radius: 6px; flex: 0 0 auto; }

/* Spotlight as a door into the vs-opponent room (drill convention: the whole
   card is the hit-zone; the cue stays teal because teal means "there is depth"). */
.spotlight-link { display: block; color: inherit; text-decoration: none;
  transition: background .12s, border-color .12s; }
.spotlight-link:hover { background: color-mix(in srgb, var(--loss) 14%, transparent);
  border-color: color-mix(in srgb, var(--loss) 60%, transparent); }
.spotlight-go { margin-left: auto; flex: 0 0 auto; color: var(--link);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: transform .12s; }
.spotlight-link:hover .spotlight-go { transform: translateX(2px); }

/* ═══════════════ Personal build recommender (account_champion.html) ═══════ */
.bld-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.bld-facet { border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--panel); padding: 10px 12px 12px; }
.bld-facet-h { font-family: var(--font-display); font-size: 14px; color: var(--accent);
  margin-bottom: 6px; }
.bld-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bld-table th { text-align: right; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); font-weight: 700; padding-bottom: 4px; }
.bld-table th:first-child { text-align: left; }
.bld-table td { padding: 5px 0; border-top: 1px solid var(--border); text-align: right;
  vertical-align: middle; white-space: nowrap; }
.bld-table td:first-child { text-align: left; width: 100%; }
.bld-name { display: flex; align-items: center; gap: 6px; }
.bld-name .champ-icon { width: 20px; height: 20px; border-radius: 4px; flex: 0 0 auto; }
.bld-wr { font-weight: 700; font-variant-numeric: tabular-nums; }
.bld-n { display: block; font-size: 10.5px; color: var(--muted); }
/* The corpus's best option: the row the table exists to point at. */
.bld-top { background: color-mix(in srgb, var(--win) 7%, transparent); }
.bld-top .bld-name span { color: var(--text); font-weight: 650; }
/* Yours only — no corpus sample to rank it against, so it reads as an aside. */
.bld-off { opacity: .8; }
.bld-thin { color: var(--muted); font-weight: 500; }
.bld-tag { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; color: var(--muted); border: 1px solid var(--border);
  border-radius: var(--pill-radius); padding: 1px 5px; }

/* ═══════════════ Per-champion progression (account_progress.html) ═════════ */
.prog-champs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.prog-champ { border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--panel); padding: 12px 14px 14px; }
.prog-champ-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.prog-champ-head .champ-cell { text-decoration: none; }
.prog-champ-name { font-family: var(--font-display); font-size: 16px; color: var(--link); }
.prog-champ-head:hover .prog-champ-name { text-decoration: underline; }
.prog-champ-n { font-size: 12.5px; white-space: nowrap; }
/* The chip is a full-width banner in the pooled view; inside a card it sits tighter. */
.prog-champ .prog-trend { margin: 0 0 8px; padding: 7px 10px; }

/* ═══════════════ You vs one opponent (account_vs.html) ════════════════════ */
/* Picks too thin to rate are shown but visibly demoted — present, not trusted. */
.vs-thin { opacity: .62; }
.vs-tag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; padding: 2px 7px; border-radius: var(--pill-radius); border: 1px solid; }
.vs-tag.yes  { color: var(--win);  border-color: color-mix(in srgb, var(--win) 45%, transparent);
  background: color-mix(in srgb, var(--win) 12%, transparent); }
.vs-tag.no   { color: var(--loss); border-color: color-mix(in srgb, var(--loss) 45%, transparent);
  background: color-mix(in srgb, var(--loss) 12%, transparent); }
.vs-tag.thin { color: var(--muted); border-color: var(--border); }

/* ═══════════════ About page ═══════════════════════════════════════════════ */
.about-stats { flex-wrap: wrap; }

/* stacked language-distribution bar + legend */
.lang-bar {
  display: flex; width: 100%; height: 16px; border-radius: 5px; overflow: hidden;
  border: 1px solid var(--border); background: var(--panel2); margin: 4px 0 12px;
}
.lang-seg { height: 100%; min-width: 2px; transition: filter 120ms; }
.lang-seg:hover { filter: brightness(1.15); }
.lang-legend { list-style: none; padding: 0; margin: 0 0 8px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 20px; }
.lang-legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.lang-dot { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }
.lang-name { font-weight: 600; }
.lang-pct { font-variant-numeric: tabular-nums; color: var(--text); }

/* roadmap */
.roadmap { display: grid; gap: 10px; }
.roadmap-item {
  --rm: var(--teal);
  border: 1px solid var(--border); border-left: 3px solid var(--rm);
  border-radius: var(--radius); padding: 11px 14px;
  background: color-mix(in srgb, var(--rm) 5%, var(--panel));
}
.rm-in-progress { --rm: var(--gold); }
.rm-planned     { --rm: var(--teal); }
.rm-exploring   { --rm: var(--muted); }
.rm-done        { --rm: var(--win); }
.rm-backlog     { --rm: var(--muted); border-left-style: dashed; opacity: .72; }
.roadmap-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.rm-status {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--rm); padding: 2px 9px; border-radius: var(--pill-radius);
  background: color-mix(in srgb, var(--rm) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--rm) 40%, transparent);
}
.rm-eta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.roadmap-title { font-weight: 600; margin-bottom: 3px; }
.roadmap-detail { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ═══════════════ Champion splash-hero (Tier-3 signature) ═══════════════════
   The splash art IS the thesis of the page. Full-bleed to the content edges,
   darkened bottom-left for legibility; the champion name is set as polished
   hextech gold. Everything else on the page stays quiet — the boldness lives
   here. (.hero-name is isolated so the Tier-3 display face swaps in via one rule.) */
.champ-hero {
  position: relative; overflow: hidden;
  margin: -24px -24px 24px;                 /* break out of main's 24px padding */
  min-height: 300px;
  background-image: var(--splash);
  background-size: cover; background-position: 50% 20%;
  background-color: var(--panel);
  border-bottom: 1px solid var(--gold-dim);
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 1%, color-mix(in srgb, var(--bg) 55%, transparent) 42%, transparent 92%),
    linear-gradient(to right, color-mix(in srgb, var(--bg) 82%, transparent) 0%, transparent 60%);
}
.hero-inner {
  position: relative; z-index: 1; min-height: 300px;
  display: flex; flex-direction: column; padding: 16px 26px 22px;
}
.hero-crumb a { color: color-mix(in srgb, var(--text) 72%, transparent); font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.hero-crumb a:hover { color: var(--gold-bright); }
.hero-body { margin-top: auto; }            /* pin content to the lower third */
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2.5px;
  color: var(--teal-bright); margin-bottom: 8px; text-shadow: 0 1px 4px rgba(0,0,0,.7);
}
.hero-gem { width: 28px; height: 28px; border-radius: 5px; border: 1px solid var(--gold-dim); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.hero-name {
  margin: 0; line-height: .98;
  font-family: var(--font-display);
  font-size: clamp(40px, 7.5vw, 72px);
  font-weight: 800; letter-spacing: .015em; text-transform: uppercase;
  background: linear-gradient(172deg, #f6edcf 0%, var(--gold-bright) 52%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.55));
}
.hero-wr { display: flex; align-items: center; gap: 11px; margin-top: 13px; }
.hero-wr-lbl { font-size: 12px; color: color-mix(in srgb, var(--text) 70%, transparent); text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.champ-hero .wrbar .track { width: 96px; height: 9px; border-radius: 5px; }
.champ-hero .wrbar .val { font-size: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-body { animation: hero-rise 480ms cubic-bezier(.2,.7,.3,1) both; }
  @keyframes hero-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 640px) {
  .champ-hero, .hero-inner { min-height: 220px; }
  .hero-inner { padding: 12px 18px 18px; }
}

/* lane-outcome chips (upgrade of the .lo text spans) */
.lo-chip {
  display: inline-block; padding: 1px 8px; border-radius: var(--pill-radius);
  font-size: 11px; font-weight: 600; text-transform: capitalize; line-height: 1.6;
  border: 1px solid transparent;
}
.lo-chip.lo-stomp   { color: #5fdc8e; background: color-mix(in srgb, #5fdc8e 15%, transparent); border-color: color-mix(in srgb, #5fdc8e 35%, transparent); }
.lo-chip.lo-won     { color: #a8d96b; background: color-mix(in srgb, #a8d96b 15%, transparent); border-color: color-mix(in srgb, #a8d96b 30%, transparent); }
.lo-chip.lo-even    { color: var(--muted); background: var(--panel2); border-color: var(--border); }
.lo-chip.lo-lost    { color: #e8a468; background: color-mix(in srgb, #e8a468 14%, transparent); border-color: color-mix(in srgb, #e8a468 32%, transparent); }
.lo-chip.lo-crushed { color: #e57373; background: color-mix(in srgb, #e57373 15%, transparent); border-color: color-mix(in srgb, #e57373 38%, transparent); }

/* ── GPI skill radar + KPI tiles (ported from viz-lab, Hextech tokens) ──────── */
.gpi{margin:14px 0;}
.gpi-cap{margin:0 0 14px; color:var(--muted); font-size:13px; max-width:74ch; line-height:1.5;}
.gpi-cap strong{color:var(--gold-bright);}
.gpi-thin{font-size:11px; color:var(--muted); border:1px solid var(--border); border-radius:4px; padding:1px 6px; white-space:nowrap;}
.gpi-grid{display:grid; grid-template-columns:300px 1fr; gap:24px; align-items:center;}
.gpi-chart{overflow-x:auto;}
.gpi-chart svg{max-width:100%; height:auto;}
.gpi-faint{opacity:.5;}
svg .gpi-axis-lbl text{fill:var(--gold-dim); font-family:ui-monospace,"SF Mono",Menlo,monospace; font-size:10px;}
.gpi-tiles{display:grid; grid-template-columns:repeat(2,1fr); gap:14px;}
.gpi-tile{background:var(--panel2); border:1px solid var(--border); border-radius:var(--radius); padding:14px 16px;}
.gpi-k{font-family:ui-monospace,"SF Mono",Menlo,monospace; font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted);}
.gpi-big{font-family:var(--font-display); font-size:26px; color:var(--gold-bright); line-height:1.1; margin:4px 0 2px; font-variant-numeric:tabular-nums;}
.gpi-u{font-size:13px; color:var(--muted); font-family:ui-monospace,Menlo,monospace; margin-left:1px;}
.gpi-bullet{position:relative; height:8px; border-radius:99px; background:var(--border); margin-top:12px;}
.gpi-fill{position:absolute; inset:0 auto 0 0; height:100%; border-radius:99px;}
.gpi-fill.good{background:var(--win);}
.gpi-fill.bad{background:var(--loss);}
.gpi-bench{position:absolute; top:-3px; width:2px; height:14px; background:var(--gold-bright); border-radius:2px; transform:translateX(-1px);}
.gpi-foot{display:flex; justify-content:space-between; gap:8px; margin-top:8px; font-family:ui-monospace,Menlo,monospace; font-size:11px; color:var(--muted);}
.gpi-foot .good{color:var(--win);}
.gpi-foot .bad{color:var(--loss);}
@media(max-width:640px){.gpi-grid{grid-template-columns:1fr; justify-items:center;}}

/* lane-diff intensity cell (gold@14 matchup grid, viz-lab #2) */
.ldcell{display:inline-block; min-width:52px; padding:2px 9px; border-radius:var(--radius); text-align:center; font-variant-numeric:tabular-nums; color:var(--text); font-weight:600;}

/* ── champion fingerprint strip (viz-lab #1) ────────────────────────────────── */
.fp{display:flex; flex-wrap:wrap; align-items:stretch; gap:18px; background:var(--panel); border:1px solid var(--border); border-radius:var(--radius-lg); padding:14px 18px; margin:10px 0 18px;}
.fp-id{display:flex; flex-direction:column; justify-content:center; min-width:150px; border-right:1px solid var(--border); padding-right:18px;}
.fp-champ{font-family:var(--font-display); font-size:22px; color:var(--gold-bright); line-height:1.1; letter-spacing:.02em;}
.fp-sub{font-size:12px; color:var(--muted); margin-top:2px;}
.fp-cells{display:grid; grid-template-columns:repeat(4, minmax(120px,1fr)); gap:18px; flex:1 1 auto;}
.fp-cell{display:flex; flex-direction:column; gap:3px; min-width:0;}
.fp-k{font-family:ui-monospace,"SF Mono",Menlo,monospace; font-size:9px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted);}
.fp-v{font-family:var(--font-display); font-size:24px; color:var(--text); line-height:1.1; font-variant-numeric:tabular-nums;}
.fp-v small{font-size:13px; color:var(--muted); font-family:ui-monospace,Menlo,monospace;}
.fp-note{font-size:11px; color:var(--muted); font-family:ui-monospace,Menlo,monospace;}
.fp-note.good{color:var(--win);} .fp-note.bad{color:var(--loss);} .fp-note.mid{color:var(--muted);}
.fp-cell svg{margin:2px 0;}
.fp-spread{display:flex; align-items:flex-end; gap:4px; height:26px; margin:3px 0;}
.fp-bar{width:12px; border-radius:2px 2px 0 0; background:var(--muted); display:block;}
.fp-bar.lo-stomp{background:var(--win);} .fp-bar.lo-won{background:color-mix(in srgb, var(--win) 62%, var(--panel3));}
.fp-bar.lo-even{background:var(--muted);}
.fp-bar.lo-lost{background:color-mix(in srgb, var(--loss) 62%, var(--panel3));} .fp-bar.lo-crushed{background:var(--loss);}
@media(max-width:720px){.fp-id{border-right:0; border-bottom:1px solid var(--border); padding-right:0; padding-bottom:10px; width:100%;} .fp-cells{grid-template-columns:repeat(2,1fr);}}

/* ── matchup small-multiples (viz-lab #6) ───────────────────────────────────── */
.sm-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(150px,1fr)); gap:12px; margin:6px 0 8px;}
.sm{background:var(--panel2); border:1px solid var(--border); border-radius:var(--radius); padding:8px 10px;}
.sm-t{display:flex; justify-content:space-between; align-items:baseline; gap:6px; font-size:12px; margin-bottom:2px;}
.sm-t b{color:var(--text); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.sm-w{font-variant-numeric:tabular-nums; font-weight:700;}
.sm-w.good{color:var(--win);} .sm-w.bad{color:var(--loss);} .sm-w.mid{color:var(--muted);}
.sm svg{display:block;}
.sm-be{stroke:var(--border); stroke-width:1; stroke-dasharray:3 3;}

/* ── build decision tree (viz-lab #3) ───────────────────────────────────────── */
.bt{display:flex; align-items:flex-start; gap:14px; flex-wrap:wrap; margin:8px 0;}
.bt-node, .bt-root{display:flex; align-items:center; gap:8px; background:var(--panel2); border:1px solid var(--border); border-radius:var(--radius); padding:8px 10px; min-width:210px;}
.bt-root{border-color:var(--gold-dim);}
.bt-node-txt{display:flex; flex-direction:column; line-height:1.2; min-width:0;}
.bt-node-txt b{color:var(--text); font-weight:600; white-space:nowrap;}
.bt-sub{font-size:10px; color:var(--muted); font-family:ui-monospace,Menlo,monospace;}
.bt-wr{margin-left:auto; font-variant-numeric:tabular-nums; font-weight:700; font-size:13px;}
.bt-wr.good{color:var(--win);} .bt-wr.bad{color:var(--loss);} .bt-wr.mid{color:var(--muted);}
.bt-branches{display:flex; flex-direction:column; gap:10px; border-left:2px solid var(--border); padding-left:14px;}
.bt-branch{display:flex; flex-direction:column; gap:5px;}
.bt-kids{display:flex; flex-wrap:wrap; gap:6px; padding-left:16px;}
.bt-kid{display:inline-flex; align-items:center; gap:5px; background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); padding:3px 8px; font-size:12px; color:var(--muted);}
.bt-kid .icon-sm{width:18px; height:18px;}
.bt-contra{margin-top:6px;}
@media(max-width:640px){.bt{flex-direction:column;} .bt-branches{border-left:0; padding-left:0;}}

/* ── single matchup WR-by-length line chart ─────────────────────────────────── */
.wrl { margin: 6px 0 18px; }
.wrl-svg { width: 100%; max-width: 380px; height: auto; display: block; overflow: visible; }
.wrl-be { stroke: var(--border); stroke-width: 1; stroke-dasharray: 4 4; }
.wrl-val { fill: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 600; }
.wrl-xlbl { fill: var(--muted); font-size: 10px; font-family: ui-monospace, Menlo, monospace; }

/* ── insight cards: evidence-backed recommendations (Phase 1) ─────────────── */
.insight-evidence { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.06); }

/* wr-vs-baseline mini bar (focus / bench / form evidence) */
.wrvb { display: flex; align-items: center; gap: 9px; }
.wrvb-track { position: relative; flex: 1; height: 8px; background: rgba(255,255,255,.07); border-radius: 4px; }
.wrvb-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 4px; }
.wrvb-fill.wr-good { background: var(--win); }
.wrvb-fill.wr-bad { background: var(--loss); }
.wrvb-tick { position: absolute; top: -2px; width: 2px; height: 12px; background: var(--gold-bright); border-radius: 1px; }
.wrvb-lbl { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wrvb-lbl.good { color: var(--win); }
.wrvb-lbl.bad { color: var(--loss); }

/* matchup diverging bars (problem-matchups evidence) — red↔green around 50% */
.mbars { display: flex; flex-direction: column; gap: 6px; }
.mbar-row { display: grid; grid-template-columns: 96px 1fr 34px; align-items: center; gap: 8px; }
.mbar-name { display: flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbar-name .champ-icon { width: 18px; height: 18px; }
.mbar-track { position: relative; height: 9px; background: rgba(255,255,255,.05); border-radius: 4px; }
.mbar-mid { position: absolute; left: 50%; top: -1px; width: 1px; height: 11px; background: rgba(255,255,255,.22); }
.mbar-fill { position: absolute; top: 0; height: 100%; }
.mbar-fill.pos { background: var(--win); border-radius: 0 4px 4px 0; }
.mbar-fill.neg { background: var(--loss); border-radius: 4px 0 0 4px; }
.mbar-val { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.mbar-val.good { color: var(--win); }
.mbar-val.bad { color: var(--loss); }

/* ── dual-curve: your WR-by-game-length vs the scouted cohort (Phase 2) ────── */
.dcurve-rows { display: flex; flex-direction: column; gap: 6px; }
.dcurve-row { display: grid; grid-template-columns: 52px 1fr 34px; align-items: center; gap: 8px; }
.dcurve-label { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dcurve-track { position: relative; height: 9px; background: rgba(255,255,255,.05); border-radius: 4px; }
.dcurve-you { position: absolute; left: 0; top: 0; height: 100%; border-radius: 4px; }
.dcurve-you.ahead { background: var(--win); }
.dcurve-you.behind { background: var(--loss); }
.dcurve-coh { position: absolute; top: -2px; width: 2px; height: 13px; background: var(--gold-bright); border-radius: 1px; }
.dcurve-gap { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.dcurve-gap.good { color: var(--win); }
.dcurve-gap.bad { color: var(--loss); }
.dcurve-legend { font-size: 11px; margin-top: 6px; }

/* ── lane funnel: WR by lane-phase outcome @14 (Phase 2B) ──────────────────── */
.lfunnel { display: flex; flex-direction: column; gap: 6px; }
.lf-row { display: grid; grid-template-columns: 78px 1fr 34px; align-items: center; gap: 8px; }
.lf-n { font-size: 11px; text-align: right; }

/* ── champion-class reference page (Phase C) ──────────────────────────────── */
.cls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cls-card { background: var(--panel); border-radius: 8px; padding: 12px 14px; }
.cls-name { font-weight: 700; color: var(--accent); margin-bottom: 4px; }
/* Expandable class card: the name is a drill (clickable = teal, per convention),
   with a caret that rotates open. Non-expandable classes keep the gold flat name. */
.cls-details summary.cls-name { color: var(--teal); cursor: pointer; list-style: none;
             display: flex; align-items: center; gap: 6px; margin-bottom: 0; }
.cls-details summary.cls-name::-webkit-details-marker { display: none; }
.cls-details summary.cls-name::before { content: "\25B8"; font-size: 11px; color: var(--teal-dim);
             transition: transform .15s ease; display: inline-block; }
.cls-details[open] summary.cls-name::before { transform: rotate(90deg); }
.cls-details summary.cls-name:hover { color: var(--teal-bright); }
.cls-body { margin: 6px 0 8px; }
.cls-desc { font-size: 13px; line-height: 1.5; color: var(--text); margin: 0 0 6px; }
.cls-meta { font-size: 12px; margin-bottom: 8px; }
.cls-body .cls-meta { margin-bottom: 0; }

/* ── class-relationship map (prototype stand: network / by-role / chord) ── */
.cmap-toggle { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cmap-toggle .pill { cursor: pointer; }
.cmap-legend { margin-left: auto; font-size: 12px; color: var(--muted, #9aa); }
.cmap-k-beat { color: var(--win); font-weight: 700; }
.cmap-k-lose { color: var(--loss); font-weight: 700; }
.cmap-svg { width: 100%; height: auto; display: block; background: var(--panel); border-radius: 10px; padding: 4px; }
.cmap-svg .edge { fill: none; stroke: rgba(190,195,210,.16); stroke-width: 1.2; transition: stroke .12s, stroke-width .12s; }
.cmap-svg.focused .edge { stroke: rgba(190,195,210,.05); }
.cmap-svg .edge.out { stroke: var(--win); stroke-width: 2.2; }
.cmap-svg .edge.in { stroke: var(--loss); stroke-width: 2.2; }
.cmap-svg.focused .edge.dim { stroke: rgba(190,195,210,.03); }
.cmap-svg .node { cursor: pointer; transition: opacity .12s; }
.cmap-svg .node.dim { opacity: .22; }
.cmap-svg .node-box { fill: var(--panel2, #191b21); stroke-width: 1.5; }
.cmap-svg .node.active .node-box { fill: color-mix(in srgb, var(--teal) 24%, var(--panel)); }
.cmap-svg .node-label { fill: var(--text); font-size: 10.5px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.cmap-svg .col-head { font-size: 12.5px; text-anchor: middle; font-weight: 700; letter-spacing: .04em; }
.cmap-svg .node-dot { stroke: var(--panel); stroke-width: 1.5; }
.cmap-svg.cmap-chord .chord-label { font-size: 10.5px; dominant-baseline: central; }
.cmap-svg.cmap-chord.focused .node.dim .chord-label,
.cmap-svg.cmap-chord.focused .node.dim .node-dot { opacity: .2; }
/* by-role text view */
.cmap-role { color: var(--accent); margin: 18px 0 8px; }
.cmap-rows { display: flex; flex-direction: column; gap: 6px; }
.cmap-row { display: grid; grid-template-columns: 160px 1fr; gap: 10px; align-items: start; }
.cmap-row-name { font-weight: 700; color: var(--text); font-size: 13px; padding-top: 2px; }
.cmap-row-rel { display: flex; flex-wrap: wrap; gap: 4px; }
.cmap-chip { font-size: 11.5px; padding: 1px 7px; border-radius: 10px; white-space: nowrap; }
.cmap-chip.beat { color: var(--win); background: color-mix(in srgb, var(--win) 14%, transparent); }
.cmap-chip.lose { color: var(--loss); background: color-mix(in srgb, var(--loss) 14%, transparent); }
@media (max-width: 560px) {
  .cmap-row { grid-template-columns: 1fr; gap: 2px; }
}
.cls-champs { display: flex; flex-wrap: wrap; gap: 5px; }
.cls-champ { display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
             background: rgba(255,255,255,.04); border-radius: 5px; padding: 2px 6px 2px 2px; }
.cls-champ .champ-icon { width: 18px; height: 18px; }

/* ── blindability callout + matchup-bars wrapper on the role page (Phase 3) ── */
.blind-callout { margin-bottom: 12px; }
.blind-callout.warn { border-left-color: var(--loss); }
.blind-callout.good { border-left-color: var(--win); }
.mbar-wrap { max-width: 560px; margin: 0 0 18px; }
.mbar-title { font-size: 12px; margin-bottom: 6px; }

/* ── similar champions block on the champion hub (Phase 3B) ───────────────── */
.similar-grp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.similar-tag { font-size: 12px; min-width: 130px; }

/* ── stat vs cohort (micro axis evidence, Phase 4) ────────────────────────── */
.svc-top { font-size: 12px; margin-bottom: 5px; }
.svc-label { font-weight: 600; }
.svc-you.bad { color: var(--loss); }
.svc-you.warn { color: var(--warn); }
.svc-track { position: relative; display: block; height: 8px; background: rgba(255,255,255,.07); border-radius: 4px; }
.svc-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 4px; }
.svc-fill.bad { background: var(--loss); }
.svc-fill.warn { background: var(--warn); }
.svc-tick { position: absolute; right: 0; top: -2px; width: 2px; height: 12px; background: var(--gold-bright); border-radius: 1px; }

/* ── Header API-status indicator (centered) + /api-limits page ─────────────── */
.api-light {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--pill-radius, 999px);
  background: var(--panel2); border: 1px solid var(--border);
  color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap;
}
.api-light:hover { color: var(--text); text-decoration: none; border-color: var(--api); }
.api-light .api-word { color: var(--muted); font-weight: 500; }
.api-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--api); box-shadow: 0 0 0 3px color-mix(in srgb, var(--api) 22%, transparent);
}
.api-light--idle    { --api: var(--teal-bright); }
.api-light--busy    { --api: var(--gold-bright); }
.api-light--limited { --api: var(--loss); }
.api-light--busy .api-dot,
.api-light--limited .api-dot { animation: apiPulse 1.4s ease-in-out infinite; }
@keyframes apiPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .api-dot { animation: none !important; } }
@media (max-width: 720px) { .api-light .api-word { display: none; } }

.apil-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 10px; margin: 4px 0 22px;
  border: 1px solid color-mix(in srgb, var(--api) 40%, transparent);
  background: color-mix(in srgb, var(--api) 12%, transparent);
}
.apil-banner--idle    { --api: var(--teal); }
.apil-banner--busy    { --api: var(--gold); }
.apil-banner--limited { --api: var(--loss); }
.apil-banner .apil-big { font-size: 19px; font-weight: 700; color: var(--text); }
.apil-banner .apil-dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: var(--api); box-shadow: 0 0 0 5px color-mix(in srgb, var(--api) 20%, transparent);
}
.apil-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.apil-gauges { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 24px; }
.apil-gauge { flex: 1 1 240px; }
.apil-gauge-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--muted); margin-bottom: 5px;
}
.apil-gauge-head b { color: var(--text); font-variant-numeric: tabular-nums; }
.apil-track { height: 9px; border-radius: 5px; background: var(--panel2); overflow: hidden; }
.apil-fill { height: 100%; border-radius: 5px; background: var(--teal); transition: width .3s; }
.apil-fill.warn { background: var(--gold); }
.apil-fill.full { background: var(--loss); }

.apil-jobs { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0; }
.apil-job {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel);
}
.apil-job .apil-name { font-weight: 600; color: var(--text); }
.apil-job .apil-state {
  margin-left: auto; font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: var(--panel2); color: var(--muted); text-transform: capitalize;
}
.apil-job .apil-state.running { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold-bright); }
.apil-job .apil-state.done    { background: color-mix(in srgb, var(--teal) 18%, transparent); color: var(--teal-bright); }
.apil-job .apil-state.queued  { color: var(--text); }
.apil-job .apil-state.error   { background: color-mix(in srgb, var(--loss) 20%, transparent); color: var(--loss); }
.apil-job .apil-prog { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.apil-empty { color: var(--muted); padding: 10px 0; }

/* ── /api-limits: error reason, debug toggle, live log ────────────────────── */
.apil-err {
  font-size: 12px; color: var(--loss); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%;
}
.apil-debug-bar { margin: 22px 0 0; }
.apil-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--muted); }
.apil-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.apil-switch-track {
  width: 38px; height: 22px; border-radius: 999px; background: var(--panel2);
  border: 1px solid var(--border); position: relative; transition: background .15s, border-color .15s; flex: none;
}
.apil-switch-knob {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted); transition: transform .15s, background .15s;
}
.apil-switch input:checked + .apil-switch-track { background: color-mix(in srgb, var(--teal) 30%, transparent); border-color: var(--teal); }
.apil-switch input:checked + .apil-switch-track .apil-switch-knob { transform: translateX(16px); background: var(--teal-bright); }
.apil-switch input:focus-visible + .apil-switch-track { outline: 2px solid var(--teal); outline-offset: 2px; }
.apil-log {
  margin-top: 12px; height: 320px; overflow-y: auto; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: #0b0e12;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55;
}
.apil-logline { color: var(--text); white-space: pre-wrap; word-break: break-word; }
.apil-logline:nth-child(odd) { color: color-mix(in srgb, var(--text) 82%, transparent); }

/* ═══════════════ Pool Health (personal Pool Designer slice, P1) ═══════════ */
.ph-honest { display: block; margin-top: 4px; font-size: 12px; color: var(--gold-dim); }
.ph-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin: 16px 0;
}
.ph-tile {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
}
.ph-k { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; }
.ph-big { font-size: 32px; font-weight: 800; line-height: 1.1; margin: 4px 0 2px; text-align: left; }
.ph-u { font-size: 15px; font-weight: 600; color: var(--muted); }
.ph-foot { font-size: 12px; color: var(--muted); }

.ph-il .ph-sigma { white-space: nowrap; font-variant-numeric: tabular-nums; }

.ph-blind { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 8px 0 4px; }
.ph-blind-card {
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--border); border-radius: var(--radius); padding: 10px 12px;
}
.ph-blind-link { display: block; color: inherit; text-decoration: none; transition: border-color .12s, background .12s; }
.ph-blind-link:hover { background: color-mix(in srgb, var(--teal) 8%, transparent); border-color: color-mix(in srgb, var(--teal) 45%, var(--border)); }
.ph-blind-top { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.ph-blind-score { font-size: 22px; font-weight: 800; margin: 4px 0 2px; }
.ph-blind-note { font-size: 12px; }
.ph-tone-good { border-left-color: var(--win); }
.ph-tone-warn { border-left-color: var(--loss); }
.ph-tone-mid  { border-left-color: var(--gold-dim); }
.ph-fg-good { color: var(--win); }
.ph-fg-warn { color: var(--loss); }
.ph-fg-mid  { color: var(--gold); }

.ph-classgaps { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.ph-classgap {
  background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--loss);
  border-radius: var(--radius); padding: 8px 12px; font-size: 13px;
}

/* ═══════════════ Matchup coverage heatmap (Pool Designer slice, P2) ═══════ */
.hc-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  font-size: 12px; margin: 8px 0 14px; }
.hc-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.hc-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.hc-key { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.hc-best-key { box-shadow: inset 0 0 0 2px var(--gold-bright); }
.hc-src { color: var(--gold); font-weight: 700; }
.colkey { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.colkey.covered { background: var(--win); }
.colkey.suggested { background: var(--gold-dim); }
.colkey.hole { background: var(--loss); }

.hc-sec { margin: 18px 0; }
.hc-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.hc-grid { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.hc-grid th, .hc-grid td { border: 1px solid var(--border); }
.hc-grid thead th { background: var(--panel2); padding: 6px 4px; vertical-align: bottom; }
.hc-corner { text-align: left; padding: 6px 10px !important; color: var(--muted);
  font-size: 11px; font-weight: 600; position: sticky; left: 0; z-index: 2; background: var(--panel2); }
.hc-col { min-width: 46px; text-align: center; }
.hc-col .champ-icon { width: 22px; height: 22px; display: block; margin: 0 auto 2px; }
.hc-colname { display: block; font-size: 10px; color: var(--muted); line-height: 1.1;
  max-width: 56px; margin: 0 auto; }
.hc-col-covered { border-top: 2px solid var(--win); }
.hc-col-suggested { border-top: 2px solid var(--gold-dim); }
.hc-col-hole { border-top: 2px solid var(--loss); }
.hc-row { text-align: left; padding: 6px 10px; white-space: nowrap; font-weight: 600;
  position: sticky; left: 0; z-index: 1; background: var(--panel); }
.hc-row .champ-icon { width: 20px; height: 20px; vertical-align: middle; margin-right: 5px; }
.hc-rg { font-weight: 400; font-size: 11px; }
.hc { text-align: center; padding: 7px 4px; font-variant-numeric: tabular-nums; }
.hc-empty { background: repeating-linear-gradient(45deg, transparent, transparent 4px,
  color-mix(in srgb, var(--border) 40%, transparent) 4px, color-mix(in srgb, var(--border) 40%, transparent) 5px); }
.hc-v { font-weight: 600; }
.hc-own_thin .hc-v { font-weight: 400; opacity: .6; }
.hc-best { box-shadow: inset 0 0 0 2px var(--gold-bright); }
.hc-best .hc-v { color: var(--text); font-weight: 800; }

.hc-details { margin-top: 8px; }
.hc-details summary { cursor: pointer; color: var(--link); font-size: 13px; padding: 4px 0; }
.hc-classgrid { font-size: 12px; }

/* ── P4: gap-fillers from the scouted corpus ── */
.gf-role { margin: 12px 0; }
.gf-h { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 14px; }
.gf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.gf-card { background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--win); border-radius: var(--radius); padding: 10px 12px; }
.gf-champ { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.gf-champ .champ-icon { width: 24px; height: 24px; }
.gf-champ .muted { font-size: 12px; margin-left: auto; }
.gf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gf-chip { background: var(--panel2); border: 1px solid var(--border); border-radius: 12px;
  padding: 2px 9px; font-size: 12px; }
.gf-none { border-left: 3px solid var(--gold-dim); padding: 8px 12px; background: var(--panel);
  border-radius: var(--radius); font-size: 13px; }

/* ── language toggle (nav) ── */
.lang-toggle { font-size: 12px; }
.lang-toggle .lang-on { color: var(--gold); font-weight: 700; }
.lang-toggle a { color: var(--muted); }
.lang-toggle a:hover { color: var(--teal-bright); }
.auth-lang { position: fixed; top: 14px; right: 18px; }

/* ───────────── feature-vision board (about.html) ───────────── */
.fv-compass {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin: 18px 0 8px; overflow: hidden;
}
.fv-compass > div { background: var(--panel); padding: 15px 17px; }
.fv-compass h3 {
  margin: 0 0 4px; font-family: var(--font-body); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; font-weight: 700; color: var(--faint, #5c6472);
}
.fv-compass p { margin: 0; font-size: 13.5px; color: var(--text); line-height: 1.5; }
.fv-compass p b { color: var(--gold-bright); font-weight: 600; }
.fv-grow { color: var(--win); font-weight: 600; }
.fv-cap { color: var(--loss); font-weight: 600; }
@media (max-width: 720px) { .fv-compass { grid-template-columns: 1fr; } }

.fv-legend {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  margin: 22px 0 6px; padding: 11px 15px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--panel) 70%, var(--bg));
  font-size: 12.5px; color: var(--muted);
}
.fv-grp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fv-legend b { color: var(--text); font-weight: 600; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.fv-pip { display: inline-block; width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); }
.fv-pip.on { background: var(--gold); }
.fv-pip.off { background: transparent; border: 1px solid var(--faint, #5c6472); }
.fv-pips { display: inline-flex; gap: 3px; }
.fv-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.fv-chip .fv-dot { width: 7px; height: 7px; border-radius: 50%; }
.fv-chip.you { color: var(--teal-bright); background: rgba(10,200,185,.10); border: 1px solid var(--teal-dim); }
.fv-chip.you .fv-dot { background: var(--teal); }
.fv-chip.niche { color: #d5a6f0; background: rgba(185,111,224,.12); border: 1px solid rgba(185,111,224,.35); }
.fv-chip.niche .fv-dot { background: var(--gem-master); }
.fv-chip.stream { color: #a9cbf2; background: rgba(106,166,230,.12); border: 1px solid rgba(106,166,230,.35); }
.fv-chip.stream .fv-dot { background: var(--gem-diamond); }
.fv-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; }
.fv-status.ok { color: var(--win); }
.fv-status.cand { color: var(--gold); }
.fv-status .tick { font-size: 12px; }
.fv-cost { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--faint, #5c6472); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.fv-starkey { color: var(--gold-bright); font-size: 11px; font-weight: 700; }

.fv-bucket { margin: 34px 0 0; }
.fv-bucket-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding-bottom: 11px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
}
.fv-bucket-head .fv-num { font-family: var(--font-display); font-size: 15px; color: var(--faint, #5c6472); letter-spacing: .1em; }
.fv-bucket-head h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: .03em; font-size: 21px; margin: 0; line-height: 1; }
.fv-bucket-head .fv-tail { color: var(--muted); font-size: 13px; flex: 1; min-width: 220px; }
.fv-b-stakes .fv-bucket-head h3 { color: var(--teal-bright); }
.fv-b-stakes .fv-bucket-head { border-bottom-color: var(--teal-dim); }
.fv-b-diff .fv-bucket-head h3 { color: var(--gold-bright); }
.fv-b-diff .fv-bucket-head { border-bottom-color: var(--gold-dim); }

.fv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.fv-card {
  position: relative; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 15px 13px; border-left: 3px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; min-height: 108px;
}
.fv-b-stakes .fv-card { border-left-color: var(--teal-dim); }
.fv-b-diff .fv-card { border-left-color: var(--gold-dim); }
.fv-card.shipped { background: color-mix(in srgb, var(--panel) 75%, var(--bg)); }
.fv-card.hero { border-left-color: var(--gold); box-shadow: 0 0 0 1px rgba(200,170,110,.22), 0 8px 26px -14px rgba(200,170,110,.4); }
.fv-card.hero.moat { border-left-color: var(--gold-bright); }
.fv-c-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fv-c-name { font-weight: 650; font-size: 15px; line-height: 1.25; color: var(--text); }
.fv-card.shipped .fv-c-name { color: #c3cad6; }
.fv-c-star { color: var(--gold-bright); font-size: 12px; letter-spacing: .08em; font-weight: 700; white-space: nowrap; margin-top: 2px; }
.fv-c-sub { font-size: 12.8px; color: var(--muted); line-height: 1.45; flex: 1; margin: 0; }
.fv-c-foot { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin-top: 2px; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) {
  .fv-card, .fv-step { transition: transform .14s ease, border-color .14s ease; }
  .fv-card:hover { transform: translateY(-2px); }
}

.fv-dnb { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 34px; }
@media (max-width: 720px) { .fv-dnb { grid-template-columns: 1fr; } }
.fv-dnb-col { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 17px 8px; background: color-mix(in srgb, var(--panel) 70%, var(--bg)); }
.fv-dnb-col.trap { border-top: 2px solid var(--loss); }
.fv-dnb-col.park { border-top: 2px solid var(--gem-diamond); }
.fv-dnb-col h3 { font-family: var(--font-display); font-size: 16px; margin: 0 0 4px; letter-spacing: .02em; }
.fv-dnb-col.trap h3 { color: var(--loss); }
.fv-dnb-col.park h3 { color: var(--gem-diamond); }
.fv-dnb-col .fv-why { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.fv-dnb-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.fv-dnb-col li { font-size: 12.5px; padding: 4px 10px; border-radius: 7px; background: var(--panel); border: 1px solid var(--border); color: #c3cad6; }
.fv-dnb-col.trap li { opacity: .82; }

.fv-seq { margin-top: 40px; }
.fv-seq-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.fv-seq-head h3 { font-family: var(--font-display); font-size: 21px; margin: 0; color: var(--gold-bright); letter-spacing: .03em; }
.fv-seq-head span { color: var(--muted); font-size: 13px; }
.fv-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px) { .fv-rail { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .fv-rail { grid-template-columns: 1fr; } }
.fv-step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 15px 14px 14px; display: flex; flex-direction: column; gap: 7px; }
.fv-step .fv-n { font-family: var(--font-display); font-size: 25px; font-weight: 700; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.fv-step .fv-st-name { font-weight: 650; font-size: 14.5px; color: var(--text); line-height: 1.25; }
.fv-step .fv-st-why { font-size: 12.5px; color: var(--muted); line-height: 1.45; flex: 1; margin: 0; }
.fv-step .fv-st-tag { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--teal-bright); }
.fv-step.expensive .fv-n { color: var(--gold-dim); }
.fv-step.expensive .fv-st-tag { color: var(--gold-dim); }
/* A banked step: the number becomes a tick and the card recedes — the rail still
   reads as the route taken, without pitching finished work as what's next. */
.fv-step.done { border-color: color-mix(in srgb, var(--win) 32%, var(--border)); }
.fv-step.done .fv-n { color: var(--win); font-size: 21px; }
.fv-step.done .fv-st-why { opacity: .72; }

.fv-foot { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; max-width: 76ch; line-height: 1.55; }
.fv-foot b { color: var(--gold-bright); font-weight: 600; }
.fv-foot .fv-k { color: var(--teal-bright); font-weight: 600; }

/* ───────────── what to practice next ───────────── */
/* hub CTA */
.pq-cta {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  margin: 16px 0 4px; padding: 14px 18px; border-radius: var(--radius-lg);
  border: 1px solid var(--gold-dim);
  background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 12%, var(--panel)), var(--panel) 70%);
  color: var(--text);
}
.pq-cta:hover { border-color: var(--gold); background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 18%, var(--panel)), var(--panel) 65%); text-decoration: none; }
.pq-cta-icon { font-size: 26px; line-height: 1; }
.pq-cta-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pq-cta-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .02em; color: var(--gold-bright); }
.pq-cta-sub { font-size: 13px; color: var(--muted); }
.pq-cta-go { font-size: 13px; font-weight: 600; color: var(--teal-bright); white-space: nowrap; }
@media (max-width: 520px) { .pq-cta-go { display: none; } }

/* ranked list */
.pq-list { list-style: none; counter-reset: none; margin: 14px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pq-item {
  display: flex; align-items: flex-start; gap: 13px;
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px;
}
.pq-sev-bad { border-left-color: var(--loss); }
.pq-sev-warn { border-left-color: var(--gold); }
.pq-rank {
  flex: none; font-family: var(--font-display); font-weight: 700; font-size: 20px;
  color: var(--faint, #5c6472); line-height: 1.2; min-width: 20px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.pq-sev-bad .pq-rank { color: var(--loss); }
.pq-sev-warn .pq-rank { color: var(--gold); }
.pq-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pq-head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.pq-title { font-weight: 650; font-size: 14.5px; color: var(--text); line-height: 1.3; }
.pq-cat { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--faint, #5c6472); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }
.pq-detail { font-size: 13px; color: var(--muted); line-height: 1.45; }
.pq-go { flex: none; align-self: center; font-size: 12.5px; font-weight: 600; color: var(--teal-bright); text-decoration: none; white-space: nowrap; }
.pq-go:hover { color: var(--teal); text-decoration: underline; }
@media (max-width: 560px) { .pq-go { align-self: flex-start; } }

/* ───────────── GPI radar → insights drill ───────────── */
.gpi-axis-link { cursor: pointer; }
.gpi-axis-link text { transition: fill .12s ease; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--teal) 45%, transparent); text-underline-offset: 2px; }
.gpi-axis-link:hover text, .gpi-axis-link:focus-visible text { fill: var(--teal-bright); text-decoration-color: var(--teal-bright); }
.gpi-axis-link:focus-visible { outline: none; }
.gpi-drill-hint { font-size: 12px; margin-top: 6px; }

/* ───────────── progression over time ───────────── */
.prog-trend {
  display: inline-flex; align-items: center; gap: 11px;
  margin: 10px 0 4px; padding: 10px 16px;
  border: 1px solid var(--border); border-left: 3px solid var(--border);
  border-radius: var(--radius-lg); background: var(--panel);
}
.prog-tone-good { border-left-color: var(--win); }
.prog-tone-bad { border-left-color: var(--loss); }
.prog-tone-mid { border-left-color: var(--gold-dim); }
.prog-trend-arrow { font-size: 18px; line-height: 1; }
.prog-tone-good .prog-trend-arrow { color: var(--win); }
.prog-tone-bad .prog-trend-arrow { color: var(--loss); }
.prog-tone-mid .prog-trend-arrow { color: var(--muted); }
.prog-trend-body { display: flex; flex-direction: column; gap: 1px; }
.prog-trend-head { font-weight: 650; font-size: 14.5px; color: var(--text); }
.prog-trend-sub { font-size: 12.5px; color: var(--muted); }

/* ───────────── timeline micro ───────────── */
.mc-econ { width: 100%; max-width: 480px; height: auto; display: block; }
.mc-zero { stroke: var(--muted); stroke-width: .6; stroke-dasharray: 3 3; }
.mc-vgrid { stroke: var(--border); stroke-width: .5; }
.mc-xlbl { fill: var(--faint, #5c6472); font-size: 7px; }
.mc-ylbl { fill: var(--faint, #5c6472); font-size: 6.5px; }

.mc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 6px 0; }
.mc-tile { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 14px; }
.mc-tile-k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--faint, #5c6472); }
.mc-item-row { display: flex; align-items: center; gap: 7px; margin: 6px 0 2px; }
.item-icon { width: 24px; height: 24px; border-radius: 5px; flex: 0 0 auto; }
.mc-item-name { font-size: 12.5px; color: var(--muted); line-height: 1.2; }
.mc-big { font-family: var(--font-display); font-size: 24px; color: var(--gold-bright); line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.mc-big.bad { color: var(--loss); }
.mc-u { font-size: 13px; color: var(--muted); }
.mc-foot { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mc-cmp { font-size: 12px; color: var(--muted); margin-top: 3px; display: flex; align-items: baseline; gap: 5px; }
.mc-cmp b { color: var(--text); font-variant-numeric: tabular-nums; }
.mc-cmp .good { color: var(--win); } .mc-cmp .bad { color: var(--loss); }
.mc-lvl td, .mc-lvl th { font-variant-numeric: tabular-nums; }

.mc-death-wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.mc-rift { width: 240px; height: 240px; flex: 0 0 auto; border-radius: var(--radius-lg); }
.mc-rift-bg { fill: color-mix(in srgb, var(--teal) 5%, var(--panel)); stroke: var(--border); stroke-width: .6; }
.mc-rift-river { stroke: color-mix(in srgb, var(--teal) 22%, transparent); stroke-width: 5; }
.mc-rift-lane { stroke: var(--border); stroke-width: .5; }
.mc-rift-lbl { fill: var(--faint, #5c6472); font-size: 4px; }
.mc-death-dot { fill: var(--loss); fill-opacity: .55; }
.mc-death-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.mc-stat { display: flex; flex-direction: column; }
.mc-stat .mc-big { margin-top: 0; }
.mc-stat-lbl { font-size: 12px; color: var(--muted); }

.mc-warn { font-size: 13px; color: var(--loss); background: color-mix(in srgb, var(--loss) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--loss) 30%, var(--border)); border-radius: 8px; padding: 8px 12px; margin: 8px 0; max-width: 70ch; }

/* ── demo stand banner (dev.otpscout.pro) ─────────────────────────────────
   Only rendered when demo_mode is on. Deliberately loud: a visitor has to
   know the data is frozen and their clicks are not saved. */
.demo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem;
  margin: 0 0 1rem;
  padding: .55rem .8rem;
  border: 1px solid #c8a33a;
  border-left-width: 4px;
  border-radius: 4px;
  background: #fdf6e0;
  font-size: .85rem;
  line-height: 1.35;
}
.demo-banner strong { color: #8a6d16; }
.demo-banner .demo-date { color: #8a6d16; opacity: .75; margin-left: auto; }

/* ── site footer: Riot attribution + privacy ────────────────────────────────
   Present on every page including the signed-out door, because that is the
   requirement — a disclaimer only members can read is not a disclaimer. Quiet
   by design: it is a legal line, not a navigation surface. */
.site-foot {
  max-width: 74ch; margin: 40px auto 28px; padding: 16px 24px 0;
  border-top: 1px solid var(--border); text-align: center;
}
.site-foot a { font-size: 12.5px; color: var(--muted); text-decoration: none; margin: 0 9px; }
.site-foot a:hover { color: var(--accent, var(--text)); }
.site-foot p { margin: 8px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--muted); }

/* Long-form prose page (privacy). Measure capped so the lines stay readable. */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 26px; }
.prose p { line-height: 1.65; }
