:root {
  color-scheme: light;
  --paper: #f7f5fb;
  --ink: #231d33;
  --accent: #5b3d9e;
  --muted: #5f5a73;
  --band: #ebe6f5;
  --rule: #d0c8e3;
  --font-heading: Iowan Old Style, Palatino Linotype, URW Palladio L, P052, serif;
  --font-body: Iowan Old Style, Palatino Linotype, URW Palladio L, P052, serif;
  --font-meta: Seravek, Gill Sans Nova, Ubuntu, Calibri, DejaVu Sans, source-sans-pro, sans-serif;
  --heading-weight: 600;
  --heading-tracking: -0.01em;
  --heading-style: normal;
  --text-small: 0.797rem;
  --text-base: 1.063rem;
  --text-lead: 1.416rem;
  --text-h3: 1.416rem;
  --text-h2: 1.888rem;
  --text-h1: 2.517rem;
  --text-display: 3.355rem;
  --text-hero: 4.472rem;
  --leading: 1.75;
  --measure: 35em;
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.75rem;
  --space-l: 3rem;
  --space-xl: 5.5rem;
  --radius: 6px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading);
  font-kerning: normal;
  overflow-wrap: break-word;
}
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-style: var(--heading-style);
  letter-spacing: var(--heading-tracking);
  line-height: 1.15;
  text-wrap: balance;
}
p, ul, ol, dl, dd, figure { margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--paper); }
time { font-variant-numeric: tabular-nums; }
.drawing { display: block; width: 100%; height: auto; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--accent);
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* A page's own header and its reading column. */
.article-head { margin-bottom: var(--space-m); }
.article-head h1 { font-size: clamp(var(--text-h2), 4.5vw, var(--text-h1)); line-height: 1.08; }
.lead { margin-top: var(--space-s); max-width: 34em; font-size: var(--text-lead); line-height: 1.45; }
.dateline, .filed-under {
  margin-bottom: var(--space-xs);
  font-family: var(--font-meta);
  font-size: var(--text-small);
  color: var(--muted);
}
.filed-under { margin: var(--space-s) 0 0; }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-s); }
.prose > h2 { margin-top: var(--space-l); font-size: var(--text-h2); }
.prose > h3 { margin-top: var(--space-m); font-size: var(--text-h3); }
.prose > h2 + *, .prose > h3 + * { margin-top: var(--space-xs); }
.prose p { text-wrap: pretty; hyphens: auto; }
.prose h2 a, .prose h3 a { color: inherit; }

/* Lists: bullets in the accent, steps numbered in rings, a checklist of empty boxes to tick on paper. */
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose ol.steps { list-style: none; padding-left: 0; counter-reset: step; }
ol.steps > li { position: relative; min-height: 1.9em; padding-left: 2.7em; counter-increment: step; }
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.85em;
  height: 1.85em;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-meta);
  font-size: 0.85em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.prose ul.checklist { list-style: none; padding-left: 0; }
ul.checklist > li { position: relative; padding-left: 1.9em; }
ul.checklist > li::before {
  content: "";
  position: absolute;
  left: 0.1em;
  top: 0.32em;
  width: 0.95em;
  height: 0.95em;
  border: 1.5px solid var(--accent);
  border-radius: 2px;
}

/* Definitions: the term in the heading face, the definition hung from a rule. */
dl.definitions { display: grid; gap: var(--space-s); }
dl.definitions dt { font-family: var(--font-heading); font-weight: var(--heading-weight); font-style: var(--heading-style); }
dl.definitions dd { margin-top: 0.2em; padding-left: var(--space-s); border-left: 2px solid var(--rule); }

/* Tables scroll sideways inside their figure rather than squeeze. */
figure.table { overflow-x: auto; }
figure.table figcaption { margin-bottom: var(--space-xs); font-family: var(--font-meta); font-size: var(--text-small); color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 0.94em; line-height: 1.4; font-variant-numeric: tabular-nums; }
th, td { padding: 0.55em 1em 0.55em 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
thead th { font-family: var(--font-meta); font-weight: 600; border-bottom: 2px solid var(--ink); }
tbody th { font-weight: 600; }
th:last-child, td:last-child { padding-right: 0; }

/* An aside sits on the second surface, marked by an accent rule. */
aside.aside { padding: var(--space-s) var(--space-m); background: var(--band); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }
.aside-label { margin-bottom: 0.25em; font-family: var(--font-heading); font-weight: var(--heading-weight); font-style: var(--heading-style); }

/* Questions open in place; the marker is a chevron drawn with borders that turns when open. */
.faq { border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-s);
  padding-block: var(--space-xs);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-style: var(--heading-style);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.2em;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-0.15em) rotate(45deg);
}
.faq details[open] summary::after { transform: translateY(0.15em) rotate(-135deg); }
.faq details > p { padding-bottom: var(--space-s); }

/* Months: the name in the margin, what happens beside it. */
dl.months { border-top: 1px solid var(--rule); }
dl.months > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: var(--space-s); padding-block: var(--space-xs); border-bottom: 1px solid var(--rule); }
dl.months dt { font-family: var(--font-meta); color: var(--accent); }
dl.months dd { margin: 0; }

/* Dated lists of notes. */
.note-list { list-style: none; margin: 0; padding: 0; }
.note-list > li { padding-block: var(--space-s); border-top: 1px solid var(--rule); }
.note-list > li:last-child { border-bottom: 1px solid var(--rule); }
.note-list time { font-family: var(--font-meta); font-size: var(--text-small); color: var(--muted); }
.note-list h2, .note-list h3, .note-list h4 { margin-top: 0.15em; font-size: var(--text-h3); }
.note-list h2 a, .note-list h3 a, .note-list h4 a { color: var(--ink); text-decoration: none; }
.note-list h2 a:hover, .note-list h3 a:hover, .note-list h4 a:hover { color: var(--accent); text-decoration: underline; }
.note-list p { margin-top: 0.25em; max-width: 36em; color: var(--muted); }
.note-figure { max-width: 36rem; margin-bottom: var(--space-m); overflow: hidden; border-radius: var(--radius); background: var(--band); }

/* Previous and next. */
.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--space-s); margin-top: var(--space-l); }
.pager-link { display: block; padding: var(--space-s) var(--space-m); color: var(--ink); text-decoration: none; border: 1px solid var(--rule); border-radius: var(--radius); }
.pager-link:hover { border-color: var(--accent); }
.pager-next { text-align: right; }
.pager-label { display: block; font-family: var(--font-meta); font-size: var(--text-small); color: var(--muted); }
.pager-title { display: block; color: var(--accent); font-family: var(--font-heading); font-weight: var(--heading-weight); font-style: var(--heading-style); }
.back { margin-top: var(--space-m); font-family: var(--font-meta); font-size: var(--text-small); }
.divider { display: flex; justify-content: center; margin-block: var(--space-l); }
.divider .drawing { width: 12rem; }
.page-list { display: grid; gap: 0.4em; padding-left: 1.25em; }
.page-list li::marker { color: var(--accent); }
.contact { font-style: italic; }

/* The footer every page carries. */
.site-footer { margin-top: var(--space-xl); border-top: 1px solid var(--rule); font-family: var(--font-meta); font-size: var(--text-small); }
.site-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-s) var(--space-m); padding-block: var(--space-m) var(--space-l); }
.site-footer-name a { color: var(--ink); text-decoration: none; font-family: var(--font-heading); font-weight: var(--heading-weight); font-style: var(--heading-style); }
.site-footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-m); }
.site-footer-links a { color: var(--muted); }
.site-footer-links a[aria-current] { color: var(--ink); }
/* Journal */
.journal { --wrap: 44rem; }
.journal .masthead-inner,
.journal .page,
.journal .site-footer-inner { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.journal .masthead-inner { padding-top: clamp(var(--space-m), 6vw, var(--space-xl)); }
.journal .site-name {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  font-style: var(--heading-style);
  letter-spacing: var(--heading-tracking);
  font-size: clamp(var(--text-h1), 12vw, calc(var(--text-hero) * 1.45));
  line-height: 0.92;
}
.journal .site-name a { color: var(--ink); text-decoration: none; }
.journal .tagline { margin-top: var(--space-s); max-width: 30em; font-size: var(--text-lead); line-height: 1.4; color: var(--muted); }
.journal .site-nav ul { list-style: none; margin: var(--space-m) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-m); font-family: var(--font-meta); font-size: var(--text-small); }
.journal .site-nav a { padding-bottom: 0.15em; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.journal .site-nav a:hover, .journal .site-nav a[aria-current] { border-bottom-color: var(--accent); }
.journal .masthead-drawing { height: clamp(5rem, 15vw, 11rem); margin-top: var(--space-m); background: var(--band); border-block: 1px solid var(--rule); }
.journal .masthead-drawing .drawing { height: 100%; }
.masthead-centered .masthead-inner { text-align: center; }
.masthead-centered .tagline { margin-inline: auto; }
.masthead-centered .site-nav ul { justify-content: center; }

.journal .page { padding-top: var(--space-l); }
.journal .intro > p:first-child { font-size: var(--text-lead); line-height: 1.5; }
.journal .home-notes, .journal .home-guides { margin-top: var(--space-l); }
.journal .home-notes > h2, .journal .home-guides > h2 { margin-bottom: var(--space-s); font-size: var(--text-h2); }
.journal .guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-s); }
.journal .guide-list h3 { font-size: var(--text-h3); }
.journal .guide-list h3 a { color: var(--ink); text-decoration: none; }
.journal .guide-list h3 a:hover { color: var(--accent); text-decoration: underline; }
.journal .guide-list p { margin-top: 0.2em; color: var(--muted); }
.journal .more-heading { margin-bottom: var(--space-xs); font-family: var(--font-meta); font-size: var(--text-small); color: var(--muted); }
.journal .more-guides .guide-list { gap: 0.4em; }
.dates-stacked .note-list time { display: block; }

@media (min-width: 66rem) {
  .dates-gutter .note-list > li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); column-gap: var(--space-m); margin-left: calc(-9rem - var(--space-m)); }
  .dates-gutter .note-list time { padding-top: 0.35em; text-align: right; }
  .dates-gutter .note .article-head { position: relative; }
  .dates-gutter .note .dateline { position: absolute; top: 0.6em; right: 100%; width: 9rem; margin: 0 var(--space-m) 0 0; text-align: right; }
}
