/* ================================================================
   JBLX — styles.css
   Shared across: index.html, values.html, teams.html, disc.html,
                  calc.html, info.html
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Space+Mono:wght@400;700&family=Sora:wght@300;400;500;600;700&display=swap');

/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  /* Palette */
  --accent:         #00c8f0;
  --accent-dim:     #0090b8;
  --accent-glow:    rgba(0, 200, 240, 0.15);
  --accent-glow-sm: rgba(0, 200, 240, 0.08);

  /* Demand colours — 8 tiers */
  --c-extraordinary: #c084fc;  
  --c-high:          #4a90e2;
  --c-decent:        #39e07a;
  --c-average:       #f0c040;
  --c-medium:        #e07820;
  --c-low:           #e03040;
  --c-minimal:       #8b1a2a;
  --c-none:          #4b5263;

  /* Trend colours */
  --c-stable:     #5a6080;
  --c-hyped:      #4a90e2;
  --c-rising:     #39e07a;
  --c-falling:    #e03040;
  --c-hoarded:       #f9ca24;
  --c-manipulated:   #e84393;

  /* Obtainable tag */
  --c-obtainable:       #43e8b0;
  --c-obtainable-bg:    rgba(67,232,176,0.10);
  --c-obtainable-border:rgba(67,232,176,0.28);

  /* Limited value accent */
  --c-limited:    #f0c040;

  /* Surfaces – Dark (default) */
  --bg:           #07080d;
  --bg2:          #0b0d15;
  --bg3:          #10131c;
  --surface:      #161924;
  --surface2:     #1c2030;
  --surface3:     #222840;
  --border:       rgba(255,255,255,0.06);
  --border-hi:    rgba(0,200,240,0.20);
  --text:         #dde2f0;
  --text-dim:     #6e788f;
  --text-muted:   #3a4055;

  /* Discord */
  --discord:      #5865f2;
  --discord-dark: #4752c4;

  /* Misc */
  --nav-h:        56px;
  --r:            8px;
  --r-lg:         14px;
  --r-xl:         20px;
  --ease:         cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: 'Rajdhani', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --font-body:    'Sora', sans-serif;
}

/* ── LIGHT MODE ─────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:       #f0f2f8;
  --bg2:      #e6e9f2;
  --bg3:      #dce0ec;
  --surface:  #ffffff;
  --surface2: #f4f6fc;
  --surface3: #ebeef7;
  --border:   rgba(0,0,0,0.07);
  --border-hi:rgba(0,150,200,0.25);
  --text:     #181c2e;
  --text-dim: #5a6278;
  --text-muted:#9aa0bc;
  --accent:         #0088bb;
  --accent-dim:     #006688;
  --accent-glow:    rgba(0,136,187,0.12);
  --accent-glow-sm: rgba(0,136,187,0.06);
  --c-stable: #9aa0bc;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
img { display: block; }

/* ── SCROLLBAR ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ================================================================
   TOP NAVIGATION  (inner pages)
================================================================ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 300;
  height: var(--nav-h);
  background: rgba(7,8,13,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-hi);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 8px;
  flex-shrink: 0;
}

[data-theme="light"] .top-nav {
  background: rgba(240,242,248,0.9);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand img {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 0 6px rgba(0,200,240,0.4));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: var(--r);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link:hover { color: var(--accent); background: var(--accent-glow-sm); }
.nav-link.active { color: var(--accent); background: var(--accent-glow); }

/* Theme toggle */
.theme-toggle {
  margin-left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  color: var(--accent);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, box-shadow 0.15s;
}
.theme-toggle:hover {
  background: var(--surface2);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ================================================================
   ADD THIS TO styles.css — after the .theme-toggle block
   (around the "TOP NAVIGATION" section)
================================================================ */

/* ── ACCOUNT BUTTON (nav-integrated, replaces fixed .qa-btn) ── */
.nav-account-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 9px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  margin-left: 4px;
  flex-shrink: 0;
  max-width: 130px;
}
.nav-account-btn:hover {
  background: var(--surface2);
  box-shadow: 0 0 10px var(--accent-glow);
}
.nav-account-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #39e07a;
  box-shadow: 0 0 6px #39e07a;
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s;
}
.nav-account-dot.offline {
  background: var(--text-muted);
  box-shadow: none;
}
#qa-btn-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80px;
}

/* ── AUTH MODAL (shared across all pages) ─────────────────────
   These are identical to the quiz.html inline styles but now
   live in styles.css so every page gets them automatically.
─────────────────────────────────────────────────────────────── */
.qa-overlay {
  position: fixed; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0,0,0,0.75);
  opacity: 0; pointer-events: none; transition: opacity 0.22s;
}
.qa-overlay.open { opacity: 1; pointer-events: all; }

.qa-modal {
  position: relative;
  background: var(--surface); border: 1px solid var(--border-hi);
  border-radius: 20px; width: 100%; max-width: 400px; padding: 28px 28px 24px;
  transform: scale(0.94) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.qa-overlay.open .qa-modal { transform: scale(1) translateY(0); }

.qa-close-btn {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.12s;
}
.qa-close-btn:hover { background: rgba(224,48,64,0.2); color: #e03040; }

.qa-modal-title {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
  letter-spacing: 0.06em; color: var(--text); margin-bottom: 4px;
}
.qa-modal-sub {
  font-family: var(--font-mono); font-size: 0.58rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 20px;
}
.qa-tabs {
  display: flex; gap: 4px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px; margin-bottom: 18px;
}
.qa-tab {
  flex: 1; padding: 8px; border: none; border-radius: 7px; background: none;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); cursor: pointer; transition: background 0.12s, color 0.12s;
}
.qa-tab.active { background: var(--surface2); color: var(--text); border: 1px solid var(--border-hi); }

.qa-field { margin-bottom: 12px; }
.qa-label {
  font-family: var(--font-mono); font-size: 0.56rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 5px; display: block;
}
.qa-input {
  width: 100%; padding: 11px 14px;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: var(--font-mono); font-size: 0.84rem;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.qa-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.qa-submit {
  width: 100%; padding: 13px;
  background: var(--accent); color: #000; border: none; border-radius: 10px;
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer;
  transition: opacity 0.15s, transform 0.15s; margin-top: 4px;
}
.qa-submit:hover { opacity: 0.85; transform: translateY(-1px); }
.qa-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.qa-error {
  font-family: var(--font-mono); font-size: 0.64rem; color: #e03040;
  background: rgba(224,48,64,0.08); border: 1px solid rgba(224,48,64,0.25);
  border-radius: 8px; padding: 8px 12px; margin-top: 10px;
  display: none; line-height: 1.5;
}
.qa-error.visible { display: block; }

.qa-success {
  font-family: var(--font-mono); font-size: 0.64rem; color: #39e07a;
  background: rgba(57,224,122,0.08); border: 1px solid rgba(57,224,122,0.25);
  border-radius: 8px; padding: 8px 12px; margin-top: 10px;
  display: none; line-height: 1.5;
}
.qa-success.visible { display: block; }

.qa-profile { display: flex; flex-direction: column; gap: 14px; }
.qa-profile-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
}
.qa-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-glow); border: 2px solid var(--border-hi);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 700; color: var(--accent); flex-shrink: 0;
}
.qa-profile-name {
  font-family: var(--font-display); font-size: 1rem;
  font-weight: 700; color: var(--text); letter-spacing: 0.04em;
}
.qa-profile-sub {
  font-family: var(--font-mono); font-size: 0.54rem;
  letter-spacing: 0.08em; color: #39e07a; text-transform: uppercase;
}
.qa-profile-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qa-profile-btn {
  padding: 10px; border-radius: 10px;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
  transition: background 0.12s; border: 1px solid;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.qa-sync-btn  { background: var(--accent-glow); border-color: var(--border-hi); color: var(--accent); }
.qa-sync-btn:hover  { background: rgba(0,200,240,0.22); }
.qa-logout-btn { background: rgba(224,48,64,0.08); border-color: rgba(224,48,64,0.25); color: #e03040; }
.qa-logout-btn:hover { background: rgba(224,48,64,0.16); }

.qa-stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.qa-stat {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 8px; text-align: center;
}
.qa-stat-n {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.qa-stat-l {
  font-family: var(--font-mono); font-size: 0.44rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-top: 3px;
}

/* Hide on very small mobile to avoid crowding the nav */
@media (max-width: 480px) {
  #qa-btn-label { display: none; }
  .nav-account-btn { padding: 7px 8px; border-radius: 50%; gap: 0; max-width: none; }
}

/* ================================================================
   FOOTER
================================================================ */
.site-footer {
  margin-top: auto;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ================================================================
   PAGE TRANSITIONS
================================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(67,232,176,0.3); }
  50%       { box-shadow: 0 0 18px rgba(67,232,176,0.6); }
}

/* ================================================================
   INDEX PAGE
================================================================ */
.index-body {
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* Animated grid bg */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,200,240,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,240,0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  animation: gridDrift 22s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes gridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 52px 52px; }
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 50% 50%, rgba(0,100,180,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 15% 85%, rgba(0,60,160,0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Chart line */
.bg-chart {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 42%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(20px, 4vh, 40px) 24px clamp(28px, 5vh, 52px);
  gap: 0;
}

.hero-logo {
  width: clamp(200px, 32vw, 460px);
  height: auto;
  max-height: 34vh;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(0,160,240,0.55)) drop-shadow(0 0 90px rgba(0,100,220,0.25));
  animation: fadeUp 0.75s var(--ease) both;
  animation-delay: 0.08s;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 1.1vw, 0.76rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
  margin-bottom: clamp(22px, 4vh, 48px);
  animation: fadeUp 0.5s var(--ease) both;
  animation-delay: 0.4s;
}
[data-theme="light"] .hero-tagline {
  color: rgba(0,0,0,0.45);
}

.hero-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 340px;
  animation: fadeUp 0.5s var(--ease) both;
  animation-delay: 0.55s;
}

.hero-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.hero-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(0,200,240,0.06) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}

.hero-btn:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(0,200,240,0.5);
  box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,200,240,0.12), inset 0 1px 0 rgba(0,200,240,0.1);
  background: var(--surface2);
}
.hero-btn:hover::before { opacity: 1; }
.hero-btn:active { transform: translateY(-1px) scale(0.99); }

.hero-btn .btn-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-btn .btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r);
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.hero-btn:hover .btn-icon {
  background: var(--accent-glow);
  border-color: var(--border-hi);
}

.hero-btn .btn-icon svg {
  width: 20px; height: 20px; color: var(--accent);
}

.hero-btn .btn-arrow {
  font-size: 1.1rem;
  color: var(--accent);
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}
.hero-btn:hover .btn-arrow { opacity: 1; transform: translateX(3px); }

/* Discord btn variant */
.hero-btn.discord-btn {
  border-color: rgba(88,101,242,0.3);
}
.hero-btn.discord-btn:hover {
  border-color: rgba(88,101,242,0.6);
  box-shadow: 0 12px 36px rgba(0,0,0,0.45), 0 0 28px rgba(88,101,242,0.18);
}
.hero-btn.discord-btn .btn-icon svg { color: #7289da; }
.hero-btn.discord-btn .btn-arrow { color: #7289da; }

.index-footer {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  z-index: 1;
  white-space: nowrap;
}

/* ================================================================
   VALUES PAGE
================================================================ */
.values-main {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 28px 60px;
}

/* ── TOOLBAR — two-row layout ────────────────────────────────── */
.values-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Mode toggle */
.mode-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  overflow: hidden;
  flex-shrink: 0;
}

.mode-btn {
  padding: 8px 18px;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: none;
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.mode-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.mode-btn:hover { color: var(--text); background: var(--surface2); }
.mode-btn.active { color: var(--bg); background: var(--accent); }

/* Search */
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 160px;
  max-width: 340px;
}
.search-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.84rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* Filter selects */
.filter-select {
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.81rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  flex-shrink: 0;
}
.filter-select:focus, .filter-select:hover { border-color: var(--accent); }

/* Item count */
.item-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ── PAGINATION ───────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.page-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.page-btn:not(:disabled):hover {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: var(--accent);
}
.page-btn svg { width: 14px; height: 14px; }

.page-info {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding: 0 8px;
}

/* ── CARD MODE ──────────────────────────────────────────────── */
#card-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  animation: fadeUp 0.3s var(--ease) both;
  cursor: default;
}

.item-card {
  cursor: pointer;
}

.item-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 16px rgba(0,200,240,0.12);
  transform: translateY(-3px);
}

/* Obtainable item card — subtle teal accent */
.item-card.is-obtainable {
  border-color: rgba(67,232,176,0.15);
}
.item-card.is-obtainable:hover {
  border-color: rgba(67,232,176,0.35);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(67,232,176,0.1);
}

.card-img-wrap {
  width: 100%;
  height: 140px;
  background: var(--bg3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}
.item-card:hover .card-img-wrap img { transform: scale(1.05); }

.card-img-fallback {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  opacity: 0.5;
}

/* Obtainable corner ribbon on card image */
.obtainable-ribbon {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Type + obtainable badges row */
.card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 2px;
}

.card-stats {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.card-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffd166;
}

.stat-value.limited {
  color: var(--c-limited);
}

.stat-na {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}
.demand-sub {
  font-size: 0.52rem;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  text-transform: lowercase;
  margin-left: 2px;
}
.demand-sub.clean-sub { color: #43e8b0; }
.demand-sub.duped-sub { color: #fc8484; }

/* ── LIST MODE ──────────────────────────────────────────────── */
#list-view {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: auto;
  max-height: calc(100vh - var(--nav-h) - 160px);
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}

.values-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 800px;
}

.values-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg3);
}

.values-table thead tr {
  border-bottom: 2px solid var(--border-hi);
}

.values-table th {
  padding: 13px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.values-table th.sortable { cursor: pointer; user-select: none; }
.values-table th.sortable:hover { color: var(--accent); }
.values-table th.sorted { color: var(--accent); }
.sort-arrow { font-size: 0.68rem; opacity: 0.5; margin-left: 3px; }

.values-table tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.values-table tbody tr:last-child { border-bottom: none; }
.values-table tbody tr:hover { background: var(--surface2); }
.values-table tbody tr.is-obtainable { border-left: 2px solid rgba(67,232,176,0.3); }
.values-table tbody tr.is-obtainable:hover { background: rgba(67,232,176,0.04); }

.values-table td {
  padding: 11px 16px;
  vertical-align: middle;
}

/* Table image cell */
.td-img {
  padding: 8px 6px 8px 14px !important;
  width: 68px;
}
.row-img-wrap {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
  position: relative;
}
tr:hover .row-img-wrap { border-color: var(--border-hi); }

.row-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-img-fallback {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* Table name */
.td-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* Table badges cell — type + obtainable stacked */
.td-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

/* Table value cells */
.td-value {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffd166;
  white-space: nowrap;
}
.td-duped {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.td-limited {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--c-limited);
  white-space: nowrap;
}

/* Notes */
.td-notes {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #b07aff;
  letter-spacing: 0.04em;
}

.td-updated {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Change badge */
.change-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 5px;
}
.change-up   { background: rgba(57,224,122,0.12); color: var(--c-rising); }
.change-down { background: rgba(224,48,64,0.12);  color: var(--c-falling); }

/* ── TYPE BADGE ───────────────────────────────────────────────── */
.badge-type {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
}
.type-vehicle     { color: #00c8f0; background: rgba(0,200,240,0.10);   border-color: rgba(0,200,240,0.28); }
.type-spoiler     { color: #ff7eb3; background: rgba(255,126,179,0.10); border-color: rgba(255,126,179,0.28); }
.type-texture     { color: #ff9f43; background: rgba(255,159,67,0.10);  border-color: rgba(255,159,67,0.28); }
.type-color       { color: #a29bfe; background: rgba(162,155,254,0.10); border-color: rgba(162,155,254,0.28); }
.type-rim         { color: #55efc4; background: rgba(85,239,196,0.10);  border-color: rgba(85,239,196,0.28); }
.type-drift       { color: #fd79a8; background: rgba(253,121,168,0.10); border-color: rgba(253,121,168,0.28); }
.type-horn           { color: #fdcb6e; background: rgba(253,203,110,0.10); border-color: rgba(253,203,110,0.28); }
.type-furniture      { color: #ffd166; background: rgba(255,209,102,0.10); border-color: rgba(255,209,102,0.28); }
.type-tyre-style     { color: #a8ff78; background: rgba(168,255,120,0.10); border-color: rgba(168,255,120,0.28); }
.type-tyre-sticker   { color: #f9844a; background: rgba(249,132,74,0.10);  border-color: rgba(249,132,74,0.28); }
.type-weapon-skin    { color: #ef233c; background: rgba(239,35,60,0.10);   border-color: rgba(239,35,60,0.28); }

/* ── OBTAINABLE BADGE ─────────────────────────────────────────── */
.badge-obtainable {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-obtainable);
  background: var(--c-obtainable-bg);
  border: 1px solid var(--c-obtainable-border);
  white-space: nowrap;
  animation: pulseGlow 2.8s ease-in-out infinite;
}
.badge-obtainable .ob-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-obtainable);
  flex-shrink: 0;
}

/* ── DEMAND BADGES — 8 tiers ──────────────────────────────────── */
.badge-demand {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  border: 1px solid;
  max-width: 100%;
  line-height: 1.3;
}
.d-extraordinary { color: var(--c-extraordinary); background: rgba(192,132,252,0.10); border-color: rgba(192,132,252,0.30); }
.d-high          { color: var(--c-high);           background: rgba(74,144,226,0.10);  border-color: rgba(74,144,226,0.28); }
.d-solid         { color: var(--c-decent);         background: rgba(57,224,122,0.10);  border-color: rgba(57,224,122,0.22); }
.d-average       { color: var(--c-average);        background: rgba(240,192,64,0.10);  border-color: rgba(240,192,64,0.28); }
.d-medium        { color: var(--c-medium);         background: rgba(224,120,32,0.10);  border-color: rgba(224,120,32,0.22); }
.d-low           { color: var(--c-low);            background: rgba(224,48,64,0.10);   border-color: rgba(224,48,64,0.22); }
.d-minimal       { color: #d44060;                 background: rgba(139,26,42,0.15);   border-color: rgba(139,26,42,0.40); }
.d-nonexistent   { color: var(--c-none);           background: rgba(75,82,99,0.10);    border-color: rgba(75,82,99,0.25); }

/* Trend badges */
.badge-trend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.t-stable  { color: var(--c-stable); }
.t-hyped   { color: var(--c-hyped); }
.t-rising  { color: var(--c-rising); }
.t-falling { color: var(--c-falling); }
.t-hoarded     { color: var(--c-hoarded); }
.t-manipulated { color: var(--c-manipulated); }

/* Empty state */
.empty-state {
  padding: 52px;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.875rem;
}

/* ================================================================
   MODAL / POPUP
================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;    /* ← lets the overlay scroll if modal is too tall */
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  transform: scale(0.94) translateY(8px);
  transition: transform 0.25s var(--ease);
  box-shadow: 0 24px 64px rgba(0,0,0,0.65), 0 0 0 1px rgba(0,200,240,0.1);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-img-wrap {
  width: 100%;
  height: 200px;
  background: var(--bg3);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.2;
  letter-spacing: 0.1em;
}

/* Obtainable badge overlaid on modal image */
.modal-obtainable-strip {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

/* Gradient overlay on modal image */
.modal-img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top, var(--surface) 0%, transparent 100%);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(255,60,80,0.6); }

.modal-content {
  padding: 22px 26px 28px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-name {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.1;
}

/* Modal badge group (type + obtainable) */
.modal-badge-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
  margin-top: 2px;
}

.modal-type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--border-hi);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.modal-stat {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
}

/* Obtainable modal stat — highlighted */
.modal-stat.limited-stat {
  border-color: rgba(240,192,64,0.25);
  background: rgba(240,192,64,0.05);
}
.modal-stat.limited-stat .modal-stat-label {
  color: rgba(240,192,64,0.7);
}

.modal-stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.modal-stat-value {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffd166;
}
.modal-stat-value.na { color: var(--text-muted); font-style: italic; font-size: 0.8rem; }
.modal-stat-value.small { font-size: 0.82rem; }
.modal-stat-value.limited { color: var(--c-limited); }

.modal-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.modal-desc-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.modal-desc {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.modal-notes {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #b07aff;
  letter-spacing: 0.04em;
}

/* ── ENHANCED MODAL SECTIONS ──────────────────────────────────── */

/* Remarks section */
.modal-section {
  margin-top: 16px;
}
.modal-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.modal-section-icon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.modal-section-icon.remarks-icon { background: #b07aff; box-shadow: 0 0 6px rgba(176,122,255,0.5); }
.modal-section-icon.pull-icon    { background: #43e8b0; box-shadow: 0 0 6px rgba(67,232,176,0.5); }

.modal-section-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.modal-section-title.remarks-title { color: #b07aff; }
.modal-section-title.pull-title    { color: #43e8b0; }

/* Remarks chips */
.modal-remarks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.remark-chip {
  display: inline-flex;
  align-items: flex-start;
  gap: 5px;
  padding: 5px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
}
.remark-chip .remark-icon { opacity: 0.55; font-size: 0.72rem; }
.remark-chip.highlight {
  color: var(--accent);
  border-color: var(--border-hi);
  background: var(--accent-glow-sm);
}
.remark-chip.warn {
  color: #e07820;
  border-color: rgba(224,120,32,0.25);
  background: rgba(224,120,32,0.07);
}
.remark-chip.good {
  color: #39e07a;
  border-color: rgba(57,224,122,0.25);
  background: rgba(57,224,122,0.07);
}
.remark-chip.purple {
  color: #b07aff;
  border-color: rgba(176,122,255,0.25);
  background: rgba(176,122,255,0.07);
}

/* Pull Value card */
.pull-value-card {
  background: var(--bg3);
  border: 1px solid rgba(67,232,176,0.20);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.pull-value-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pull-value-amount {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #43e8b0;
}
.pull-value-sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pull-value-note {
  font-size: 0.73rem;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 240px;
}

/* ── LIVE UPDATED TIMER ───────────────────────────────────────── */
.updated-time {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.updated-time .upd-icon { opacity: 0.5; margin-right: 3px; }

/* ── STAT CHANGE BADGES ───────────────────────────────────────── */
.change-prev {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  margin-left: 5px;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

/* Modal last-updated bar */
.modal-updated {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 10px;
  letter-spacing: 0.04em;
}
.modal-updated svg { opacity: 0.45; flex-shrink: 0; }

/* ================================================================
   TEAMS PAGE
================================================================ */
.teams-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 28px 72px;
}

.teams-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 8px;
  animation: fadeUp 0.4s var(--ease) both;
}

.teams-subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 44px;
  animation: fadeUp 0.4s var(--ease) 0.1s both;
}

.team-section {
  margin-bottom: 44px;
  animation: fadeUp 0.4s var(--ease) both;
}

.team-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-hi);
}

.team-section-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  flex-shrink: 0;
}

.team-section-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  gap: 18px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  animation: fadeUp 0.35s var(--ease) both;
}
.team-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.3);
}

.team-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--border-hi);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-info { flex: 1; min-width: 0; }

.team-name {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-role {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.team-desc {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-dim);
}

/* ================================================================
   DISCORD PAGE
================================================================ */
.disc-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.disc-card {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-xl);
  padding: 56px 48px;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  animation: scaleIn 0.4s var(--ease) both;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

.disc-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(88,101,242,0.12);
  border: 2px solid rgba(88,101,242,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7289da;
}
.disc-icon svg { width: 40px; height: 40px; }

.disc-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  line-height: 1.2;
}

.disc-sub {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 340px;
}

.disc-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 36px;
  background: var(--discord);
  color: #fff;
  border-radius: var(--r-lg);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 6px 24px rgba(88,101,242,0.35);
  margin-top: 6px;
}
.disc-join-btn:hover {
  background: var(--discord-dark);
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(88,101,242,0.45);
}
.disc-join-btn svg { width: 22px; height: 22px; }

.disc-note {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* ================================================================
   INFO PAGE  —  /info.html
================================================================ */
.info-main {
  flex: 1;
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 28px 80px;
}

/* Page header */
.info-page-header {
  margin-bottom: 40px;
  animation: fadeUp 0.3s var(--ease) both;
}
.info-page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.1;
  margin-bottom: 8px;
}
.info-page-title svg { color: var(--accent); flex-shrink: 0; }
.info-page-sub {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 620px;
}

/* Tab bar */
.info-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 5px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  animation: fadeUp 0.3s var(--ease) 0.05s both;
}
.info-tab {
  flex: 1;
  min-width: 120px;
  padding: 10px 14px;
  border-radius: var(--r);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.info-tab:hover { color: var(--text); background: var(--surface2); }
.info-tab.active { color: #000; background: var(--accent); }
.info-tab svg { flex-shrink: 0; }

/* Tab panels */
.info-panel { display: none; animation: fadeUp 0.22s var(--ease) both; }
.info-panel.active { display: block; }

/* Section card */
.info-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 20px;
}
.info-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border-hi);
}
.info-section-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}
.info-section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.info-section-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.info-section-body p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.72;
}
.info-section-body strong { color: var(--text); }

/* Numbered step list */
.info-steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.step-num {
  counter-increment: step;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid var(--border-hi);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.step-num::before { content: counter(step); }
.step-body {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.65;
  flex: 1;
}
.step-body strong { color: var(--text); }

/* Callout box */
.info-callout {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  border: 1px solid;
}
.info-callout.tip {
  background: rgba(0,200,240,0.06);
  border-color: rgba(0,200,240,0.22);
}
.info-callout.warn {
  background: rgba(224,120,32,0.06);
  border-color: rgba(224,120,32,0.22);
}
.info-callout.good {
  background: rgba(57,224,122,0.06);
  border-color: rgba(57,224,122,0.20);
}
.info-callout-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.info-callout-body {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.info-callout-body strong { color: var(--text); }

/* Demand tier table */
.demand-table {
  width: 100%;
  border-collapse: collapse;
}
.demand-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-hi);
}
.demand-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.demand-table tr:last-child td { border-bottom: none; }
.demand-table tr:hover td { background: var(--surface2); }
.demand-table .d-col { width: 110px; }
.demand-table .d-desc {
  font-size: 0.81rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.demand-table .d-liquid {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Verdict tier table */
.verdict-table {
  width: 100%;
  border-collapse: collapse;
}
.verdict-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-hi);
}
.verdict-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 0.81rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.verdict-table tr:last-child td { border-bottom: none; }
.verdict-table tr:hover td { background: var(--surface2); }
.verdict-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Glossary grid */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.glossary-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
.glossary-term {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 5px;
}
.glossary-def {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* Inline code pill */
.code-pill {
  display: inline-block;
  padding: 1px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 768px) {
  .values-main { padding: 20px 16px 48px; }
  .values-toolbar { gap: 10px; }
  .search-wrap { max-width: none; flex: 1 1 100%; }
  #card-view { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
  .teams-main { padding: 28px 16px 56px; }
  .team-grid { grid-template-columns: 1fr; }
  .disc-card { padding: 40px 28px; }
  .modal { max-width: 100%; }
  .modal-grid { grid-template-columns: 1fr; }
  .top-nav { padding: 0 16px; }
  .nav-link span { display: none; }
  .info-main { padding: 24px 16px 56px; }
  .info-tabs { gap: 3px; padding: 4px; }
  .info-tab { min-width: 80px; padding: 8px 10px; font-size: 0.72rem; }
  .info-section-body { padding: 18px 16px; }
  .demand-table .d-liquid { display: none; }
  .glossary-grid { grid-template-columns: 1fr; }
}

/* Light mode — dark outline on logos */
[data-theme="light"] .hero-logo {
  filter:
    drop-shadow(1px 0 0 rgba(0,0,0,0.6))
    drop-shadow(-1px 0 0 rgba(0,0,0,0.6))
    drop-shadow(0 1px 0 rgba(0,0,0,0.6))
    drop-shadow(0 -1px 0 rgba(0,0,0,0.6))
    drop-shadow(0 3px 10px rgba(0,0,0,0.4));
}
[data-theme="light"] .nav-brand img {
  filter:
    drop-shadow(1px 0 0 rgba(0,0,0,0.55))
    drop-shadow(-1px 0 0 rgba(0,0,0,0.55))
    drop-shadow(0 1px 0 rgba(0,0,0,0.55))
    drop-shadow(0 -1px 0 rgba(0,0,0,0.55));
}
@media (max-width: 480px) {
  #card-view { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-img-wrap { height: 110px; }
  .hero-logo { width: 240px; }
  .hero-btn .btn-left span { display: none; }
}

/* Index page mobile fix – text will NEVER disappear again */
@media (max-width: 480px) {
  .hero-btn, .menu-btn {
    padding: 16px 20px !important;
    min-height: 72px;
  }
  .hero-btn .btn-left span,
  .menu-btn .menu-label {
    display: block !important;
    font-size: 1.02rem !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }
}

/* ── OBTAINABLE PILL — BIT TRANSPARENT VERSION ───────────────────────────── */
@media (max-width: 768px) {
  .item-card.is-obtainable::after {
    font-size: 0.48rem;
    padding: 2px 8px;
    top: 6px;
    right: 6px;
    letter-spacing: 0.04em;
    border-width: 1px;
  }
}

/* Modal strip is a real div — JS injects the badge-obtainable span into it */
.modal-obtainable-strip {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  pointer-events: none;
}

/* ── VALUES PAGE BACKGROUND ─────────────────────────────────── */
.values-main { position: relative; }

.values-main::before {
  content: '';
  position: fixed;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0,200,240,0.07) 0%, transparent 70%);
  border-radius: 50%;
  top: -200px; right: -200px;
  animation: vl-orb 22s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.values-main::after {
  content: '';
  position: fixed;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(162,155,254,0.06) 0%, transparent 70%);
  border-radius: 50%;
  bottom: -150px; left: -150px;
  animation: vl-orb 28s ease-in-out infinite reverse;
  pointer-events: none;
  z-index: 0;
}
@keyframes vl-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-60px, 80px) scale(1.08); }
  66%       { transform: translate(40px, -60px) scale(0.94); }
}

/* Ensure toolbar and cards sit above the orbs */
.values-toolbar, #card-view, #list-view, .pagination {
  position: relative;
  z-index: 1;
}

/* ── DROPDOWN NAV ──────────────────────────────────────────── */
.nav-dropdown { position: relative; }
.dropdown-toggle {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: var(--r);
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, background 0.15s;
}
.dropdown-toggle:hover, .nav-dropdown.open .dropdown-toggle {
  color: var(--accent); background: var(--accent-glow-sm);
}
.dropdown-arrow { transition: transform 0.2s; flex-shrink: 0; }
.nav-dropdown.open .dropdown-arrow { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 500;
  overflow: hidden;
}
.nav-dropdown.open .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-left: 3px solid transparent;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.dropdown-item:hover, .dropdown-item.active {
  color: var(--accent);
  background: var(--accent-glow);
  border-left-color: var(--accent);
}
.dropdown-item svg { flex-shrink: 0; opacity: 0.7; }

/* ================================================================
   ADVANCED FILTER PANEL
================================================================ */
.toolbar-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-toggle-btn:hover, .filter-toggle-btn.has-active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}
.filter-toggle-btn svg { width: 14px; height: 14px; }

.filter-active-count {
  background: var(--accent);
  color: #000;
  font-size: 0.58rem;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-family: var(--font-mono);
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeUp 0.18s var(--ease) both;
}

.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-chips.scrollable {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.filter-chips.scrollable::-webkit-scrollbar { height: 3px; }
.filter-chips.scrollable::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 99px; }

.filter-chip {
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg3);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
  flex-shrink: 0;
  user-select: none;
}
.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 900;
}

/* Demand chips — colored when active */
.filter-chip.fcd-Extraordinary.active { background: var(--c-extraordinary); border-color: var(--c-extraordinary); color: #000; }
.filter-chip.fcd-High.active          { background: var(--c-high);          border-color: var(--c-high);          color: #fff; }
.filter-chip.fcd-Solid.active         { background: var(--c-decent);        border-color: var(--c-decent);        color: #000; }
.filter-chip.fcd-Average.active       { background: var(--c-average);       border-color: var(--c-average);       color: #000; }
.filter-chip.fcd-Medium.active        { background: var(--c-medium);        border-color: var(--c-medium);        color: #fff; }
.filter-chip.fcd-Low.active           { background: var(--c-low);           border-color: var(--c-low);           color: #fff; }
.filter-chip.fcd-Minimal.active       { background: var(--c-minimal);       border-color: var(--c-minimal);       color: #fff; }
.filter-chip.fcd-Nonexistent.active   { background: var(--c-none);          border-color: var(--c-none);          color: #aaa; }

/* Trend chips */
.filter-chip.fct-Hyped.active   { background: var(--c-hyped);   border-color: var(--c-hyped);   color: #fff; }
.filter-chip.fct-Rising.active  { background: var(--c-rising);  border-color: var(--c-rising);  color: #000; }
.filter-chip.fct-Falling.active { background: var(--c-falling); border-color: var(--c-falling); color: #fff; }
.filter-chip.fct-Stable.active  { background: var(--c-stable);  border-color: var(--c-stable);  color: #fff; }
.filter-chip.fct-Hoarded.active     { background: var(--c-hoarded);     border-color: var(--c-hoarded);     color: #000; }
.filter-chip.fct-Manipulated.active { background: var(--c-manipulated); border-color: var(--c-manipulated); color: #fff; }

/* Season chips */
.filter-chip.season-chip.active {
  background: linear-gradient(135deg, #7b61ff, #00c8f0);
  border-color: #7b61ff;
  color: #fff;
}
.filter-chip.og-chip.active {
  background: linear-gradient(135deg, #ffd166, #ff7eb3);
  border-color: #ffd166;
  color: #000;
}

/* Price range */
.filter-bottom-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.price-range-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-input {
  width: 120px;
  padding: 7px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  outline: none;
  transition: border-color 0.15s;
}
.price-input::placeholder { color: var(--text-muted); }
.price-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.price-sep {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ── DUAL RANGE SLIDER ─────────────────────────────────────── */
.dual-range-wrap {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
}
.dual-range-track {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: var(--surface3);
  border-radius: 99px;
  pointer-events: none;
}
.dual-range-fill {
  position: absolute;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  box-shadow: 0 0 8px var(--accent-glow);
  pointer-events: none;
}
.dual-range {
  position: absolute;
  left: 0; right: 0;
  width: 100%;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  pointer-events: none;
  outline: none;
}
.dual-range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg2);
  box-shadow: 0 0 8px rgba(0,200,240,0.5);
  cursor: pointer;
  pointer-events: all;
  transition: box-shadow 0.15s, transform 0.15s;
}
.dual-range::-webkit-slider-thumb:hover,
.dual-range::-webkit-slider-thumb:active {
  box-shadow: 0 0 0 6px var(--accent-glow);
  transform: scale(1.18);
}
.dual-range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg2);
  box-shadow: 0 0 8px rgba(0,200,240,0.5);
  cursor: pointer;
  pointer-events: all;
}

/* Obtainable toggle */
.obtainable-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.toggle-switch {
  width: 38px;
  height: 21px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 99px;
  position: relative;
  transition: background 0.18s, border-color 0.18s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--text-muted);
  top: 2px;
  left: 2px;
  transition: transform 0.18s, background 0.18s;
}
.toggle-switch.on {
  background: var(--c-obtainable-bg);
  border-color: var(--c-obtainable-border);
  box-shadow: 0 0 10px rgba(67,232,176,0.25);
}
.toggle-switch.on::after {
  transform: translateX(17px);
  background: var(--c-obtainable);
}
.obtainable-toggle-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  user-select: none;
}

/* Sort row (replaces old sort dropdowns) */
.sort-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sort-row-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}
.sort-chip {
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--bg3);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sort-chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-glow); }
.sort-chip.active {
  background: var(--surface2);
  border-color: var(--border-hi);
  color: var(--text);
}
.sort-arrow-icon { font-size: 0.6rem; opacity: 0.7; }

/* Filter footer */
.filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}
.active-filter-summary {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.clear-filters-btn {
  padding: 5px 14px;
  background: rgba(224,48,64,0.1);
  border: 1px solid rgba(224,48,64,0.25);
  border-radius: var(--r);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--c-falling);
  cursor: pointer;
  transition: all 0.15s;
}
.clear-filters-btn:hover {
  background: rgba(224,48,64,0.22);
  border-color: rgba(224,48,64,0.5);
}

@media (max-width: 768px) {
  .filter-panel { padding: 14px 14px; gap: 12px; }
  .price-input { width: 90px; }
  .filter-bottom-row { gap: 14px; }
}

/* ── COLLAPSIBLE FILTER GROUPS ───────────────────────────────── */
.filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}
.filter-group-header:hover .filter-group-label { color: var(--accent); }

.filter-group-toggle {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  transition: transform 0.18s, color 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.filter-group-header:hover .filter-group-toggle { color: var(--accent); }
.filter-group.collapsed .filter-group-toggle { transform: rotate(-90deg); }

.filter-group-body {
  overflow: hidden;
  transition: max-height 0.22s var(--ease), opacity 0.18s;
  max-height: 400px;
  opacity: 1;
}
.filter-group.collapsed .filter-group-body {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Active indicator dot on collapsed headers */
.filter-group-label-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-group-active-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  display: none;
  flex-shrink: 0;
}
.filter-group.has-active-filter .filter-group-active-dot { display: block; }