:root {
  --ink: #1a2026;
  --ink-soft: #333c44;
  --paper: #f1efea;
  --panel: #f8f7f3;
  --signal: #b03a2e;
  --slate: #3a5c68;
  --muted: #6d7278;
  --rule: #d5d2ca;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --body: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  overscroll-behavior-x: none;
  max-width: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.72;
  -webkit-text-size-adjust: 100%;
  font-kerning: normal;
}

.wrap {
  width: 100%;
  max-width: 748px;
  margin: 0 auto;
  padding: 0 22px;
  touch-action: pan-y;
}

a { color: var(--slate); text-decoration: none; border-bottom: 1px solid rgba(58, 92, 104, .38); }
a:hover { color: var(--signal); border-bottom-color: rgba(176, 58, 46, .55); }
a:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

/* ---------- header ---------- */
header.site { border-bottom: 1px solid var(--rule); background: var(--paper); }
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}
header.site a { border-bottom: 0; display: block; }
header.site img { height: 25px; width: auto; display: block; }
header.site .stamp {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- hero ---------- */
.hero { padding: 56px 0 26px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 18px;
}
h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(31px, 6.2vw, 44px);
  line-height: 1.15;
  letter-spacing: -.012em;
  margin: 0;
}
.dek {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 20px 0 0;
  max-width: 34em;
}
.updated {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 18px 0 0;
}
article > .updated { margin: 0 0 4px; }

/* ---------- article ---------- */
article { padding: 0 0 20px; }
article p { margin: 0 0 22px; }
article h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 27px;
  line-height: 1.24;
  letter-spacing: -.008em;
  margin: 52px 0 18px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
article h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.32;
  margin: 34px 0 14px;
}
article h2 + p, article h3 + p { margin-top: 0; }
article ol { margin: 0 0 22px; padding-left: 26px; }
article ol li { margin-bottom: 8px; }
article ul { margin: 0 0 22px; padding-left: 22px; }
article ul li { margin-bottom: 8px; }
em { font-style: italic; }
article code {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 1px 5px;
}

/* ---------- contents ---------- */
.contents {
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 0;
  margin: 34px 0 38px;
}
.contents > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 15px 44px 15px 22px;
  display: block;
  position: relative;
}
.contents > summary::-webkit-details-marker { display: none; }
.contents > summary::marker { content: ""; }
.contents > summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 1.5px solid var(--signal);
  border-bottom: 1.5px solid var(--signal);
  transform: rotate(45deg);
}
.contents[open] > summary::after { margin-top: -2px; transform: rotate(-135deg); }
.contents > summary:hover { color: var(--ink); }
.contents > summary:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.contents ol {
  margin: 0;
  padding: 2px 22px 20px;
  list-style: none;
  counter-reset: toc;
  border-top: 1px solid var(--rule);
}
.contents li {
  counter-increment: toc;
  font-size: 16px;
  line-height: 1.5;
  padding: 5px 0 5px 34px;
  position: relative;
  margin: 0;
}
.contents li:first-child { padding-top: 12px; }
.contents li::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--signal);
}
.contents li:first-child::before { top: 15px; }
.contents a { border-bottom: 0; color: var(--ink); }
.contents a:hover { color: var(--signal); }

/* ---------- definition list ---------- */
dl.points { margin: 0 0 22px; padding: 0; }
dl.points dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  margin: 18px 0 2px;
}
dl.points dt::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 12px;
  background: var(--signal);
  margin-right: 10px;
  vertical-align: -1px;
}
dl.points dd { margin: 0 0 0 16px; color: var(--ink-soft); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; margin: 26px 0 28px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--panel); }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
}
tbody tr:last-child td { border-bottom: 0; }
td.term, th.term { font-family: var(--display); font-weight: 600; }

/* ---------- callout ---------- */
.callout {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--signal);
  padding: 22px 24px 4px;
  margin: 44px 0 0;
}
.callout h2 {
  margin: 0 0 12px;
  border: 0;
  padding: 0;
  font-size: 22px;
}
.callout p { margin: 0 0 18px; }

/* ---------- editorial note ---------- */
.editorial-note {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--slate);
  padding: 22px 24px 6px;
  margin: 48px 0 0;
  font-size: 16px;
}
.editorial-note h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}
.editorial-note p { margin: 0 0 16px; }

/* ---------- closing disclaimer ---------- */
.disclaimer {
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  margin: 44px 0 0;
}

/* ---------- faq ---------- */
.faq h3 { font-size: 19px; margin-top: 30px; }

/* ---------- footer ---------- */
footer.site {
  margin-top: 60px;
  border-top: 1px solid var(--rule);
  background: var(--panel);
  padding: 40px 0 44px;
}
footer.site img { height: 23px; width: auto; display: block; margin-bottom: 18px; }
footer.site .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 26px 24px;
  margin: 0 0 30px;
}
footer.site .cols > div { flex: 1 1 130px; min-width: 120px; }
footer.site .cols h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}
footer.site .cols ul { list-style: none; margin: 0; padding: 0; }
footer.site .cols li { font-size: 15px; line-height: 1.9; }
footer.site .cols a { color: var(--ink-soft); border-bottom: 0; }
footer.site .cols a:hover { color: var(--signal); }
footer.site .note { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 10px; max-width: 46em; }
footer.site .bottom {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  margin-top: 22px;
}

/* ---------- mobile ---------- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .wrap { padding: 0 18px; }
  .hero { padding: 38px 0 20px; }
  .dek { font-size: 18px; }
  article h2 { font-size: 24px; margin-top: 42px; }
  article h3 { font-size: 19px; }
  header.site .stamp { display: none; }
  .contents > summary { padding: 14px 40px 14px 18px; }
  .contents > summary::after { right: 20px; }
  .contents ol { padding: 2px 18px 18px; }
  .callout, .editorial-note { padding-left: 18px; padding-right: 18px; }
  footer.site .cols { gap: 32px 20px; }
  footer.site .cols > div { flex: 1 1 45%; min-width: 45%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
