/*
 * Visual pass, loaded LAST on every page so it wins over the older inline styles.
 * Goal: a plain, flat stats tool instead of a glassy template.
 *   - no dot grid, no glow, no gradient text
 *   - no backdrop blur, no translucent "glass" cards: solid surfaces with a 1px border
 *   - smaller corner radii, no pill buttons, no hover lift / tilt / fade-up animations
 *   - one typeface (Inter)
 * To tweak the look, change the variables below.
 */
:root {
  --rf-bg: #0b0b0c;
  --rf-surface: #121214;
  --rf-surface-2: #17171a;
  --rf-line: #26262a;
  --rf-line-hi: #3a3a40;
  --rf-text: #ededf0;
  --rf-dim: #8f8f98;
  --rf-r: 8px;      /* controls */
  --rf-r-lg: 12px;  /* panels and cards */
  --rf-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- background: flat, no dots, no glow ---------- */
html, body { background: var(--rf-bg); }
.snow-dots, .grind-site-dots { display: none !important; }
body::before { background: none !important; content: none !important; }
body { font-feature-settings: normal; letter-spacing: 0; }

/* ---------- no blur anywhere, no glass plates behind the frames ---------- */
*, *::before, *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.glass-plates { display: none !important; }

/* ---------- type: one family, no gradient headings ---------- */
h1, h2, h3, .hm-title, .hm-h2, .brand-name, .up-title, .channel-name,
.up-v2 .up-patch-head h2, .pf-title, .dash-view h1 { font-family: var(--rf-font) !important; }
h1 span, .hm-grad, .grad {
  background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important; color: inherit !important;
}
.hm-title { font-weight: 650; letter-spacing: -.035em; }
.hm-h2 { font-weight: 650; letter-spacing: -.02em; }

/* ---------- surfaces: solid, flat ---------- */
.topbar, .sidebar { background: var(--rf-bg) !important; border-color: var(--rf-line) !important; box-shadow: none !important; }
.hm-glass, .up-panel, .up-patch, .pick-card, .grind-panel, .ch-card, .dash-card, .pf-card, .pf-modal, .profile-menu,
.glass-card, .cmp-card, .live-window, .soc-card, .dg-card, .dg-dd-list, .collab-list, .login-bubble,
.gw-row, .status-card, .cr-card, .panel, .card {
  background: var(--rf-surface) !important; border: 1px solid var(--rf-line) !important;
  border-radius: var(--rf-r-lg) !important; box-shadow: none !important;
}
.hm-fact, .claim-box, .check-box, .commands-column, .collab-column, .up-list li {
  background: var(--rf-surface-2) !important; border-color: var(--rf-line) !important; border-radius: var(--rf-r) !important;
}
.up-patch { background: var(--rf-surface-2) !important; }
.up-panel, .up-patch { padding-block: 0; }
.grind-panel, #grindPanel, #authView { border-radius: var(--rf-r-lg) !important; }

/* ---------- controls: 8px corners instead of pills ---------- */
.tab, .search, .discord-btn, .icon-btn, .user, .hm-btn, .search-container, .search-button, .ch-search, .ch-search button,
.collab-btn, .rename-button, .rename-input, .mode-toggle, .mode-help, .channel-change-inline, .grind-left, .claim-copy,
.auth-form input, .auth-form button, .command-btn, .boost-btn, .cmd-btn, .dash-btn, .pf-btn, .pf-input, .live-btn,
.dg-dd-btn, .gw-delta, .badge, .up-tag, .api-pill, .ch-more button, .more-row button, .go-btn, .cmp-btn {
  border-radius: var(--rf-r) !important;
}
.search, .discord-btn, .hm-btn.ghost, .live-btn { background: var(--rf-surface) !important; border-color: var(--rf-line) !important; }
.search:hover, .discord-btn:hover, .hm-btn.ghost:hover, .tab:hover { background: var(--rf-surface-2) !important; border-color: var(--rf-line-hi) !important; }
.hm-btn { height: 44px; padding: 0 20px; font-weight: 600; }
.hm-btn.primary { background: #f4f4f5; color: #0b0b0c; }
.tab.active { background: var(--rf-surface-2); }
.pf-input, .rename-input, .search-bar, .ch-search input, .auth-form input { background: var(--rf-surface-2) !important; border: 1px solid var(--rf-line) !important; }
.pf-input:focus, .rename-input:focus, .search-bar:focus, .auth-form input:focus { border-color: var(--rf-line-hi) !important; box-shadow: none !important; outline: none; }
.search-container, .ch-search { background: var(--rf-surface) !important; border-color: var(--rf-line) !important; }

/* ---------- no decorative motion ---------- */
.hm-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.content.swap { animation: none !important; }
.hm-card, .ch-card, .command-btn, .boost-btn, .cmd-btn, .hm-btn, .collab-btn { transition: background .15s, border-color .15s, color .15s !important; }
.hm-card:hover, .ch-card:hover, .command-btn:hover, .cmd-btn:hover, .boost-btn:hover, .hm-btn:hover { transform: none !important; box-shadow: none !important; }
.hm-card:hover, .ch-card:hover { background: var(--rf-surface-2) !important; border-color: var(--rf-line-hi) !important; }
.live-stage { perspective: none !important; }
.live-window { transform: none !important; }
.live-window::before, .live-window::after { display: none !important; }

/* ---------- home page: plain text blocks, no icon tiles, no eyebrow labels ---------- */
.hm-ico, .hm-eyebrow { display: none !important; }
.hm-card { padding: 20px 22px; }
.hm-card h3 { margin-bottom: 6px; }
.hm-section { margin-top: clamp(48px, 8vh, 80px); }
.hm-sub { max-width: 620px; }
.hm-faq summary { border-radius: var(--rf-r-lg) !important; }

/* ---------- web grind: command buttons ---------- */
.command-grid > *, .command-grid button { border-radius: var(--rf-r) !important; background: var(--rf-surface-2) !important; border: 1px solid var(--rf-line) !important; box-shadow: none !important; }
.command-grid button:hover { background: #1d1d21 !important; border-color: var(--rf-line-hi) !important; }
.odo-bezel, .odo-window { border-radius: var(--rf-r) !important; box-shadow: none !important; }

/* inputs that sit inside a bordered search box should not draw a second box */
.search-container .search-bar, .ch-search input, .search .search-input { background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
.search-container { padding: 4px; }

/* the hidden attribute must always win over component display rules */
[hidden] { display: none !important; }


/* fixes: rows and wrappers that must NOT get their own card */
.api-row { background: none !important; border: 0 !important; border-top: 1px solid var(--rf-line) !important; border-radius: 0 !important; }
.api-row:first-of-type { border-top: 0 !important; }
.up-panel { background: transparent !important; border: 0 !important; border-radius: 0 !important; }
.collab-row { border-radius: var(--rf-r) !important; background: var(--rf-surface-2) !important; border: 1px solid var(--rf-line) !important; }
.collab-row .rename-input, .collab-row input { background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.collab-row:focus-within { border-color: var(--rf-line-hi) !important; box-shadow: none !important; }

.collab-column { background: transparent !important; border: 0 !important; }

/* ---------- Countries page ---------- */
.ct-pick { max-width: 1100px; margin: 0 auto 22px; }
.ct-search { width: 100%; max-width: 320px; height: 40px; margin: 0 0 12px; padding: 0 12px; color: var(--rf-text); font: 500 14px var(--rf-font); background: var(--rf-surface); border: 1px solid var(--rf-line); border-radius: var(--rf-r); }
.ct-search:focus { outline: none; border-color: var(--rf-line-hi); }
.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 188px; overflow-y: auto; padding: 2px; }
.ct-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 8px; color: #d4d4d8; font: 500 13px var(--rf-font); background: var(--rf-surface); border: 1px solid var(--rf-line); border-radius: var(--rf-r); cursor: pointer; transition: background .15s, border-color .15s; }
.ct-chip:hover { background: var(--rf-surface-2); border-color: var(--rf-line-hi); }
.ct-chip.on { color: #0b0b0c; background: #f4f4f5; border-color: #f4f4f5; }
.ct-flag { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; flex: none; }
.ct-flag.lg { width: 44px; height: 30px; border-radius: 3px; }
.ct-count { color: var(--rf-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.ct-chip.on .ct-count { color: #52525b; }
.ct-none, .ct-empty { color: var(--rf-dim); font-size: 14px; }
.ct-empty { max-width: 1100px; margin: 24px auto; }
.ct-head { display: flex; align-items: center; gap: 14px; max-width: 1100px; margin: 0 auto 14px; }
.ct-head h2 { margin: 0; font: 650 22px/1.2 var(--rf-font); letter-spacing: -.02em; }
.ct-head p { margin: 2px 0 0; color: var(--rf-dim); font-size: 13px; }
.ct-list { list-style: none; max-width: 1100px; margin: 0 auto; padding: 0; background: var(--rf-surface); border: 1px solid var(--rf-line); border-radius: var(--rf-r-lg); overflow: hidden; }
.ct-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--rf-line); }
.ct-row:first-child { border-top: 0; }
.ct-rank { width: 40px; flex: none; color: var(--rf-dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.ct-av { width: 38px; height: 38px; flex: none; border-radius: 50%; object-fit: cover; background: #18181b; }
.ct-who { min-width: 0; flex: 1; }
.ct-who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.ct-who span { color: var(--rf-dim); font-size: 12px; }
.ct-subs { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
#countriesView .ch-more { max-width: 1100px; margin: 16px auto 0; text-align: center; }
@media (max-width: 520px) { .ct-row { gap: 10px; padding: 10px 12px; } .ct-rank { width: 32px; } }

/* ---------- Race page: same flat look as the rest ---------- */
.rc-card { background: var(--rf-surface) !important; border: 1px solid var(--rf-line) !important; border-radius: var(--rf-r-lg) !important; box-shadow: none !important; }
.rc.top1 .rc-card { border-color: rgba(250,204,21,.45) !important; }
.rc-num { font-family: var(--rf-font) !important; letter-spacing: -.01em; }
.race-title, .race-panel-title { font-family: var(--rf-font) !important; }
.race-panel, .race-empty { background: var(--rf-surface) !important; border: 1px solid var(--rf-line) !important; border-radius: var(--rf-r-lg) !important; box-shadow: none !important; }
.race-btn, .dg-race-btn, .race-select, .race-seg, .race-badge { border-radius: var(--rf-r) !important; box-shadow: none !important; }
.race-seg button { border-radius: 6px !important; }
.dg-race-btn, .race-btn:not(.solid), .race-select { background: var(--rf-surface) !important; border-color: var(--rf-line) !important; }
.race-btn.solid { background: #f4f4f5 !important; }
.race-seg { background: var(--rf-surface-2) !important; border-color: var(--rf-line) !important; }
