:root {
  --bg: #f4efe6;
  --paper: #fffaf3;
  --ink: #1c1915;
  --muted: #5c564c;
  --line: #d8cfc0;
  --accent: #8a3d1c;
  --accent-soft: #f0d8c8;
  --ok: #215c3a;
  --warn: #7a4a00;
  --danger: #8a1c1c;
  --focus: #1c4c8a;
  --sans: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ui: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 1.05rem;
  line-height: 1.55;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }
header.app {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.wrap { width: min(52rem, calc(100% - 2rem)); margin: 0 auto; }
header.app .wrap, footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.9rem 0;
}
.brand {
  font-family: var(--sans);
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.brand span { color: var(--accent); }
nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.95rem;
}
nav a:hover, nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
main { padding: 1.75rem 0 3rem; }
h1, h2, h3 { font-family: var(--sans); line-height: 1.25; margin: 0 0 0.6rem; }
h1 { font-size: 2rem; font-weight: 600; }
h2 { font-size: 1.3rem; margin-top: 2rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.note, .callout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 1rem 0 1.4rem;
}
.callout.warn { border-color: #e0c48a; background: #fff6e6; }
.callout.danger { border-color: #e3b6b6; background: #fbeeee; }
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.card h3 { margin-bottom: 0.35rem; font-size: 1.05rem; }
.meta { color: var(--muted); font-size: 0.9rem; }
.list { list-style: none; padding: 0; margin: 0; }
.list li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin: 0 0 0.75rem;
}
.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.8rem;
  margin-right: 0.35rem;
}
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre {
  background: #1c1915;
  color: #f4efe6;
  padding: 1rem;
  border-radius: 8px;
  overflow: auto;
  font-size: 0.88rem;
  line-height: 1.45;
}
code { font-size: 0.92em; }
a { color: var(--accent); }
a:focus, button:focus, input:focus, textarea:focus, select:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
label { display: block; font-weight: 600; margin: 0 0 0.3rem; }
input, textarea, select, button {
  font: inherit;
}
input, textarea, select {
  width: 100%;
  max-width: 28rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #b9b0a2;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 0.9rem;
}
button, .btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
}
button.secondary, .btn.secondary { background: #4a453d; }
button[disabled] { opacity: 0.6; cursor: not-allowed; }
table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 0.92rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }
.overflow { overflow-x: auto; }
footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  background: var(--paper);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
@media (max-width: 40rem) {
  nav a { margin-left: 0; margin-right: 0.9rem; }
  h1 { font-size: 1.6rem; }
}
