/* Restyle overlay — applies to all pages EXCEPT declaration.html.
   declaration.html intentionally opts out by not linking this file. */

:root {
  --r-ivory: #f4efe6;
  --r-ivory-soft: #fbf8f1;
  --r-ink: #141210;
  --r-ink-2: #2a2622;
  --r-muted: #6a6259;
  --r-crimson: #a1231b;
  --r-crimson-deep: #6f1712;
  --r-mustard: #c48a1a;
  --r-rule: rgba(20, 18, 16, 0.18);
  --r-rule-strong: rgba(20, 18, 16, 0.42);
  --r-shadow: 0 2px 0 0 var(--r-ink), 14px 14px 0 -2px rgba(20, 18, 16, 0.08);
  --r-shadow-lift: 0 3px 0 0 var(--r-ink), 18px 18px 0 -2px rgba(20, 18, 16, 0.1);
}

/* ---------- Base canvas ---------- */
body {
  font-family: "Libre Franklin", sans-serif;
  color: var(--r-ink);
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 31px,
      rgba(20, 18, 16, 0.05) 32px,
      transparent 33px,
      transparent 64px
    ),
    linear-gradient(180deg, var(--r-ivory-soft), var(--r-ivory));
  line-height: 1.6;
}

body::before {
  background: none;
  opacity: 0;
}

/* ---------- Page shell ---------- */
.page-shell {
  padding: 24px 28px 12px;
}

.site-header,
.site-footer,
main {
  width: min(1180px, 100%);
}

/* ---------- Masthead / Nav ---------- */
.site-header {
  padding-bottom: 0;
  border-bottom: 4px double var(--r-ink);
  margin-bottom: 22px;
}

.site-header::after {
  display: none;
}

.site-nav {
  background: var(--r-ivory);
  backdrop-filter: none;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--r-ink);
  gap: 28px;
}

.nav-logo {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--r-ink);
  gap: 12px;
}

.nav-logo img {
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--r-ink);
  border-radius: 0;
  padding: 4px;
  background: var(--r-ivory-soft);
}

.nav-links {
  gap: 2px;
}

.nav-links a {
  padding: 8px 12px;
  color: var(--r-ink-2);
  border-radius: 0;
  border: 1px solid transparent;
  font-family: "Libre Franklin", sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  transition: background 120ms ease, color 120ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--r-ink);
  color: var(--r-ivory-soft);
  border-color: var(--r-ink);
}

.nav-links a[aria-current="page"] {
  background: var(--r-crimson);
  color: #fff;
  border-color: var(--r-crimson-deep);
}

.dropdown-menu {
  background: var(--r-ivory-soft);
  border: 1.5px solid var(--r-ink);
  border-radius: 0;
  box-shadow: 6px 6px 0 0 var(--r-ink);
  padding: 6px;
  gap: 2px;
  min-width: 280px;
}

.dropdown-menu a {
  border-radius: 0;
}

/* ---------- Main spacing ---------- */
main {
  padding: 8px 0 32px;
}

/* ---------- Hero (home) ---------- */
.hero,
.page-hero {
  border-radius: 0;
  border: 2px solid var(--r-ink);
  box-shadow: var(--r-shadow-lift);
  padding: 52px 48px;
  background: var(--r-ivory-soft);
  position: relative;
  overflow: visible;
}

.hero {
  background:
    linear-gradient(115deg, var(--r-ivory-soft) 0 62%, transparent 62%),
    repeating-linear-gradient(45deg, rgba(161, 35, 27, 0.05) 0 8px, transparent 8px 16px),
    var(--r-ivory);
}

.page-hero {
  background:
    linear-gradient(180deg, var(--r-ivory-soft) 0%, var(--r-ivory) 100%);
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 8px;
  background:
    repeating-linear-gradient(90deg, var(--r-ink) 0 14px, transparent 14px 22px);
  pointer-events: none;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
  gap: 40px;
  align-items: center;
}

/* ---------- Typography ---------- */
h1,
h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--r-ink);
}

h1 {
  font-size: clamp(2.8rem, 5.5vw, 4.9rem);
  line-height: 0.98;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 2.8vw, 2.6rem);
  line-height: 1.05;
  margin-bottom: 14px;
}

/* Redaction / censor-bar eyebrow */
.eyebrow,
.section-label {
  display: inline-block;
  padding: 4px 12px 5px;
  margin-bottom: 18px;
  background: var(--r-ink);
  color: #ffffff;
  font-family: "Libre Franklin", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 0;
  position: relative;
}

.eyebrow::after,
.section-label::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 6px;
  margin-left: 8px;
  background: var(--r-crimson);
  vertical-align: middle;
}

.hero-subtitle {
  color: var(--r-crimson);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.32rem;
  margin-top: 14px;
}

.lead {
  color: var(--r-ink-2);
  font-size: 1.1rem;
  margin-top: 22px;
  max-width: 38rem;
}

.intro-copy {
  color: var(--r-muted);
  font-size: 0.98rem;
  border-left: 3px solid var(--r-crimson);
  padding-left: 18px;
  margin-top: 22px;
}

.rule {
  width: min(240px, 100%);
  height: 3px;
  margin: 26px 0 0;
  background:
    linear-gradient(90deg, var(--r-ink) 0 72%, var(--r-crimson) 72% 100%);
}

/* ---------- Buttons ---------- */
.button {
  border-radius: 0;
  border: 2px solid var(--r-ink);
  min-height: 50px;
  padding: 12px 22px;
  font-family: "Libre Franklin", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, color 120ms ease;
  box-shadow: 5px 5px 0 0 var(--r-ink);
}

.button:hover,
.button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 0 var(--r-ink);
  outline: none;
}

.button-primary {
  background: var(--r-crimson);
  color: #fff;
  border-color: var(--r-ink);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--r-crimson-deep);
}

.button-secondary {
  background: var(--r-ivory-soft);
  color: var(--r-ink);
  border-color: var(--r-ink);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: var(--r-ink);
  color: var(--r-ivory-soft);
}

/* ---------- Hero visual (home) ---------- */
.hero-visual {
  border-radius: 0;
  border: 2px solid var(--r-ink);
  background: var(--r-ivory-soft);
  padding: 14px;
  box-shadow: 8px 8px 0 0 var(--r-crimson);
}

.hero-visual::before {
  display: none;
}

.home-photo-frame img {
  border-radius: 0;
  box-shadow: none;
  filter: grayscale(0.25) contrast(1.06);
  border: 1px solid var(--r-ink);
}

/* ---------- Panels / cards ---------- */
.panel,
.quote-panel,
.stats-strip div {
  border-radius: 0;
  border: 2px solid var(--r-ink);
  box-shadow: var(--r-shadow);
  background: var(--r-ivory-soft);
  padding: 30px 32px;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.panel:hover,
.quote-panel:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--r-shadow-lift);
}

.panel p:not(.eyebrow):not(.section-label),
.quote-panel p:not(.eyebrow):not(.section-label),
.page-hero p:not(.eyebrow):not(.section-label) {
  color: var(--r-ink-2);
}

.panel-feature {
  background: var(--r-ivory-soft);
  border-top: 8px solid var(--r-crimson);
}

.quote-panel {
  background:
    linear-gradient(180deg, var(--r-ink) 0 6px, var(--r-ivory-soft) 6px),
    var(--r-ivory-soft);
}

.quote-panel blockquote {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  line-height: 1.2;
  color: var(--r-ink);
  padding-left: 28px;
  border-left: 3px solid var(--r-crimson);
}

.quote-credit {
  color: var(--r-muted);
  font-family: "Libre Franklin", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 18px;
}

/* ---------- Content grid ---------- */
.content-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 24px;
}

/* ---------- Stats ---------- */
.stats-strip {
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 2px solid var(--r-ink);
  background: var(--r-ivory-soft);
  box-shadow: var(--r-shadow);
  margin-top: 32px;
}

.stats-strip div {
  border: 0;
  border-right: 1px solid var(--r-rule-strong);
  box-shadow: none;
  background: transparent;
  padding: 26px 24px;
  transition: background 140ms ease;
}

.stats-strip div:hover {
  background: rgba(161, 35, 27, 0.06);
  transform: none;
}

.stats-strip div:last-child {
  border-right: 0;
}

.stats-strip strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--r-crimson);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stats-strip span {
  display: block;
  margin-top: 8px;
  color: var(--r-muted);
  font-size: 0.88rem;
}

/* ---------- Stacked panels ---------- */
.stacked-panels {
  gap: 20px;
}

.stacked-panels .panel {
  border-left: 6px solid var(--r-crimson);
  padding-left: 30px;
}

.stacked-panels .panel:nth-child(2n) {
  border-left-color: var(--r-ink);
}

.stacked-panels .panel:nth-child(3n) {
  border-left-color: var(--r-mustard);
}

/* ---------- Feature list ---------- */
.feature-list {
  padding-left: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding: 6px 0 6px 28px;
  border-bottom: 1px dashed var(--r-rule);
  color: var(--r-ink-2);
}

.feature-list li:last-child {
  border-bottom: 0;
}

.feature-list li + li {
  margin-top: 0;
}

.feature-list li::before {
  content: "\25A0";
  position: absolute;
  left: 4px;
  top: 8px;
  color: var(--r-crimson);
  font-size: 0.75rem;
}

/* ---------- About page ---------- */
.about-project-hero {
  background:
    linear-gradient(180deg, var(--r-ivory-soft), var(--r-ivory));
}

.about-project-hero::before {
  opacity: 0.08;
  filter: grayscale(1) contrast(1.1);
  background:
    linear-gradient(90deg, var(--r-ivory-soft) 0%, rgba(251, 248, 241, 0.5) 100%),
    url("./library-shelves.jpg") center/cover;
  top: 8px;
}

.about-project-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.8fr);
  gap: 40px;
  align-items: end;
}

.about-project-hero h1 {
  font-size: clamp(3rem, 5.4vw, 5rem);
}

.about-project-subtitle {
  max-width: 34rem;
  color: var(--r-ink);
}

.about-project-lead {
  padding-left: 24px;
  border-left: 3px solid var(--r-crimson);
  color: var(--r-ink-2);
}

.about-project-panel {
  background: var(--r-ivory-soft);
}

.project-points {
  gap: 16px;
}

.project-point {
  border-radius: 0;
  border: 1.5px solid var(--r-ink);
  background: var(--r-ivory);
  padding: 20px 20px 18px;
  box-shadow: 4px 4px 0 0 var(--r-ink);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.project-point:hover,
.project-point:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--r-crimson);
  background: var(--r-ivory-soft);
  border-color: var(--r-ink);
}

.project-point h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 1.24rem;
  color: var(--r-ink);
  margin-bottom: 8px;
}

.project-point p {
  color: var(--r-muted);
}

.about-project-cta a {
  color: var(--r-crimson);
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 44px;
  padding: 22px 0 32px;
  border-top: 4px double var(--r-ink);
  color: var(--r-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-align: center;
}

.site-footer a {
  color: var(--r-crimson);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}

.site-footer p {
  margin: 4px 0;
}

/* ---------- Admin gear ---------- */
.admin-gear-button {
  border-radius: 0;
  border: 1.5px solid var(--r-ink);
  background: var(--r-ivory-soft);
  color: var(--r-crimson);
  box-shadow: 4px 4px 0 0 var(--r-ink);
  width: 46px;
  height: 46px;
}

.admin-gear-button:hover {
  background: var(--r-ink);
  color: var(--r-ivory-soft);
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero,
  .page-hero {
    padding: 40px 26px;
  }
}

@media (max-width: 800px) {
  .page-shell {
    padding: 16px;
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }

  .stats-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--r-rule-strong);
  }

  .stats-strip div:last-child {
    border-bottom: 0;
  }

  .nav-links a {
    font-size: 0.76rem;
    padding: 7px 10px;
  }

  .nav-logo {
    font-size: 1.1rem;
  }

  .dropdown-menu {
    background: var(--r-ivory);
    box-shadow: none;
    border-width: 1.5px;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2.8rem;
  }

  .button {
    width: 100%;
  }

  .hero-visual {
    box-shadow: 5px 5px 0 0 var(--r-crimson);
  }
}

/* ==========================================================
   Declaration page — newsprint/editorial treatment
   ========================================================== */

.declaration-main {
  padding-top: 8px;
}

.declaration-shell {
  border-radius: 0;
  border: 2px solid var(--r-ink);
  box-shadow: var(--r-shadow-lift);
  padding: 44px 40px;
  background:
    linear-gradient(180deg, var(--r-ivory-soft), var(--r-ivory));
  position: relative;
  overflow: hidden;
}

.declaration-shell::before {
  opacity: 0.08;
  background-image:
    linear-gradient(180deg, rgba(244, 239, 230, 0.55), rgba(244, 239, 230, 0.82)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900'%3E%3Crect width='1600' height='900' fill='%23efe7db'/%3E%3Cg opacity='0.9'%3E%3Crect x='90' y='165' width='1400' height='18' rx='9' fill='%23c8b8a3'/%3E%3Crect x='120' y='68' width='48' height='97' rx='7' fill='%23b9835a'/%3E%3Crect x='174' y='76' width='38' height='89' rx='6' fill='%23839bb2'/%3E%3Crect x='220' y='58' width='63' height='107' rx='8' fill='%23c69a76'/%3E%3Crect x='289' y='72' width='34' height='93' rx='6' fill='%23d6c2aa'/%3E%3Crect x='331' y='51' width='56' height='114' rx='8' fill='%238b5a4a'/%3E%3Crect x='394' y='82' width='36' height='83' rx='6' fill='%23a9b7a1'/%3E%3Crect x='438' y='65' width='67' height='100' rx='8' fill='%23dbc7b2'/%3E%3Crect x='519' y='70' width='45' height='95' rx='7' fill='%237d93a4'/%3E%3Crect x='575' y='56' width='52' height='109' rx='8' fill='%23bf8664'/%3E%3Crect x='635' y='85' width='32' height='80' rx='6' fill='%23d8d1c5'/%3E%3Crect x='675' y='61' width='58' height='104' rx='8' fill='%239f6e56'/%3E%3C/g%3E%3C/svg%3E");
  filter: grayscale(0.6);
}

.declaration-shell::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--r-ink) 0 14px, transparent 14px 22px);
  z-index: 1;
  pointer-events: none;
}

.declaration-header-row {
  grid-template-columns: minmax(170px, 0.42fr) minmax(0, 1fr) minmax(220px, 0.48fr);
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 3px double var(--r-ink);
  gap: 26px;
}

.declaration-kicker {
  padding: 5px 12px 6px;
  background: var(--r-ink);
  color: #ffffff;
  font-family: "Libre Franklin", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  justify-self: start;
}

.declaration-kicker::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 6px;
  margin-left: 8px;
  background: var(--r-crimson);
  vertical-align: middle;
}

.declaration-header-row h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--r-ink);
}

.declaration-header-note {
  color: var(--r-ink-2);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.05rem;
  text-align: right;
  margin: 0;
}

.declaration-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.88fr);
  gap: 28px;
}

.declaration-copy {
  border-radius: 0;
  border: 2px solid var(--r-ink);
  box-shadow: var(--r-shadow);
  background: var(--r-ivory-soft);
  padding: 34px 36px;
  border-left: 6px solid var(--r-crimson);
}

.declaration-copy h2,
.supporter-panel h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 2.6vw, 2.2rem);
  color: var(--r-ink);
  margin-bottom: 16px;
}

.declaration-copy p {
  color: var(--r-ink-2);
  font-size: 1.04rem;
  line-height: 1.7;
}

.declaration-closing {
  margin-top: 22px;
  padding: 20px 22px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--r-ink);
  background: var(--r-ivory);
  border-left: 3px solid var(--r-crimson);
}

.supporter-panel {
  border-radius: 0;
  border: 2px solid var(--r-ink);
  box-shadow: var(--r-shadow);
  background: var(--r-ivory-soft);
  padding: 28px;
  position: sticky;
  top: 96px;
}

.supporter-count-card {
  padding: 22px 22px 20px;
  border-radius: 0;
  border: 1.5px solid var(--r-ink);
  background: var(--r-ivory);
  box-shadow: 5px 5px 0 0 var(--r-crimson);
}

.supporter-count-card h2 {
  margin: 8px 0 0;
  font-size: 1.5rem;
}

.supporter-panel-top {
  margin-top: 20px;
  padding: 0 2px 18px;
  border-bottom: 1px dashed var(--r-rule-strong);
}

.supporter-total strong {
  font-family: "Cormorant Garamond", serif;
  color: var(--r-crimson);
  font-size: clamp(4rem, 8vw, 5.6rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.supporter-total-note {
  color: var(--r-ink-2);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
}

.supporter-form {
  gap: 14px;
  margin-top: 22px;
}

.supporter-field {
  color: var(--r-ink-2);
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.supporter-field span,
.supporter-toggle span {
  font-weight: 700;
  color: var(--r-ink);
}

.supporter-toggle span {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.88rem;
  font-weight: 500;
}

.supporter-field input {
  min-height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--r-ink);
  border-radius: 0;
  background: #ffffff;
  color: var(--r-ink);
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}

.supporter-field input:focus {
  outline: none;
  border-color: var(--r-crimson);
  box-shadow: 3px 3px 0 0 var(--r-crimson);
}

.supporter-toggle {
  color: var(--r-ink-2);
  font-size: 0.9rem;
}

.supporter-toggle input {
  accent-color: var(--r-crimson);
  width: 18px;
  height: 18px;
}

.supporter-submit {
  margin-top: 6px;
}

.supporter-list-wrap h3 {
  font-family: "Cormorant Garamond", serif;
  color: var(--r-ink);
  font-size: 1.12rem;
}

.supporter-dropdown {
  margin-top: 22px;
  border-radius: 0;
  border: 1.5px solid var(--r-ink);
  background: var(--r-ivory);
  overflow: hidden;
}

.supporter-dropdown summary {
  padding: 14px 18px;
  font-weight: 700;
  color: var(--r-ink);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  background: var(--r-ivory-soft);
  border-bottom: 1px solid var(--r-ink);
}

.supporter-dropdown summary::after {
  color: var(--r-crimson);
  font-weight: 700;
}

.supporter-dropdown[open] summary {
  background: var(--r-ink);
  color: #ffffff;
}

.supporter-dropdown[open] summary::after {
  color: var(--r-ivory-soft);
}

.supporter-list li,
.supporter-empty {
  border-radius: 0;
  border: 1px solid var(--r-ink);
  background: #ffffff;
  color: var(--r-ink-2);
  padding: 10px 14px;
}

.fine-print {
  color: var(--r-muted);
  font-size: 0.85rem;
}

@media (max-width: 920px) {
  .declaration-header-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .declaration-header-row h1 {
    text-align: left;
  }

  .declaration-header-note {
    text-align: left;
  }

  .declaration-layout {
    grid-template-columns: 1fr;
  }

  .supporter-panel {
    position: static;
  }
}

@media (max-width: 800px) {
  .declaration-shell {
    padding: 28px 22px;
  }

  .declaration-copy {
    padding: 26px 22px;
  }
}
