:root {
  --paper: #f3efe6;
  --sheet: #fbf8f2;
  --ink: #1b1915;
  --muted: #5c564c;
  --line: #d4cdc1;
  --line-strong: #b7afa1;
  --navy: #172a3a;
  --navy-2: #243848;
  --rust: #8a3d32;
  --caution: #6a5018;
  --caution-bg: #f4ead3;
  --max: 70rem;
  --serif: "Liberation Serif", "Noto Serif", Georgia, serif;
  --sans: Inter, "Liberation Sans", "Noto Sans", sans-serif;
  --mono: "Liberation Mono", "Noto Sans Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}
a { color: var(--rust); text-underline-offset: 0.15em; }
a:hover { color: #6d2e26; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}
img { max-width: 100%; }

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--sheet);
  padding: 0.4rem 0.7rem;
  z-index: 5;
}
.skip:focus { top: 0.5rem; }

.site-header {
  background: var(--navy);
  color: #f6f1e7;
}
.header-row {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  align-items: flex-end;
  padding-top: 1.1rem;
  padding-bottom: 0.9rem;
}
.mark {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 14rem;
}
.mark-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e4c36a;
}
.mark-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.1;
}
.mark small {
  display: block;
  margin-top: 0.2rem;
  color: #d5d0c6;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0;
  font-weight: 400;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  justify-content: flex-end;
  padding-bottom: 0.15rem;
}
nav a {
  color: #f6f1e7;
  text-decoration: none;
  font-size: 0.92rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.1rem;
}
nav a:hover { border-bottom-color: #e4c36a; color: #fff; }
nav a[aria-current="page"] { border-bottom-color: #e4c36a; }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
main { padding: 1.75rem 0 3rem; }
.page-head { margin-bottom: 1.5rem; max-width: 44rem; }
.page-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.12;
  margin: 0 0 0.6rem;
}
.lede { font-size: 1.15rem; margin: 0; }
.muted { color: var(--muted); }
.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--caution);
  margin: 0 0 0.4rem;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.65rem;
  line-height: 1.2;
  margin: 2rem 0 0.6rem;
}
h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.25rem;
  margin: 1.4rem 0 0.4rem;
}
p { margin: 0.6rem 0; }
ul, ol { margin: 0.4rem 0 0.8rem; padding-left: 1.2rem; }
li + li { margin-top: 0.3rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0 0.4rem;
}
.stat {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 0.85rem 0.9rem 0.75rem;
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat span { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.86rem; line-height: 1.35; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.panel {
  background: var(--sheet);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem 1.1rem;
}
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }

.note, .todo-box {
  border-left: 3px solid var(--navy);
  background: var(--sheet);
  padding: 0.8rem 1rem;
  margin: 1rem 0;
}
.todo-box { border-left-color: var(--caution); background: var(--caution-bg); }
.todo-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--caution);
  color: var(--caution);
  padding: 0.05rem 0.35rem;
  margin-right: 0.35rem;
  vertical-align: 0.1em;
}

.table-wrap { overflow-x: auto; max-width: 100%; margin: 0.8rem 0 1rem; border: 1px solid var(--line); background: var(--sheet); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); }
th { background: var(--navy); color: #f6f1e7; font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
caption {
  caption-side: bottom;
  text-align: left;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.55rem 0.7rem 0.65rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.btn {
  display: inline-block;
  background: var(--navy);
  color: #f6f1e7;
  text-decoration: none;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--navy);
}
.btn:hover { background: var(--navy-2); color: #fff; }
.btn.secondary { background: transparent; color: var(--navy); }
.btn.secondary:hover { background: var(--sheet); color: var(--navy); }

.site-footer {
  border-top: 1px solid var(--line-strong);
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0.35rem 0; }
.site-footer .disclaimer { color: var(--ink); }

code, .mono { font-family: var(--mono); font-size: 0.86em; }

@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .wrap { width: min(var(--max), calc(100% - 1.25rem)); }
  .header-row { flex-direction: column; align-items: flex-start; }
  nav { justify-content: flex-start; }
  .stat b { font-size: 1.45rem; }
  th, td { padding: 0.45rem 0.5rem; }
}
