:root {
  --emerald-950: #08271f;
  --emerald-900: #0f3b2e;
  --emerald-800: #174d3e;
  --brass: #b9a36b;
  --brass-light: #d9c994;
  --paper: #f5efdf;
  --paper-deep: #e8dfc9;
  --ink: #17342b;
  --muted: #53675f;
  --danger: #8b3f31;
  --line: rgba(185, 163, 107, 0.55);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", Arial, sans-serif;
  --measure: 69ch;
  --gutter: clamp(1rem, 4vw, 4rem);
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.25rem;
  --space-5: 3.5rem;
  --rule: 1px solid var(--line);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  color: var(--paper);
  background: var(--emerald-950);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.62;
}

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--brass-light); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--brass-light); outline-offset: 4px; }
img { display: block; width: 100%; height: auto; }
p, li, a { font-size: max(1rem, 16px); }

.skip-link {
  position: fixed; z-index: 20; top: 0.5rem; left: 0.5rem; min-height: 44px;
  padding: 0.65rem 1rem; color: var(--emerald-950); background: var(--paper); transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.reading-progress { position: fixed; z-index: 18; inset: 0 0 auto; height: 4px; background: transparent; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--brass-light); }

.site-header { border-bottom: var(--rule); }
.utility-strip {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: 0.7rem var(--gutter); background: var(--emerald-900); border-bottom: var(--rule);
}
.utility-strip p { margin: 0; color: var(--brass-light); font-size: 1rem; letter-spacing: 0.02em; }
.site-name { display: inline-flex; align-items: baseline; min-height: 44px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; text-decoration: none; }
.site-name span { margin-left: 0.35rem; color: var(--brass-light); font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.site-menu { position: relative; padding: 0 var(--gutter); background: var(--emerald-950); }
.site-menu summary { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; color: var(--paper); cursor: pointer; font-weight: 700; list-style: none; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu[open] summary span { transform: rotate(45deg); }
.site-menu nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 0 var(--space-2); }
.site-menu nav a { display: flex; align-items: center; min-height: 48px; padding: 0.55rem 0.7rem; border-top: var(--rule); text-decoration: none; }
.site-menu nav a[aria-current="page"] { color: var(--brass-light); }

main { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter) var(--space-5); }
.hero { display: grid; gap: var(--space-4); align-items: center; padding: clamp(3rem, 9vw, 7rem) 0 var(--space-5); }
.hero-copy { max-width: 720px; }
.eyebrow, .card-label, .next-note > span {
  margin: 0 0 0.75rem; color: var(--brass-light); font-size: 1rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.04; text-wrap: balance; }
h1 { max-width: 16ch; margin: 0; font-size: clamp(3rem, 8vw, 6.8rem); letter-spacing: -0.035em; }
.dek { max-width: 61ch; margin: 1.5rem 0 0; color: #dfd8c6; font-size: clamp(1.15rem, 2vw, 1.38rem); line-height: 1.5; }
.status-note { width: max-content; max-width: 100%; margin: 1.25rem 0 0; padding: 0.45rem 0.7rem; color: var(--brass-light); border: var(--rule); font-size: 1rem; }
.hero-figure { position: relative; margin: 0; border: var(--rule); background: var(--emerald-900); box-shadow: 16px 16px 0 rgba(185, 163, 107, 0.08); }
.hero-figure::before, .hero-figure::after { content: ""; position: absolute; z-index: 2; width: 28%; aspect-ratio: 1; border-color: var(--brass); pointer-events: none; }
.hero-figure::before { top: 0.6rem; left: 0.6rem; border-top: 1px solid; border-left: 1px solid; }
.hero-figure::after { right: 0.6rem; bottom: 0.6rem; border-right: 1px solid; border-bottom: 1px solid; }

.notebook { color: var(--ink); background: var(--paper); border-top: 4px double var(--brass); }
.entry-section { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); border-bottom: 1px solid #c9bea2; }
.section-mark { padding: 2rem 0.5rem; color: #6e664f; border-right: 1px solid #c9bea2; font-family: var(--font-display); font-size: 1.1rem; text-align: center; }
.section-body { min-width: 0; padding: clamp(2rem, 5vw, 4.5rem); }
.section-body > * { max-width: var(--measure); }
.section-body h2 { margin: 0 0 1.25rem; color: var(--emerald-900); font-size: clamp(2rem, 4vw, 3.4rem); }
.section-body > p { margin: 0 0 1.2rem; }
.section-body ul { margin: 1rem 0 0; padding: 0; list-style: none; }
.section-body li { position: relative; min-height: 44px; padding: 0.55rem 0 0.55rem 1.8rem; border-top: 1px solid #d5cbb2; }
.section-body li::before { content: "✦"; position: absolute; left: 0; color: #766530; }

.evidence-card { position: relative; margin: 2rem 0 0; padding: 1.5rem; border: 1px solid #9f8d5a; background: #eee5d0; box-shadow: 6px 6px 0 #d4c8a9; }
.evidence-card::after { content: ""; position: absolute; inset: 0.45rem; border: 1px solid rgba(15, 59, 46, 0.12); pointer-events: none; }
.evidence-card > * { position: relative; z-index: 1; }
.evidence-card .card-label { color: #5d542f; }
.evidence-card h3 { margin: 0 0 0.85rem; color: var(--emerald-900); font-size: clamp(1.55rem, 3vw, 2.1rem); }
.evidence-card p { margin: 0.7rem 0; }
.card-grid { display: grid; gap: 1rem; max-width: none; }
.card-grid .evidence-card { margin-top: 0.5rem; }
.source-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; max-width: var(--measure); }
.source-link { position: relative; z-index: 2; display: inline-flex; align-items: center; min-height: 46px; padding: 0.55rem 0.85rem; color: var(--emerald-900); border: 1px solid #8d7a48; background: #faf5e8; font-weight: 700; }
.source-link:hover { color: var(--emerald-950); background: #fffaf0; }

.next-note { display: grid; gap: 0.3rem; padding: var(--space-5) 0 0; }
.next-note a { display: flex; align-items: center; justify-content: space-between; min-height: 64px; max-width: 780px; padding: 0.8rem 1rem; color: var(--paper); border-top: var(--rule); border-bottom: var(--rule); font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.1rem); text-decoration: none; }

footer { display: grid; gap: 1rem; padding: var(--space-4) var(--gutter); color: var(--paper); border-top: var(--rule); background: var(--emerald-900); }
footer p { max-width: 62ch; margin: 0; }
footer nav { display: flex; flex-wrap: wrap; gap: 0.7rem; }
footer a { display: inline-flex; align-items: center; min-height: 48px; padding: 0.55rem 0.75rem; border: var(--rule); }

@media (min-width: 760px) {
  .site-menu summary { width: max-content; min-width: 220px; }
  .site-menu nav { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  footer { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}

@media (max-width: 520px) {
  :root { --gutter: 1rem; }
  body { font-size: 17px; }
  .utility-strip { align-items: flex-start; flex-direction: column; gap: 0; }
  .utility-strip p { padding-bottom: 0.6rem; }
  .site-name { flex-wrap: wrap; }
  .site-menu nav { grid-template-columns: 1fr; }
  .hero { padding-top: 2.5rem; }
  h1 { font-size: clamp(2.7rem, 14vw, 4.3rem); }
  .entry-section { grid-template-columns: 2.3rem minmax(0, 1fr); }
  .section-mark { padding-inline: 0.2rem; font-size: 1rem; }
  .section-body { padding: 1.7rem 1rem; }
  .evidence-card { padding: 1.2rem 1rem; box-shadow: 4px 4px 0 #d4c8a9; }
  footer nav { display: grid; grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
