:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f6f9fb;
  --surface: rgba(255, 255, 255, .88);
  --surface-strong: rgba(255, 255, 255, .96);
  --line: rgba(40, 69, 94, .13);
  --line-strong: rgba(13, 148, 136, .28);
  --text: #13212b;
  --muted: #5f6f7d;
  --subtle: #7a8996;
  --teal: #0d9488;
  --teal-soft: rgba(13, 148, 136, .10);
  --indigo: #3b5bdb;
  --indigo-soft: rgba(59, 91, 219, .10);
  --amber: #b96a13;
  --amber-soft: rgba(245, 158, 11, .14);
  --red: #c2413b;
  --red-soft: rgba(194, 65, 59, .10);
  --shadow: 0 18px 70px rgba(24, 38, 52, .10);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(246, 249, 251, .96) 42rem),
    repeating-linear-gradient(90deg, rgba(13, 148, 136, .085) 0 1px, transparent 1px 82px),
    repeating-linear-gradient(0deg, rgba(59, 91, 219, .060) 0 1px, transparent 1px 82px),
    var(--bg);
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .82), transparent 18rem),
    linear-gradient(90deg, transparent, rgba(13, 148, 136, .08), transparent);
  opacity: .8;
  z-index: -1;
}

.signal-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .42;
  pointer-events: none;
  z-index: -2;
}

main {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: stretch;
  min-height: 360px;
  padding: 18px 0;
}

.hero-copy,
.score-visual,
.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding: 30px;
  overflow: hidden;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(13, 148, 136, .18), rgba(59, 91, 219, .08) 44%, transparent 72%),
    repeating-linear-gradient(135deg, rgba(19, 33, 43, .040) 0 1px, transparent 1px 14px);
  opacity: .95;
  pointer-events: none;
}

.hero-copy > * {
  position: relative;
}

.hero-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.live-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(185, 106, 19, .26);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 11px;
  font-weight: 850;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 860px;
  font-size: 56px;
  line-height: 1.04;
  text-wrap: balance;
}

h2 {
  font-size: 22px;
  line-height: 1.24;
}

.summary {
  max-width: 860px;
  margin: 18px 0 0;
  color: #344656;
  font-size: 17px;
  line-height: 1.68;
}

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

.language-toggle {
  display: inline-flex;
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
}

.lang-button,
.link-button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.lang-button {
  color: #536574;
  background: transparent;
  cursor: pointer;
}

.lang-button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--indigo));
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(13, 148, 136, .20);
  color: #10202b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 251, 250, .88));
  text-decoration: none;
  box-shadow:
    0 8px 22px rgba(24, 38, 52, .075),
    inset 0 0 0 1px rgba(255, 255, 255, .62);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.link-button::after {
  content: "↗";
  color: var(--teal);
  font-size: 12px;
  line-height: 1;
  opacity: .82;
  transform: translateY(-1px);
}

.link-button:hover,
.lang-button:hover {
  border-color: rgba(13, 148, 136, .42);
  color: #07151b;
}

.link-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 28px rgba(24, 38, 52, .12),
    0 0 0 3px rgba(13, 148, 136, .08),
    inset 0 0 0 1px rgba(255, 255, 255, .80);
}

.link-button:focus-visible,
.lang-button:focus-visible {
  outline: 3px solid rgba(59, 91, 219, .26);
  outline-offset: 2px;
}

.score-visual {
  position: relative;
  min-height: 360px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(244, 250, 249, .86)),
    var(--surface);
}

.score-visual::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(13, 148, 136, .18);
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, rgba(13, 148, 136, .050) 0 1px, transparent 1px 16px),
    linear-gradient(180deg, transparent, rgba(59, 91, 219, .050));
  pointer-events: none;
}

.score-shell,
.gauge,
.signal-readouts {
  position: relative;
}

.score-shell {
  display: grid;
  align-content: center;
  min-height: 176px;
  border-radius: 8px;
  border: 1px solid rgba(13, 148, 136, .16);
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(13, 148, 136, .10), rgba(59, 91, 219, .035)),
    rgba(255, 255, 255, .78);
}

.score-visual span {
  font-size: 60px;
  line-height: 1;
  font-weight: 880;
  color: #07151b;
  font-variant-numeric: tabular-nums;
}

.score-visual label {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.gauge {
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(13, 148, 136, .16);
  border-radius: 999px;
  background: rgba(20, 42, 55, .07);
}

.gauge div {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--indigo), #f59e0b);
  box-shadow: 0 0 22px rgba(13, 148, 136, .24);
  transition: width .75s ease;
}

.signal-readouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.signal-readouts div {
  min-width: 0;
  border-top: 1px solid rgba(13, 148, 136, .18);
  padding-top: 12px;
}

.signal-readouts span {
  display: block;
  font-size: 22px;
}

.signal-readouts label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
}

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

.metric {
  min-height: 116px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(242, 248, 250, .82)),
    var(--surface);
}

.metric span {
  display: block;
  color: #07151b;
  font-size: 30px;
  font-weight: 860;
  font-variant-numeric: tabular-nums;
}

.metric label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.panel {
  margin-top: 12px;
  overflow: hidden;
}

.background-panel {
  background:
    linear-gradient(90deg, rgba(13, 148, 136, .10), transparent 50%),
    var(--surface);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line);
}

.section-heading.compact {
  display: block;
}

.section-heading.compact > p {
  margin-top: 8px;
}

.section-heading p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

.section-kicker {
  margin-bottom: 8px;
}

.background-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr);
  gap: 18px;
  padding: 20px;
}

.background-copy {
  color: #263947;
  font-size: 16px;
  line-height: 1.78;
}

.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.token-list span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(13, 148, 136, .26);
  border-radius: 8px;
  padding: 0 11px;
  color: #0f3d3a;
  background: rgba(255, 255, 255, .82);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 780;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .58);
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid rgba(40, 69, 94, .095);
  white-space: nowrap;
  font-size: 14px;
}

th {
  color: #4c5c67;
  background: rgba(239, 246, 248, .92);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

tbody tr {
  transition: background .18s ease;
}

tbody tr:hover {
  background: rgba(13, 148, 136, .055);
}

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

.rank {
  width: 54px;
  color: var(--amber);
  font-weight: 880;
  font-variant-numeric: tabular-nums;
}

.system-name {
  color: #10202b;
  font-weight: 820;
}

.system-sub {
  margin-top: 4px;
  color: var(--subtle);
  font-size: 12px;
}

.score-cell {
  min-width: 166px;
}

.score-line {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
}

.score-line span {
  color: #07151b;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}

.mini-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 42, 55, .08);
}

.mini-bar div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--indigo), #f59e0b);
}

.score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  min-height: 28px;
  border: 1px solid rgba(40, 69, 94, .12);
  border-radius: 999px;
  padding: 0 9px;
  color: #142331;
  background: rgba(245, 248, 250, .95);
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.count-good,
.count-bad,
.count-muted {
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}

.count-good {
  color: var(--teal);
}

.count-bad {
  color: var(--red);
}

.count-muted {
  color: var(--amber);
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 12px;
}

.grid-two > .panel {
  height: 100%;
  margin-top: 0;
}

.protocol-list,
.protocol-extra,
.model-list,
.case-grid,
.resource-list {
  padding: 16px 20px 20px;
}

.protocol-list {
  padding-bottom: 8px;
}

.protocol-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(40, 69, 94, .095);
}

.protocol-item:last-child {
  border-bottom: 0;
}

.protocol-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(13, 148, 136, .24);
  border-radius: 8px;
  color: var(--teal);
  background: var(--teal-soft);
  font-weight: 850;
}

.protocol-name,
.model-row strong {
  color: #10202b;
  font-weight: 820;
}

.protocol-source,
.model-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.protocol-extra {
  padding-top: 0;
}

.protocol-extra-title {
  margin: 6px 0 10px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.protocol-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.protocol-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(13, 148, 136, .18);
  border-radius: 8px;
  padding: 0 10px;
  color: #0f3d3a;
  background: rgba(13, 148, 136, .065);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.model-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.2fr) minmax(128px, .75fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(40, 69, 94, .095);
}

.model-row:last-child {
  border-bottom: 0;
}

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

.case-card {
  border: 1px solid rgba(40, 69, 94, .11);
  border-radius: 8px;
  padding: 15px;
  background: rgba(255, 255, 255, .78);
}

.case-category {
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.case-input {
  margin: 10px 0 13px;
  color: #10202b;
  font-weight: 760;
  line-height: 1.58;
}

.case-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

.case-meta b {
  color: #263947;
}

.resource-grid {
  align-items: stretch;
}

.resource-list {
  display: grid;
  gap: 10px;
}

.resource-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  gap: 12px;
  align-items: center;
  min-height: 70px;
  border: 1px solid rgba(40, 69, 94, .11);
  border-radius: 8px;
  padding: 13px 14px;
  color: inherit;
  background:
    linear-gradient(90deg, rgba(13, 148, 136, .055), rgba(59, 91, 219, .025)),
    rgba(255, 255, 255, .78);
  text-decoration: none;
}

.resource-row[href]:hover {
  border-color: rgba(13, 148, 136, .34);
  background:
    linear-gradient(90deg, rgba(13, 148, 136, .09), rgba(59, 91, 219, .045)),
    rgba(255, 255, 255, .92);
}

.resource-row strong,
.resource-row small,
.resource-row code {
  display: block;
  min-width: 0;
}

.resource-row strong {
  color: #10202b;
  font-weight: 820;
}

.resource-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.resource-row code {
  justify-self: end;
  max-width: 300px;
  border: 1px solid rgba(13, 148, 136, .20);
  border-radius: 8px;
  padding: 7px 9px;
  color: #0f3d3a;
  background: rgba(255, 255, 255, .82);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: right;
}

footer {
  margin: 22px 0 0;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  main {
    width: min(100% - 28px, 1280px);
    padding: 20px 0 44px;
  }

  .hero,
  .background-grid,
  .grid-two,
  .case-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .hero-copy,
  .score-visual {
    min-height: auto;
  }

  h1 {
    font-size: 42px;
  }

  .score-visual {
    gap: 18px;
  }

  .score-shell {
    min-height: 132px;
  }

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

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 8px;
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 20px, 1280px);
    padding-top: 12px;
  }

  .hero-copy,
  .score-visual,
  .section-heading,
  .background-grid,
  .protocol-list,
  .protocol-extra,
  .model-list,
  .case-grid,
  .resource-list {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1 {
    font-size: 34px;
    line-height: 1.08;
  }

  h2 {
    font-size: 20px;
  }

  .summary,
  .background-copy {
    font-size: 15px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 92px;
  }

  .signal-readouts {
    grid-template-columns: 1fr;
  }

  .model-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .resource-row {
    grid-template-columns: 1fr;
  }

  .resource-row code {
    justify-self: stretch;
    max-width: none;
    text-align: left;
  }

  th,
  td {
    padding: 12px;
  }
}
