:root {
  --ink: #172026;
  --ink-soft: #28333d;
  --muted: #5d6975;
  --line: #d9e2e8;
  --line-strong: #bfccd5;
  --paper: #ffffff;
  --page: #f6f8f8;
  --page-warm: #f9f7f2;
  --tint: #edf6f4;
  --teal: #006d77;
  --teal-dark: #004f56;
  --plum: #7b3f5c;
  --gold: #9a6b10;
  --focus: #1b6fc9;
  --shadow: 0 18px 50px rgba(23, 32, 38, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: 0;
}

a {
  color: var(--teal-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  max-width: 1220px;
  margin: 0 auto;
  min-height: 62px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 850;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--teal-dark);
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 74px 24px;
}

.paper-hero {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcfc 62%, var(--page) 100%);
  border-bottom: 1px solid var(--line);
}

.paper-hero-inner {
  padding-top: 88px;
  padding-bottom: 34px;
}

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  font-size: 74px;
}

h2 { font-size: 40px; }
h3 { font-size: 21px; }

.lead {
  max-width: 980px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 21px;
  line-height: 1.56;
}

.fact-strip,
.bench-strip {
  margin: 42px 0 0;
  padding: 0;
  display: grid;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.fact-strip {
  grid-template-columns: repeat(4, 1fr);
}

.bench-strip {
  grid-template-columns: repeat(3, 1fr);
  background: var(--paper);
}

.fact-strip div,
.bench-strip div {
  padding: 22px 24px 24px;
  border-right: 1px solid var(--line);
}

.fact-strip div:first-child,
.bench-strip div:first-child {
  padding-left: 0;
}

.fact-strip div:last-child,
.bench-strip div:last-child {
  border-right: 0;
}

dt {
  margin: 0;
  color: var(--teal-dark);
  font-size: 36px;
  font-weight: 880;
  line-height: 1;
}

dd {
  margin: 10px 0 0;
  color: var(--muted);
}

.hero-figure-wrap {
  padding-top: 10px;
  padding-bottom: 86px;
}

.paper-section {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.muted-section {
  background: var(--page);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(290px, 0.74fr) minmax(0, 1.26fr);
  gap: 42px;
  align-items: center;
}

.qualitative-grid {
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
}

.section-copy {
  max-width: 590px;
}

.wide-copy {
  max-width: 900px;
  margin-bottom: 30px;
}

.section-copy p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.section-copy .section-kicker {
  margin-top: 0;
  color: var(--plum);
  font-size: 12px;
}

.paper-figure,
.media-block {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.paper-figure img,
.media-image {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.hero-figure {
  max-width: 820px;
  margin: 0 auto;
}

figcaption {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  padding: 13px 16px 15px;
}

.figure-pair,
.media-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr);
  gap: 22px;
  align-items: stretch;
}

.portrait-figure img {
  height: 100%;
  object-fit: contain;
}

.wide-figure {
  margin-top: 18px;
}

.section-note {
  max-width: 900px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 16px;
}

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

.result-readout p {
  margin: 0;
  padding: 18px 20px;
  color: var(--ink-soft);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.paper-table-wrap {
  margin-top: 24px;
}

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

caption {
  caption-side: top;
  padding: 15px 16px;
  color: var(--muted);
  font-weight: 760;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: var(--page);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-strong);
}

td {
  color: var(--ink-soft);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

tbody tr:nth-child(even):not(.highlight-row) td {
  background: #fafcfc;
}

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

.highlight-row {
  background: #edf6f4;
  font-weight: 820;
}

.highlight-row td:first-child {
  box-shadow: inset 4px 0 0 var(--teal);
}

.paper-table-wrap table {
  min-width: 980px;
}

.paper-table-wrap td,
.paper-table-wrap th {
  white-space: nowrap;
}

.results-table th:nth-child(n+3),
.results-table td:nth-child(n+3),
.agreement-table th:nth-child(n+2),
.agreement-table td:nth-child(n+2),
.rl-table th:last-child,
.rl-table td:last-child {
  text-align: right;
}

.compact-table {
  max-width: 900px;
}

.compact-table table {
  min-width: 0;
}

.rl-grid {
  grid-template-columns: minmax(320px, 1.05fr) minmax(0, 0.95fr);
}

.rl-grid .section-copy {
  max-width: 560px;
}

.rl-grid .paper-table-wrap {
  margin-top: 0;
}

.rl-grid + .result-readout {
  margin-top: 28px;
}

.band {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.band.soft { background: var(--page); }

.section-heading {
  max-width: 840px;
  margin-bottom: 28px;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: 40px;
  line-height: 1.12;
}

.section-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metric,
.feature,
.callout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.metric {
  padding: 20px;
  min-height: 132px;
}

.metric strong {
  display: block;
  color: var(--teal-dark);
  font-size: 34px;
  line-height: 1.1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(320px, 1.04fr);
  gap: 32px;
  align-items: center;
}

.split.reversed {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  padding: 22px;
}

.feature h3,
.callout h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.feature p,
.callout p {
  margin: 0;
  color: var(--muted);
}

.callout {
  padding: 24px;
  background: var(--tint);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 820;
  background: var(--paper);
  color: var(--ink);
}

.button.primary {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

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

.code-block {
  overflow-x: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid #23313a;
  border-radius: 7px;
  background: #111a20;
  color: #e9f2f3;
  font-size: 14px;
  line-height: 1.55;
}

.note {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  background: var(--tint);
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: #dbe5e8;
}

.footer .container {
  padding-top: 28px;
  padding-bottom: 28px;
}

.footer p { margin: 0; }

@media (max-width: 980px) {
  h1 { font-size: 56px; }
  h2,
  .section-heading h1,
  .section-heading h2 { font-size: 34px; }
  .fact-strip,
  .bench-strip,
  .result-readout,
  .metrics,
  .feature-grid,
  .media-grid,
  .figure-pair,
  .two-column,
  .qualitative-grid,
  .split,
  .split.reversed {
    grid-template-columns: 1fr;
  }
  .fact-strip div,
  .bench-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-left: 0;
  }
  .fact-strip div:last-child,
  .bench-strip div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .nav-links {
    gap: 14px;
  }
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }
  .paper-hero-inner {
    padding-top: 58px;
    padding-bottom: 24px;
  }
  .hero-figure-wrap {
    padding-top: 6px;
    padding-bottom: 58px;
  }
  h1 { font-size: 40px; }
  h2,
  .section-heading h1,
  .section-heading h2 { font-size: 29px; }
  .lead {
    font-size: 18px;
  }
  dt {
    font-size: 32px;
  }
  .section-copy p {
    font-size: 16px;
  }
  th,
  td {
    padding: 10px 12px;
  }
}
