:root {
  color-scheme: light dark;
  --bg: #fbfaf8;
  --fg: #1c1b19;
  --muted: #6b6862;
  --rule: #e2ded7;
  --accent: #7a4a1e;
  --panel: #fff;
  --error: #8c2c1f;
  --ok: #2c6135;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614; --fg: #e8e5df; --muted: #9a958c; --rule: #302d29;
    --accent: #d79a63; --panel: #1f1e1b; --error: #e08276; --ok: #8fc79a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.65 ui-serif, Georgia, "Times New Roman", serif;
}
header.site, main, footer.site { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }
header.site {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: baseline;
  justify-content: space-between; padding-top: 2rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule); margin-bottom: 2rem;
}
.brand { font-weight: 600; font-size: 1.1rem; text-decoration: none; color: var(--fg); }
header.site nav { display: flex; gap: 1rem; align-items: baseline; font-size: .9rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 2rem 0 .75rem; font-weight: 600; }
h1 { font-size: 1.85rem; margin-top: 0; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p, ul, ol, blockquote, pre { margin: 0 0 1rem; }
ul, ol { padding-left: 1.4rem; }
blockquote {
  border-left: 3px solid var(--rule); margin-left: 0;
  padding-left: 1rem; color: var(--muted);
}
code, pre, textarea, input { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
code { font-size: .9em; background: var(--panel); padding: .1em .3em; border-radius: 3px; }
pre {
  background: var(--panel); border: 1px solid var(--rule); border-radius: 5px;
  padding: .9rem 1rem; overflow-x: auto;
}
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
footer.site {
  margin-top: 4rem; padding-top: 1rem; padding-bottom: 3rem;
  border-top: 1px solid var(--rule); color: var(--muted); font-size: .85rem;
}
.muted { color: var(--muted); font-size: .9rem; }
.error { color: var(--error); }
.ok { color: var(--ok); }
.stack { display: flex; flex-direction: column; gap: .9rem; max-width: 34rem; }
.stack label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
input[type=text], input[type=password], textarea {
  font-size: .95rem; padding: .5rem .6rem; border: 1px solid var(--rule);
  border-radius: 4px; background: var(--panel); color: var(--fg); width: 100%;
}
textarea { line-height: 1.6; resize: vertical; min-height: 20rem; }
button {
  font: inherit; font-size: .9rem; padding: .5rem 1.1rem; cursor: pointer;
  border: 1px solid var(--accent); border-radius: 4px;
  background: var(--accent); color: var(--bg); align-self: flex-start;
}
button.linkish {
  background: none; border: none; color: var(--accent); padding: 0;
  text-decoration: underline; font-size: .9rem;
}
form.inline { display: inline; }
.row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.pagelist { list-style: none; padding: 0; }
.pagelist li { padding: .4rem 0; border-bottom: 1px solid var(--rule); }
.notice {
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  background: var(--panel); padding: 1rem 1.1rem; border-radius: 4px;
}
.notice p:last-child { margin-bottom: 0; }
.editlink { margin-top: 3rem; font-size: .85rem; }
details summary { cursor: pointer; }
