:root {
  --bg: #10131C;
  --panel: #1A2030;
  --panel-2: #222B3D;
  --line: #2E3953;
  --blue: #3498DB;
  --blue-dark: #2874A6;
  --gold: #F1C40F;
  --green: #2ECC71;
  --red: #E74C3C;
  --up: #2ECC71;
  --down: #FF7A6B; /* lighter than --red so small text stays readable on panels */
  --muted: #AAB4C5;
  --text: #F4F6FA;
  --faint: #8D98AD;
  --grid: #2A3448;
  /* Chart series: validated together on --panel (dark band, CVD-safe). */
  --series-a: #3498DB;
  --series-b: #BC8C0C;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 1100px; margin: 0 auto; padding: 0 16px 24px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

/* Header */
.site-header { text-align: center; padding: 28px 16px 14px; }
.site-header h1 { margin: 0; font-size: clamp(22px, 5vw, 30px); font-weight: 700; }
.brand { color: var(--gold); font-weight: 800; letter-spacing: .08em; }
.tagline { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.site-nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  margin-top: 12px;
  padding: 4px;
  border-radius: 12px;
  background: var(--panel);
}
.site-nav a {
  padding: 8px 16px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { background: var(--panel-2); color: var(--gold); }
main.wide { max-width: 1280px; }

/* Panels */
.panel { background: var(--panel); border-radius: var(--radius); padding: 16px; }

/* Search form */
.search-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}
.field { display: grid; gap: 6px; }
.field-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.field-a .field-label { color: var(--blue); }
.field-b .field-label { color: var(--gold); }
input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* stops iOS zooming on focus */
  font-variant-numeric: tabular-nums;
}
input::placeholder { color: #6F7A90; }
input:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.swap {
  min-height: 46px;
  min-width: 46px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.swap:hover { color: var(--text); }
.compare {
  display: block;
  margin: 14px auto 0;
  min-height: 46px;
  padding: 0 28px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
}
.compare:hover { background: var(--blue-dark); }
.compare:disabled { opacity: .6; cursor: progress; }
.status { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 13px; min-height: 1.45em; }
.status.busy { color: var(--gold); }
.status.ok { color: var(--green); }
.status.error { color: var(--red); }
main > .status:empty { display: none; }

/* Passcode */
.passcode { margin-top: 16px; }
.passcode h2 { margin: 0 0 4px; font-size: 16px; color: var(--gold); }
.passcode p { margin: 0 0 12px; font-size: 13px; }
.passcode-row { display: flex; gap: 10px; flex-wrap: wrap; }
.passcode-row input { flex: 1 1 200px; }
.passcode-row .compare { margin: 0; }

/* Results */
/* minmax(0, 1fr) lets wide tables scroll inside their box instead of widening the page */
.results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.empty { text-align: center; padding: 48px 16px; }
.empty h2 { margin: 0 0 6px; color: var(--gold); font-size: 20px; letter-spacing: .04em; }
.empty p { margin: 0; color: var(--muted); }

.profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.profile { border-top: 3px solid var(--blue); }
.profile.b { border-top-color: var(--gold); }
.profile-head { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--panel-2);
  flex: none;
}
.side-tag { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--blue); }
.b .side-tag { color: var(--gold); }
.player-name { margin: 0; font-size: 22px; line-height: 1.2; color: var(--gold); overflow-wrap: anywhere; }
.alliance { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 14px 0 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.profile .notice { margin: 12px 0 0; font-size: 12px; color: var(--gold); }
.profile.missing .player-name { color: var(--muted); }

.section h2 { margin: 0 0 10px; font-size: 14px; letter-spacing: .1em; color: var(--gold); text-transform: uppercase; }
.vs-head, .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.vs-head { padding: 0 12px 4px; font-size: 12px; font-weight: 700; }
.vs-head .a { color: var(--blue); overflow-wrap: anywhere; }
.vs-head .b { color: var(--gold); text-align: right; overflow-wrap: anywhere; }
.vs-head .mid { color: var(--muted); text-align: center; letter-spacing: .06em; }
.row { background: var(--panel-2); border-radius: 8px; padding: 9px 12px; margin-top: 4px; }
.val { font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.val.b { text-align: right; }
.val.win { color: var(--green); }
.val.win::before { content: "▲\00a0"; font-size: .7em; vertical-align: .1em; }
.val.dim { color: var(--muted); font-weight: 500; }
.val .sub { display: block; font-size: 11px; font-weight: 500; color: #8D98AD; }
.label { text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.diff { display: block; font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: #8D98AD; }
.subhead { margin: 14px 0 2px; padding: 0 12px; font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--blue); text-transform: uppercase; }
.note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Heroes */
.hero { border-radius: 10px; background: var(--bg); margin-top: 8px; }
.hero > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: var(--panel-2);
}
.hero > summary::-webkit-details-marker { display: none; }
.hero-name { text-align: center; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }
.hero-name::after { content: " ▾"; color: var(--muted); font-size: 11px; }
.hero[open] .hero-name::after { content: " ▴"; }
.hero-sum { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hero-sum.b { text-align: right; }
.hero-body { padding: 4px 6px 10px; }
.hero-body .row { background: var(--panel); }
.hero-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.hero-brief { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.hero-brief.b { align-items: flex-end; }
.hero-brief .star { width: 14px; height: 14px; }
.hero-lv { font-size: 13px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.val.has-tile { line-height: 0; }
.val.has-tile .gear-tile { width: 58px; }
.val.win.has-tile::before { content: none; }
.val.win .gear-tile { box-shadow: 0 0 0 2px var(--green), inset 0 0 0 2px rgba(255, 255, 255, .16); }

/* Hero cards (Player) */
.hero-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; margin-top: 10px; }
.hero-card { background: var(--panel-2); border-radius: 12px; padding: 12px; min-width: 0; }
.hero-top { display: flex; gap: 12px; align-items: flex-start; }
.hero-info { flex: 1; min-width: 0; }
.hero-title { margin: 0 0 4px; font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.hero-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 10px; margin: 8px 0 0; font-size: 13px; }
.hero-facts dt { color: var(--muted); }
.hero-facts dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-portrait { width: 64px; height: 64px; flex: none; display: block; border-radius: 10px; background: var(--bg); object-fit: cover; }
.hero-portrait.small { width: 40px; height: 40px; border-radius: 8px; }
.hero-portrait.no-art { display: grid; place-items: center; font-size: 26px; font-weight: 800; color: var(--gold); }
.hero-portrait.small.no-art { font-size: 18px; }

/* Stars: six petals each */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars.none { color: var(--muted); }
.star { width: 18px; height: 18px; display: block; flex: none; }
.star .petal { fill: #3A4560; }
.star .petal.lit { fill: var(--gold); }
.val .stars { gap: 1px; }
.val .star { width: 16px; height: 16px; }

/* Gear tiles: icon on the quality colour, troop type, +enhancement, Lv. mastery */
.gear-row { display: grid; grid-template-columns: repeat(5, minmax(0, 64px)); gap: 8px; margin-top: 14px; padding: 4px 0 0 4px; }
.gear-tile {
  position: relative;
  display: inline-block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  vertical-align: middle;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .16);
  line-height: normal;
}
.gear-tile.q-common { background: linear-gradient(160deg, #8C95A6, #5A6273); }
.gear-tile.q-uncommon { background: linear-gradient(160deg, #62BE68, #2E7D3A); }
.gear-tile.q-rare { background: linear-gradient(160deg, #55A7E2, #22609B); }
.gear-tile.q-epic { background: linear-gradient(160deg, #AA7BE3, #673DA6); }
.gear-tile.q-mythic { background: linear-gradient(160deg, #F4C95A, #C68A1E); }
.gear-tile.q-red { background: linear-gradient(160deg, #F07878, #B53B3B); }
.gear-tile.no-gear { background: none; box-shadow: inset 0 0 0 2px var(--line); }
.gear-none { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-weight: 700; }
.gear-icon { position: absolute; left: 10%; top: 6%; width: 80%; height: 72%; object-fit: contain; }
.gear-icon.no-art { display: grid; place-items: center; font-size: 20px; font-weight: 800; color: rgba(255, 255, 255, .9); }
.gear-troop { position: absolute; top: -5px; left: -5px; width: 20px; height: 20px; object-fit: contain; }
.gear-plus {
  position: absolute;
  top: 3px;
  right: 3px;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  line-height: 15px;
  color: #fff;
  background: rgba(16, 19, 28, .62);
  font-variant-numeric: tabular-nums;
}
.gear-plus.b1 { background: #5F6676; }
.gear-plus.b2 { background: #1B7A3E; }
.gear-plus.b3 { background: #246BA8; }
.gear-plus.b4 { background: #8551CF; }
.gear-plus.b5 { background: #965C14; }
.gear-plus.b6 { background: #8E1F1F; }
.gear-lv {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 3px rgba(0, 0, 0, .6);
  font-variant-numeric: tabular-nums;
}

.label.key { color: var(--gold); }

/* Chart */
.chart { margin: 4px 0 14px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 4px 8px; font-size: 13px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.line-key { display: inline-block; width: 16px; height: 2px; border-radius: 1px; background: var(--series-a); flex: none; }
.line-key.b { background: var(--series-b); }
.chart-plot { position: relative; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-svg:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 6px; }
.chart-svg .grid { stroke: var(--grid); stroke-width: 1; }
.chart-svg .baseline, .chart-svg .tick { stroke: #3A4560; stroke-width: 1; }
.chart-svg .axis { fill: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-svg .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke: var(--series-a); }
.chart-svg .series.b { stroke: var(--series-b); }
.chart-svg .end-dot { fill: var(--series-a); stroke: var(--panel); stroke-width: 2; }
.chart-svg .end-dot.b { fill: var(--series-b); }
.chart-svg .end-label { fill: var(--muted); font-size: 12px; font-weight: 600; }
.chart-svg .crosshair { stroke: var(--muted); stroke-width: 1; }
.chart-svg .hit { fill: transparent; cursor: crosshair; }
.chart-svg .vbar { fill: var(--series-a); }
.check { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 46px; color: var(--muted); font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--blue); }
.chart-tip {
  position: absolute;
  top: 6px;
  min-width: 150px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  font-size: 12px;
  pointer-events: none;
}
.tip-date { color: var(--faint); margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.tip-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.tip-name { color: var(--muted); }

/* Data tables */
.readings { margin-top: 12px; }
.readings > summary { cursor: pointer; color: var(--blue); font-size: 13px; font-weight: 600; padding: 4px 0; }
.table-wrap { overflow-x: auto; margin-top: 8px; border-radius: 10px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--grid); white-space: nowrap; }
table.data thead th { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--panel); }
table.data .num { text-align: right; }
table.data td.dim { color: #6F7A90; }
table.data td.sorted { color: var(--text); font-weight: 700; }

/* Rankings */
.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 12px;
  align-items: end;
}
.filters .compare { margin: 0; }
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.rank-summary { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
table.rankings tbody tr:hover { background: var(--panel-2); }
table.rankings .player {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--panel);
  min-width: 150px;
  max-width: 200px;
  white-space: normal;
}
table.rankings tbody tr:hover .player { background: var(--panel-2); }
table.rankings .player { display: table-cell; }
.pos { display: inline-block; min-width: 2.2em; color: var(--faint); font-weight: 600; vertical-align: top; }
.who { display: inline-flex; flex-direction: column; vertical-align: top; }
.who a { color: var(--text); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.who a:hover { color: var(--gold); text-decoration: underline; }
.who .tag { color: var(--faint); font-size: 11px; font-weight: 500; }
.th-sort {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.th-sort:hover { color: var(--text); }
th[aria-sort] .th-sort { color: var(--gold); }
td.pick, th.pick { text-align: center; }
td.pick input { width: 20px; height: 20px; min-height: 0; accent-color: var(--blue); cursor: pointer; }
.pick-bar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px 10px 16px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.pick-bar #pick-text { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.pick-bar .compare { margin: 0; display: inline-flex; align-items: center; text-decoration: none; }

/* Tracker pages: tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.tile {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--panel-2);
  text-align: left;
  font: inherit;
  color: inherit;
}
.tile-button { border: 1px solid transparent; cursor: pointer; }
.tile-button:hover { border-color: var(--line); }
.tile-button[aria-pressed="true"] { border-color: var(--gold); }
.tile-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tile-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tile-value { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile-sub { color: var(--faint); font-size: 12px; }
.toolbar { display: flex; gap: 10px; margin: 4px 0 4px; }
.toolbar input { max-width: 320px; }

/* Changes in numbers */
.chg { font-weight: 700; font-variant-numeric: tabular-nums; }
.chg.up { color: var(--up); }
.chg.down { color: var(--down); }
.chg.flat, .chg.none { color: var(--faint); font-weight: 500; }
table.data td.warn { color: var(--gold); font-weight: 700; }

/* Movers */
.filters.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.movers-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
ol.movers { list-style: none; margin: 0; padding: 0; }
li.mover { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--grid); }
li.mover:last-child { border-bottom: 0; }
.mover-main { flex: 1; min-width: 0; }
.mover-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mover-name { min-width: 0; overflow-wrap: anywhere; }
.mover-name a { color: var(--text); font-weight: 700; text-decoration: none; }
.mover-name a:hover { color: var(--gold); text-decoration: underline; }
.mover-name .tag { color: var(--faint); font-size: 12px; }
.bar { height: 6px; margin: 6px 0 4px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 3px; }
.bar-fill.up { background: var(--up); }
.bar-fill.down { background: var(--down); }
.mover-sub { color: var(--faint); font-size: 12px; }

/* Changes feed */
.day-head { margin: 18px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.day-head:first-of-type { margin-top: 10px; }
ul.feed { list-style: none; margin: 0; padding: 0; }
ul.feed li {
  display: grid;
  grid-template-columns: 4.6em 7.4em minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--grid);
}
ul.feed li:last-child { border-bottom: 0; }
.time { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge.rename { color: var(--blue); }
.badge.join { color: var(--up); }
.badge.leave { color: var(--down); }
.badge.switch { color: var(--gold); }
.badge.tc { color: #B79CFF; }
.badge.muted-badge { color: var(--muted); }
.what { overflow-wrap: anywhere; }
.what a { color: var(--text); font-weight: 700; text-decoration: none; }
.what a:hover { color: var(--gold); text-decoration: underline; }
.atag { color: var(--gold); font-weight: 600; }
.now, .old-name { color: var(--muted); }
.compare.more { margin: 14px auto 0; }

/* Compare: earlier names and alliances */
.past { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--grid); }
.past-list { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.past-list dt { color: var(--muted); }
.past-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.past-list span[title] { cursor: help; text-decoration: underline dotted var(--line); text-underline-offset: 3px; }
.past-note { margin: 6px 0 0; color: var(--faint); font-size: 11px; }

/* Player page */
.alliance-pick .field { max-width: 460px; }
.one-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.one-field .compare { margin: 0; }
.profiles.one { grid-template-columns: minmax(0, 1fr); }
.panel.side { border-top: 3px solid var(--line); display: grid; align-content: start; gap: 10px; }
.side-title { margin: 0; font-size: 14px; letter-spacing: .1em; color: var(--gold); text-transform: uppercase; }
.compare-with { display: flex; gap: 10px; }
.compare-with input { flex: 1; min-width: 0; }
.compare-with .compare { margin: 0; padding: 0 18px; }
.panel.side .note { margin: 0; }
.line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  background: var(--panel-2);
  border-radius: 8px;
  padding: 9px 12px;
  margin-top: 4px;
}
.line-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; overflow-wrap: anywhere; }
.line.key .line-label { color: var(--gold); }
.line-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.line-val.dim { color: var(--muted); font-weight: 500; }
.line-val .sub { display: block; font-size: 11px; font-weight: 500; color: var(--faint); }
.share { grid-column: 1 / -1; display: block; height: 4px; border-radius: 2px; background: var(--bg); overflow: hidden; }
.share-fill { display: block; height: 100%; border-radius: 2px; background: var(--series-a); }

/* Footer */
.support-link { color: var(--gold); font-weight: 700; text-decoration: none; }
.support-link:hover, .support-link:focus-visible { text-decoration: underline; }
.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: #77829A;
  font-size: 12px;
}

@media (max-width: 760px) {
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filters.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .movers-grid { grid-template-columns: minmax(0, 1fr); }
  .filters .compare { grid-column: 1 / -1; justify-self: center; }
}

@media (max-width: 560px) {
  .search-fields { grid-template-columns: 1fr; }
  .one-field { grid-template-columns: 1fr; }
  .one-field .compare { justify-self: center; }
  .site-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .site-nav a { padding: 8px 6px; font-size: 13px; text-align: center; }
  .filters.three { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tile-value { font-size: 19px; }
  ul.feed li { grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; }
  ul.feed .what { grid-column: 1 / -1; }
  table.rankings .player { min-width: 120px; max-width: 140px; }
  .swap { justify-self: center; transform: rotate(90deg); }
  main { padding: 0 12px 24px; }
  .panel { padding: 14px 12px; }
  .vs-head, .row, .hero > summary { grid-template-columns: minmax(0, 1fr) minmax(72px, auto) minmax(0, 1fr); gap: 6px; }
  .row { padding: 8px 10px; }
  .val { font-size: 13.5px; }
  .label { font-size: 11px; }
}
