:root {
  --ink: #1f2421;
  --muted: #59615b;
  --paper: #fbfaf5;
  --panel: #ffffff;
  --line: #d8d4c8;
  --moss: #3f6b54;
  --moss-dark: #294637;
  --copper: #b55f35;
  --amber: #d89a45;
  --sage: #e8efe6;
  --shadow: 0 24px 60px rgba(31, 36, 33, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(63, 107, 84, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(63, 107, 84, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

a {
  color: inherit;
}

.hero {
  min-height: 86vh;
  padding: 24px;
  display: grid;
  align-content: space-between;
  background:
    radial-gradient(circle at 80% 18%, rgba(216, 154, 69, 0.26), transparent 28%),
    linear-gradient(135deg, #26392f 0%, #3f6b54 48%, #e9ddc7 100%);
  color: #fffdf5;
}

.nav {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a,
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 700;
}

.nav a {
  color: rgba(255, 253, 245, 0.86);
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.hero-inner {
  width: min(1120px, 100%);
  margin: 0 auto 7vh;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--copper);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffdba2;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1,
h2 {
  font-family: "Fraunces", Georgia, serif;
}

h1 {
  max-width: 900px;
  font-size: clamp(4.3rem, 12vw, 10.5rem);
}

h2 {
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  color: var(--moss-dark);
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.subtitle {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: clamp(1.2rem, 3vw, 2rem);
  line-height: 1.35;
  color: rgba(255, 253, 245, 0.92);
}

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

.button.primary {
  background: #fffdf5;
  color: var(--moss-dark);
}

.button.secondary {
  border: 1px solid rgba(255, 253, 245, 0.55);
  color: #fffdf5;
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0;
}

.section.narrow {
  width: min(860px, calc(100% - 32px));
}

.section.narrow p {
  font-size: 1.16rem;
  color: var(--muted);
}

.section-heading {
  margin-bottom: 26px;
}

.section-note {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--muted);
}

.figure-panel,
.table-block {
  margin: 0 0 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.figure-panel img {
  width: 100%;
  display: block;
  background: #fff;
}

.architecture-figure img {
  padding: 42px 48px;
}

.figure-panel figcaption {
  padding: 18px 22px 22px;
  color: var(--muted);
  font-size: 0.98rem;
}

.caption-detail {
  display: block;
  margin-top: 10px;
  color: var(--ink);
}

.table-block {
  padding: 24px;
}

.table-block.compact {
  margin-top: 28px;
}

.module-note,
.metric-note {
  margin: -4px 0 16px;
  color: var(--muted);
}

.metric-note {
  margin: 14px 2px 0;
  font-size: 0.92rem;
}

.takeaway {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--moss);
  background: var(--sage);
  color: var(--ink);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 740px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

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

th {
  background: var(--moss-dark);
  color: #fffdf5;
  font-weight: 800;
}

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

th:last-child,
td:last-child {
  border-right: 0;
}

.highlight-row td {
  background: var(--sage);
}

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

audio {
  width: 174px;
  max-width: 100%;
}

.paper-composite {
  margin-top: 28px;
}

.analysis-subheading {
  margin-top: 44px;
}

.paper-figure {
  margin: 24px auto 0;
  object-fit: contain;
}

.paper-figure-medium {
  max-width: 80%;
}

.paper-figure-small {
  max-width: 55%;
}

.paper-subfigure-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px 18px;
  padding: 24px 24px 10px;
}

.paper-subfigure {
  grid-column: span 2;
  text-align: center;
}

.paper-subfigure:nth-child(4) {
  grid-column: 2 / span 2;
}

.paper-subfigure img {
  width: 100%;
  display: block;
}

.paper-subfigure p {
  margin: 6px 0 0;
  font-size: 0.95rem;
}

footer {
  padding: 34px 16px 46px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: 76vh;
    padding: 18px;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero-inner {
    margin-bottom: 5vh;
  }

  .section {
    padding: 54px 0;
  }

  .table-block {
    padding: 16px;
  }

  .architecture-figure img {
    padding: 24px 18px;
  }

  .paper-figure-medium,
  .paper-figure-small {
    max-width: 100%;
  }

  .paper-subfigure-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .paper-subfigure,
  .paper-subfigure:nth-child(4) {
    grid-column: auto;
  }
}

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