:root {
  --bg: #F3F1E9;
  --ink: #29383C;
  --paper: #FFFEF8;
  --accent: #A85F47;
  --sage: #62877E;
  --panel: #263D42;
  --line: #D8D4C9;
  --mute: #737D79;
  --mark: #E9DDBD;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-wrap: break-word;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(to bottom, transparent 0, transparent 31px, rgba(41, 56, 60, 0.04) 32px),
    linear-gradient(to right, rgba(168, 95, 71, 0.06) 0, rgba(168, 95, 71, 0.06) 1px, transparent 1px);
  background-size: auto, 48px 48px;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(41, 56, 60, 0.18);
  pointer-events: none;
}
body::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
body::after { content: "§01"; bottom: 14px; right: 14px; width: auto; height: auto; border: 0; font: 10px/1 var(--mono); letter-spacing: 0.14em; color: var(--mute); }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--panel); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 40; background: var(--paper); padding: 8px 12px; }

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  height: 68px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 241, 233, 0.94);
  position: sticky;
  top: 0;
  z-index: 12;
}
.site-header .wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.12em;
}
.wordmark span:first-child { font-size: 11px; }
.wordmark span:last-child { font-size: 16px; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-nav a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
[data-nav-toggle] { display: none; }

.kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 8px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 650; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 20px; }

.lede { max-width: 64ch; margin: 0 0 18px; }
.muted { color: var(--mute); }
.mono { font-family: var(--mono); }
.section { padding: 40px 0; border-top: 1px solid var(--line); }
.section-tight { padding: 28px 0; }

label, .lbl {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 10px 0 6px;
}

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.checks label { display: flex; gap: 8px; align-items: center; text-transform: none; letter-spacing: 0; font-size: 14px; margin: 8px 0; }

.btn, button.btn, a.btn {
  appearance: none;
  border: 1px solid var(--panel);
  background: var(--panel);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 11px 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.status { min-height: 1.4em; color: var(--accent); margin: 8px 0 0; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.address { font-style: normal; line-height: 1.7; }

.article-body { max-width: 68ch; }
.article-body p { margin: 0 0 14px; }
.article-body h2 { margin-top: 28px; }
.article-body h3 { margin-top: 20px; }
.article-body ul, .article-body ol { margin: 0 0 14px; padding-left: 1.2em; }
.article-body code, .mono { font-family: var(--mono); font-size: 0.95em; }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-family: var(--serif); font-weight: 700; }

.site-footer { border-top: 1px solid var(--line); padding: 22px 0 40px; font-size: 14px; }
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 10px 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 760px) {
  .site-header { height: auto; }
  .site-header .wrap { height: auto; min-height: 68px; padding: 10px 0; }
  [data-nav-toggle] { display: inline-block; }
  .site-nav { display: none; width: 100%; flex-direction: column; padding-bottom: 12px; }
  .site-nav.is-open { display: flex; }
  .btn { width: 100%; text-align: center; min-height: 44px; }
  .wrap { width: min(var(--max), calc(100% - 20px)); }
}

@media (max-width: 320px) {
  .wrap { width: calc(100% - 16px); }
}
