:root {
  --bg: #fbfaf7;
  --text: #1d2126;
  --muted: #5b6168;
  --line: #dcd8cf;
  --head: #1f3354;
  --link: #24508f;
  --panel: #f2efe8;
  --mark-bg: #fff1b8;
  --mark-text: #4a3b00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --text: #e4e3df;
    --muted: #a3a8ae;
    --line: #353a41;
    --head: #b9ccec;
    --link: #93b6ee;
    --panel: #1c2026;
    --mark-bg: #4a3d0c;
    --mark-text: #ffe9a3;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.wrap { max-width: 42rem; margin: 0 auto; padding: 0 16px; }
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; padding-bottom: 12px; font-size: 14px; color: var(--muted); }
a { color: var(--link); text-underline-offset: 2px; }
.top a { color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: 0.02em; }
main { padding-bottom: 48px; }
h1 {
  font-family: "Hiragino Mincho ProN", "Noto Serif JP", "Noto Serif CJK JP", "Yu Mincho", serif;
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.4;
  color: var(--head);
  margin: 32px 0 16px;
}
h2 { font-size: 1.2rem; line-height: 1.5; color: var(--head); margin: 44px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
h3 { font-size: 1.05rem; line-height: 1.5; margin: 28px 0 8px; }
h4 { font-size: 0.95rem; margin: 18px 0 4px; color: var(--muted); }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 1.3em; }
li { margin: 4px 0; }
.dates { color: var(--muted); font-size: 14px; }
.dates p { margin: 0; }
nav.toc { background: var(--panel); border-radius: 8px; padding: 12px 16px; margin: 24px 0 8px; font-size: 15px; }
nav.toc p { margin: 0 0 4px; font-weight: 600; }
nav.toc ol { margin: 0; padding-left: 1.6em; }
nav.toc li { margin: 2px 0; }
table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 15px; line-height: 1.7; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--panel); font-weight: 600; }
table.kv th[scope="row"] { width: 32%; }
mark { background: var(--mark-bg); color: var(--mark-text); padding: 0 3px; border-radius: 3px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { padding-top: 16px; padding-bottom: 32px; }
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 12px; padding: 4px 0; }
  table.stack td { border: none; padding: 4px 12px; }
  table.stack td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
  table.kv th[scope="row"] { width: 36%; }
}
