:root {
  --paper: #f3efe6;
  --paper-2: #e7e1d4;
  --ink: #1b1916;
  --muted: #5c564c;
  --line: #d4ccbe;
  --pak: #8f3d1e;
  --pak-soft: #f3e4da;
  --gti: #2f4a45;
  --gti-soft: #e3ebe8;
  --human: #3d3a34;
  --formula: #6e675c;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

a { color: inherit; }

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

header.top {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(243, 239, 230, 0.94);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.top-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0 14px;
}

.brand {
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0;
  font-size: 16px;
  max-width: 14rem;
  line-height: 1.2;
}

.brand small {
  display: block;
  font-weight: 450;
  color: var(--muted);
  letter-spacing: 0;
  font-size: 13px;
  margin-top: 2px;
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
}

nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

.hero {
  padding: 56px 0 28px;
}

.kicker {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

h1 {
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-weight: 500;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.lead {
  max-width: 42rem;
  font-size: 21px;
  margin: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin: 36px 0 8px;
}

.stat {
  padding: 18px 18px 20px 0;
}

.stat + .stat { padding-left: 18px; border-left: 1px solid var(--line); }

.stat b {
  display: block;
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; }

h2 {
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-weight: 500;
  font-size: 34px;
  letter-spacing: -0.02em;
  margin: 48px 0 12px;
}

h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

p { margin: 0 0 14px; }

ol { margin: 0 0 16px; padding-left: 1.2em; }

ol li { margin: 0 0 8px; }

section { padding-bottom: 12px; }

.grid-2, .grid-3 {
  display: grid;
  gap: 16px;
}

.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.card {
  background: #faf7f1;
  border: 1px solid var(--line);
  padding: 18px 18px 8px;
  text-decoration: none;
  display: block;
}

.card p { color: var(--muted); font-size: 16px; }

.card:hover { border-color: var(--ink); }

.timeline { list-style: none; margin: 20px 0 0; padding: 0; }

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

.time {
  font-variant-numeric: tabular-nums;
  color: var(--pak);
  font-weight: 650;
}

.groups { display: grid; gap: 10px; margin-top: 16px; }

.group {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
}

.tag {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: start;
  padding-top: 4px;
}

.tag.pak { color: var(--pak); }
.tag.gti { color: var(--gti); }
.tag.human { color: var(--human); }
.tag.formula { color: var(--formula); }

.group.pak { background: var(--pak-soft); border-color: #e2c8ba; }
.group.gti { background: var(--gti-soft); border-color: #c9d8d3; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0 20px;
}

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

th { font-weight: 650; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.table-scroll { overflow-x: auto; margin: 8px 0 24px; }

table.compare { min-width: 720px; }

table.compare td:first-child,
table.compare th:first-child { width: 16%; font-weight: 650; }

table.compare td { width: 42%; }

table.q-table { min-width: 0; width: 100%; }
table.compare.q-table th:first-child,
table.compare.q-table td:first-child {
  width: 2.75rem;
  white-space: nowrap;
  padding-right: 12px;
}
table.compare.q-table th:nth-child(2),
table.compare.q-table td:nth-child(2),
table.compare.q-table th:nth-child(3),
table.compare.q-table td:nth-child(3) {
  width: auto;
}

.empty { color: var(--muted); }

footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 20px 0 36px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 800px) {
  .stats, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .timeline li, .group { grid-template-columns: 1fr; gap: 4px; }
  .top-row { flex-direction: column; }
}
