:root {
  color-scheme: light;
  --ink: #182022;
  --muted: #657176;
  --page: #f4f7f6;
  --surface: #ffffff;
  --surface-alt: #eaf1ee;
  --line: #d8e1dd;
  --line-strong: #b8c5c0;
  --accent: #2f6fed;
  --accent-warm: #c75d3b;
  --good: #1f8f70;
  --charcoal: #20282b;
  --shadow: 0 18px 42px rgba(24, 32, 34, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.48;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.hero {
  color: #fff;
  background: #182022;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px max(20px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.brand {
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.navlinks {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

.navlinks a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.navlinks a:hover {
  color: #fff;
}

.language-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(44px, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 6px;
}

.language-toggle button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.language-toggle button:first-child {
  border-left: 0;
}

.language-toggle button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
}

.language-toggle button:hover:not([aria-pressed="true"]) {
  color: #fff;
}

.hero-grid {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 40px;
  align-items: end;
}

.hero-copy {
  min-width: 0;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-warm);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f1a673;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: 62px;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: 0;
}

.hero-kicker {
  max-width: 760px;
  margin-bottom: 14px;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.lede {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  background: #fff;
  color: var(--ink);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.46);
  color: #fff;
}

.button:hover {
  transform: translateY(-1px);
}

.hero-resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 900;
}

.hero-resource-links a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration-color: rgba(255, 255, 255, 0.36);
  text-underline-offset: 4px;
}

.hero-resource-links a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.hero-panel > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 15px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-panel > div:first-child {
  border-top: 0;
}

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

main {
  overflow: hidden;
}

.protocol-band {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1fr);
  gap: 44px;
  align-items: start;
  padding: 68px max(20px, calc((100vw - 1240px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.hero-grid > *,
.protocol-band > *,
.intro > *,
.env-heading > * {
  min-width: 0;
}

.protocol-copy p:last-child,
.intro-copy p,
.section-title p {
  color: var(--muted);
  font-size: 17px;
}

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

.protocol-facts div {
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.protocol-facts strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.protocol-facts span {
  color: var(--muted);
  font-size: 14px;
}

.intro {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(340px, 0.92fr);
  gap: 56px;
  align-items: start;
  padding: 72px 0 34px;
}

.intro-copy {
  display: grid;
  gap: 14px;
}

.intro-copy p {
  margin-bottom: 0;
}

.env-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto 26px;
  overflow-x: auto;
  padding: 10px 0;
  background: rgba(244, 247, 246, 0.92);
  backdrop-filter: blur(10px);
}

.env-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.env-nav a:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 20px rgba(24, 32, 34, 0.08);
}

.env-nav em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e7edf9;
  color: var(--accent);
  font-style: normal;
  font-size: 12px;
}

.env-nav-all {
  background: var(--charcoal) !important;
  color: #fff !important;
  border-color: var(--charcoal) !important;
}

.env-sections {
  display: grid;
  gap: 0;
  padding-bottom: 20px;
}

.env-section {
  width: 100%;
  padding: 58px max(20px, calc((100vw - 1240px) / 2));
  border-top: 1px solid var(--line);
  background: #fbfcfc;
}

.env-section:nth-child(even) {
  background: var(--surface-alt);
}

.env-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 32px;
  align-items: start;
  margin-bottom: 24px;
  scroll-margin-top: 80px;
}

.env-heading p {
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
}

.env-heading .score-note {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

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

.env-metrics > div {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(24, 32, 34, 0.07);
}

.env-winner {
  border-left: 4px solid var(--good) !important;
}

.env-metrics span,
.card-title span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.env-metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
}

.env-metrics em {
  display: block;
  margin-top: 6px;
  color: var(--good);
  font-size: 27px;
  font-style: normal;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.model-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.model-card.winner {
  border-color: rgba(31, 143, 112, 0.7);
}

.media-shell {
  position: relative;
  background: #111819;
}

.media-shell img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.card-title > div {
  min-width: 0;
}

.card-title h3 {
  overflow-wrap: anywhere;
}

.rank-pill {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf2f0;
  color: var(--ink) !important;
  font-size: 10px !important;
  font-weight: 950 !important;
  white-space: nowrap;
}

.winner .rank-pill {
  background: #e4f5ee;
  color: var(--good) !important;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 14px;
}

.card-stats div {
  padding-top: 8px;
  border-top: 2px solid #e7eeeb;
}

dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

dd {
  margin: 3px 0 0;
  font-size: 18px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.card-body p {
  min-height: 58px;
  color: var(--muted);
  font-size: 13px;
}

.artifact-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #e7eeeb;
}

.artifact-line span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.artifact-line code {
  overflow-wrap: anywhere;
  color: #394448;
  font-size: 10px;
  line-height: 1.25;
  text-align: right;
}

.matrix-section {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 66px 0 82px;
}

.matrix-section .section-title {
  max-width: 760px;
  margin-bottom: 22px;
}

.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(24, 32, 34, 0.08);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7eeeb;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  text-align: left;
  font-weight: 900;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td.best {
  color: var(--good);
  font-weight: 950;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 36px;
  padding: 28px max(20px, calc((100vw - 1240px) / 2));
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.footer strong {
  color: var(--ink);
  font-size: 15px;
}

.footer span {
  max-width: 760px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 1180px) {
  .model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 42px 0 46px;
  }

  h1 {
    font-size: 54px;
  }

  h2 {
    font-size: 32px;
  }

  .hero-kicker {
    font-size: 22px;
  }

  .protocol-band,
  .intro,
  .env-heading {
    grid-template-columns: 1fr;
  }

  .protocol-facts,
  .env-metrics {
    grid-template-columns: 1fr;
  }

  .intro {
    padding-top: 54px;
  }
}

@media (max-width: 640px) {
  .hero-grid,
  .intro,
  .env-nav,
  .matrix-section {
    width: calc(100% - 28px);
  }

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

  .topbar-right {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .navlinks {
    flex-wrap: wrap;
    gap: 16px;
  }

  h1 {
    font-size: 43px;
  }

  h2 {
    font-size: 28px;
  }

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

  .lede {
    font-size: 15px;
  }

  .button {
    min-height: 42px;
    padding: 0 14px;
  }

  .hero-panel > div {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .stat-label {
    font-size: 11px;
  }

  .protocol-band,
  .env-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .model-grid,
  .card-stats {
    grid-template-columns: 1fr;
  }

  .artifact-line {
    grid-template-columns: 1fr;
  }

  .artifact-line code {
    text-align: left;
  }
}
