:root {
  --bg: #f7f5f0;
  --bg-soft: #efebe4;
  --surface: #fcfbf8;
  --text: #1f2421;
  --text-soft: #5f675f;
  --line: #d8ddd3;
  --accent: #667a6d;
  --accent-dark: #4d6156;
  --max-width: 1120px;
  --narrow-width: 760px;
  --radius: 20px;
  --shadow: 0 16px 40px rgba(31, 36, 33, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95em;
  background: rgba(102, 122, 109, 0.08);
  padding: 0.12em 0.35em;
  border-radius: 6px;
}

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  width: min(var(--narrow-width), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 240, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(216, 221, 211, 0.8);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav {
  display: flex;
  gap: 22px;
}

.nav a {
  color: var(--text-soft);
  font-size: 0.96rem;
}

.nav a.active,
.nav a:hover {
  color: var(--text);
}

.hero {
  padding: 84px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 360px);
  gap: 32px;
  align-items: start;
}

.eyebrow,
.section-label,
.card-label,
.timeline-date,
.callout-label,
.badge,
.lesson span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eyebrow,
.section-label,
.card-label,
.timeline-date,
.callout-label {
  color: var(--accent-dark);
}

.hero h1 {
  margin: 10px 0 18px;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  max-width: 8ch;
}

.hero-summary {
  max-width: 62ch;
  color: var(--text-soft);
  font-size: 1.08rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 24px;
}

.hero-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.94rem;
  background: rgba(252, 251, 248, 0.7);
}

.metrics-card,
.info-card,
.experiment-card,
.comparison-card,
.definition-card,
.bullet-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metrics-card {
  padding: 22px;
}

.metric + .metric {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.metric strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

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

.section {
  padding: 80px 0;
}

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

.section-soft {
  background: var(--bg-soft);
  border-top: 1px solid rgba(216, 221, 211, 0.8);
  border-bottom: 1px solid rgba(216, 221, 211, 0.8);
}

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

.section h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.overview-grid,
.definition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.definition-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 24px;
}

.info-card,
.definition-card {
  padding: 22px;
}

.info-card p:last-child,
.definition-card p:last-child {
  margin-bottom: 0;
  color: var(--text-soft);
}

.definition-card h3 {
  margin: 10px 0 8px;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.prose {
  margin-top: 24px;
}

.prose p {
  margin: 0 0 18px;
  font-size: 1.06rem;
  color: var(--text-soft);
}

.prose strong {
  color: var(--text);
}

.callout {
  margin-top: 28px;
  padding: 20px 22px;
  border-left: 3px solid var(--accent);
  background: rgba(252, 251, 248, 0.65);
  border-radius: 12px;
}

.callout p:last-child {
  margin: 8px 0 0;
  color: var(--text);
}

.timeline {
  position: relative;
  display: grid;
  gap: 24px;
  margin-top: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 18px;
}

.timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 0 0 6px var(--bg);
  position: relative;
  z-index: 1;
}

.timeline-content h3 {
  margin: 6px 0 8px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.timeline-content p:last-child {
  margin: 0;
  color: var(--text-soft);
}

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

.experiment-card {
  padding: 22px;
}

.experiment-card h3 {
  margin: 10px 0 10px;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
}

.experiment-card p {
  color: var(--text-soft);
}

.experiment-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(102, 122, 109, 0.12);
  color: var(--accent-dark);
}

.bullet-card {
  margin-top: 24px;
  padding: 22px;
}

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

.comparison-card {
  padding: 24px;
}

.plain-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--text-soft);
}

.plain-list li + li {
  margin-top: 10px;
}

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

.results-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.results-table th,
.results-table td {
  padding: 18px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.results-table th {
  font-size: 0.9rem;
  color: var(--accent-dark);
  font-weight: 600;
  background: rgba(252, 251, 248, 0.9);
}

.results-table td {
  color: var(--text-soft);
}

.results-table strong {
  color: var(--text);
}

.results-table tbody tr:last-child td {
  border-bottom: 0;
}

.lessons-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.lesson {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.lesson:last-child {
  border-bottom: 1px solid var(--line);
}

.lesson span {
  color: var(--accent-dark);
}

.lesson p {
  margin: 0;
  font-size: 1.04rem;
}

.site-footer {
  padding: 28px 0 42px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer-copy {
  margin: 0;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-soft);
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 980px) {
  .hero-grid,
  .overview-grid,
  .experiments-grid,
  .comparison-grid,
  .definition-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 12ch;
  }
}

@media (max-width: 640px) {
  .container,
  .narrow {
    width: min(100% - 28px, var(--max-width));
  }

  .header-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 14px;
  }

  .hero {
    padding-top: 64px;
  }

  .lesson {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}