:root {
  color-scheme: light;
  --ink: #292722;
  --muted: #666257;
  --paper: #fffdf7;
  --line: #ddd5c5;
  --accent: #a74432;
  --wash: #f2ecdf;
}

* { box-sizing: border-box; }
html { background: var(--wash); }
body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.85 system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
a { color: #7e3025; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid #a74432; outline-offset: 3px; }
.site-header, .page-shell, .site-footer { width: min(100% - 32px, 820px); margin-inline: auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--ink); font-weight: 750; text-decoration: none; letter-spacing: .04em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 16px; font-size: .92rem; }
.site-header nav a { color: var(--ink); }
.page-shell { padding: 24px 0 48px; }
.breadcrumbs { margin: 0 0 14px; color: var(--muted); font-size: .88rem; }
.breadcrumbs span { padding-inline: .45em; }
.paper {
  padding: clamp(22px, 5vw, 52px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 10px 32px #392a1510;
}
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .82rem; font-weight: 750; letter-spacing: .12em; }
h1, h2, h3 { line-height: 1.4; }
h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.55rem); letter-spacing: .01em; }
h2 { margin: 2.1em 0 .55em; padding-bottom: .35em; border-bottom: 1px solid var(--line); font-size: 1.35rem; }
h3 { margin: 1.4em 0 .4em; font-size: 1.08rem; }
p { margin: .7em 0; }
.lead { margin: 1em 0 1.6em; color: #49463e; font-size: 1.08rem; }
.note, .result, .tool-callout { margin: 1.2em 0; padding: 16px 18px; border-left: 4px solid var(--accent); background: #f7f1e6; }
.note p:first-child, .result p:first-child, .tool-callout p:first-child { margin-top: 0; }
.note p:last-child, .result p:last-child, .tool-callout p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 1em 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: #f2ecdf; }
td.numeric, th.numeric { text-align: right; white-space: nowrap; }
ol, ul { padding-left: 1.4em; }
li + li { margin-top: .4em; }
.article-list { display: grid; gap: 14px; margin: 1.6em 0; padding: 0; list-style: none; }
.article-list li { margin: 0; padding: 18px 20px; border: 1px solid var(--line); background: var(--paper); }
.article-list a { font-size: 1.12rem; font-weight: 720; }
.article-list p { margin: .4em 0 0; color: var(--muted); }
.related { margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.related ul { margin-bottom: 0; }
.site-footer { padding: 0 0 28px; color: var(--muted); font-size: .88rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
@media (max-width: 520px) {
  body { font-size: 16px; }
  .site-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .paper { padding: 22px 18px; }
  th, td { padding: 8px; }
}
@media print {
  html, body { background: white; }
  .site-header, .breadcrumbs, .site-footer, .related, .tool-callout { display: none; }
  .page-shell { width: 100%; padding: 0; }
  .paper { border: 0; box-shadow: none; padding: 0; }
}
