:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #242c29;
  --muted: #606960;
  --line: #d5dbd1;
  --accent: #9b432a;
  --soft: #eaf0e7;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 5px; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
::selection { background: #dce7d4; }
.wrap { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: absolute; left: 20px; top: -100px; padding: 8px 16px; background: var(--ink); color: white; z-index: 5; }
.skip:focus { top: 12px; color: white; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 27px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; font-size: 19px; font-weight: 650; letter-spacing: .08em; white-space: nowrap; }
.mark { width: 27px; height: 32px; border: 1.5px solid currentColor; border-radius: 2px; position: relative; }
.mark::before { content: ""; position: absolute; inset: 8px 6px auto; height: 5px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.mark::after { content: ""; position: absolute; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; right: -5px; bottom: 3px; border: 2px solid var(--paper); }
.nav { display: flex; flex-wrap: wrap; gap: 28px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--accent); font-size: 16px; letter-spacing: .08em; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 245px; align-items: end; gap: 60px; padding: 70px 0 62px; border-bottom: 1px solid var(--line); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 23px; font-size: clamp(36px, 4.5vw, 56px); font-weight: 620; line-height: 1.35; letter-spacing: -.04em; }
.lead { max-width: 620px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.85; }
.margin-note { border-left: 1px solid var(--line); padding-left: 24px; color: var(--muted); }
.margin-note p { margin: 0; }
.margin-note strong { display: block; font-weight: 500; font-size: 34px; line-height: 1.4; color: var(--ink); margin-bottom: 9px; font-variant-numeric: tabular-nums; }
.reading-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding-top: 47px; }
.contents { align-self: start; position: sticky; top: 30px; }
.contents h2 { margin-bottom: 22px; font-size: 16px; font-weight: 500; color: var(--muted); }
.contents ol { margin: 0; padding: 0; list-style: none; }
.contents li { margin-bottom: 16px; }
.contents a { display: flex; gap: 13px; text-decoration: none; line-height: 1.6; }
.contents .number { color: var(--accent); font-variant-numeric: tabular-nums; }
.contents .small-note { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 30px; color: var(--muted); }
.note { padding-bottom: 45px; margin-bottom: 44px; border-bottom: 1px solid var(--line); scroll-margin-top: 32px; }
.note:last-child { margin-bottom: 0; border-bottom: 0; }
.note-label { font-size: 16px; color: var(--accent); margin-bottom: 12px; }
h2 { margin-bottom: 20px; font-size: 28px; font-weight: 620; line-height: 1.45; letter-spacing: -.02em; }
h3 { margin-block: 28px 11px; font-size: 19px; font-weight: 600; }
.note p { margin-bottom: 18px; }
.note ul, .note ol, .prose ul { padding-left: 1.4em; }
.note li, .prose li { padding-left: 4px; margin-bottom: 8px; }
.note li:last-child, .prose li:last-child { margin-bottom: 0; }
.callout { margin-top: 25px; padding: 21px 24px; border-left: 3px solid #75866b; background: var(--soft); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: 5px; font-weight: 600; }
.checklist { border-block: 1px solid var(--line); padding: 6px 0; margin: 25px 0; }
.check-row { display: grid; grid-template-columns: 90px 1fr; gap: 22px; padding-block: 14px; }
.check-row + .check-row { border-top: 1px solid var(--line); }
.check-row dt { color: var(--accent); }
.check-row dd { margin: 0; }
.check-row dd span { display: block; color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1em; overflow-wrap: anywhere; }
pre { margin: 23px 0; padding: 22px 24px; overflow-x: auto; border: 1px solid var(--line); background: #efeee6; line-height: 1.65; }
pre code { overflow-wrap: normal; }
.closing-note { margin: 30px 0 0; padding-top: 29px; border-top: 1px solid var(--line); color: var(--muted); }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; padding-block: 28px; margin-top: 30px; border-top: 1px solid var(--line); color: var(--muted); }
.footer p { margin: 0; }
.footer nav { display: flex; gap: 25px; }
.page { max-width: 760px; min-height: 62vh; padding-block: 68px 45px; }
.page h1 { margin-bottom: 28px; font-size: clamp(36px, 5vw, 48px); }
.prose p { margin-bottom: 21px; }
.prose h2 { font-size: 22px; margin-top: 36px; margin-bottom: 15px; }
.back { display: inline-block; margin-top: 20px; font-weight: 500; }
.error-code { font-size: clamp(80px, 16vw, 140px); color: #9aab92; line-height: 1.1; margin-bottom: 24px; font-weight: 500; letter-spacing: -.07em; }
@media (max-width: 820px) {
  .wrap { width: min(100% - 48px, 680px); }
  .intro { grid-template-columns: 1fr; padding-block: 48px 42px; gap: 29px; }
  .margin-note { padding-left: 18px; }
  .margin-note strong { display: inline; margin-right: 10px; font-size: 23px; }
  .margin-note p { display: inline; }
  .reading-layout { grid-template-columns: 1fr; gap: 35px; padding-top: 30px; }
  .contents { position: static; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
  .contents h2 { margin-bottom: 17px; }
  .contents li { margin-bottom: 12px; }
  .contents .small-note { display: none; }
  .page { padding-block: 46px 30px; }
}
@media (max-width: 440px) {
  .wrap { width: calc(100% - 36px); }
  .masthead { align-items: flex-start; padding-block: 22px; gap: 18px; }
  .nav { gap: 16px; padding-top: 1px; }
  .wordmark { font-size: 18px; gap: 10px; }
  .mark { width: 23px; height: 29px; }
  h1 { font-size: 36px; }
  h2 { font-size: 25px; }
  .lead { font-size: 17px; }
  .check-row { grid-template-columns: 64px 1fr; gap: 15px; }
  .callout, pre { padding: 18px; }
  .footer { margin-top: 20px; padding-block: 23px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media print {
  :root { background: white; color: black; }
  .wrap { width: 100%; }
  .skip, .nav, .contents, .margin-note, .footer { display: none; }
  .intro, .reading-layout { display: block; padding-block: 24px; }
  .note { break-inside: avoid; }
}
