
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1b1f24;
  --muted: #5b6470;
  --line: #e3e0d8;
  --accent: #0f6b5c;
  --accent-ink: #ffffff;
  --notice-bg: #fff4d6;
  --notice-ink: #6b4b00;
  --focus: #1a56db;
  --radius: 10px;
  --max: 1080px;
  --gutter: 16px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101418;
    --surface: #171c22;
    --ink: #eef1f4;
    --muted: #a4afbb;
    --line: #2a323c;
    --accent: #4fc3b0;
    --accent-ink: #06201b;
    --notice-bg: #3a2e10;
    --notice-ink: #ffe08a;
    --focus: #8ab4ff;
  }
}
:root[data-theme="dark"] {
  --bg: #101418;
  --surface: #171c22;
  --ink: #eef1f4;
  --muted: #a4afbb;
  --line: #2a323c;
  --accent: #4fc3b0;
  --accent-ink: #06201b;
  --notice-bg: #3a2e10;
  --notice-ink: #ffe08a;
  --focus: #8ab4ff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font-body); }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: var(--gutter); background: var(--surface); padding: 8px 12px; z-index: 10; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { font: 700 22px/1 var(--font-head); color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.brand span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.search { margin-left: auto; display: flex; gap: 6px; }
.search input { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); min-width: 0; width: 200px; }
.btn { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; display: inline-block; }
.btn-ghost { background: transparent; color: var(--accent); }
main { min-height: 60vh; padding: 28px 0 40px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: 22px; margin-top: 32px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
h3 { font-size: 18px; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 16px; }
.meta { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin-bottom: 6px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 6px; }
.article { max-width: 720px; }
.article .body p { margin: 0 0 1.1em; font-size: 18px; line-height: 1.7; white-space: pre-line; }
.article figure { margin: 0 0 20px; }
.article img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.article figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.related { margin-top: 36px; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.list li a { color: var(--ink); font-weight: 600; text-decoration: none; }
.list li a:hover { text-decoration: underline; }
.state { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; color: var(--muted); }
.state strong { color: var(--ink); display: block; margin-bottom: 4px; }
.notice { background: var(--notice-bg); color: var(--notice-ink); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 20px; font-size: 15px; }
.placeholder { background: var(--notice-bg); color: var(--notice-ink); padding: 0 4px; border-radius: 4px; font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.prose p, .prose li { max-width: 70ch; }
.prose h2 { margin-top: 28px; }
form.contact label, form.search-page label { display: block; font-weight: 600; margin: 14px 0 4px; }
form.search-page input { width: 100%; max-width: 420px; font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.plain-link { color: inherit; text-decoration: none; }
form.contact input, form.contact textarea { width: 100%; font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 24px; }
.site-footer .wrap { padding-top: 24px; padding-bottom: 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0 0 14px; font-size: 14px; }
.footer-links a { color: var(--ink); }
.small { font-size: 13px; color: var(--muted); margin: 0; }
@media (max-width: 639px) {
  .search { margin-left: 0; width: 100%; }
  .search input { flex: 1; width: auto; }
}
