:root {
  --bg: #f9f8f6;
  --panel: #fff;
  --panel-soft: #f1eeeb;
  --line: #ece9e5;
  --text: #242322;
  --muted: #6f6a65;
  --muted-2: #8b8680;
  --accent: #23211f;
  --ok: #55ad60;
  --shadow: 0 1px 2px rgba(30, 28, 26, 0.06), 0 12px 32px rgba(30, 28, 26, 0.04);
}

* {
  box-sizing: border-box;
}

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

button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(249, 248, 246, 0.96);
  backdrop-filter: blur(14px);
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  color: #4c4946;
  font-size: 18px;
}

.main-nav button {
  min-width: 78px;
  height: 44px;
  border-radius: 8px;
}

.main-nav button.active {
  background: var(--panel-soft);
}

.shell {
  min-height: calc(100vh - 72px);
}

.segmented {
  display: flex;
  align-items: center;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(230, 226, 221, 0.65);
}

.segmented.small {
  gap: 4px;
  height: 42px;
  padding: 4px;
}

.segmented.small button {
  min-width: 86px;
  height: 34px;
  border-radius: 7px;
  color: #625e59;
}

.segmented button.active {
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.content {
  min-width: 0;
  max-width: 1414px;
  margin: 0 auto;
  padding: 50px 22px 24px;
}

.hero {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 2vw, 38px);
  font-weight: 500;
  letter-spacing: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: #504d49;
  font-size: 18px;
}

.hero p {
  max-width: 1340px;
  margin: 16px 0 28px;
  color: #5b5753;
  font-size: clamp(17px, 1.35vw, 22px);
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  color: #79746e;
  font-size: 16px;
}

.table-section {
  margin-top: 6px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 34px;
  gap: 18px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #625d57;
  font-size: 16px;
}

.divider {
  width: 1px;
  height: 32px;
  background: var(--line);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  color: #5a554f;
  font-size: 22px;
}

.table-wrap {
  height: auto;
  min-height: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
}

thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 44px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  color: #242424;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

thead th[data-sort] {
  cursor: pointer;
}

th,
td {
  padding: 0 20px;
}

thead th:first-child,
tbody td:first-child {
  width: 170px;
  border-right: 1px solid var(--line);
  text-align: center;
}

tbody td {
  height: 68px;
  border-bottom: 1px solid #f0eeeb;
  background: var(--panel);
  color: #5c5854;
  font-size: 16px;
  vertical-align: middle;
}

.empty-cell {
  height: 180px;
  color: var(--muted);
  text-align: center;
}

tbody tr:hover {
  background: #f2efeb;
}

tbody tr:hover td {
  background: #f2efeb;
}

tbody tr:hover td,
tbody tr:hover .model-name,
tbody tr:hover .model-meta,
tbody tr:hover .score,
tbody tr:hover .delta {
  color: #201f1d;
}

.rank {
  color: #595550;
  font-weight: 800;
}

.spread {
  font-size: 16px;
  white-space: nowrap;
}

.model-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 300px;
}

.lab-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #111;
  font-size: 16px;
  font-weight: 900;
}

.lab-logo {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  object-fit: contain;
}

.model-name {
  color: #5a5753;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 16px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.model-meta {
  margin-top: 4px;
  color: #77716b;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.score {
  color: #595550;
  white-space: nowrap;
}

.delta {
  margin-left: 8px;
  color: #77716b;
  font-size: 16px;
}

.nowrap {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero p {
    font-size: 20px;
  }
}

@media (max-width: 860px) {
  .topbar {
    height: auto;
    min-height: 68px;
    padding: 8px 10px;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
  }

  .main-nav button {
    min-width: 72px;
    height: 44px;
    font-size: 17px;
  }

  .content {
    padding: 32px 14px 28px;
  }

  .hero {
    padding-bottom: 28px;
  }

  .hero p {
    font-size: 18px;
  }

  .meta-row {
    gap: 12px;
    font-size: 16px;
  }

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

  .toolbar-right {
    width: 100%;
    overflow-x: auto;
  }

  .table-wrap {
    overflow: visible;
  }

  thead th {
    font-size: 16px;
  }

  tbody td {
    height: 82px;
    font-size: 18px;
  }

  .model-cell {
    min-width: 0;
    max-width: 280px;
  }

  .model-name {
    font-size: 17px;
    white-space: normal;
  }

  .model-meta {
    font-size: 14px;
    white-space: normal;
  }

}
