*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-hover: #f0f1f3;
  --surface-alt: #e8eaed;
  --border: #d1d5db;
  --border-light: #e5e7eb;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-text: #ffffff;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --radius: 8px;
  --radius-sm: 4px;
  --header-h: 56px;
  --sidebar-w: 260px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --transition: .15s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;
    --surface: #1f2937;
    --surface-hover: #273548;
    --surface-alt: #374151;
    --border: #4b5563;
    --border-light: #374151;
    --text: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: #1e3a5f;
    --danger: #ef4444;
    --danger-light: #3b1a1a;
    --shadow: 0 1px 3px rgba(0,0,0,.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,.3);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.4);
  }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  height: var(--header-h);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--primary);
}
.tagline {
  font-size: .85rem;
  color: var(--text-secondary);
  display: none;
}
@media (min-width: 600px) {
  .tagline { display: inline; }
}

.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
}
@media (max-width: 899px) {
  .sidebar-toggle { display: block; }
}

/* Layout */
.layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 16px 0;
  display: flex;
  gap: 12px;
  align-items: stretch;
  min-height: calc(100vh - var(--header-h));
}
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  height: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 899px) {
  .sidebar {
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-lg);
    width: 300px;
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--header-h);
    z-index: 89;
    background: rgba(0,0,0,.4);
  }
  .sidebar-overlay.open { display: block; }
}

.content {
  flex: 1;
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Sidebar Sections */
.sidebar-section {
  margin-bottom: 20px;
}
.sidebar-section h3 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.filter-group {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-group::-webkit-scrollbar { width: 4px; }
.filter-group::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  padding: 3px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.filter-label:hover { background: var(--surface-hover); }
.filter-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.filter-label .count {
  margin-left: auto;
  color: var(--text-muted);
  font-size: .78rem;
}

.filter-loading {
  font-size: .85rem;
  color: var(--text-muted);
  font-style: italic;
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.range-inputs input[type="number"] {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
/* Quick Filters */
.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.qf-btn {
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.qf-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Filter Stats */
.filter-stats {
  font-size: .78rem;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}
.stat-row .stat-val {
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
.tier-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.tier-dot.flagship { background: #6366f1; }
.tier-dot.ultra { background: #06b6d4; }
.tier-dot.high { background: #22c55e; }
.tier-dot.mid { background: #eab308; }
.tier-dot.entry { background: #6b7280; }

.range-inputs input[type="number"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
.range-inputs span {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Search in sidebar */
#search {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
#search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
#search::placeholder { color: var(--text-muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--primary);
  color: var(--primary-text);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-hover); }
#clear-filters, #clear-filters-empty { width: 100%; justify-content: center; }

/* Controls Bar */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.controls-left { display: flex; align-items: center; gap: 12px; }
.controls-right { display: flex; align-items: center; gap: 8px; }
.result-count {
  font-size: .85rem;
  color: var(--text-secondary);
}

.compare-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.compare-toggle:hover { background: var(--surface-hover); }
.compare-toggle input { accent-color: var(--primary); }

/* Table */
.table-wrapper {
  overflow: hidden;
  flex: 1;
  position: relative;
}
#cpu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
#cpu-table th {
  background: var(--surface-alt);
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 1;
}
#cpu-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
#cpu-table tbody tr {
  transition: background var(--transition);
  cursor: pointer;
}
#cpu-table tbody tr:hover { background: var(--surface-hover); }
#cpu-table tbody tr.selected { background: var(--primary-light); }
#cpu-table tbody tr:last-child td { border-bottom: none; }

#cpu-table .col-check { width: 40px; text-align: center; }
#cpu-table .col-check input { accent-color: var(--primary); }
#cpu-table .col-name { min-width: 180px; }
#cpu-table .col-cores { width: 80px; text-align: center; }
#cpu-table .col-clock { width: 120px; }
#cpu-table .col-socket { width: 130px; }
#cpu-table .col-process { width: 90px; text-align: center; }
#cpu-table .col-tdp { width: 70px; text-align: center; }
#cpu-table .col-released { width: 100px; }
#cpu-table .col-passmark { width: 120px; text-align: center; white-space: nowrap; }

.pm-bar-wrap {
  display: inline-block;
  width: 55px;
  height: 7px;
  background: var(--surface-alt);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 4px;
}
.pm-bar {
  height: 100%;
  border-radius: 3px;
  transition: width .3s ease;
}
.pm-bar.tier-low { background: linear-gradient(90deg, #ef4444, #f97316); }
.pm-bar.tier-med { background: linear-gradient(90deg, #f97316, #eab308); }
.pm-bar.tier-high { background: linear-gradient(90deg, #eab308, #22c55e); }
.pm-bar.tier-ultra { background: linear-gradient(90deg, #22c55e, #06b6d4); }
.pm-bar.tier-flagship { background: linear-gradient(90deg, #06b6d4, #6366f1); }

.pm-score {
  font-variant-numeric: tabular-nums;
  font-size: .78rem;
  vertical-align: middle;
  color: var(--text-secondary);
  transition: color var(--transition);
}
#cpu-table tbody tr:hover .pm-score {
  color: var(--text);
}

/* Best score highlight in compare modal */
.compare-table .best-val {
  font-weight: 700;
  color: var(--primary);
}
.compare-table .best-val::after {
  content: ' ★';
  font-size: .7rem;
  color: #eab308;
}

.name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cpu-name-link {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.cpu-name-link:hover { color: var(--primary); text-decoration: none; }
tr:hover .cpu-name-link { color: var(--primary); }

.tier-badge {
  font-size: .6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.4;
  flex-shrink: 0;
  opacity: .85;
}
.tier-badge.tier-flagship { background: #6366f1; color: #fff; }
.tier-badge.tier-ultra { background: #06b6d4; color: #fff; }
.tier-badge.tier-high { background: #22c55e; color: #fff; }
.tier-badge.tier-med { background: #eab308; color: #000; }
.tier-badge.tier-low { background: #6b7280; color: #fff; }

.cpu-codename {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Sortable Columns */
.sortable { cursor: pointer; }
.sortable:hover { color: var(--text); }
.sortable .sort-icon { display: inline-block; width: 12px; text-align: center; font-size: .7rem; color: var(--text-muted); }
.sortable.sorted-asc .sort-icon::after { content: "▲"; color: var(--primary); }
.sortable.sorted-desc .sort-icon::after { content: "▼"; color: var(--primary); }
.sortable:not(.sorted-asc):not(.sorted-desc) .sort-icon::after { content: "▲"; opacity: .25; }

/* Empty & Loading States */
.empty-state, .loading-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  text-align: center;
  gap: 12px;
}
.empty-state.visible, .loading-state.visible { display: flex; }
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pagination .page-btn {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: .82rem;
  cursor: pointer;
  transition: all var(--transition);
}
.pagination .page-btn:hover { background: var(--surface-hover); border-color: var(--primary); color: var(--primary); }
.pagination .page-btn.active { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.pagination .page-btn:disabled { opacity: .4; cursor: default; }
.pagination .page-btn:disabled:hover { background: var(--surface); border-color: var(--border); color: var(--text); }
.pagination .page-info {
  font-size: .82rem;
  color: var(--text-secondary);
  padding: 0 8px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: modal-in .2s ease;
}
.modal-sm { max-width: 500px; }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-body.table-wrapper { border: none; border-radius: 0; }

/* Compare Table */
.compare-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.compare-table th, .compare-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
}
.compare-table th {
  background: var(--surface-alt);
  font-weight: 600;
  font-size: .8rem;
  white-space: nowrap;
}
.compare-table .spec-label {
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  background: var(--surface);
}
.compare-table .cpu-col { min-width: 160px; }
.compare-table .cpu-col h3 { font-size: .9rem; margin-bottom: 2px; }
.compare-table .cpu-col em { font-size: .78rem; color: var(--text-muted); font-style: normal; }

/* Detail Modal */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  font-size: .85rem;
}
.detail-grid .label {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 6px 8px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.detail-grid .value {
  padding: 6px 8px;
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.detail-link {
  display: block;
  margin-top: 12px;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  html { font-size: 14px; }
  .layout { flex-direction: column; }
  #cpu-table .col-socket,
  #cpu-table .col-process,
  #cpu-table .col-passmark { display: none; }
  .controls-bar { flex-direction: column; align-items: stretch; }
  .controls-right { justify-content: flex-end; }
}

@media (max-width: 480px) {
  #cpu-table .col-cores { display: none; }
  .modal { max-height: 90vh; }
}

/* Tab Bar */
.tab-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-left: auto;
  align-self: stretch;
}
.tab-btn {
  padding: 0 18px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition), border-color var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
@media (max-width: 600px) {
  .tab-btn { padding: 0 10px; font-size: .78rem; }
}

/* Tab Content Visibility */
.tab-content { display: none; }
.tab-content.active { display: revert; }
tbody.tab-content.active { display: table-row-group; }

/* GPU Table Columns */
#cpu-table .col-g3d { width: 100px; text-align: center; white-space: nowrap; }
#cpu-table .col-g2d { width: 100px; text-align: center; white-space: nowrap; }
#cpu-table .col-type { width: 80px; text-align: center; }
#cpu-table .col-category { width: 100px; text-align: center; }
#cpu-table .col-bus { width: 120px; }
#cpu-table .col-memsize { width: 90px; text-align: center; }

/* GPU Brand Badges */
.type-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.4;
}
.type-badge.amd { background: #ef4444; color: #fff; }
.type-badge.intel { background: #3b82f6; color: #fff; }
.type-badge.nvidia { background: #22c55e; color: #fff; }
.type-badge.other { background: var(--text-muted); color: #fff; }

/* Mobile responsive hiding */
@media (max-width: 768px) {
  #cpu-table .col-g3d,
  #cpu-table .col-g2d,
  #cpu-table .col-type,
  #cpu-table .col-category,
  #cpu-table .col-bus,
  #cpu-table .col-memsize { display: none; }
}

/* Detail Modal Enhancements */
.modal-lg { max-width: 900px; }

.detail-page { display: flex; flex-direction: column; gap: 16px; }

.detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-header .detail-name { font-size: 1.1rem; font-weight: 700; }
.detail-header .detail-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.detail-header .detail-badge.badge-flagship { background: #6366f1; color: #fff; }
.detail-header .detail-badge.badge-ultra { background: #06b6d4; color: #fff; }
.detail-header .detail-badge.badge-high { background: #22c55e; color: #fff; }
.detail-header .detail-badge.badge-mid { background: #eab308; color: #000; }
.detail-header .detail-badge.badge-entry { background: #6b7280; color: #fff; }
.detail-header .detail-type-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.detail-header .detail-type-badge.amd { background: #ef4444; color: #fff; }
.detail-header .detail-type-badge.intel { background: #3b82f6; color: #fff; }
.detail-header .detail-type-badge.nvidia { background: #22c55e; color: #fff; }
.detail-header .detail-type-badge.other { background: var(--text-muted); color: #fff; }
.detail-header .detail-type-badge.integrated { background: var(--text-muted); color: #fff; }

.detail-chart-section {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.detail-chart-section svg { width: 100%; display: block; overflow: visible; }
.detail-chart-section .chart-title {
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.detail-equivalent {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: .85rem;
  color: var(--text);
  border-left: 3px solid var(--primary);
}
.detail-equivalent strong { font-weight: 700; }

.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  font-size: .85rem;
}
.detail-specs .spec-label {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 6px 8px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.detail-specs .spec-value {
  padding: 6px 8px;
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.detail-similar {
  padding-top: 4px;
}
.detail-similar h4 {
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.detail-similar-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.similar-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .78rem;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface);
  color: var(--text);
}
.similar-chip:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.similar-chip .chip-score {
  color: var(--text-muted);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.bar-label {
  font-size: 11px;
  fill: var(--text-secondary);
  font-family: var(--font);
}
.bar-label.highlight { fill: var(--text); font-weight: 600; }
.bar-average-line {
  stroke-dasharray: 5 4;
  stroke-width: 1.5;
}
.bar-average-line.avg-tier { stroke: var(--danger); }
.bar-average-line.avg-latest { stroke: var(--primary); }
.bar-average-label {
  font-size: 10px;
  font-family: var(--font);
  fill: var(--text-muted);
}
.bar-average-label.avg-tier { fill: var(--danger); }
.bar-average-label.avg-latest { fill: var(--primary); }

.footer {
  text-align: center;
  padding: 16px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  margin-top: 24px;
}
.footer a {
  color: var(--primary);
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}
