:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-muted: #f0f2f5;
  --border: #dfe3e9;
  --text: #111827;
  --text-muted: #4b5563;
  --accent: #0ea5e9;
  --accent-dark: #0f172a;
  --shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.4);
  --section-global: rgba(34, 197, 94, 0.22);
  --section-global-alt: rgba(34, 197, 94, 0.3);
  --section-core: rgba(14, 165, 233, 0.24);
  --section-core-alt: rgba(14, 165, 233, 0.32);
  --section-performance: rgba(129, 140, 248, 0.22);
  --section-performance-alt: rgba(129, 140, 248, 0.3);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f5f7;
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 55%), var(--bg);
  color: #111827;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.9), rgba(14, 165, 233, 0.85));
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.75rem 0 2rem;
  box-shadow: 0 30px 60px -40px rgba(15, 23, 42, 0.7);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-end;
  justify-content: space-between;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  margin: 0 0 0.5rem 0;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin: 0 0 0.75rem 0;
}

.lead {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0.7rem 1.2rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px -18px rgba(15, 23, 42, 0.4);
}

.btn-dark {
  color: #fff;
  background: linear-gradient(135deg, #111827, #1f2937);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-outline {
  color: #111827;
  color: var(--text);
  background: #fff;
  border-color: #dfe3e9;
  border-color: var(--border);
}

.page-header .btn-outline {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

main {
  padding: 2.5rem 0 4rem;
}

.use-case-panel {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.use-case-panel-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.use-case-panel-header h2 {
  margin: 0 0 0.4rem 0;
  font-size: 1.35rem;
}

.use-case-panel-header p {
  margin: 0;
  color: #4b5563;
  color: var(--text-muted);
}

.use-case-panel-note {
  max-width: min(320px, 100%);
  font-size: 0.9rem;
  text-align: right;
}

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

@media (max-width: 880px) {
  .use-case-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .use-case-panel-note {
    text-align: left;
  }

  .use-case-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .use-case-card {
    align-items: flex-start;
    gap: 0.85rem;
  }

  .use-case-image {
    width: 64px;
    height: 64px;
  }

  .use-case-text strong {
    line-height: 1.35;
  }
}

.use-case-card {
  position: relative;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  padding-right: 3.25rem;
  border-radius: 16px;
  border: 1px solid #dfe3e9;
  border: 1px solid var(--border);
  background: #f0f2f5;
  background: var(--surface-muted);
  cursor: pointer;
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  isolation: isolate;
  outline: none;
}

.use-case-card:hover {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 18px 32px -28px rgba(15, 23, 42, 0.45);
  transform: translateY(-2px);
}

.use-case-card:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.55);
  outline-offset: 2px;
}

.use-case-card[data-checked="true"] {
  border-color: rgba(14, 165, 233, 0.9);
  box-shadow: 0 22px 38px -28px rgba(14, 165, 233, 0.55);
  background: rgba(14, 165, 233, 0.12);
}

.use-case-card input[type="checkbox"] {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.use-case-indicator {
  pointer-events: none;
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  border: 2px solid #dfe3e9;
  border: 2px solid var(--border);
  background: #ffffff;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: transparent;
  transition: background 0.2s ease, border 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.use-case-indicator::before {
  content: "";
}

.use-case-card[data-checked="true"] .use-case-indicator {
  background: #0ea5e9;
  background: var(--accent);
  border-color: #0ea5e9;
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.18);
}

.use-case-card[data-checked="true"] .use-case-indicator::before {
  content: "✓";
}

.use-case-image {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.use-case-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.use-case-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.use-case-text strong {
  font-size: 0.95rem;
  color: #111827;
  color: var(--text);
}

.use-case-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(15, 23, 42, 0.6);
}

.use-case-summary {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
  color: var(--text-muted);
}

.use-case-reasons {
  display: grid;
  gap: 0.75rem;
}

.use-case-reason {
  position: relative;
  padding: 0.85rem 1rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(79, 70, 229, 0.16);
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.08));
  box-shadow: 0 18px 35px -28px rgba(17, 24, 39, 0.45);
}

.use-case-reason__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.16);
  color: #312e81;
  color: rgba(49, 46, 129, 0.95);
  margin-bottom: 0.4rem;
}

.use-case-reason__text {
  margin: 0;
  color: rgba(17, 24, 39, 0.85);
  line-height: 1.45;
}

.metric-distribution {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.metric-distribution__caption {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(17, 24, 39, 0.7);
}

.metric-distribution__bar {
  position: relative;
  display: flex;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

.metric-distribution__segment {
  flex: 0 0 var(--segment-width, 0%);
  background: var(--segment-color, var(--accent));
  transition: flex-basis 0.45s ease, opacity 0.45s ease;
  opacity: 0.95;
}

.metric-distribution__segment:first-child {
  border-top-left-radius: inherit;
  border-bottom-left-radius: inherit;
}

.metric-distribution__segment:last-child {
  border-top-right-radius: inherit;
  border-bottom-right-radius: inherit;
}

.metric-distribution__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.metric-distribution__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: inherit;
}

.metric-distribution__legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--swatch-color, var(--accent));
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.metric-distribution__legend-label {
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
}

.metric-distribution__legend-label strong {
  font-weight: 600;
  color: #111827;
  color: var(--text);
}

.metric-distribution__legend-percent {
  font-variant-numeric: tabular-nums;
}

.panel {
  background: #ffffff;
  background: var(--surface);
  border: 1px solid #dfe3e9;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.75rem;
  box-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.4);
  box-shadow: var(--shadow);
}

.panel.controls {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 2rem;
}

.controls-collapsible {
  border: 1px dashed #dfe3e9;
  border: 1px dashed var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
  color: #4b5563;
  color: var(--text-muted);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.controls-collapsible[open] {
  background: #ffffff;
  background: var(--surface);
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 32px -26px rgba(15, 23, 42, 0.35);
}

.controls-collapsible summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: inherit;
  gap: 1rem;
}

.controls-collapsible summary::-webkit-details-marker {
  display: none;
}

.controls-collapsible summary::after {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
  transition: transform 0.2s ease;
}

.controls-collapsible[open] summary::after {
  transform: rotate(-135deg);
}

.controls-collapsible summary:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.35);
  outline-offset: 3px;
  border-radius: 20px;
}

.summary-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.summary-title {
  font-size: 0.95rem;
  color: #111827;
  color: var(--text);
}

.summary-description {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.25rem;
  align-items: end;
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.controls-grid:empty {
  display: none;
}

.control-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4b5563;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.control input[type="search"],
.control select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #dfe3e9;
  border: 1px solid var(--border);
  font: inherit;
  background: #f0f2f5;
  background: var(--surface-muted);
  color: #111827;
  color: var(--text);
  transition: border 0.15s ease, box-shadow 0.15s ease;
}

.control input[type="search"]:focus,
.control select:focus {
  outline: none;
  border-color: rgba(14, 165, 233, 0.7);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.control .slider-input {
  margin-top: 0;
  padding: 0.1rem 0;
}

.control .slider-input output {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  color: var(--text);
  min-width: 3rem;
  text-align: right;
}

.control.checkbox {
  align-self: center;
  font-size: 0.95rem;
  color: #4b5563;
  color: var(--text-muted);
}

.control.checkbox label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
}

.control.checkbox input[type="checkbox"] {
  appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 6px;
  border: 2px solid #dfe3e9;
  border: 2px solid var(--border);
  background: #f0f2f5;
  background: var(--surface-muted);
  display: grid;
  place-items: center;
  transition: border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  position: relative;
}

.control.checkbox input[type="checkbox"]::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 3px;
  background: transparent;
  transition: transform 0.2s ease, background 0.15s ease;
  transform: scale(0.6);
}

.control.checkbox input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: rgba(14, 165, 233, 0.8);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.control.checkbox input[type="checkbox"]:checked {
  border-color: #0ea5e9;
  border-color: var(--accent);
  background: rgba(14, 165, 233, 0.15);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.control.checkbox input[type="checkbox"]:checked::after {
  background: #0ea5e9;
  background: var(--accent);
  transform: scale(1);
}

.control.align-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.table-panel {
  padding: 1.5rem 1.5rem 2rem;
}

@media (max-width: 720px) {
  .use-case-panel-note {
    text-align: left;
  }

  .use-case-card {
    padding: 0.85rem;
  }

  .use-case-image {
    width: 60px;
    height: 60px;
  }
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#results-count {
  margin: 0;
  color: #4b5563;
  color: var(--text-muted);
}


.sort-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.sort-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  row-gap: 0.5rem;
}

.weight-update-indicator {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: #0f766e;
  background: rgba(45, 212, 191, 0.18);
  border: 1px solid rgba(13, 148, 136, 0.32);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
  min-height: 1.6rem;
}

.weight-update-indicator[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .sort-controls {
    align-items: stretch;
  }

  .weight-update-indicator {
    align-self: flex-start;
  }
}

.sort {
  font: inherit;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #dfe3e9;
  border: 1px solid var(--border);
  background: #f0f2f5;
  background: var(--surface-muted);
  cursor: pointer;
  color: #4b5563;
  color: var(--text-muted);
  position: relative;
  transform: translateY(0);
  box-shadow: 0 0 0 rgba(14, 165, 233, 0);
  transition: all 0.18s ease;
}

.sort-label {
  font-weight: 500;
}

.sort-arrow {
  margin-left: 0.4rem;
  font-size: 0.7rem;
  opacity: 0.75;
}

.sort-multiplier {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: 0.45rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(45, 212, 191, 0.18);
  color: #0f766e;
  box-shadow: inset 0 0 0 0 rgba(16, 185, 129, 0.5);
}

.sort-multiplier--updated {
  animation: sortMultiplierPulse 0.95s ease;
}

.sort--weight-updated {
  animation: sortWeightGlow 0.9s ease;
}

@keyframes sortMultiplierPulse {
  0% {
    transform: scale(0.92);
    background: rgba(110, 231, 183, 0.6);
    color: #047857;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
  }
  35% {
    transform: scale(1.09);
    background: rgba(45, 212, 191, 0.9);
    color: #065f46;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(1);
    background: rgba(45, 212, 191, 0.18);
    color: #0f766e;
    box-shadow: inset 0 0 0 0 rgba(16, 185, 129, 0.3);
  }
}

@keyframes sortWeightGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    background: rgba(45, 212, 191, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    background: inherit;
  }
}

.sort.global-metric {
  color: #0f172a;
  border-color: rgba(14, 165, 233, 0.55);
  background: rgba(14, 165, 233, 0.18);
  box-shadow: 0 16px 26px -24px rgba(14, 165, 233, 0.7);
}

.sort:hover {
  color: #0f172a;
  border-color: rgba(14, 165, 233, 0.4);
  background: rgba(14, 165, 233, 0.14);
  transform: translateY(-1px);
  box-shadow: 0 16px 26px -24px rgba(14, 165, 233, 0.65);
}

.sort.active {
  color: #0f172a;
  border-color: rgba(14, 165, 233, 0.6);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(14, 165, 233, 0.16));
  transform: translateY(-4px);
  box-shadow: 0 26px 44px -26px rgba(14, 165, 233, 0.8);
  z-index: 1;
}

.sort.global-metric:hover {
  border-color: rgba(14, 165, 233, 0.65);
  background: rgba(14, 165, 233, 0.24);
}

.sort.global-metric.active {
  border-color: rgba(14, 165, 233, 0.75);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.34), rgba(14, 165, 233, 0.2));
  box-shadow: 0 32px 52px -24px rgba(14, 165, 233, 0.8);
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
  min-width: 880px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th,
tbody td {
  white-space: normal;
  word-break: break-word;
}

.header-groups th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b5563;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  padding: 0.35rem 1rem;
  border-bottom: 1px solid #dfe3e9;
  border-bottom: 1px solid var(--border);
}

.header-groups .group-global {
  background: rgba(34, 197, 94, 0.22);
  background: var(--section-global);
  background-color: rgba(34, 197, 94, 0.22);
  background-color: var(--section-global);
  border-radius: 12px 12px 0 0;
  color: #0f172a;
}

.header-groups .group-core {
  background: rgba(14, 165, 233, 0.24);
  background: var(--section-core);
  background-color: rgba(14, 165, 233, 0.24);
  background-color: var(--section-core);
  border-radius: 12px 12px 0 0;
  color: #0f172a;
}

.header-groups .group-performance {
  background: rgba(129, 140, 248, 0.22);
  background: var(--section-performance);
  background-color: rgba(129, 140, 248, 0.22);
  background-color: var(--section-performance);
  border-radius: 12px 12px 0 0;
  color: #0f172a;
}

thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4b5563;
  color: var(--text-muted);
  padding: 0 1rem 0.75rem;
}

thead th.section-global {
  background: rgba(34, 197, 94, 0.22);
  background: var(--section-global);
  background-color: rgba(34, 197, 94, 0.22);
  background-color: var(--section-global);
  color: #0f172a;
}

thead th.section-core {
  background: rgba(14, 165, 233, 0.24);
  background: var(--section-core);
  background-color: rgba(14, 165, 233, 0.24);
  background-color: var(--section-core);
  color: #0f172a;
}

thead th.section-performance {
  background: rgba(129, 140, 248, 0.22);
  background: var(--section-performance);
  background-color: rgba(129, 140, 248, 0.22);
  background-color: var(--section-performance);
  color: #0f172a;
}

.section-core-stack,
.section-performance-stack {
  padding: 0.75rem 1rem 1rem;
}

.section-core-stack__title,
.section-performance-stack__title {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
  font-weight: 700;
}

.section-core-stack__metrics,
.section-performance-stack__metrics {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.section-core-stack__metric,
.section-performance-stack__metric {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
  color: var(--text-muted);
  font-weight: 600;
}

.section-core-stack__metric[data-active-sort="true"],
.section-performance-stack__metric[data-active-sort="true"] {
  color: #0b1120;
  font-weight: 700;
}

thead th[data-active-sort="true"] {
  position: relative;
  transform: translateY(-1px);
  box-shadow: 0 26px 44px -28px rgba(14, 165, 233, 0.6);
  z-index: 1;
  color: #0b1120;
  font-weight: 700;
}

thead th[data-active-sort="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(191, 219, 254, 0.4));
  opacity: 0.9;
  pointer-events: none;
  mix-blend-mode: screen;
}

tbody td {
  padding: 1rem;
  border-top: 1px solid #f0f2f5;
  border-top: 1px solid var(--surface-muted);
  vertical-align: middle;
}

tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.02);
}

tbody td[data-section="global"] {
  background: rgba(34, 197, 94, 0.22);
  background: var(--section-global);
  background-color: rgba(34, 197, 94, 0.22);
  background-color: var(--section-global);
  color: #0f172a;
  background-clip: padding-box;
}

tbody tr:nth-child(odd) td[data-section="global"] {
  background: rgba(34, 197, 94, 0.3);
  background: var(--section-global-alt);
  background-color: rgba(34, 197, 94, 0.3);
  background-color: var(--section-global-alt);
  color: #0f172a;
}

tbody td[data-section="core"] {
  background: rgba(14, 165, 233, 0.24);
  background: var(--section-core);
  background-color: rgba(14, 165, 233, 0.24);
  background-color: var(--section-core);
  color: #0f172a;
  background-clip: padding-box;
}

tbody tr:nth-child(odd) td[data-section="core"] {
  background: rgba(14, 165, 233, 0.32);
  background: var(--section-core-alt);
  background-color: rgba(14, 165, 233, 0.32);
  background-color: var(--section-core-alt);
  color: #0f172a;
}

tbody td[data-section="performance"] {
  background: rgba(129, 140, 248, 0.22);
  background: var(--section-performance);
  background-color: rgba(129, 140, 248, 0.22);
  background-color: var(--section-performance);
  color: #0f172a;
  background-clip: padding-box;
}

tbody tr:nth-child(odd) td[data-section="performance"] {
  background: rgba(129, 140, 248, 0.3);
  background: var(--section-performance-alt);
  background-color: rgba(129, 140, 248, 0.3);
  background-color: var(--section-performance-alt);
  color: #0f172a;
}

tbody td[data-active-sort="true"] {
  position: relative;
  transform: translateY(-2px);
  border-top-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 48px -28px rgba(14, 165, 233, 0.7), 0 0 0 1px rgba(14, 165, 233, 0.45);
  isolation: isolate;
  background-clip: padding-box;
}

tbody td[data-section="global"][data-active-sort="true"],
tbody tr:nth-child(odd) td[data-section="global"][data-active-sort="true"] {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.44), rgba(16, 185, 129, 0.28));
  color: #052e16;
}

tbody td[data-section="core"][data-active-sort="true"],
tbody tr:nth-child(odd) td[data-section="core"][data-active-sort="true"] {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.5), rgba(59, 130, 246, 0.26));
  color: #0f172a;
}

tbody td[data-section="performance"][data-active-sort="true"],
tbody tr:nth-child(odd) td[data-section="performance"][data-active-sort="true"] {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.52), rgba(99, 102, 241, 0.3));
  color: #0f172a;
}

tbody td[data-active-sort="true"]::after {
  content: "";
  position: absolute;
  inset: -8px;
  background: radial-gradient(circle at top, rgba(191, 219, 254, 0.7), transparent 65%);
  opacity: 0.75;
  z-index: -1;
  pointer-events: none;
}

tbody td[data-active-sort="true"] .score-bar .value {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

tbody td[data-active-sort="true"] .score-bar .bar {
  height: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.table-wrapper a {
  color: #0ea5e9;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.table-wrapper a:hover {
  text-decoration: underline;
}


.brand-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.brand-name {
  font-weight: 600;
}

.brand-legal {
  font-size: 0.8rem;
  color: #4b5563;
  color: var(--text-muted);
}

.brand-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #4b5563;
  color: var(--text-muted);
}

.bike-photo {
  position: relative;
  flex: 0 0 auto;
  width: min(160px, 100%);
  aspect-ratio: 4 / 3;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f0f2f5;
  background: var(--surface-muted);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.bike-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bike-photo--placeholder {
  border: 1px dashed rgba(148, 163, 184, 0.5);
}

.bike-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #4b5563;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.model-info {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.model-name {
  font-weight: 600;
}

.model-cell a {
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .bike-photo {
    width: min(100%, 220px);
  }
}

@media (max-width: 600px) {
  .bike-photo {
    width: min(100%, 200px);
  }
}

.brand-meta a {
  font-weight: 600;
}

.brand-founded {
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: #f0f2f5;
  background: var(--surface-muted);
  color: #4b5563;
  color: var(--text-muted);
  font-weight: 600;
}

.score-cell {
  width: 220px;
}

.model-score.score-cell {
  width: 100%;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.model-score .score-bar {
  width: 100%;
}

.model-score-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4b5563;
  color: var(--text-muted);
  font-weight: 600;
}

.score-cell[data-has-breakdown="true"] {
  cursor: pointer;
}

.score-cell[data-has-breakdown="true"] .score-bar .value {
  text-decoration: underline dotted rgba(15, 23, 42, 0.35);
  text-decoration-thickness: 2px;
}

.core-stack,
.performance-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.core-stack-item,
.performance-stack-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.core-stack-item + .core-stack-item,
.performance-stack-item + .performance-stack-item {
  margin-top: 0.15rem;
}

.performance-stack-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4b5563;
  color: var(--text-muted);
  font-weight: 600;
}

.performance-stack-title + .performance-stack-item {
  margin-top: 0.25rem;
}

.core-stack-item-title,
.performance-stack-item-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(15, 23, 42, 0.72);
  font-weight: 600;
}

.core-stack .score-cell,
.performance-stack .score-cell {
  width: 100%;
}

.core-stack .score-cell .score-bar,
.performance-stack .score-cell .score-bar {
  width: 100%;
}

.core-stack .score-cell[data-active-sort="true"],
.performance-stack .score-cell[data-active-sort="true"] {
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 26px 44px -28px rgba(14, 165, 233, 0.8);
  transform: translateY(-2px);
}

.core-stack .score-cell[data-active-sort="true"] .core-stack-item-title,
.performance-stack .score-cell[data-active-sort="true"] .performance-stack-item-title {
  color: #0b1120;
}

.score-bar {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.score-bar .bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #f0f2f5;
  background: var(--surface-muted);
  overflow: hidden;
}

.score-bar .bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0%;
  width: var(--fill, 0%);
  border-radius: inherit;
  background: linear-gradient(120deg, #22c55e, #16a34a);
  transition: width 0.35s ease, background 0.3s ease;
}

.score-bar[data-level="none"] .bar::after {
  background: linear-gradient(120deg, #cbd5f5, #e5e7eb);
}

.score-bar[data-level="low"] .bar::after {
  background: linear-gradient(120deg, #f97316, #ea580c);
}

.score-bar[data-level="warn"] .bar::after {
  background: linear-gradient(120deg, #facc15, #f59e0b);
}

.score-bar[data-level="mid"] .bar::after {
  background: linear-gradient(120deg, #34d399, #10b981);
}

.score-bar[data-level="high"] .bar::after {
  background: linear-gradient(120deg, #22c55e, #15803d);
}

.score-bar .value {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
  color: var(--text);
}

.score-popover {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 120;
}

.score-popover[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.score-popover-card {
  width: min(440px, 100%);
  max-height: min(75vh, 520px);
  background: #ffffff;
  background: var(--surface);
  border: 1px solid #dfe3e9;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.4);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  outline: none;
}

.score-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.score-popover-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.score-popover-close {
  border: none;
  background: transparent;
  color: #4b5563;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.score-popover-close:hover,
.score-popover-close:focus {
  background: #f0f2f5;
  background: var(--surface-muted);
  color: #111827;
  color: var(--text);
  outline: none;
}

.score-popover-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.score-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.score-breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #f0f2f5;
  background: var(--surface-muted);
}

.score-breakdown-label {
  font-weight: 600;
  color: #111827;
  color: var(--text);
}

.score-breakdown-value {
  font-size: 0.9rem;
  color: #4b5563;
  color: var(--text-muted);
}

.score-stars {
  --score-star-color: #facc15;
  --score-star-background: rgba(107, 114, 128, 0.45);
  --score-star-percent: 0%;
  position: relative;
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.1rem;
  color: var(--score-star-background);
  white-space: nowrap;
}

.score-stars::after {
  content: attr(data-stars);
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--score-star-percent);
  color: var(--score-star-color);
  overflow: hidden;
  pointer-events: none;
  white-space: nowrap;
}

.score-breakdown-summary {
  margin: 0;
  font-weight: 600;
  color: #111827;
  color: var(--text);
  font-size: 0.95rem;
}

.score-breakdown-empty {
  margin: 0;
  color: #4b5563;
  color: var(--text-muted);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.footer {
  margin: 3rem auto 4rem;
  color: #4b5563;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #4b5563;
  color: var(--text-muted);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal[data-open="true"] {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 10;
  background: #ffffff;
  background: var(--surface);
  border-radius: 22px;
  padding: 2rem;
  width: min(440px, 100%);
  border: 1px solid #dfe3e9;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.4);
  box-shadow: var(--shadow);
}

.modal-header h3 {
  margin: 0 0 0.5rem;
}

.modal-subtitle {
  margin: 0 0 1.5rem;
  color: #4b5563;
  color: var(--text-muted);
}

.slider {
  display: block;
  font-weight: 600;
  color: #111827;
  color: var(--text);
}

.slider-input {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.6rem;
}

.slider input[type="range"] {
  flex: 1;
}

.slider output {
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 3rem;
  text-align: right;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

@media (max-width: 640px) {
  .header-inner {
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }
  thead {
    display: none;
  }
  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }
  tbody tr {
    margin-bottom: 1rem;
    border: 1px solid #dfe3e9;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    padding: 0.5rem 0.75rem;
  }
  tbody td {
    border: none;
    padding: 0.5rem 0;
  }
  tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4b5563;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
  }
  .actions {
    justify-content: flex-start;
  }
}
