
:root {
  --bg: #f6f2ea;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #17211f;
  --muted: #65706d;
  --line: #ded6c7;
  --line-strong: #c7bda8;
  --teal: #0f766e;
  --blue: #2563eb;
  --amber: #c77613;
  --red: #b42318;
  --green: #15803d;
  --shadow: 0 18px 44px rgba(23, 33, 31, 0.09);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Aptos", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(circle at 12% 0%, rgba(15,118,110,0.14), transparent 28rem),
    radial-gradient(circle at 95% 8%, rgba(199,118,19,0.13), transparent 24rem),
    linear-gradient(180deg, #fffaf0 0%, var(--bg) 42%, #eef5f2 100%);
  color: var(--ink);
}
.page-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(23,33,31,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(23,33,31,0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.75), transparent 72%);
}
.shell { width: min(1320px, calc(100vw - 40px)); margin: 0 auto; position: relative; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  padding: 30px 0 18px;
}
.brand-lockup { max-width: 760px; }
.eyebrow, .kicker {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
h1, h2 { margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(30px, 4.4vw, 58px); line-height: .96; }
h2 { font-size: 20px; }
p { color: var(--muted); }
.toolbar, .filters {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.about-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255,253,248,.92);
  text-decoration: none;
  font-weight: 800;
}
.about-link:hover { border-color: var(--teal); color: var(--teal); }
.control { display: grid; gap: 6px; min-width: 188px; }
.control span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
select, input[type="search"] {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(255,253,248,.92);
  color: var(--ink);
  font: inherit;
}
input[type="search"] { min-width: 240px; }
.notice {
  margin: 0 0 18px;
  padding: 11px 14px;
  border: 1px solid rgba(15,118,110,.25);
  border-radius: 7px;
  background: rgba(255,253,248,.78);
  color: var(--muted);
}
.leaderboard-hero {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: end;
  padding: 22px 0 20px;
  border-top: 1px solid var(--line);
}
.leaderboard-hero h2 { font-size: clamp(32px, 5vw, 66px); line-height: .95; }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-tile {
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.66);
}
.stat-tile .label, .rank-meta, .subtle { color: var(--muted); font-size: 12px; }
.stat-tile .value { margin-top: 8px; font-size: 25px; font-weight: 850; overflow-wrap: anywhere; }
.leaderboard-panel, .detail-band, .analysis-grid > article {
  background: rgba(255,253,248,.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.leaderboard-panel { margin: 0 0 20px; overflow: hidden; }
.leaderboard-head, .section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.count-pill, .score-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}
.leaderboard-table-wrap, .table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 12px 11px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; background: rgba(248,244,235,.92); white-space: nowrap; }
.leaderboard-table th { position: sticky; top: 0; z-index: 1; }
.leaderboard-table tr { cursor: pointer; }
.leaderboard-table tbody tr:hover { background: rgba(15,118,110,.06); }
.leaderboard-table tbody tr.is-selected { background: rgba(15,118,110,.11); }
.rank-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #17211f;
  color: #fffdf8;
  font-weight: 900;
}
.model-name { font-weight: 850; max-width: 320px; overflow-wrap: anywhere; }
.score-cell { min-width: 138px; }
.score-main { display: flex; justify-content: space-between; gap: 8px; font-weight: 850; }
.score-track { margin-top: 7px; height: 8px; border-radius: 999px; background: #e7dfd1; overflow: hidden; }
.score-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), #19a79b); }
.score-fill.support { background: linear-gradient(90deg, var(--amber), #eab308); }
.score-fill.general { background: linear-gradient(90deg, var(--blue), #38bdf8); }
.metric-good { color: var(--green); font-weight: 850; }
.metric-warn { color: var(--amber); font-weight: 850; }
.metric-bad { color: var(--red); font-weight: 850; }
.model-detail.is-hidden { display: none; }
.detail-band { margin-bottom: 20px; }
.comparison-strip { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.analysis-grid > article { overflow: hidden; }
.artifact-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 18px; }
.artifact-list a { color: var(--teal); border: 1px solid var(--line-strong); border-radius: 7px; padding: 9px 11px; text-decoration: none; font-weight: 800; background: #fff; }
.artifact-list a:hover { border-color: var(--teal); }
.empty { padding: 18px; color: var(--muted); font-style: italic; }
.about-page { max-width: 1080px; padding-bottom: 32px; }
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 20px;
  align-items: end;
  padding: 20px 0 22px;
  border-top: 1px solid var(--line);
}
.about-hero h2 { margin: 0; font-size: clamp(30px, 4.4vw, 56px); line-height: .98; max-width: 760px; }
.about-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.about-facts div, .about-card, .about-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,253,248,.9);
  box-shadow: var(--shadow);
}
.about-facts div { min-height: 88px; padding: 13px; }
.about-facts span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.about-facts strong { display: block; margin-top: 9px; font-size: 18px; line-height: 1.15; }
.about-content { padding: 18px; }
.about-content p { margin: 0 0 14px; color: var(--ink); line-height: 1.58; font-size: 16px; }
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 20px 0; }
.about-card { padding: 18px; }
.about-card h2 { margin-bottom: 12px; }
.about-card ul { margin: 0; padding-left: 18px; color: var(--ink); }
.about-card li { margin-bottom: 9px; line-height: 1.45; }
.about-note { padding: 18px; margin-bottom: 20px; }
.about-note p:last-child { margin: 0; color: var(--ink); line-height: 1.58; font-size: 15px; }
@media (max-width: 980px) {
  .topbar, .leaderboard-hero, .leaderboard-head, .section-heading { display: grid; align-items: start; }
  .toolbar, .filters, .comparison-strip { justify-content: start; }
  .stat-strip, .analysis-grid, .about-facts, .about-grid { grid-template-columns: 1fr 1fr; }
  .about-hero { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .shell { width: min(100vw - 24px, 1320px); }
  .stat-strip, .analysis-grid, .about-facts, .about-grid { grid-template-columns: 1fr; }
  .control, input[type="search"] { min-width: 0; width: 100%; }
  th, td { padding: 10px 9px; }
}
