:root {
  color-scheme: light;
  --background: #f6f3ed;
  --surface: #fffdf8;
  --foreground: #152326;
  --muted: #5d6b6d;
  --border: #cbd5d1;
  --accent: #087f76;
  --accent-dark: #075e58;
  --accent-soft: #d8efeb;
  --warm: #b34f2c;
  --warm-soft: #f3ddd2;
  --table: #dfd2bd;
  --focus: #155eef;
  --shadow: 0 18px 50px rgb(36 49 51 / 8%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent-dark);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
}

.brand {
  color: var(--foreground);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.repo-link {
  font-size: 0.9rem;
  font-weight: 650;
}

section {
  padding-block: 72px;
}

.hero {
  padding-top: 88px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2 {
  max-width: 880px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.07;
}

h1 {
  font-size: clamp(3rem, 8vw, 6.8rem);
}

h2 {
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.lede {
  max-width: 770px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.2vw, 1.42rem);
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 52px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--border);
  box-shadow: var(--shadow);
}

.evidence-stat {
  min-height: 160px;
  padding: 28px;
  background: var(--surface);
}

.evidence-stat strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.evidence-stat span {
  display: block;
  max-width: 220px;
  margin-top: 14px;
  color: var(--muted);
}

.boundary {
  max-width: 740px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.section-heading > p:not(.eyebrow) {
  max-width: 730px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.dinner-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
  margin-top: 54px;
}

.dinner-table {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1.15;
  margin-inline: auto;
}

.table-surface {
  position: absolute;
  inset: 20% 21%;
  display: grid;
  place-content: center;
  border: 2px solid #b29c7d;
  border-radius: 50%;
  background: var(--table);
  color: #443827;
  text-align: center;
}

.guest {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 54px;
  height: 54px;
  place-content: center;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  font-weight: 750;
}

.guest-a,
.guest-b {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.guest-a {
  top: 4%;
  left: 24%;
}

.guest-b {
  top: 4%;
  right: 24%;
}

.guest-c {
  top: 43%;
  right: 2%;
}

.guest-d {
  right: 24%;
  bottom: 3%;
}

.guest-e {
  bottom: 3%;
  left: 24%;
}

.guest-f {
  top: 43%;
  left: 2%;
}

.translation {
  border-top: 1px solid var(--border);
}

.translation > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
  align-items: start;
  padding-block: 22px;
  border-bottom: 1px solid var(--border);
}

.translation p {
  margin: 0;
}

.step-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 750;
}

.experiment {
  border-block: 1px solid var(--border);
}

.constructs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 46px;
}

.construct {
  min-width: 0;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.construct legend {
  padding-inline: 8px;
  font-size: 1.05rem;
  font-weight: 750;
}

.construct > p {
  min-height: 52px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.directions label > span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.86rem;
  font-weight: 650;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

.missing-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.results-wrap {
  margin-top: 38px;
  overflow-x: auto;
}

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

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

th,
td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

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

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

tbody tr[data-complete="false"] {
  color: var(--muted);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 54px 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 28px 24px 0 0;
  border-top: 2px solid var(--border);
}

.timeline li::before {
  position: absolute;
  top: -7px;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--background);
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.timeline span {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline strong {
  display: block;
  margin-top: 8px;
}

.timeline p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.model-comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.model-comparison > div {
  padding-top: 18px;
  border-top: 3px solid var(--accent);
}

.model-comparison span {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-comparison strong {
  display: block;
  margin-top: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 500;
}

.model-comparison p {
  color: var(--muted);
}

.closing {
  max-width: 790px;
  margin: 48px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.35;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 26px;
  margin-top: 30px;
}

.actions a {
  font-weight: 700;
}

footer {
  padding-block: 36px 54px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 780px) {
  .evidence-grid,
  .constructs,
  .model-comparison {
    grid-template-columns: 1fr;
  }

  .evidence-stat {
    min-height: 0;
  }

  .dinner-layout {
    grid-template-columns: 1fr;
  }

  .construct > p {
    min-height: 0;
  }

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

  .timeline li {
    padding: 18px 0 18px 26px;
    border-top: 0;
    border-left: 2px solid var(--border);
  }

  .timeline li::before {
    top: 24px;
    left: -7px;
  }
}

@media (max-width: 500px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1120px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  section {
    padding-block: 52px;
  }

  .hero {
    padding-top: 48px;
  }

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

  .construct {
    padding: 20px 16px;
  }

  .dinner-table {
    width: 100%;
  }

  .guest {
    width: 46px;
    height: 46px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #11191b;
    --surface: #182326;
    --foreground: #edf4f1;
    --muted: #afbfba;
    --border: #38504e;
    --accent: #63cfc2;
    --accent-dark: #8be0d5;
    --accent-soft: #193d3a;
    --warm: #ef9b78;
    --warm-soft: #492a20;
    --table: #4b4030;
    --focus: #82b5ff;
    --shadow: none;
  }

  .table-surface {
    border-color: #88755b;
    color: #fff4df;
  }
}

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