:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --surface: #ffffff;
  --surface-muted: #f0f3ee;
  --line: #d9ded3;
  --text: #17211c;
  --muted: #66736a;
  --teal: #147c74;
  --teal-weak: #d9efeb;
  --gold: #a36f16;
  --gold-weak: #f5e8c7;
  --red: #a8463f;
  --blue: #356799;
  --shadow: 0 16px 32px rgba(24, 34, 28, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

.topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.eyebrow,
.summary-label,
.summary-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.brand-title {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid #b8d7d2;
  background: var(--teal-weak);
  color: #0d5d58;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 32px;
  align-items: end;
  padding: 14px 0 28px;
  border-bottom: 1px solid var(--line);
}

.intro-band h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.14;
}

.intro-band p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 8px;
  height: 76px;
}

.metric-strip span {
  border-radius: 6px 6px 2px 2px;
  background: var(--teal);
}

.metric-strip span:nth-child(1) {
  height: 62%;
  background: var(--teal);
}

.metric-strip span:nth-child(2) {
  height: 44%;
  background: var(--gold);
}

.metric-strip span:nth-child(3) {
  height: 78%;
  background: var(--blue);
}

.metric-strip span:nth-child(4) {
  height: 36%;
  background: var(--red);
}

.metric-strip span:nth-child(5) {
  height: 54%;
  background: #4f6f52;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.summary-card {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 34px;
  line-height: 1;
}

.summary-card.highlight {
  border-color: #dec68b;
  background: #fffaf0;
}

.tab-bar {
  display: flex;
  gap: 10px;
  margin: 8px 0 18px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.tab-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label count"
    "note count";
  gap: 2px 12px;
  min-width: 168px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.tab-button span {
  grid-area: label;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-button small {
  grid-area: note;
  color: var(--muted);
  font-size: 12px;
}

.tab-button b {
  align-self: center;
  grid-area: count;
  min-width: 30px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  padding: 5px 8px;
  text-align: center;
}

.tab-button.active {
  border-color: #87bdb5;
  background: var(--teal-weak);
  box-shadow: inset 0 0 0 1px rgba(20, 124, 116, 0.22);
}

.tab-button.active b {
  background: var(--teal);
  color: #fff;
}

.tab-button:focus {
  outline: 3px solid rgba(20, 124, 116, 0.22);
  outline-offset: 2px;
}

.subset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 18px;
}

.subset-bar[hidden] {
  display: none;
}

.subset-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.subset-button b {
  min-width: 24px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  padding: 3px 7px;
  text-align: center;
}

.subset-button.active {
  border-color: #87bdb5;
  background: var(--teal-weak);
  color: #0d5d58;
}

.subset-button.active b {
  background: var(--teal);
  color: #fff;
}

.subset-button:focus {
  outline: 3px solid rgba(20, 124, 116, 0.22);
  outline-offset: 2px;
}

.controls-band {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.control-field span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.control-field input,
.control-field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c7cec4;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
}

.control-field input:focus,
.control-field select:focus,
.row-toggle:focus,
.copy-button:focus {
  outline: 3px solid rgba(20, 124, 116, 0.22);
  outline-offset: 2px;
}

.table-section {
  padding-top: 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-dot.macro {
  background: var(--teal);
}

.legend-dot.micro {
  background: var(--gold);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f9faf7;
  color: #4b574f;
  font-size: 12px;
  line-height: 1.25;
  text-transform: uppercase;
}

.overall-table {
  min-width: 1160px;
}

.dataset-table {
  min-width: 1220px;
}

.overall-table th:nth-child(1),
.overall-table tbody tr:not(.detail-row) td:nth-child(1) {
  width: 52px;
}

.overall-table th:nth-child(2),
.overall-table tbody tr:not(.detail-row) td:nth-child(2) {
  width: 250px;
}

.overall-table th:nth-child(n + 3):nth-child(-n + 7),
.overall-table tbody tr:not(.detail-row) td:nth-child(n + 3):nth-child(-n + 7) {
  width: 96px;
}

.overall-table th:nth-child(8),
.overall-table tbody tr:not(.detail-row) td:nth-child(8) {
  width: 78px;
}

.overall-table th:nth-child(9),
.overall-table tbody tr:not(.detail-row) td:nth-child(9) {
  width: 94px;
}

.overall-table th:nth-child(10),
.overall-table tbody tr:not(.detail-row) td:nth-child(10) {
  width: 250px;
}

.dataset-table th:nth-child(1),
.dataset-table tbody tr:not(.detail-row) td:nth-child(1) {
  width: 50px;
}

.dataset-table th:nth-child(2),
.dataset-table tbody tr:not(.detail-row) td:nth-child(2) {
  width: 230px;
}

.dataset-table th:nth-child(3),
.dataset-table tbody tr:not(.detail-row) td:nth-child(3) {
  width: 120px;
}

.dataset-table th:nth-child(n + 4):nth-child(-n + 8),
.dataset-table tbody tr:not(.detail-row) td:nth-child(n + 4):nth-child(-n + 8) {
  width: 86px;
}

.dataset-table th:nth-child(9),
.dataset-table tbody tr:not(.detail-row) td:nth-child(9) {
  width: 72px;
}

.dataset-table th:nth-child(10),
.dataset-table tbody tr:not(.detail-row) td:nth-child(10) {
  width: 90px;
}

.dataset-table th:nth-child(11),
.dataset-table tbody tr:not(.detail-row) td:nth-child(11) {
  width: 126px;
}

.dataset-table th:nth-child(12),
.dataset-table tbody tr:not(.detail-row) td:nth-child(12) {
  width: 170px;
}

td.numeric,
th.numeric {
  text-align: right;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.model-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.model-stack {
  display: block;
  min-width: 0;
}

.model-stack {
  display: block;
  min-width: 0;
}

.row-toggle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #c7cec4;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.model-name,
.dataset-name {
  display: block;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.model-name-link {
  color: var(--text);
  text-decoration-color: rgba(20, 124, 116, 0.45);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.model-name-link:hover {
  color: var(--teal);
}

.model-name-link {
  color: var(--text);
  text-decoration-color: rgba(20, 124, 116, 0.45);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.model-name-link:hover {
  color: var(--teal);
}

.model-repo,
.subset-name {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.model-card-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 6px;
  border: 1px solid #b8d7d2;
  border-radius: 999px;
  background: var(--teal-weak);
  color: #0d5d58;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  text-decoration: none;
}

.model-card-link:hover {
  border-color: var(--teal);
  background: #c8e7e1;
}

.metric-cell {
  min-width: 0;
}

.metric-value {
  display: block;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.metric-bar {
  display: block;
  height: 4px;
  margin-top: 6px;
  margin-left: auto;
  max-width: 70px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}

.metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.latency {
  font-variant-numeric: tabular-nums;
}

.sample-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 92px;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--surface-muted);
  font-size: 13px;
  font-weight: 700;
}

.gpu-cell {
  color: #39443d;
  overflow-wrap: anywhere;
}

.source-pill {
  display: inline-block;
  margin: 2px 4px 2px 0;
  border-radius: 999px;
  background: #fff4d3;
  color: #5f410b;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 9px;
}

.detail-inline-list {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.detail-inline-list > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.coverage-cell {
  min-width: 220px;
}

.coverage-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.coverage-summary span {
  min-width: 76px;
  font-weight: 800;
}

.coverage-summary i {
  border-radius: 999px;
  background: #e8ede5;
  color: #344039;
  font-style: normal;
  font-weight: 700;
  padding: 3px 8px;
}

.coverage-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.coverage-summary span {
  margin-right: 2px;
  font-weight: 800;
}

.coverage-summary i {
  border-radius: 999px;
  background: var(--surface-muted);
  color: #4b574f;
  font-style: normal;
  font-weight: 700;
  padding: 2px 7px;
}

.detail-row td {
  background: #fbfcf9;
  padding: 0;
}

.detail-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.detail-group h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.metric-list,
.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.metric-list div,
.meta-list div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.metric-list dt,
.meta-list dt {
  color: var(--muted);
  font-size: 12px;
}

.metric-list dd,
.meta-list dd {
  margin: 3px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.coverage-list {
  display: grid;
  gap: 8px;
}

.coverage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.coverage-item small,
.coverage-metrics i {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 2px;
}

.coverage-metrics {
  flex: 0 0 auto;
  font-weight: 800;
  text-align: right;
}

.command-box {
  margin-top: 12px;
}

.command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.copy-button {
  border: 1px solid #c7cec4;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.command {
  display: block;
  max-height: 116px;
  overflow: auto;
  padding: 12px;
  border-radius: 7px;
  background: #17211c;
  color: #f6f7f2;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.empty-state {
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.error-state {
  color: var(--red);
}

@media (max-width: 980px) {
  .intro-band,
  .detail-panel {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    max-width: 320px;
  }

  .summary-grid,
  .controls-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .topbar-inner,
  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .intro-band h1 {
    font-size: 30px;
  }

  .summary-grid,
  .controls-band,
  .metric-list,
  .meta-list {
    grid-template-columns: 1fr;
  }
}
