:root {
  --paper: #f3ecdf;
  --paper-2: #fffaf2;
  --ink: #1c1915;
  --muted: #5e564c;
  --line: #d9cbb6;
  --seal: #8d2f2b;
  --moss: #1f4d3a;
  --moss-soft: #e5f0ea;
  --bad: #8d2f2b;
  --bad-soft: #f8e8e4;
  --shadow: 0 1px 0 rgba(28, 25, 21, 0.04);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), transparent 180px),
    var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.45;
}
a { color: var(--moss); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: Palatino, "Iowan Old Style", "Palatino Linotype", serif; font-weight: 600; letter-spacing: 0; }
h1 { font-size: 1.8rem; margin: 0 0 .3rem; }
h2 { font-size: 1.25rem; margin: 1.6rem 0 .6rem; }
p { margin: .4rem 0 .8rem; }

.top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  padding: 1.1rem 1.4rem .7rem;
  border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; color: inherit; }
.brand strong { display: block; font-family: Palatino, "Iowan Old Style", serif; font-size: 1.35rem; }
.brand span { color: var(--muted); font-size: .85rem; }
.nav { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.years a { margin-left: .4rem; }
.years .here { color: var(--ink); font-weight: 650; text-decoration: none; }

.wrap { width: min(1100px, calc(100% - 2rem)); margin: 1.2rem auto 3rem; }
.flash { padding: .7rem .9rem; border: 1px solid var(--line); background: var(--paper-2); margin-bottom: 1rem; }
.flash.ok { background: var(--moss-soft); border-color: #b7d0c4; }
.flash.bad { background: var(--bad-soft); border-color: #e2c2bb; }
.banner { padding: .8rem 1rem; background: #f7efe2; border-left: 4px solid var(--seal); margin-bottom: 1rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.card, .panel, table, form.stack {
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.card, .panel { padding: .9rem 1rem; }
.card .label, .muted { color: var(--muted); font-size: .85rem; }
.figure { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; font-size: 1.35rem; margin: .2rem 0 0; }
.negative { color: var(--seal); }

table { width: 100%; border-collapse: collapse; margin: .6rem 0 1rem; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 650; border-top: 2px solid var(--ink); }
.scroll { overflow-x: auto; }

form.stack { padding: 1rem; display: grid; gap: .7rem; }
label { display: grid; gap: .25rem; font-size: .92rem; }
label.inline { display: flex; gap: .5rem; align-items: center; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="file"], select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid #c9bba6;
  padding: .45rem .55rem;
  border-radius: 0;
}
textarea { min-height: 4.5rem; }
.row { display: flex; flex-wrap: wrap; gap: .7rem; }
.row > * { flex: 1 1 180px; }
button, .button {
  background: var(--ink);
  color: #f6f1e7;
  border: 0;
  padding: .5rem .8rem;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
button.quiet, .button.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.danger { background: var(--seal); }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.lines { display: grid; gap: .4rem; }
.line { display: grid; grid-template-columns: 1.4fr .7fr .7fr 1fr .8fr; gap: .4rem; }
.diff { font-variant-numeric: tabular-nums; }
.diff.bad { color: var(--seal); }
.diff.ok { color: var(--moss); }
.note { color: var(--muted); font-size: .9rem; }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .86rem; }
pre.token { white-space: pre-wrap; word-break: break-all; background: #241c18; color: #f4eadc; padding: .8rem; }
.section { margin-top: 1.4rem; }
@media (max-width: 800px) {
  .line { grid-template-columns: 1fr 1fr; }
  .top { flex-direction: column; align-items: flex-start; }
}
