:root {
  --bg: #fbf7f1;
  --surface: #f3ebe0;
  --ink: #2a2420;
  --muted: #74685d;
  --line: #e3d7c7;
  --accent: #a4532b;
  --accent-soft: #f0dccd;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1916;
    --surface: #26221e;
    --ink: #ece4d9;
    --muted: #a59a8d;
    --line: #3a342e;
    --accent: #e08a5c;
    --accent-soft: #3a2a20;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem; padding-block: 1.1rem;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  font: 600 1.2rem/1 var(--serif); color: var(--ink); text-decoration: none;
}
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 1.25rem; font-size: .95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* hero */
.hero { padding: 3.5rem 0 2rem; }
.eyebrow {
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .75rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; }
.hero h1 { font-size: clamp(2rem, 6vw, 2.9rem); margin: 0 0 1rem; }
.lead { font-size: 1.12rem; color: var(--muted); margin: 0; max-width: 36rem; }

/* starter card */
.starter {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  margin: 2rem 0 3rem;
}
.starter div { background: var(--surface); padding: .9rem 1rem; }
.starter span { display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.starter strong { font: 600 1.05rem/1.4 var(--serif); }

@media (max-width: 40rem) {
  .starter { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 2.5rem; }
}

/* entries list */
.section-title { font-size: 1.35rem; margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.entries { list-style: none; margin: 0 0 3rem; padding: 0; }
.entries li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.entries h3 { margin: .15rem 0 .35rem; font-size: 1.3rem; }
.entries h3 a { color: var(--ink); text-decoration: none; }
.entries h3 a:hover { color: var(--accent); }
.entries p { margin: 0; color: var(--muted); }
.meta { font-size: .85rem; color: var(--muted); }
.tag {
  display: inline-block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: .1rem .55rem; margin-left: .4rem;
}

/* article */
.article { padding: 3rem 0 2rem; }
.article h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); margin: .4rem 0 1.25rem; }
.article h2 { font-size: 1.4rem; margin: 2.25rem 0 .5rem; }
.article p, .article ul, .article ol { margin: 0 0 1.1rem; }
.article li { margin-bottom: .35rem; }
.note {
  background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
  padding: .85rem 1.1rem; margin: 1.5rem 0; color: var(--ink);
}
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 600; color: var(--muted); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.back { display: inline-block; margin-top: 1rem; font-size: .95rem; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  padding-block: 1.5rem; font-size: .85rem; color: var(--muted);
}

/* 404 */
.lost { padding: 5rem 0 4rem; text-align: center; }
.lost h1 { font-size: 2.4rem; margin: .5rem 0; }
.lost p { color: var(--muted); }
