:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --ink: #2a2420;
  --muted: #6b5f55;
  --line: #e8dfd2;
  --accent: #7a4a2b;
  --accent-soft: #f3e7da;
  --radius: 14px;
  --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: #1b1714;
    --surface: #242019;
    --ink: #f1e9df;
    --muted: #b3a697;
    --line: #3a332b;
    --accent: #e0a77d;
    --accent-soft: #33281f;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

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

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

header.site {
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 18px; padding-bottom: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.01em;
}
.brand img { width: 28px; height: 28px; }
nav.site a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
nav.site a:hover { color: var(--ink); }

main { padding: 48px 0 64px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 6vw, 46px); margin: 0 0 12px; }
h2 { font-size: 24px; margin: 40px 0 8px; }
h3 { font-size: 19px; margin: 24px 0 4px; }

.lead { font-size: 19px; color: var(--muted); margin: 0 0 32px; }
.meta { color: var(--muted); font-size: 14px; }

.card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; color: var(--ink); text-decoration: none;
}
a.card:hover { border-color: var(--accent); }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--muted); }

.pill {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 99px; padding: 2px 10px; margin-bottom: 10px;
}

.links { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 24px; }

.note {
  background: var(--accent-soft); border-radius: var(--radius); padding: 16px 18px; margin: 20px 0;
}

table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }
.table-scroll { overflow-x: auto; }

ol li, ul li { margin: 4px 0; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site .wrap { padding-top: 24px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer.site a { color: var(--muted); }
