:root {
  --ink: #183145;
  --muted: #607582;
  --paper: #f7f5ef;
  --card: #fffdf8;
  --line: #d9d9d2;
  --accent: #c15c38;
  --accent-dark: #9d4324;
  --gold: #d7a72e;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(circle at 88% 6%, rgba(215, 167, 46, .12), transparent 23rem), var(--paper); font-family: var(--sans); line-height: 1.6; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.shell { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 5.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font-weight: 750; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { display: grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-family: var(--serif); font-size: 1.25rem; }
nav { display: flex; gap: .2rem; }
nav a { padding: .5rem .7rem; color: var(--muted); font-size: .92rem; font-weight: 650; text-decoration: none; }
nav a:hover, nav .is-current { color: var(--accent-dark); }
nav .is-current { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35rem; }
.hero { padding-block: clamp(5rem, 12vw, 9rem) clamp(4rem, 9vw, 7rem); max-width: 1120px; }
.eyebrow { margin: 0 0 1rem; color: var(--accent-dark); font-size: .74rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2, h3 { line-height: 1.08; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.035em; }
h1 { max-width: 850px; margin: 0; font-size: clamp(3rem, 8vw, 6.3rem); }
h1 em { color: var(--accent); font-weight: inherit; }
.lede { max-width: 680px; margin: 1.8rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-top: 2.25rem; }
.button { display: inline-flex; gap: .75rem; align-items: center; padding: .72rem 1rem; border: 1px solid var(--accent-dark); background: var(--accent); color: white; font-weight: 700; text-decoration: none; transition: background .15s ease, transform .15s ease; }
.button:hover { background: var(--accent-dark); transform: translateY(-2px); }
.text-link { color: var(--accent-dark); font-size: .94rem; font-weight: 700; text-underline-offset: .25rem; }
.notes { padding-bottom: clamp(5rem, 10vw, 8rem); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--ink); }
.section-heading h2 { max-width: 500px; margin: 0 0 2rem; font-size: clamp(2rem, 4vw, 3.1rem); }
.note-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: rgba(255, 253, 248, .65); }
.note-grid article { min-height: 235px; padding: 1.7rem; }
.note-grid article + article { border-left: 1px solid var(--line); }
.note-number { color: var(--accent); font-family: var(--serif); font-size: 1.3rem; }
.note-grid h3 { margin: 2.3rem 0 .55rem; font-size: 1.05rem; }
.note-grid p { margin: 0; color: var(--muted); font-size: .95rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: clamp(2rem, 8vw, 8rem); padding-block: clamp(4rem, 10vw, 8rem); }
.article h1 { max-width: 760px; font-size: clamp(2.8rem, 6vw, 5.1rem); }
.article h2 { margin-top: 2.5rem; font-size: 2rem; }
.article p:not(.eyebrow):not(.lede) { max-width: 680px; color: var(--muted); }
.article-rule { width: 4rem; height: 3px; margin-top: 2.5rem; background: var(--gold); }
code { padding: .1rem .3rem; background: #ece9df; color: var(--ink); }
.article .button { margin-top: 1.3rem; }
.margin-note { align-self: start; padding: 1.2rem 0; border-top: 1px solid var(--ink); }
dl { margin: 1rem 0 0; }
dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
dt { color: var(--muted); } dd { margin: 0; font-weight: 700; text-align: right; }
.error-page { padding-block: clamp(6rem, 18vw, 12rem); }
.error-page h1 { max-width: 760px; font-size: clamp(3rem, 7vw, 5.5rem); }
.site-footer { margin-top: auto; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer-inner { min-height: 5rem; }
.site-footer a { color: var(--accent-dark); font-weight: 700; }

@media (max-width: 700px) {
  .shell { width: min(100% - 2rem, 1120px); }
  .header-inner { min-height: 4.7rem; }
  .note-grid, .article-layout { grid-template-columns: 1fr; }
  .note-grid article + article { border-top: 1px solid var(--line); border-left: 0; }
  .note-grid article { min-height: auto; }
  .note-grid h3 { margin-top: 1rem; }
  .section-heading { display: block; }
  .margin-note { max-width: 350px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
