:root {
  color-scheme: light;
  --paper: #f5f2eb;
  --surface: #fcfaf5;
  --ink: #222a29;
  --muted: #505b58;
  --accent: #963e27;
  --line: #d6d2c7;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 5.25rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.62 var(--body); }
main { min-width: 0; }
h1, h2, h3, p, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
button { font: inherit; }
:focus-visible { outline: 2px solid #216481; outline-offset: 5px; }
::selection { background: #f0cbad; color: #241811; }

.wrap { width: min(100% - 5rem, 1160px); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 8vw, 8rem); }
.eyebrow {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.5;
  text-transform: uppercase;
}
.skip-link {
  position: fixed;
  z-index: 10;
  inset: .65rem auto auto .65rem;
  transform: translateY(-200%);
  padding: .55rem .85rem;
  background: var(--ink);
  color: white;
}
.skip-link:focus { transform: none; color: white; }

.site-header {
  position: sticky;
  z-index: 4;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(12px)) {
  .site-header { background: rgba(245, 242, 235, .9); backdrop-filter: blur(12px); }
}
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.header-inner { min-height: 4.1rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: .65rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -.022em;
}
.brand-mark { flex: none; width: 1.5rem; height: 1.5rem; }
.brand-ring { stroke: var(--brand-ring, var(--ink)); }
.brand-particle-warm { fill: var(--brand-warm, #a3472f); }
.brand-particle-cool { fill: var(--brand-cool, #286c70); }
.site-nav { display: flex; align-items: center; gap: clamp(1.5rem, 3.7vw, 3.1rem); }
.site-nav a { position: relative; padding: .55rem 0; font-size: .9rem; font-weight: 600; text-decoration: none; }
.site-nav a::after { position: absolute; right: 0; bottom: .35rem; left: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .24s var(--ease); content: ""; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.menu-toggle { min-height: 44px; border: 0; padding-inline: .5rem; background: transparent; color: var(--ink); font-weight: 650; cursor: pointer; }

.button, .text-link { display: inline-flex; width: fit-content; align-items: center; gap: .65rem; min-height: 44px; font-weight: 650; font-size: .88rem; }
.button {
  justify-content: center;
  padding: .73rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: .25rem;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  transition: background-color .23s var(--ease), border-color .23s var(--ease), transform .23s var(--ease);
}
.button:hover { background: #394442; border-color: #394442; color: white; transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button.secondary { background: transparent; color: var(--ink); }
.button.secondary:hover { background: var(--surface); color: var(--accent); }
.text-link { text-decoration: underline; text-decoration-color: #a6a8a0; transition: color .2s ease, text-decoration-color .2s ease; }
.text-link:hover { text-decoration-color: currentColor; }
.text-link span { display: inline-block; transition: transform .23s var(--ease); }
.text-link:hover span { transform: translateX(3px); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2.35rem; }
.home-notes .note-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.home-notes .note-list a { display: grid; grid-template-columns: minmax(7rem, 1fr) 4.5fr auto; align-items: center; gap: .5rem 1.25rem; min-height: 5rem; padding: 1rem .15rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.home-notes .note-kind { color: var(--muted); font-size: .83rem; }
.home-notes .note-title { font: 500 clamp(1.3rem, 2.8vw, 2rem)/1.16 var(--display); letter-spacing: -.026em; }
.home-notes .note-arrow { transition: transform .23s var(--ease); }
.home-notes .note-list a:hover .note-arrow { transform: translate(2px, -2px); }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer-inner { min-height: 6.5rem; flex-wrap: wrap; padding-block: 1.2rem; }
.footer-inner .wordmark { color: var(--ink); font-size: .94rem; }
.footer-inner > a:not(.wordmark) { font-weight: 600; }

@media (max-width: 900px) {
  .wrap { width: min(100% - 3.5rem, 1160px); }
}
@media (max-width: 720px) {
  .wrap { width: min(100% - 2.5rem, 1160px); }
  .header-inner { min-height: 3.65rem; flex-wrap: wrap; gap: 0 1rem; }
  .site-nav { gap: .2rem 1rem; flex-wrap: wrap; }
  .header-inner:has(.menu-toggle:not([hidden])) .site-nav { position: absolute; top: 100%; left: 0; width: 100%; display: grid; gap: 0; padding: .35rem 1.25rem .9rem; border-bottom: 1px solid var(--line); background: var(--paper); }
  .header-inner:has(.menu-toggle:not([hidden])) .site-nav a { min-height: 44px; padding: .6rem .15rem; }
  .site-nav a::after { right: auto; width: 2rem; }
  .section-heading { align-items: start; flex-direction: column; gap: .35rem; margin-bottom: 1.2rem; }
}
@media (max-width: 460px) {
  .home-notes .note-list a { grid-template-columns: minmax(0, 1fr) auto; padding-block: 1rem; }
  .home-notes .note-kind { grid-column: 1; }
  .home-notes .note-title { grid-column: 1; }
  .home-notes .note-arrow { grid-column: 2; grid-row: 1 / 3; }
  .footer-inner { align-items: start; flex-direction: column; gap: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition { pointer-events: none; }
  ::view-transition-group(root) { animation-duration: .24s; animation-timing-function: var(--ease); }
}
