:root {
  color-scheme: light;
  --ink: #10252a;
  --muted: #52666b;
  --paper: #ffffff;
  --ground: #f3f6f6;
  --line: #dbe4e4;
  --teal: #0e7377;
  --teal-soft: #e1f0ef;
  --orange: #c9652e;
  --orange-soft: #fae8dc;
  --shadow: 0 12px 32px rgba(22, 52, 57, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.55rem 0.85rem;
  border-radius: 0.45rem;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 88% 12%, rgba(14, 115, 119, 0.12), transparent 28rem),
    linear-gradient(135deg, #fbfdfd 0%, #eef5f4 100%);
}

.hero::after {
  content: "ΔC";
  position: absolute;
  right: max(2vw, 1rem);
  bottom: -5.5rem;
  color: rgba(14, 115, 119, 0.055);
  font-size: clamp(10rem, 24vw, 22rem);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.hero .shell {
  position: relative;
  z-index: 1;
  padding-block: 4.4rem 2rem;
}

.kicker,
.figure-number {
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 0.9rem;
  font-size: clamp(2.35rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h1 span {
  color: var(--teal);
}

.lede {
  max-width: 780px;
  margin-bottom: 1.5rem;
  color: #385158;
  font-size: clamp(1rem, 2vw, 1.28rem);
}

.scope {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 2.2rem;
}

.scope span {
  padding: 0.32rem 0.68rem;
  border: 1px solid #bfcfcf;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #29464c;
  font-size: 0.84rem;
  font-weight: 620;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
}

nav a {
  color: #41595e;
  font-size: 0.9rem;
  font-weight: 680;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

main {
  padding-block: 2.5rem 5rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.metrics article {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--paper);
  box-shadow: 0 5px 18px rgba(22, 52, 57, 0.04);
}

.metric-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  color: var(--teal);
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
  line-height: 1.25;
}

.metrics s {
  color: #849397;
  font-weight: 560;
  text-decoration-thickness: 1px;
}

.metrics small {
  color: var(--muted);
}

.metric-note {
  margin: 0.75rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.figure-card,
.model-card,
.boundary {
  margin-top: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.figure-card {
  overflow: hidden;
  scroll-margin-top: 1rem;
}

.figure-header,
.section-heading {
  padding: 1.55rem 1.75rem 1.25rem;
}

.figure-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.download {
  flex: none;
  padding: 0.48rem 0.72rem;
  border: 1px solid #aac2c2;
  border-radius: 0.48rem;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 720;
  text-decoration: none;
}

.download:hover,
.download:focus-visible {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.figure-link {
  display: block;
  padding: clamp(0.75rem, 3vw, 2rem);
  background: #f9fbfb;
}

.figure-link img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #edf1f1;
}

.figure-link--portrait img {
  max-width: 930px;
  margin-inline: auto;
}

.caption {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.5rem;
  padding: 1.3rem 1.75rem 1.55rem;
  border-top: 1px solid var(--line);
  color: #425a60;
  font-size: 0.9rem;
}

.caption p {
  margin-bottom: 0;
}

.math-inline {
  white-space: nowrap;
  color: var(--ink);
  font-family: "STIX Two Math", "Cambria Math", serif;
}

.model-card,
.boundary {
  padding-bottom: 1.8rem;
  scroll-margin-top: 1rem;
}

.equations {
  display: grid;
  gap: 0.7rem;
  padding: 0 1.75rem 1.35rem;
}

.equation {
  overflow-x: auto;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--teal);
  background: var(--teal-soft);
  color: #14383c;
  font-family: "STIX Two Math", "Cambria Math", Georgia, serif;
  font-size: clamp(0.94rem, 2vw, 1.12rem);
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  padding-inline: 1.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

caption {
  padding-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: left;
}

th,
td {
  padding: 0.68rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

th:first-child,
td:first-child {
  text-align: left;
}

thead th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody th {
  font-weight: 650;
}

.model-note {
  margin: 1rem 1.75rem 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.boundary {
  border-color: #efcdb8;
  background: #fffaf7;
}

.boundary .figure-number {
  color: var(--orange);
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 0 1.75rem;
}

.boundary-grid div {
  padding: 1rem;
  border: 1px solid #f1dacb;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.72);
}

.boundary-grid h3 {
  margin-bottom: 0.35rem;
  color: #93441f;
  font-size: 0.98rem;
}

.boundary-grid p {
  margin-bottom: 0;
  color: #654c41;
  font-size: 0.87rem;
}

footer {
  border-top: 1px solid var(--line);
  background: #e9eeee;
  color: #52666b;
  font-size: 0.8rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 1.25rem, 1180px);
  }

  .hero .shell {
    padding-block: 3rem 1.5rem;
  }

  .metrics,
  .boundary-grid,
  .caption {
    grid-template-columns: 1fr;
  }

  .metric-note {
    text-align: left;
  }

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

  .figure-header,
  .section-heading,
  .caption {
    padding-inline: 1rem;
  }

  .equations,
  .table-wrap,
  .boundary-grid {
    padding-inline: 1rem;
  }

  .model-note {
    margin-inline: 1rem;
  }

  .equation {
    font-size: 0.86rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
