:root {
  color-scheme: light;
  --ink: #17181b;
  --muted: #62656b;
  --paper: #ffffff;
  --ground: #f2f3f5;
  --line: #d9dce1;
  --accent: #a71930;
  --accent-dark: #761022;
  --soft: #f8ecef;
  --max: 76rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ground);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-dark); text-underline-offset: .18em; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 3px solid #d4939e; outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 20;
  padding: .65rem .9rem;
  color: #fff;
  background: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .06em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  color: #fff;
  background: var(--accent);
  font: 800 1.3rem/1 Georgia, serif;
}

.brand strong,
.brand small { display: block; }
.brand strong { font-size: .93rem; }
.brand small { color: var(--muted); font-size: .72rem; letter-spacing: .04em; }
.site-header time { color: var(--muted); font-size: .88rem; white-space: nowrap; }

.page-shell {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 48rem);
  gap: clamp(2rem, 5vw, 5rem);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) 2rem 5rem;
}

.toc-panel {
  position: sticky;
  top: 2rem;
  align-self: start;
  max-height: calc(100vh - 4rem);
  overflow: auto;
  padding-top: .35rem;
}

.eyebrow {
  margin: 0 0 .8rem;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.toc-panel ul { margin: 0; padding: 0; list-style: none; }
.toc-panel li { margin: .45rem 0; }
.toc-panel ul ul { display: none; }
.toc-panel a {
  display: block;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.35;
  text-decoration: none;
}
.toc-panel a:hover { color: var(--accent); }

main { min-width: 0; }

.article-body {
  padding: clamp(1.5rem, 4vw, 4rem);
  background: var(--paper);
  border-top: .35rem solid var(--accent);
  box-shadow: 0 1.25rem 3.75rem rgba(31, 33, 38, .08);
}

.article-body h1,
.article-body h2,
.article-body h3 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.13;
  text-wrap: balance;
}

.article-body h1 {
  max-width: 10ch;
  margin: 0 0 .75rem;
  font-size: clamp(3rem, 8vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -.045em;
}

.article-body h2 {
  margin: 3.75rem 0 1.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
}

.article-body h1 + h2 {
  margin-top: 0;
  padding-top: 0;
  color: var(--accent-dark);
  border-top: 0;
  font-family: inherit;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: .015em;
}

.article-body h3 {
  margin: 2.3rem 0 .9rem;
  font-size: 1.4rem;
}

.article-body h2 + h3 {
  margin-top: .25rem;
  color: var(--muted);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-body p { margin: 0 0 1.15rem; }
.article-body strong { font-weight: 750; }

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.35rem 1.5rem;
  color: #4d1620;
  background: var(--soft);
  border-left: .3rem solid var(--accent);
  font: 600 clamp(1.1rem, 2.5vw, 1.35rem)/1.55 Georgia, serif;
}

.article-body blockquote p { margin: 0; }

.evidence-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: 1rem;
  margin: 1.5rem 0 1rem;
}

.evidence-gallery figure {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: .65rem;
  background: #f6f7f8;
  border: 1px solid var(--line);
}

.evidence-gallery a {
  display: block;
  overflow: hidden;
  background: #e4e6e9;
}

.evidence-gallery img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 180ms ease;
}

.evidence-gallery a:hover img { transform: scale(1.012); }

.evidence-gallery figcaption {
  padding: .8rem .3rem .2rem;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}

.evidence-note {
  margin-bottom: 1.8rem !important;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
}

.editorial-note {
  margin: 1.6rem 0;
  padding: 1.15rem 1.3rem;
  color: #3c424b;
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-left: .3rem solid var(--accent);
}

.editorial-note p:last-child { margin-bottom: 0; }

.article-body ul,
.article-body ol { margin: 1rem 0 1.5rem; padding-left: 1.4rem; }
.article-body li { margin: .45rem 0; padding-left: .3rem; }
.article-body li::marker { color: var(--accent); font-weight: 800; }

.article-body hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-footer {
  margin-top: 2rem;
  padding: 1.5rem 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .9rem;
}

.article-footer p { margin: .25rem 0; }

@media (max-width: 820px) {
  .site-header { padding-inline: 1rem; }
  .site-header time { display: none; }
  .page-shell { grid-template-columns: 1fr; padding: 1rem 1rem 3rem; }
  .toc-panel {
    position: static;
    max-height: none;
    padding: 1rem 1.1rem;
    background: #fff;
    border-left: .25rem solid var(--accent);
  }
  .toc-panel nav ul { columns: 2; column-gap: 1.5rem; }
  .article-body { padding: 1.5rem; }
  .article-body h1 { font-size: clamp(2.8rem, 16vw, 4.8rem); }
  .evidence-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  body { font-size: 1rem; }
  .toc-panel nav ul { columns: 1; }
  .brand small { display: none; }
  .article-body { padding: 1.2rem; box-shadow: none; }
}

@media print {
  body { background: #fff; font-size: 10.5pt; }
  .site-header, .toc-panel, .skip-link { display: none; }
  .page-shell { display: block; max-width: none; padding: 0; }
  .article-body { padding: 0; border: 0; box-shadow: none; }
  .article-body h2 { break-after: avoid; }
  .article-body a { color: inherit; text-decoration: none; }
}
