:root {
  --bg: #ffffff;
  --bg-alt: #f3f5f8;
  --text: #17202b;
  --muted: #4d5866;
  --accent: #1a5683;
  --accent-hover: #12415f;
  --accent-text: #ffffff;
  --border: #d5dce4;
  --focus: #b45309;
  --todo-bg: #fff1c2;
  --todo-text: #5c4300;
  --draft-bg: #fde7c8;
  --draft-text: #4a2800;
  --radius: 10px;
  --max: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c;
    --bg-alt: #19212a;
    --text: #e8edf2;
    --muted: #b3bdc8;
    --accent: #7cbde8;
    --accent-hover: #a6d3f1;
    --accent-text: #0b1620;
    --border: #2e3943;
    --focus: #fbbf24;
    --todo-bg: #4a3a08;
    --todo-text: #ffe8a8;
    --draft-bg: #4a2c06;
    --draft-text: #ffe2bd;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  overflow-wrap: break-word;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 12px; }
h2 { font-size: 1.6rem; margin: 0 0 16px; }
h3 { font-size: 1.1rem; margin: 20px 0 6px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
code { font-size: 0.92em; }
.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; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-text); padding: 10px 14px; z-index: 20; }
.skip-link:focus { left: 8px; top: 8px; }

.draft-banner { background: var(--draft-bg); color: var(--draft-text); padding: 10px 16px; font-size: 0.95rem; }
.draft-banner p { margin: 0; max-width: var(--max); margin-inline: auto; }
.draft-list { max-width: var(--max); margin: 6px auto 0; padding-left: 20px; columns: 2 220px; }

.site-header { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
.nav-list { list-style: none; display: flex; gap: 4px 18px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a { text-decoration: none; color: var(--muted); padding: 4px 0; }
.nav-list a:hover { color: var(--accent); text-decoration: underline; }

.hero { padding: 64px 0 48px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 680px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn { display: inline-block; padding: 11px 20px; border-radius: var(--radius); text-decoration: none; font-weight: 600; border: 2px solid var(--accent); line-height: 1.3; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn-secondary { background: var(--bg); color: var(--accent); }
.btn-secondary:hover { color: var(--accent-hover); border-color: var(--accent-hover); }

.section { padding: 56px 0; scroll-margin-top: 64px; }
.alt { background: var(--bg-alt); }
.muted { color: var(--muted); }
.note { color: var(--muted); margin-top: 20px; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-top: 0; }
.card p { margin: 0; }

.facts { margin: 16px 0 0; }
.facts > div { display: grid; grid-template-columns: 150px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
}

.todo { background: var(--todo-bg); color: var(--todo-text); padding: 0 4px; border-radius: 4px; }

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 0.95rem; }
