:root {
  --paper: #EEE8DA;
  --card: #F5F0E4;
  --ink: #17150F;
  --ink-2: #3B372D;
  --muted: #5C5648;
  --rule: #CFC6B1;
  --accent: #2C3C73;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--ink); color: var(--paper);
  padding: 12px 16px; font-family: var(--ui); font-size: 14px;
}
.skip:focus { left: 16px; top: 16px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

/* Masthead and navigation */
.masthead {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 32px; padding-top: 24px; padding-bottom: 24px;
}
.brand {
  font-family: var(--display); font-size: 24px; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; padding: 10px 0;
}
.nav { display: flex; flex-wrap: wrap; gap: 0 28px; font-family: var(--ui); font-size: 14px; font-weight: 500; }
.nav a { color: var(--ink); text-decoration: none; padding: 14px 0; display: inline-block; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"] { font-weight: 600; }

/* Headings and intros */
.eyebrow {
  margin: 0; font-family: var(--ui); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.display {
  margin: 20px 0 0; max-width: 900px;
  font-family: var(--display); font-weight: 300;
  font-size: clamp(38px, 5.6vw, 68px); line-height: 1.04; letter-spacing: -0.025em;
  text-wrap: balance;
}
.display.xl { font-size: clamp(40px, 6.4vw, 80px); line-height: 1.02; max-width: 960px; }
.intro { margin: 28px 0 0; max-width: 640px; font-size: 20px; color: var(--ink-2); text-wrap: pretty; }
.hero { padding-top: 72px; padding-bottom: 80px; }
.page-head { padding-top: 72px; }
.list-section { padding-top: 72px; }

/* Article lists */
.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 24px; margin-bottom: 24px;
}
.label {
  margin: 0; font-family: var(--ui); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.more { font-family: var(--ui); font-size: 14px; font-weight: 600; padding: 10px 0; text-decoration: none; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }
.entries { border-bottom: 1px solid var(--rule); }
.entry {
  display: grid; grid-template-columns: 1fr 2fr; gap: 8px 32px;
  padding: 32px 0; border-top: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
}
.entry:first-child { border-top-color: var(--ink); }
.entry-meta { font-family: var(--ui); font-size: 13px; font-weight: 600; color: var(--muted); }
.entry-meta .topic { color: var(--accent); }
.entry h3 {
  margin: 0 0 8px; font-family: var(--display); font-weight: 400;
  font-size: 30px; line-height: 1.15; letter-spacing: -0.01em;
}
.entry p { margin: 0; font-size: 17px; color: var(--muted); max-width: 620px; }
.entry:hover h3 { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.list-note { margin: 56px 0 0; max-width: 620px; font-size: 15px; color: var(--muted); }

/* Article page */
.article { max-width: 720px; margin: 0 auto; padding: 56px 32px 0; }
.back {
  display: inline-block; padding: 12px 0; font-family: var(--ui);
  font-size: 14px; font-weight: 500; text-decoration: none;
}
.back:hover { text-decoration: underline; text-underline-offset: 4px; }
.article .eyebrow { margin: 24px 0 20px; }
.article .eyebrow span { color: var(--muted); }
.article h1 {
  margin: 0; font-family: var(--display); font-weight: 300;
  font-size: clamp(34px, 5vw, 54px); line-height: 1.07; letter-spacing: -0.025em; text-wrap: balance;
}
.lede {
  margin: 28px 0 0; font-family: var(--display); font-weight: 300;
  font-size: 24px; line-height: 1.4; color: var(--ink-2); text-wrap: pretty;
}
.prose { margin-top: 56px; font-size: 20px; line-height: 1.7; }
.prose h2 {
  margin: 44px 0 16px; font-family: var(--display); font-weight: 400;
  font-size: 28px; line-height: 1.2; letter-spacing: -0.01em;
}
.prose h3 { margin: 32px 0 12px; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.25; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 20px; text-wrap: pretty; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 1.3em; }
.prose li { margin-bottom: 8px; }
.prose blockquote { margin: 0 0 20px 24px; font-style: italic; color: var(--ink-2); }
.prose blockquote p { margin: 0; }
.prose img { display: block; max-width: 100%; height: auto; margin: 0 0 20px; }
.prose a { overflow-wrap: anywhere; }
.prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.88em; background: var(--card); padding: 0.1em 0.3em; }
.prose pre { overflow-x: auto; margin: 0 0 20px; padding: 16px; background: var(--card); font-size: 16px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 44px 0; }
.note {
  margin: 44px 0 0; padding-top: 24px; border-top: 1px solid var(--rule);
  font-family: var(--ui); font-size: 13px; line-height: 1.6; color: var(--muted);
}
.nextcard {
  display: block; margin-top: 56px; padding: 28px;
  background: var(--card); border: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
}
.nextcard .label { color: var(--accent); }
.nextcard strong {
  display: block; margin-top: 8px; font-family: var(--display); font-weight: 400;
  font-size: 24px; line-height: 1.2;
}
.nextcard:hover strong { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* About page */
.about { display: grid; grid-template-columns: 2fr 1fr; gap: 56px 72px; padding-top: 64px; align-items: start; }
.about .prose { margin-top: 0; max-width: 660px; font-size: 21px; line-height: 1.65; }
.facts { margin: 0; padding-top: 20px; border-top: 2px solid var(--ink); display: grid; gap: 16px; font-size: 16px; }
.facts dt {
  font-family: var(--ui); font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.facts dd { margin: 0; }
.fine { max-width: 660px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--muted); }

/* Footer */
.site-footer { margin-top: 112px; border-top: 1px solid var(--rule); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between;
  padding-top: 40px; padding-bottom: 56px; font-size: 15px; color: var(--muted);
}
.footer-inner p { margin: 4px 0 0; }
.footer-name { font-family: var(--display); font-size: 20px; color: var(--ink); }
.footer-fine { margin-top: 12px; font-size: 14px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 24px; font-family: var(--ui); font-size: 14px; font-weight: 500; }
.footer-nav a { color: var(--muted); text-decoration: none; padding: 12px 0; display: inline-block; }
.footer-nav a:hover { color: var(--accent); }

@media (max-width: 800px) {
  .entry, .about { grid-template-columns: 1fr; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .article { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 48px; padding-bottom: 56px; }
  .page-head { padding-top: 48px; }
  .prose { font-size: 19px; }
}
