:root {
  --bg: #07090e;
  --bg-elev: #0c1018;
  --panel: #111622;
  --panel-2: #171e2e;
  --panel-glass: rgba(15, 20, 31, 0.88);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --border-gold: rgba(229, 185, 98, 0.45);
  --gold: #e5b962;
  --gold-bright: #f7da92;
  --gold-dim: rgba(229, 185, 98, 0.14);
  --green: #3ddc97;
  --cyan: #38bdf8;
  --violet: #c084fc;
  --ember: #fb7185;
  --orange: #f97316;
  --text: #eef2f9;
  --text-soft: #b8c4d9;
  --muted: #8f9db5;
  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.48;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 65% 45% at 14% 0%, rgba(229, 185, 98, 0.065), transparent 65%),
    radial-gradient(ellipse 55% 40% at 88% 4%, rgba(56, 189, 248, 0.055), transparent 60%),
    radial-gradient(ellipse 45% 45% at 50% 100%, rgba(192, 132, 252, 0.035), transparent 70%);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select {
  font-family: inherit;
  color: var(--text);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(148, 163, 184, 0.12);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--gold-bright);
}

.num, .kpi-value, .stat-val, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.text-green { color: var(--green); }
.text-gold { color: var(--gold-bright); }
.text-cyan { color: var(--cyan); }
.text-violet { color: var(--violet); }
.text-ember { color: var(--ember); }

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  background: rgba(8, 11, 17, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1580px;
  margin: 0 auto;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-crest {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f7da92, #c99234 65%, #734c12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(229, 185, 98, 0.28);
  flex-shrink: 0;
}
.brand-text { min-width: 0; }
.brand-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--gold-bright);
  line-height: 1.2;
}
.brand-sub {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
  text-decoration: none;
  white-space: nowrap;
}
.nav-btn:hover {
  background: rgba(148, 163, 184, 0.10);
  border-color: var(--border);
  color: var(--text);
  text-decoration: none;
}
.nav-btn-support { color: #f6c28b; }
.nav-btn-support:hover {
  background: rgba(249, 115, 22, 0.10);
  border-color: rgba(249, 115, 22, 0.32);
  color: #fed7aa;
}
.nav-badge {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(61, 220, 151, 0.85);
  flex-shrink: 0;
}

/* Pre-Patch 1.0.0 Notice Banner */
.patch-banner {
  position: relative;
  z-index: 20;
  background: linear-gradient(90deg, rgba(229, 185, 98, 0.11), rgba(20, 27, 42, 0.92) 45%, rgba(56, 189, 248, 0.09));
  border-bottom: 1px solid rgba(229, 185, 98, 0.28);
}
.patch-banner-inner {
  max-width: 1580px;
  margin: 0 auto;
  padding: 8px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.patch-banner-copy {
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.4;
}
.patch-banner-copy strong { color: var(--text); }
.patch-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
  white-space: nowrap;
}
.patch-banner-link {
  color: var(--gold-bright);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.patch-banner-link:hover { color: #fef08a; }
.patch-banner-close {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.patch-banner-close:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: var(--border);
  color: var(--text);
}
@media (max-width: 768px) {
  .patch-banner-inner { padding: 8px 14px; align-items: flex-start; }
  .patch-banner-copy { font-size: 12px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: rgba(229, 185, 98, 0.5); transform: translateY(-1px); text-decoration: none; }
.btn:disabled { opacity: 0.42; cursor: not-allowed; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-ghost { background: rgba(23, 30, 46, 0.72); }
.btn-ghost-quiet {
  background: transparent;
  border-color: var(--border);
  color: var(--text-soft);
  font-weight: 600;
}
.btn-ghost-quiet:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.10);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost-quiet.is-pinned {
  border-color: rgba(192, 132, 252, 0.45);
  background: rgba(192, 132, 252, 0.12);
  color: #e9d5ff;
}
.btn-outline-gold {
  background: rgba(229, 185, 98, 0.09);
  border-color: var(--border-gold);
  color: var(--gold-bright);
}
.btn-outline-gold:hover:not(:disabled) {
  background: rgba(229, 185, 98, 0.18);
  border-color: var(--gold-bright);
  color: #fff8e1;
}
.btn-gold {
  background: linear-gradient(180deg, #eec46c, #b78028);
  border-color: #f7da92;
  color: #090b10;
  box-shadow: 0 4px 18px rgba(229, 185, 98, 0.22);
}
.btn-gold:hover:not(:disabled) { background: linear-gradient(180deg, #f7da92, #ca9032); }
.btn-cyan {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.24), rgba(14, 116, 144, 0.24));
  border-color: rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
}
.btn-saved {
  background: rgba(229, 185, 98, 0.10);
  border-color: rgba(229, 185, 98, 0.42);
  color: var(--gold-bright);
}
.btn-saved.is-saved {
  background: rgba(229, 185, 98, 0.24);
  border-color: var(--gold-bright);
  color: #fff8e1;
}
.saved-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(229, 185, 98, 0.22);
  font-family: var(--font-mono);
  font-size: 11px;
}
.btn-star {
  padding: 5px 8px;
  font-size: 13px;
  line-height: 1;
}
.btn-star.saved {
  border-color: var(--gold);
  background: rgba(229, 185, 98, 0.20);
  color: var(--gold-bright);
}
.btn-compare { background: rgba(192, 132, 252, 0.12); border-color: rgba(192, 132, 252, 0.38); color: #e9d5ff; }
.btn-support {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.20), rgba(194, 65, 12, 0.16));
  border-color: rgba(251, 146, 60, 0.55);
  color: #fed7aa;
  box-shadow: 0 2px 14px rgba(249, 115, 22, 0.14);
}
.btn-support:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.32), rgba(194, 65, 12, 0.24));
  border-color: #fb923c;
  color: #fff7ed;
  box-shadow: 0 4px 18px rgba(249, 115, 22, 0.28);
}
.footer-support-link { color: #fdba74; font-weight: 600; }
.footer-support-link:hover { color: #ffedd5; }
.compare-count {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(192, 132, 252, 0.24);
  font-family: var(--font-mono);
  font-size: 11px;
}
.btn-link {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
}
.btn-link:hover { text-decoration: underline; }

.icon-btn {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn.active { background: var(--gold-dim); border-color: var(--border-gold); color: var(--gold-bright); }

/* Shell */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1580px;
  margin: 0 auto;
  padding: 20px 22px 64px;
}

/* Hero Strip */
.hero-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 6px 2px 4px;
}

.hero-copy { min-width: 0; flex: 1 1 460px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.hero-copy h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.18;
  letter-spacing: 0.4px;
  background: linear-gradient(90deg, #fff5dc 0%, #e5b962 60%, #c68c32 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 780px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.btn-hero-matcher {
  padding: 10px 18px;
  font-size: 13.5px;
  border-radius: 10px;
}
.hero-cta-hint {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 768px) { .hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } }

.kpi-card {
  min-width: 0;
  background: linear-gradient(180deg, rgba(19, 25, 38, 0.92), rgba(12, 16, 24, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.kpi-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.65px; color: var(--muted); font-weight: 700; }
.kpi-value { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; white-space: nowrap; }
.kpi-sub { font-size: 11.5px; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Control Panel */
.control-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 15px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.control-primary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}

.control-group { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ctrl-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--muted); font-weight: 700; }

.control-search-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.control-search-cluster select,
.drawer-select,
.search-box input {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 12.5px;
}
.control-search-cluster select:focus,
.drawer-select:focus,
.search-box input:focus { border-color: var(--gold); }

.btn-filter-toggle {
  padding: 7px 12px;
  background: var(--bg-elev);
  border-color: var(--border);
  color: var(--text-soft);
  font-weight: 600;
}
.btn-filter-toggle:hover,
.btn-filter-toggle.open {
  border-color: var(--border-gold);
  color: var(--gold-bright);
  background: rgba(229, 185, 98, 0.08);
}
.filter-chevron {
  font-size: 11px;
  transition: transform 0.16s ease;
}
.btn-filter-toggle.open .filter-chevron { transform: rotate(180deg); }
.filter-active-badge {
  padding: 0 6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--gold);
  color: #090b10;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.active-filters-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
}
.af-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.af-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.af-chip:hover { background: rgba(229, 185, 98, 0.24); }

.more-filters-drawer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.more-filters-drawer[hidden] { display: none; }
.drawer-row {
  display: flex;
  align-items: flex-end;
  gap: 14px 18px;
  flex-wrap: wrap;
}
.drawer-clear-btn { margin-left: auto; align-self: flex-end; padding-bottom: 6px; }

/* Workspace Bar (Top Builds | Meta Analytics) */
.workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.workspace-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ws-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}
.ws-tab:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
}
.ws-tab.active {
  background: var(--panel);
  border-color: var(--border-gold);
  color: var(--gold-bright);
  box-shadow: 0 2px 12px rgba(229, 185, 98, 0.10);
}
.ws-tab-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.ws-tab.active .ws-tab-sub { color: var(--text-soft); }

.workspace-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.seg-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
}

.seg-btn {
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active {
  background: linear-gradient(180deg, rgba(229, 185, 98, 0.18), rgba(229, 185, 98, 0.08));
  border-color: var(--border-gold);
  color: var(--gold-bright);
  box-shadow: 0 0 12px rgba(229, 185, 98, 0.12);
}
.seg-btn small { font-size: 10.5px; opacity: 0.75; font-weight: 600; }
.seg-divider {
  width: 1px;
  align-self: stretch;
  margin: 4px 3px;
  background: var(--border-strong);
  opacity: 0.75;
}
.seg-btn-ssf {
  border-color: rgba(45, 212, 191, 0.22);
  color: #94d2c8;
}
.seg-btn-ssf:hover {
  color: #5eead4;
  border-color: rgba(45, 212, 191, 0.45);
}
.seg-btn-ssf.active {
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.20), rgba(45, 212, 191, 0.08));
  border-color: rgba(45, 212, 191, 0.60);
  color: #5eead4;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.14);
}
.seg-mini .seg-btn { padding: 4px 10px; font-size: 11.5px; }

.toggle-cluster { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.toggle-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  transition: all 0.15s ease;
}
.pill-toggle[aria-pressed="true"] {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
}
.pill-toggle[aria-pressed="true"] .toggle-indicator {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.pill-toggle-combo {
  padding: 6px 11px;
  border-color: rgba(245, 158, 11, 0.30);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(168, 85, 247, 0.10));
  color: #fde68a;
}
.pill-toggle-combo:hover {
  border-color: rgba(245, 158, 11, 0.58);
  color: #fef3c7;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.18);
}
.pill-toggle-combo[aria-pressed="true"] {
  border-color: rgba(245, 158, 11, 0.78);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(168, 85, 247, 0.24));
  color: #fef3c7;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.22), 0 0 18px rgba(168, 85, 247, 0.22);
}
.pill-toggle-combo[aria-pressed="true"] .toggle-indicator {
  border-color: #fbbf24;
  background: linear-gradient(135deg, #fbbf24, #c084fc);
  box-shadow: 0 0 9px rgba(251, 191, 36, 0.85);
}
.combo-filter-count {
  padding: 0 6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(168, 85, 247, 0.34));
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fef3c7;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.combo-filter-count[hidden] { display: none; }

.control-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
}

.class-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.class-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}
.class-pill:hover { border-color: var(--border-strong); color: var(--text); }
.class-pill.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--cls-color, var(--gold));
  color: var(--text);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.28);
}
.class-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cls-color, var(--gold)); }
.class-cnt { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }

.search-box { position: relative; display: flex; align-items: center; }
.search-box svg { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.search-box input { padding-left: 30px; width: 215px; }
.view-mode-btns { display: inline-flex; gap: 4px; }

.view-provenance {
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.14);
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.prov-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
}
.prov-dedicated { background: rgba(61, 220, 151, 0.12); color: var(--green); border: 1px solid rgba(61, 220, 151, 0.35); }
.prov-preview { background: rgba(229, 185, 98, 0.12); color: var(--gold-bright); border: 1px solid var(--border-gold); }

/* Visualization Workspace */
.analytics-section[hidden],
.builds-section[hidden] { display: none; }

.viz-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
@media (max-width: 1120px) { .viz-workspace { grid-template-columns: minmax(0, 1fr); } }

.viz-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15.5px;
  color: var(--gold-bright);
  letter-spacing: 0.4px;
}
.panel-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.scatter-wrap {
  position: relative;
  height: 360px;
  background: radial-gradient(circle at 50% 45%, rgba(23, 30, 46, 0.55), rgba(8, 11, 17, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
#scatterCanvas { width: 100%; height: 100%; display: block; cursor: crosshair; }

.scatter-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  min-width: 230px;
  max-width: 290px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(10, 13, 20, 0.96);
  border: 1px solid var(--border-gold);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  font-size: 12px;
}
.stt-head { font-weight: 800; font-size: 13px; color: var(--gold-bright); margin-bottom: 4px; }
.stt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; margin-top: 6px; }
.stt-grid span { color: var(--muted); font-size: 11px; }
.stt-grid strong { font-family: var(--font-mono); font-size: 11.5px; text-align: right; }

.scatter-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-soft);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; opacity: 0.9; }
.legend-item:hover { opacity: 1; color: var(--text); }

/* Class Meta Bars */
.class-bars { display: flex; flex-direction: column; gap: 8px; }
.cls-bar-row {
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.14s ease;
}
.cls-bar-row:hover { border-color: var(--border-strong); }
.cls-bar-row.active { border-color: var(--gold); background: rgba(229, 185, 98, 0.08); }
.cls-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px 10px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 5px;
}
.cls-bar-name { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cls-bar-cnt { color: var(--muted); font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.cls-bar-stats { font-family: var(--font-mono); font-size: 11px; color: var(--text-soft); }
.cls-bar-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  overflow: hidden;
}
.cls-bar-fill { height: 100%; border-radius: 999px; transition: width 0.35s ease; }

.asc-highlights-wrap { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.sub-hdr {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hint-muted { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); font-size: 11px; }

.asc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.asc-chip {
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: 11.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.asc-chip:hover { border-color: var(--border-gold); }
.asc-chip.active { border-color: var(--gold); background: var(--gold-dim); color: var(--gold-bright); }
.asc-chip .mono { font-size: 10.5px; color: var(--green); }

/* Builds Section */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.section-title-group { display: flex; align-items: center; gap: 10px; }
.section-title-group h2 { margin: 0; font-family: var(--font-display); font-size: 19px; color: var(--gold-bright); }
.result-count {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-soft);
}

.pinned-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pinned-lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.pinned-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(192, 132, 252, 0.14);
  border: 1px solid rgba(192, 132, 252, 0.4);
  font-size: 11.5px;
  font-weight: 600;
}
.pin-chip button { background: none; border: none; color: var(--muted); cursor: pointer; padding: 0; font-size: 12px; }
.pin-chip button:hover { color: var(--text); }

/* Build Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1200px) { .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .cards-grid { grid-template-columns: minmax(0, 1fr); } }

.empty-builds-state {
  grid-column: 1 / -1;
  padding: 36px 20px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px dashed var(--border-strong);
  color: var(--text-soft);
}
.empty-builds-state strong { display: block; font-size: 15px; color: var(--text); margin-bottom: 4px; }
.empty-builds-state p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }

.build-card {
  position: relative;
  background: linear-gradient(180deg, #111723, #0c1019);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
  min-width: 0;
}
.build-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cls-color, var(--gold)), color-mix(in srgb, var(--el-color, var(--gold)) 75%, transparent));
  opacity: 0.95;
  z-index: 4;
}
.build-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--cls-color, var(--gold)) 56%, rgba(229, 185, 98, 0.55));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.52), 0 0 0 1px color-mix(in srgb, var(--cls-color, var(--gold)) 22%, transparent);
}

/* Cinematic Card Banner */
.bc-banner {
  position: relative;
  height: 146px;
  padding: 12px 14px 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  isolation: isolate;
  background: #0a0e17;
}
.bc-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: brightness(0.86) contrast(1.06) saturate(1.05);
  transition: transform 0.35s ease, filter 0.25s ease;
  z-index: 0;
}
.build-card:hover .bc-banner-img {
  transform: scale(1.05);
  filter: brightness(0.95) contrast(1.08) saturate(1.12);
}
.bc-banner-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(7, 9, 14, 0.62) 0%, rgba(7, 9, 14, 0.14) 36%, rgba(11, 15, 24, 0.78) 76%, #111723 100%),
    radial-gradient(ellipse 75% 70% at 0% 100%, color-mix(in srgb, var(--cls-color, #e5b962) 26%, transparent), transparent 68%);
}

.bc-banner-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.bc-banner-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.rank-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(8, 12, 20, 0.86);
  border: 1px solid var(--border-gold);
  color: var(--gold-bright);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.archetype-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(8, 12, 20, 0.86);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}
.niche-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(8, 12, 20, 0.86);
  border: 1px solid rgba(56, 189, 248, 0.36);
  color: #7dd3fc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.bc-score-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.86);
  border: 1px solid rgba(229, 185, 98, 0.42);
  color: var(--gold-bright);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.bc-banner-title {
  position: relative;
  z-index: 2;
  min-width: 0;
}
.bc-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.bc-title-el {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(10, 14, 22, 0.78);
  border: 1px solid color-mix(in srgb, var(--el-color, #94a3b8) 45%, transparent);
  flex-shrink: 0;
}
.bc-skill {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}
.bc-asc {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cls-color, var(--cyan));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}
.bc-asc-sep,
.bc-class-sub { color: #cbd5e1; font-weight: 500; opacity: 0.82; }

/* Circular portraits (used in Matcher cards) */
.bc-portrait-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid color-mix(in srgb, var(--cls-color, var(--gold)) 68%, rgba(255, 255, 255, 0.18));
  background: #080b11;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
}
.bc-portrait {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.bc-portrait-sm { width: 48px; height: 48px; }
.bc-el-pip {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0b1019;
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}
.bc-el-pip-sm { width: 20px; height: 20px; right: -2px; bottom: -2px; }

.bc-body {
  padding: 11px 14px 13px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}

/* Mini Boss / Clear / Tank Profile Bars */
.bc-profile-bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.bc-pbar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.bc-pbar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
}
.bc-pbar-head strong {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-soft);
}
.bc-pbar-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}
.bc-pbar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.pbar-boss { background: linear-gradient(90deg, #d97706, #f7da92); }
.pbar-clear { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.pbar-tank { background: linear-gradient(90deg, #059669, #3ddc97); }

.bc-inspect-cue {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.bc-inspect-arrow {
  display: inline-block;
  transition: transform 0.16s ease;
}
.build-card:hover .bc-inspect-arrow { transform: translateX(3px); }

.tbl-asc-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}
.tbl-portrait {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border-strong);
  background: #080b11;
  flex-shrink: 0;
}
.tbl-skill-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.tbl-el-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.match-card-id {
  display: flex;
  align-items: center;
  gap: 11px;
}

.bc-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  background: rgba(7, 9, 14, 0.52);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
}
.bc-m { display: flex; flex-direction: column; min-width: 0; }
.bc-m-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); font-weight: 600; }
.bc-m strong { font-family: var(--font-mono); font-size: 13.5px; margin-top: 2px; white-space: nowrap; line-height: 1.25; }
.bc-m-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; }

.bc-gems-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.gem-chip-mini {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.g-str { border-color: rgba(248, 113, 113, 0.38); color: #fca5a5; background: rgba(248, 113, 113, 0.09); }
.g-dex { border-color: rgba(74, 222, 128, 0.38); color: #86efac; background: rgba(74, 222, 128, 0.09); }
.g-int { border-color: rgba(96, 165, 250, 0.38); color: #93c5fd; background: rgba(96, 165, 250, 0.09); }
.g-spirit { border-color: rgba(45, 212, 191, 0.42); color: #5eead4; background: rgba(45, 212, 191, 0.09); }
.g-lineage { border-color: rgba(247, 218, 146, 0.52); color: var(--gold-bright); background: rgba(229, 185, 98, 0.14); }
.g-white { border-color: var(--border-strong); color: var(--text-soft); }

.bc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.micro-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.09);
  border: 1px solid var(--border);
  color: var(--text-soft);
}
.micro-tag.ks { border-color: rgba(229, 185, 98, 0.4); color: var(--gold-bright); }
.micro-tag.uniq { border-color: rgba(249, 115, 22, 0.45); color: #fdba74; background: rgba(249, 115, 22, 0.09); }
.micro-tag.combo { border-color: rgba(192, 132, 252, 0.4); color: #d8b4fe; }
.micro-tag.ws { border-color: rgba(56, 189, 248, 0.4); color: #7dd3fc; }

/* Engine-Discovered Combo Glowing Badge & Modal Callout */
.bc-combo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.engine-combo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #fef3c7;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(168, 85, 247, 0.30));
  border: 1px solid rgba(251, 191, 36, 0.62);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.22), 0 0 16px rgba(168, 85, 247, 0.24);
  white-space: nowrap;
  cursor: help;
}
.engine-combo-badge.compact {
  padding: 2px 7px;
  font-size: 10.5px;
}
.combo-callout {
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.11), rgba(168, 85, 247, 0.13) 55%, rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(251, 191, 36, 0.48);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.14), inset 0 1px 0 rgba(253, 230, 138, 0.14);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.combo-callout[hidden] { display: none; }
.combo-callout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.combo-callout-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.combo-callout-label {
  font-size: 14.5px;
  font-weight: 800;
  color: #fef3c7;
}
.combo-callout-lifts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.combo-lift-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  background: rgba(9, 13, 22, 0.72);
}
.combo-lift-pill.syn { color: #e9d5ff; border-color: rgba(192, 132, 252, 0.55); }
.combo-lift-pill.dps { color: #86efac; border-color: rgba(61, 220, 151, 0.50); }
.combo-lift-pill.ehp { color: #7dd3fc; border-color: rgba(56, 189, 248, 0.50); }
.combo-lift-pill.axis { color: #fde68a; border-color: rgba(251, 191, 36, 0.50); }
.combo-callout-pieces {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.combo-piece-chip {
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #fde68a;
  background: rgba(10, 14, 24, 0.75);
  border: 1px solid rgba(251, 191, 36, 0.36);
}
.combo-piece-plus {
  color: #c084fc;
  font-weight: 800;
  font-size: 12px;
}
.combo-callout-summary {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-soft);
}

.bc-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bc-score { font-family: var(--font-mono); font-size: 12px; color: var(--gold-bright); font-weight: 800; }
.bc-btns { display: flex; gap: 6px; }

/* Table View */
.table-container {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}
.builds-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.builds-table th {
  text-align: left;
  padding: 11px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.builds-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
  vertical-align: middle;
}
.builds-table tbody tr { cursor: pointer; transition: background 0.13s; }
.builds-table tbody tr:hover { background: rgba(229, 185, 98, 0.07); }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(3, 5, 9, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-backdrop.open { display: flex; }

.modal-dialog {
  width: 100%;
  max-height: 92vh;
  background: var(--panel);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.78);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-xl { max-width: 1400px; }
.modal-lg { max-width: 980px; }
.modal-md { max-width: 680px; }

.modal-sticky-head {
  padding: 14px 20px;
  background: linear-gradient(180deg, #181f2f, #121723);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.modal-sticky-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold-bright);
}
.insp-subtitle { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; }
.insp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.insp-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 15px;
}
.modal-close:hover { border-color: var(--gold); color: var(--gold-bright); }

.insp-body {
  padding: 18px 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 1080px) { .insp-hero-grid { grid-template-columns: minmax(0, 1fr); } }

.tree-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tree-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.tree-tools-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mini-check { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-soft); cursor: pointer; }
.mini-check input { accent-color: var(--gold); }
.tree-search {
  width: 130px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 11.5px;
}
.zoom-btns { display: inline-flex; gap: 4px; }

.tree-canvas-wrap {
  position: relative;
  height: 460px;
  background: radial-gradient(circle at 50% 50%, #101625 0%, #06080d 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
#inspectorTreeCanvas, #compareTreeCanvas { width: 100%; height: 100%; display: block; cursor: grab; }
#inspectorTreeCanvas:active, #compareTreeCanvas:active { cursor: grabbing; }

.tree-stats-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(7, 9, 14, 0.84);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-soft);
  pointer-events: none;
}

.tree-node-tooltip {
  position: absolute;
  z-index: 25;
  pointer-events: none;
  min-width: 220px;
  max-width: 310px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 11, 18, 0.96);
  border: 1px solid var(--border-gold);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  font-size: 12px;
}
.tnt-title { font-weight: 800; color: var(--gold-bright); font-size: 13px; }
.tnt-meta { font-size: 11px; color: var(--cyan); margin: 2px 0 6px; }
.tnt-stats { margin: 0; padding-left: 14px; color: var(--text-soft); font-size: 11.5px; }
.tnt-stats li { margin-bottom: 2px; }

.tree-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-soft);
}
.tree-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot-lg { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-gold { background: #f7da92; box-shadow: 0 0 6px #f7da92; }
.dot-ws1 { background: #fb7185; box-shadow: 0 0 6px #fb7185; }
.dot-ws2 { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }
.dot-ks { background: #f59e0b; transform: rotate(45deg); border-radius: 2px; }
.dot-jewel { background: #3ddc97; }
.dot-anoint { background: #c084fc; }

.metrics-col { display: flex; flex-direction: column; gap: 12px; }
.radar-card, .combat-grid-card, .sub-panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
}
.radar-wrap { display: flex; align-items: center; justify-content: center; }

.pob-flag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(61, 220, 151, 0.14);
  color: var(--green);
  border: 1px solid rgba(61, 220, 151, 0.35);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 580px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-cell {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 9px;
}
.stat-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.stat-val { font-size: 13.5px; font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }

.insp-mid-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 980px) { .insp-mid-grid { grid-template-columns: minmax(0, 1fr); } }

/* Gem Link Groups */
.gem-groups-list { display: flex; flex-direction: column; gap: 9px; }
.gem-group-row {
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--border);
}
.gem-group-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.gem-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.gem-link-line { width: 12px; height: 2px; background: rgba(229, 185, 98, 0.5); }
.gem-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  cursor: default;
}
.gem-chip.main-gem { font-weight: 800; box-shadow: 0 0 10px rgba(229, 185, 98, 0.16); }

/* Keystones / Notables / Uniques */
.highlights-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.hl-card {
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.hl-card.clickable { cursor: pointer; }
.hl-card.clickable:hover { border-color: var(--gold); }
.hl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.hl-name { font-weight: 700; font-size: 13px; color: var(--gold-bright); }
.hl-type { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(148, 163, 184, 0.12); color: var(--text-soft); }
.hl-lines { margin: 0; padding-left: 14px; font-size: 11.5px; color: var(--text-soft); }
.hl-lines li { margin-bottom: 2px; }

/* Bottom Leveling / Gear / Raw Code */
.insp-bottom-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.insp-bottom-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.trade-league-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
}
.trade-league-picker label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; font-size: 10px; }
.trade-league-select, .trade-league-custom {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 700;
  outline: none;
}
.trade-league-select:focus, .trade-league-custom:focus { border-color: var(--gold); }
.trade-league-custom { width: 128px; }

.trade-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(229, 185, 98, 0.5);
  background: linear-gradient(180deg, rgba(229, 185, 98, 0.18), rgba(229, 185, 98, 0.08));
  color: var(--gold-bright);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.14s ease;
}
.trade-btn:hover {
  border-color: var(--gold-bright);
  background: linear-gradient(180deg, rgba(229, 185, 98, 0.30), rgba(229, 185, 98, 0.14));
  color: #fff8e1;
  transform: translateY(-1px);
}
.trade-btn.unique-trade {
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(249, 115, 22, 0.14);
  color: #fdba74;
}
.trade-btn.unique-trade:hover {
  border-color: #fb923c;
  background: rgba(249, 115, 22, 0.28);
  color: #ffedd5;
}
.trade-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 9px;
  background: rgba(229, 185, 98, 0.07);
  border: 1px solid rgba(229, 185, 98, 0.25);
  font-size: 12px;
  color: var(--text-soft);
}
.trade-banner strong { color: var(--gold-bright); }

.leveling-table tbody tr.stage-row-active {
  background: rgba(229, 185, 98, 0.09);
}
.stage-gear-drawer {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 11px;
  background: var(--bg);
  border: 1px solid var(--border-gold);
}
.stage-gear-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.stage-gear-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stage-lvl-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan);
}
.stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.stage-pill {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}
.stage-pill:hover { border-color: var(--border-gold); color: var(--text); }
.stage-pill.active {
  border-color: var(--gold);
  background: var(--gold-dim);
  color: var(--gold-bright);
}
.stage-pill small { font-weight: 500; opacity: 0.78; margin-left: 3px; }

.leveling-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.leveling-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.leveling-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
  vertical-align: top;
}
.pivot-pill {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(192, 132, 252, 0.18);
  color: var(--violet);
  font-size: 10.5px;
  font-weight: 700;
}

.gear-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 900px) { .gear-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gear-grid { grid-template-columns: 1fr; } }

.gear-slot-card {
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.gear-slot-card.unique { border-color: rgba(249, 115, 22, 0.5); background: linear-gradient(180deg, rgba(249, 115, 22, 0.08), var(--panel)); }
.gear-slot-card.equipped {
  border-color: rgba(61, 220, 151, 0.52);
  background: linear-gradient(180deg, rgba(61, 220, 151, 0.09), var(--panel));
}
.gear-slot-card.equipped .gs-mods { opacity: 0.62; }
.gs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}
.gs-top-right { display: inline-flex; align-items: center; gap: 5px; }
.gs-check-btn {
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}
.gs-check-btn:hover { border-color: var(--green); color: var(--green); }
.gs-check-btn.checked {
  border-color: rgba(61, 220, 151, 0.6);
  background: rgba(61, 220, 151, 0.18);
  color: var(--green);
}

/* Saved Builds Modal & PoB2 Importer */
.pob-import-box {
  padding: 13px 14px;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border-gold);
}
.pob-import-textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11.5px;
  resize: vertical;
  outline: none;
}
.pob-import-textarea:focus { border-color: var(--gold); }
.pob-import-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.pob-import-name {
  flex: 1;
  min-width: 200px;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
  outline: none;
}
.pob-import-name:focus { border-color: var(--gold); }
.pob-import-err {
  margin-top: 7px;
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fca5a5;
  font-size: 12px;
}

.saved-builds-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.saved-empty {
  padding: 24px 16px;
  text-align: center;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px dashed var(--border-strong);
  color: var(--muted);
  font-size: 13px;
}
.saved-card {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.saved-card.archived { border-color: rgba(245, 158, 11, 0.45); }
.saved-card.imported { border-color: rgba(56, 189, 248, 0.45); }
.saved-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.saved-card-title { font-size: 15px; font-weight: 800; color: var(--text); }
.saved-card-meta { font-size: 11.5px; color: var(--text-soft); margin-top: 2px; }
.saved-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.saved-pill.live { color: var(--green); border-color: rgba(61, 220, 151, 0.4); background: rgba(61, 220, 151, 0.10); }
.saved-pill.archived { color: var(--gold-bright); border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.12); }
.saved-pill.imported { color: var(--cyan); border-color: rgba(56, 189, 248, 0.45); background: rgba(56, 189, 248, 0.12); }
.saved-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.saved-note-input {
  flex: 1;
  min-width: 170px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-soft);
  font-size: 11.5px;
  outline: none;
}
.saved-note-input:focus { border-color: var(--gold); color: var(--text); }
.saved-card-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gs-slot { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
.gs-name { font-weight: 800; font-size: 13px; color: var(--gold-bright); margin: 2px 0; }
.gear-slot-card.unique .gs-name { color: #fb923c; }
.gs-base { font-size: 11.5px; color: var(--text-soft); margin-bottom: 5px; }
.gs-mods { margin: 0; padding-left: 14px; font-size: 11px; color: #93c5fd; flex: 1; }
.gs-trade-foot {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pob-code-area {
  width: 100%;
  min-height: 110px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--green);
  resize: vertical;
}

/* Comparator */
.cmp-header-cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 780px) { .cmp-header-cards { grid-template-columns: minmax(0, 1fr); } }
.cmp-build-banner {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
}
.cmp-build-banner.a { border-left: 4px solid #f97316; }
.cmp-build-banner.b { border-left: 4px solid #38bdf8; }
.cmp-select {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
}
.cmp-select:focus { border-color: var(--gold); }

.cmp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; }
@media (max-width: 1020px) { .cmp-grid { grid-template-columns: minmax(0, 1fr); } }

.cmp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cmp-table th, .cmp-table td { padding: 7px 9px; border-bottom: 1px solid rgba(148, 163, 184, 0.09); }
.cmp-table th { font-size: 11px; text-transform: uppercase; color: var(--muted); text-align: left; }
.cmp-win { color: var(--green); font-weight: 800; }

/* Matcher Wizard */
.matcher-step { margin-bottom: 16px; }
.matcher-step h3 { margin: 0 0 8px; font-size: 13.5px; color: var(--gold-bright); }
.matcher-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.matcher-opts.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 680px) { .matcher-opts.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.matcher-opt {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  text-align: left;
  cursor: pointer;
  transition: all 0.14s ease;
}
.matcher-opt:hover { border-color: var(--border-strong); }
.matcher-opt.active { border-color: var(--gold); background: var(--gold-dim); }
.matcher-opt strong { display: block; font-size: 13px; color: var(--text); }
.matcher-opt span { font-size: 11.5px; color: var(--muted); }

.matcher-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
@media (max-width: 860px) { .matcher-results { grid-template-columns: minmax(0, 1fr); } }
.match-card {
  min-width: 0;
  padding: 13px;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border-gold);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.match-card .btn { margin-top: auto; }
.match-reasons { margin: 0; padding-left: 16px; font-size: 12px; color: var(--text-soft); }

/* Methodology & Genetic Evolution Modal */
.hero-how-link {
  display: inline;
  padding: 0;
  margin-left: 0;
  border: none;
  background: transparent;
  color: var(--gold-bright);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero-how-link:hover { color: #fef08a; }
.method-copy { gap: 12px; }
.evo-pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 8px;
}
@media (max-width: 720px) {
  .evo-pipeline { grid-template-columns: 1fr; }
  .evo-arrow { display: none; }
}
.evo-step {
  padding: 11px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 38, 0.6));
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.evo-badge {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.14);
  padding: 2px 7px;
  border-radius: 999px;
}
.evo-step strong { font-size: 13px; color: var(--text); }
.evo-step p { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--text-soft); }
.evo-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  opacity: 0.8;
}
.method-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
}
.method-item h4 { margin: 0 0 4px; color: var(--gold-bright); font-size: 13.5px; }
.method-item p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--text-soft); }
.method-item-evo {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.07), rgba(15, 23, 38, 0.55));
}
.method-item-note {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, rgba(229, 185, 98, 0.08), rgba(15, 23, 38, 0.55));
}

/* Floating Rich Tooltip */
.rich-tooltip {
  position: fixed;
  z-index: 120;
  pointer-events: none;
  max-width: 340px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 11, 18, 0.97);
  border: 1px solid var(--border-gold);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.75);
  font-size: 12px;
}
.rt-title { font-weight: 800; color: var(--gold-bright); font-size: 13px; }
.rt-sub { font-size: 11px; color: var(--cyan); margin: 2px 0 6px; }
.rt-body { color: var(--text-soft); font-size: 11.5px; line-height: 1.45; }

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 140;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(15, 23, 38, 0.96);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  background: rgba(8, 11, 17, 0.72);
  padding: 16px 22px;
}
.footer-inner {
  max-width: 1580px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 6px 10px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-caveat {
  max-width: 1580px;
  margin: 10px auto 0;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}
.footer-caveat strong { color: var(--text-soft); font-weight: 700; }

/* Responsive Refinements */
@media (max-width: 960px) {
  .control-search-cluster { margin-left: 0; width: 100%; }
  .search-box { flex: 1 1 200px; }
  .search-box input { width: 100%; }
}

@media (max-width: 768px) {
  .topbar { position: static; }
  .topbar-inner { padding: 10px 14px; gap: 10px; }
  .topbar-actions { width: 100%; justify-content: flex-start; gap: 4px; }
  .nav-btn { padding: 5px 9px; font-size: 12px; }
  .shell { padding: 14px 14px 48px; }
  .hero-strip { gap: 14px; margin-bottom: 14px; }
  .hero-cta { align-items: flex-start; width: 100%; }
  .btn-hero-matcher { width: 100%; }
  .control-panel { padding: 12px; }
  .workspace-bar { gap: 8px; }
  .ws-tab { padding: 7px 11px; font-size: 13px; }
  .ws-tab-sub { display: none; }
  .site-footer { padding: 14px; }

  /* Mobile Modal Chrome */
  .modal-backdrop { padding: 6px; align-items: flex-end; }
  .modal-dialog { max-height: 94vh; border-radius: 14px; overflow-y: auto; }
  .modal-sticky-head { padding: 11px 13px; gap: 8px; flex-shrink: 0; }
  .modal-sticky-head h2 { font-size: 16.5px; }
  .insp-actions { gap: 5px; }
  .insp-actions .btn-sm { padding: 5px 8px; font-size: 11px; }
  .insp-body { padding: 12px 13px 20px; gap: 12px; overflow-y: visible; }
  .tree-canvas-wrap { height: 290px; }
  .scatter-wrap { height: 300px; }
}

@media (max-width: 520px) {
  .bc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-footer { flex-wrap: wrap; }
  .control-search-cluster select,
  .btn-filter-toggle { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
