/* ====================================================================
   Design system — mirrors lib/theme.dart so desktop and mobile match.

   Color: same palette. Spacing: same 4-px scale. Radius: same.
   Numeric type uses tabular figures everywhere for steady column widths.
   ==================================================================== */

:root {
  --bg:           #07070A;
  --surface:      #13131C;
  --surface-2:   #1B1B26;
  --surface-3:   #252531;
  --border:       #2A2A36;
  --border-2:     #3A3A48;

  --text:         #F5F5F7;
  --text-dim:     #8B8E99;
  --text-faint:   #5C606B;

  --gold:         #F5C518;
  --gold-deep:    #C99C00;
  --gold-soft:    #FFE391;

  --win:          #34D399;
  --loss:         #F87171;
  --info:         #60A5FA;

  /* Spacing — multiples of 4 */
  --s-xs: 4px;  --s-sm: 8px;  --s-md: 12px;
  --s-lg: 16px; --s-xl: 20px; --s-2xl: 24px;
  --s-3xl: 32px; --s-4xl: 48px; --s-5xl: 64px;

  /* Radius */
  --r-sm: 8px;  --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;

  /* Layout */
  --content-max: 1180px;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01';
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }

/* ----- Nav -------------------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,7,10,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--s-2xl);
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s-2xl);
}
.logo {
  display: flex; align-items: center; gap: var(--s-md);
  text-decoration: none; color: var(--text); font-weight: 700; letter-spacing: -0.2px;
  font-size: 16px;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--bg); display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px;
}
.nav-links {
  display: flex; gap: var(--s-xl); align-items: center; margin-left: auto;
}
.nav-links a {
  color: var(--text-dim); font-size: 14px; font-weight: 500;
  padding: 6px 10px; border-radius: var(--r-sm);
  transition: color .12s ease, background .12s ease;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active {
  color: var(--gold);
  background: rgba(245,197,24,0.10);
}

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border); color: var(--text);
  padding: 6px; border-radius: var(--r-sm); margin-left: auto;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: var(--s-md);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: var(--s-md) var(--s-lg); border-radius: 0; font-size: 15px; }
  .nav-toggle { display: inline-flex; }
}

/* ----- Page container -------------------------------------------- */

main {
  flex: 1;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: var(--s-2xl);
}

/* Eyebrow / section header */
.eyebrow {
  font-size: 11px; letter-spacing: 1.4px; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase;
}
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: var(--s-2xl) 0 var(--s-md);
}
.section-title h2 {
  margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.2px;
}
.section-title .link {
  font-size: 13px; font-weight: 600; color: var(--gold);
}

/* ----- Cards & surfaces ------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.card.padded { padding: var(--s-xl); }

.hero {
  text-align: center;
  padding: var(--s-4xl) 0 var(--s-2xl);
}
.hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800; letter-spacing: -1.4px; line-height: 1.05;
  background: linear-gradient(135deg, var(--text) 30%, var(--gold-soft));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p {
  margin: var(--s-md) auto 0;
  color: var(--text-dim); font-size: 17px; max-width: 580px;
}

/* ----- Search bar ------------------------------------------------ */

.search-wrap { position: relative; margin: 0 auto; max-width: 640px; }
.search-input {
  width: 100%; padding: 14px 16px 14px 44px;
  font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); outline: none;
  transition: border-color .12s ease;
}
.search-input::placeholder { color: var(--text-faint); }
.search-input:focus { border-color: var(--gold); }
.search-icon {
  position: absolute; top: 50%; left: 16px; transform: translateY(-50%);
  pointer-events: none; color: var(--text-faint);
}
.search-clear {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  background: transparent; border: 0; color: var(--text-dim); padding: 6px;
  border-radius: var(--r-sm); display: none;
}
.search-clear.show { display: block; }

.suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); list-style: none; padding: 4px; margin: 0;
  max-height: 380px; overflow-y: auto; z-index: 5;
}
.suggestions li {
  display: flex; align-items: center; gap: var(--s-md);
  padding: var(--s-sm) var(--s-md); border-radius: var(--r-md); cursor: pointer;
}
.suggestions li:hover { background: var(--surface-3); }
.suggestions li img {
  width: 40px; height: 56px; object-fit: cover; border-radius: 4px;
  background: var(--surface-2);
}
.sugg-meta { flex: 1; min-width: 0; }
.sugg-meta .name { font-weight: 600; font-size: 14px; }
.sugg-meta .set { color: var(--text-faint); font-size: 12px; }

/* ----- Card thumbs (carousels) ----------------------------------- */

.carousel {
  display: grid; grid-auto-flow: column; grid-auto-columns: 168px;
  gap: var(--s-md); overflow-x: auto; padding: 4px 4px var(--s-md);
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 999px; }

.thumb {
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform .12s ease;
}
.thumb:hover { transform: translateY(-2px); }
.thumb-img {
  position: relative; aspect-ratio: 245/342; width: 100%;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-2);
}
.thumb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-meta { padding: var(--s-sm) 4px 0; }
.thumb-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pill {
  position: absolute; top: 6px; left: 6px;
  padding: 3px 8px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 800; letter-spacing: -0.1px;
  font-variant-numeric: tabular-nums;
}
.pill.win { background: var(--win); color: var(--bg); }
.pill.loss { background: var(--loss); color: var(--bg); }
.pill.gold { background: var(--gold); color: var(--bg); }

/* ----- Tile rows (list views) ------------------------------------ */

.tile {
  display: flex; align-items: center; gap: var(--s-md);
  padding: var(--s-md);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--s-sm);
  cursor: pointer; transition: border-color .12s ease, transform .12s ease;
  color: inherit; text-decoration: none;
}
.tile:hover { border-color: var(--border-2); text-decoration: none; }
.tile img.tile-thumb {
  width: 48px; height: 66px; object-fit: cover; border-radius: 6px;
  background: var(--surface-2); flex-shrink: 0;
}
.tile-meta { flex: 1; min-width: 0; }
.tile-name { font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-trailing { text-align: right; flex-shrink: 0; }
.tile-trailing .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-trailing .pct { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-trailing .pct.win { color: var(--win); }
.tile-trailing .pct.loss { color: var(--loss); }

/* ----- Card-detail layout --------------------------------------- */

.detail-layout {
  display: grid; grid-template-columns: 340px 1fr;
  gap: var(--s-2xl); align-items: start;
}
@media (max-width: 720px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-layout .detail-image { max-width: 280px; margin: 0 auto; }
}
.detail-image {
  position: sticky; top: calc(var(--nav-h) + var(--s-lg));
}
.detail-image img {
  width: 100%; border-radius: var(--r-lg);
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
}
.detail-meta h1 {
  margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.6px;
}
.detail-meta .meta-row {
  margin-top: var(--s-sm); color: var(--text-dim); font-size: 14px;
}
.detail-meta .set-link {
  color: var(--gold); font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--gold-deep); text-underline-offset: 3px;
}

/* Price comparison */
.compare {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--s-2xl);
  margin-top: var(--s-lg);
}
.compare-grid {
  display: grid; grid-template-columns: 1fr 1px 1fr;
  align-items: center; gap: 0;
}
.compare-col { text-align: center; padding: var(--s-md); }
.compare-col .label { font-size: 11px; letter-spacing: 1.2px; color: var(--text-dim);
  font-weight: 700; text-transform: uppercase; }
.compare-col .value { font-size: 30px; font-weight: 800; letter-spacing: -0.4px;
  margin-top: 6px; font-variant-numeric: tabular-nums; }
.compare-col .sub { color: var(--text-faint); font-size: 12px; margin-top: 4px; }
.compare-divider { background: var(--border); width: 1px; height: 56px; }
.gap-pill {
  margin-top: var(--s-lg);
  display: flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 13px; letter-spacing: -0.1px;
}
.gap-pill.win { background: rgba(52,211,153,0.14); color: var(--win); }
.gap-pill.loss { background: rgba(248,113,113,0.14); color: var(--loss); }
.gap-pill.neutral { background: var(--surface-3); color: var(--text-dim); }

/* Action buttons */
.detail-actions {
  margin-top: var(--s-md);
  display: flex; gap: var(--s-sm); flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--r-md);
  font-weight: 700; font-size: 14px; border: 0;
  transition: transform .1s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--gold); color: var(--bg); }
.btn.primary:hover { background: var(--gold-soft); transform: translateY(-1px); }
.btn.ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
}
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: rgba(248,113,113,0.14); color: var(--loss); }

/* Graded grid */
.graded {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.graded-row {
  display: flex; align-items: center; gap: var(--s-md);
  padding: var(--s-md) var(--s-lg);
  border-bottom: 1px solid var(--border);
}
.graded-row:last-child { border-bottom: 0; }
.graded-row .dot { width: 8px; height: 8px; border-radius: 50%; }
.graded-row .label { flex: 1; font-weight: 600; font-size: 14px; }
.graded-row .val { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.graded-row.psa10 {
  background: linear-gradient(110deg,
    rgba(245,197,24,0.08) 0%,
    rgba(255,138,216,0.10) 33%,
    rgba(96,165,250,0.10) 66%,
    rgba(245,197,24,0.08) 100%);
  background-size: 300% 100%;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Chart */
.chart-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-lg);
}
.chart-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: var(--s-md);
}
.chart-head .now {
  font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}
.chart-change {
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.chart-change.win { background: rgba(52,211,153,0.14); color: var(--win); }
.chart-change.loss { background: rgba(248,113,113,0.14); color: var(--loss); }

.tier-tabs {
  display: flex; flex-wrap: wrap; gap: var(--s-sm); margin-top: var(--s-md);
}
.tier-tab {
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--text-dim);
  border: 1px solid var(--border); font-size: 12px; font-weight: 600;
}
.tier-tab.active {
  background: rgba(245,197,24,0.16);
  border-color: var(--gold);
  color: var(--gold);
}

/* Sales table */
.sales {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.sale-row {
  display: grid;
  grid-template-columns: 90px 1fr 110px 18px;
  gap: var(--s-md); align-items: center;
  padding: var(--s-md) var(--s-lg);
  border-bottom: 1px solid var(--border);
  color: var(--text); text-decoration: none;
}
.sale-row:last-child { border-bottom: 0; }
.sale-row:hover { background: var(--surface-2); text-decoration: none; }
.sale-row .price {
  color: var(--gold); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums;
}
.sale-row .title {
  font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sale-row .date { font-size: 12px; color: var(--text-faint); text-align: right;
  font-variant-numeric: tabular-nums; }

/* Portfolio header */
.portfolio-head {
  padding: var(--s-2xl);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  margin-bottom: var(--s-xl);
}
.portfolio-head .eyebrow { margin-bottom: var(--s-sm); }
.portfolio-head .big {
  font-size: clamp(36px, 6vw, 56px); font-weight: 900;
  letter-spacing: -1px; font-variant-numeric: tabular-nums;
}
.portfolio-head .delta {
  display: flex; align-items: center; gap: 8px; margin-top: var(--s-sm);
  font-variant-numeric: tabular-nums; flex-wrap: wrap;
}
.portfolio-head .stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border); margin-top: var(--s-xl); padding-top: var(--s-lg);
}
.portfolio-head .stat { padding: 0 var(--s-md); }
.portfolio-head .stat:not(:first-child) { border-left: 1px solid var(--border); }
.portfolio-head .stat .lbl { font-size: 10px; letter-spacing: 1.2px; color: var(--text-dim);
  font-weight: 700; text-transform: uppercase; }
.portfolio-head .stat .vl { margin-top: 4px; font-weight: 700; font-size: 16px;
  font-variant-numeric: tabular-nums; }

/* Bottom sheet / modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: var(--s-xl);
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--s-2xl);
  max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 var(--s-sm); font-size: 22px; font-weight: 800;
  letter-spacing: -0.4px; }
.modal .sub { color: var(--text-dim); margin-bottom: var(--s-xl); }
.modal-row { margin-bottom: var(--s-xl); }
.modal-row .eyebrow { margin-bottom: var(--s-sm); }
.tier-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.tier-pick button {
  padding: 8px 12px; border-radius: var(--r-pill);
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
}
.tier-pick button.active {
  background: rgba(245,197,24,0.16); border-color: var(--gold); color: var(--gold);
}
.tier-pick small { color: var(--text-faint); font-weight: 600; font-variant-numeric: tabular-nums; }

.stepper { display: flex; align-items: center; gap: var(--s-md); }
.stepper button {
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  font-size: 18px; font-weight: 700;
}
.stepper .qty {
  width: 72px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md);
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
}

.input {
  width: 100%; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; outline: none;
}
.input:focus { border-color: var(--gold); }

/* Skeleton shimmer */
.sk {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-3) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: skshimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
}
@keyframes skshimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: -100% 50%; }
}
.no-motion .sk { animation: none; background: var(--surface-2); }
.no-motion .graded-row.psa10 { animation: none; background-position: 0% 50%; }

/* Empty states */
.empty {
  padding: var(--s-5xl) var(--s-xl); text-align: center;
}
.empty .icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: var(--s-md);
}
.empty h3 { margin: 0 0 var(--s-sm); font-weight: 700; }
.empty p { color: var(--text-dim); margin: 0; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--s-2xl) 0;
  color: var(--text-faint); font-size: 13px;
  margin-top: var(--s-5xl);
}
.footer-inner {
  max-width: var(--content-max); margin: 0 auto; padding: 0 var(--s-2xl);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-lg);
  flex-wrap: wrap;
}
.footer-links a { color: var(--text-dim); margin-left: var(--s-lg); font-size: 13px; }
.footer-links a:first-child { margin-left: 0; }

/* Setting toggle */
.setting-row {
  display: flex; align-items: center; gap: var(--s-md);
  padding: var(--s-md) var(--s-lg);
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .ico {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: var(--surface-3); display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
}
.setting-row .lbl { flex: 1; font-weight: 500; }
.setting-row .sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* Switch */
.switch {
  position: relative; display: inline-block; width: 46px; height: 26px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: var(--surface-3);
  border: 1px solid var(--border); border-radius: 999px;
  transition: background .15s ease;
}
.switch .slider::before {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 20px; height: 20px; background: var(--text); border-radius: 50%;
  transition: transform .18s cubic-bezier(.4,0,.2,1);
}
.switch input:checked + .slider { background: var(--gold); border-color: var(--gold); }
.switch input:checked + .slider::before { background: var(--bg); transform: translateX(20px); }

/* Learn promo card */
.learn-promo {
  display: flex; align-items: center; gap: var(--s-lg);
  padding: var(--s-xl) var(--s-2xl);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  text-decoration: none; color: var(--text);
  transition: transform .14s ease, border-color .14s ease;
}
.learn-promo:hover {
  text-decoration: none; transform: translateY(-2px);
  border-color: var(--gold);
}
.learn-promo-text { flex: 1; min-width: 0; }
.learn-promo-eyebrow {
  font-size: 11px; letter-spacing: 1.4px; font-weight: 700; color: var(--gold);
  margin-bottom: 6px;
}
.learn-promo-title {
  font-size: 20px; font-weight: 800; letter-spacing: -0.4px;
}
.learn-promo-sub {
  margin-top: 6px; color: var(--text-dim); font-size: 14px;
}
.learn-promo-arrow {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
  flex-shrink: 0;
  transition: transform .14s ease;
}
.learn-promo:hover .learn-promo-arrow { transform: translateX(4px); }

/* Rank badge on Card Detail */
.rank-badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: var(--s-md); padding: 6px 12px 6px 6px;
  background: linear-gradient(135deg, rgba(245,197,24,0.18), rgba(245,197,24,0.06));
  border: 1px solid var(--gold);
  border-radius: var(--r-pill);
  text-decoration: none; color: var(--gold);
  transition: transform .12s ease;
}
.rank-badge:hover { transform: translateY(-1px); text-decoration: none; }
.rank-badge-num {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--bg);
  border-radius: 999px; padding: 3px 9px;
  font-weight: 900; font-size: 12px; font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}
.rank-badge-label {
  font-weight: 700; font-size: 12px; letter-spacing: 0.2px;
}

/* Utility */
.row { display: flex; align-items: center; gap: var(--s-md); }
.spacer { flex: 1; }
.muted { color: var(--text-dim); }
.tabular { font-variant-numeric: tabular-nums; }
.win-color { color: var(--win); }
.loss-color { color: var(--loss); }

@media (max-width: 720px) {
  main { padding: var(--s-lg); }
  .hero { padding: var(--s-2xl) 0 var(--s-lg); }
  .compare-col .value { font-size: 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links a:first-child { margin-left: 0; }
}
