:root {
  --ink: #171513;
  --paper: #fbf8f2;
  --white: #171513;
  --muted: rgba(23, 21, 19, 0.72);
  --line: rgba(183, 128, 27, 0.42);
  --gold: #b7801b;
  --gold-soft: #c18a29;
  --shadow: 0 18px 48px rgba(61, 45, 24, 0.14);
}

body {
  background: #ece7df;
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header,
body:has(.cover-page:hover) .site-header {
  background: rgba(255, 253, 249, 0.94);
  border-bottom-color: rgba(183, 128, 27, 0.34);
  box-shadow: 0 8px 28px rgba(51, 39, 24, 0.08);
}

.brand,
.nav a {
  color: var(--ink);
}

.brand-dot {
  background: #fffdfa;
  color: var(--gold);
  border: 1px solid rgba(183, 128, 27, 0.48);
}

.cover-page,
.visual-page {
  background: var(--paper);
}

.visual-page {
  border-top-color: rgba(183, 128, 27, 0.34);
}

.cover-page img,
.visual-page img {
  filter: none;
}

.doctor-explains,
.final-page,
.issue-brief,
.news-hub,
.article,
.columns,
.clinic-info,
.sources {
  background:
    radial-gradient(circle at 88% 8%, rgba(210, 163, 76, 0.12), transparent 30%),
    linear-gradient(150deg, #fffefa, #f7f2e9 58%, #fbf8f2);
  color: var(--ink);
  border-color: rgba(183, 128, 27, 0.38);
}

.doctor-explains {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.section-label,
h1,
h2,
h3,
h4,
.credit-list strong,
.reference-list em,
.hub-list a {
  color: var(--ink);
}

.doctor-explains .lead,
.explain-grid p,
.science-note,
.final-kicker,
.reference-list span,
.issue-brief > p,
.article-header > p,
.article > p,
.hub-main p,
.service-box li,
.sources li,
.treatment-grid p,
.question-list p,
.comparison-points p,
.column p,
.map-card p,
.article-split p,
.clinic-info p,
figcaption {
  color: rgba(23, 21, 19, 0.76);
}

.science-note,
.service-box,
.safety,
.map-card,
.column,
.byline-card {
  background: rgba(255, 252, 245, 0.9);
  color: var(--ink);
  border-color: rgba(183, 128, 27, 0.42);
}

.science-note,
.service-box,
.safety {
  border-left-color: var(--gold);
}

.contact-actions a,
.reference-list a {
  background: var(--gold);
  color: #17120c;
}

.footer {
  background: #fffdfa;
  color: rgba(23, 21, 19, 0.68);
  border-top: 1px solid rgba(183, 128, 27, 0.32);
}

.back-top {
  background: rgba(255, 253, 249, 0.96);
  color: var(--ink);
  border-color: rgba(183, 128, 27, 0.52);
  box-shadow: 0 8px 24px rgba(46, 34, 19, 0.12);
}

.light-processing {
  background:
    linear-gradient(100deg, rgba(183, 128, 27, 0.04), rgba(255, 255, 255, 0.72), rgba(183, 128, 27, 0.04)),
    var(--paper);
}

@media (prefers-reduced-motion: no-preference) {
  .visual-page img[data-light-ready="true"],
  .cover-page img[data-light-ready="true"] {
    animation: light-page-in 260ms ease-out both;
  }
}

@media (max-width: 520px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .nav {
    width: 100%;
    padding-bottom: 2px;
  }
}

@keyframes light-page-in {
  from { opacity: 0.82; }
  to { opacity: 1; }
}
