/* ==========================================================================
   MANDATE FOR ACCOUNTABILITY — Report Page Styles
   Standalone page. No shared CSS from main site.
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  font-size: 18px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }
}

body {
  font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  color: #2D2D2D;
  background: #F8F6F1;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #1B2A4A;
  text-decoration-color: #C41230;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

a:hover {
  color: #C41230;
}

a:focus-visible {
  outline: 3px solid #C41230;
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #1B2A4A;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
  font-size: 0.875rem;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* --- Progress Bar --- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: #C41230;
  z-index: 999;
  transition: width 0.1s linear;
}

/* --- Container --- */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.container--chapter {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  width: 100%;
}

/* ==========================================================================
   SNAP SCREENS — Every section is one viewport
   ========================================================================== */

.section {
  scroll-snap-align: start;
}

.snap-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 3rem 0;
  overflow: hidden;
}

.snap-screen--cover {
  background: #1B2A4A;
  color: #fff;
  position: relative;
  text-align: center;
  padding: 0;
  justify-content: center;
}

.snap-screen--cream {
  background: #F8F6F1;
}

.snap-screen--navy {
  background: #1B2A4A;
  color: #fff;
  text-align: center;
}

/* ==========================================================================
   COVER — matches Heritage "Mandate for Leadership" layout
   ========================================================================== */

.cover__numbers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cover__20,
.cover__27 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(12rem, 25vw, 22rem);
  line-height: 0.85;
  position: absolute;
  user-select: none;
}

/* 20: top-left, bleeds off the left edge */
.cover__20 {
  top: 4vh;
  left: -3vw;
  color: #1B3A5C;
}

/* 27: middle-right, bleeds off the right edge, above the meta */
.cover__27 {
  bottom: 22vh;
  right: -3vw;
  color: #C41230;
}

/* Big rubber-stamp on the cover */
.cover__stamp {
  position: absolute;
  z-index: 2;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-family: 'Special Elite', cursive;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C41230;
  border: 3.5px solid #C41230;
  border-radius: 6px;
  padding: 0.3em 0.5em;
  opacity: 0.75;
  pointer-events: none;
  white-space: nowrap;
  box-shadow:
    inset 0 0 0 1px rgba(196, 18, 48, 0.3),
    1px 1px 0 rgba(196, 18, 48, 0.15),
    -0.5px -0.5px 0 rgba(196, 18, 48, 0.1);
}

/* Snap screens need positioning for cover stamp */
.snap-screen {
  position: relative;
}

/* Title block: centered on the page */
.cover__content {
  position: relative;
  z-index: 1;
  padding: 0 2rem;
  width: 100%;
}

.cover__title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.cover__title em {
  font-weight: 400;
  font-size: 0.55em;
  opacity: 0.85;
  font-style: italic;
}

.cover__title-line {
  display: block;
}

.cover__subtitle {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-style: italic;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

/* Meta: pinned to bottom center */
.cover__meta {
  position: absolute;
  bottom: 4vh;
  left: 0;
  right: 0;
  z-index: 1;
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.6;
  text-align: center;
}

.cover__meta p {
  margin-bottom: 0.15rem;
}

/* Mobile: scale down numbers, tighten padding */
@media (max-width: 480px) {
  .cover__20,
  .cover__27 {
    font-size: 9rem;
  }

  .cover__20 {
    top: 3vh;
    left: -1rem;
  }

  .cover__27 {
    bottom: 18vh;
    right: -1rem;
  }

  .cover__content {
    padding: 0 1.5rem;
  }

  .cover__meta {
    padding: 0 1.5rem 3vh;
  }
}

/* ==========================================================================
   NOTE SECTION
   ========================================================================== */

.note__body {
  margin-bottom: 1.5rem;
}

.note__body p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

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

.note__quote {
  border-left: 4px solid #C41230;
  padding: 1rem 1.5rem;
  margin: 0 0 1.75rem;
}

.note__quote p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-style: italic;
  line-height: 1.5;
  color: #1B2A4A;
  margin: 0;
}

.note__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}

.note__footnote {
  font-size: 0.8rem;
  color: #888;
  text-align: center;
  line-height: 1.5;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
}

.btn--primary {
  background: #C41230;
  color: #fff;
  border-color: #C41230;
}

.btn--primary:hover {
  background: #a30f28;
  border-color: #a30f28;
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: #1B2A4A;
  border-color: #1B2A4A;
}

.btn--outline:hover {
  background: #1B2A4A;
  color: #fff;
}

/* On dark backgrounds */
.snap-screen--navy .btn--outline {
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}

.snap-screen--navy .btn--outline:hover {
  background: #fff;
  color: #1B2A4A;
  border-color: #fff;
}

/* ==========================================================================
   SECTION HEADINGS
   ========================================================================== */

.section-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 1.5rem;
  text-align: center;
}

.section-heading--dark {
  color: #2D2D2D;
  text-align: left;
}

.sources__note {
  font-family: 'Caveat', cursive;
  font-size: 1.1rem;
  color: #888;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   TABLE OF CONTENTS
   ========================================================================== */

.toc__heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #1B2A4A;
  margin-bottom: 2rem;
  text-align: center;
}

.toc__list {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.toc__item {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  padding: 0.5rem 0;
  color: #2D2D2D;
  transition: color 0.2s;
}

.toc__item:hover {
  color: #C41230;
}

.toc__label {
  font-size: 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.toc__dots {
  flex: 1;
  border-bottom: 2px dotted #bbb;
  margin: 0 0.5rem;
  min-width: 2rem;
  position: relative;
  top: -0.3em;
}

.toc__page {
  font-size: 1rem;
  flex-shrink: 0;
  color: #888;
}

@media (max-width: 560px) {
  .toc__dots {
    display: none;
  }
  .toc__item {
    justify-content: space-between;
  }
  .toc__label {
    white-space: normal;
    flex: 1;
    padding-right: 1rem;
  }
}

/* ==========================================================================
   CHAPTERS — compact, one-screen layout
   ========================================================================== */

.chapter__header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd;
}

.chapter__label {
  display: block;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #888;
  margin-bottom: 0.35rem;
}

.chapter__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 700;
  color: #1B2A4A;
  line-height: 1.2;
}

.chapter__body p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

/* Single context line below figure box */
.chapter__context {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
  line-height: 1.6;
}

.chapter__signoff {
  font-style: italic;
  color: #666;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* ==========================================================================
   DROP CAP
   ========================================================================== */

.drop-cap::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 3.25em;
  float: left;
  line-height: 0.8;
  padding-right: 0.1em;
  padding-top: 0.07em;
  color: #1B2A4A;
  font-weight: 700;
}

/* ==========================================================================
   KEY MESSAGE BLOCK QUOTES
   ========================================================================== */

.key-message {
  background: #1B2A4A;
  color: #fff;
  padding: 1.5rem 1.5rem;
  margin: 0 0 1.25rem;
  border-radius: 2px;
}

.key-message p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-style: italic;
  line-height: 1.45;
  margin: 0;
}

.key-message cite {
  display: block;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.75rem;
  font-style: normal;
  opacity: 0.7;
  margin-top: 0.75rem;
}

/* Variant: red left border on cream */
.key-message--border {
  background: transparent;
  color: #1B2A4A;
  border-left: 5px solid #C41230;
  padding: 1.25rem 1.5rem 1.25rem 1.25rem;
}

.key-message--border cite {
  color: #666;
  opacity: 1;
}

/* Inverted for conclusion (on navy bg) */
.key-message--inverted {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   FIGURE BOXES — compact
   ========================================================================== */

.figure-box {
  border: 1px solid #ccc;
  background: #f2efe9;
  padding: 1.25rem 1.5rem;
  margin: 0 0 1rem;
  border-radius: 2px;
}

.figure-box__label {
  display: block;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #888;
  margin-bottom: 0.35rem;
}

.figure-box__number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  color: #1B2A4A;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.figure-box__number--red {
  color: #C41230;
}

.figure-box__number-unit {
  font-size: 0.45em;
  font-weight: 400;
  opacity: 0.7;
}

.figure-box__text {
  font-size: 0.85rem;
  line-height: 1.55;
  margin-bottom: 0.5rem;
  color: #444;
}

.figure-box__source {
  font-size: 0.7rem;
  color: #888;
  line-height: 1.4;
}

.figure-box__source a {
  color: #888;
  text-decoration-color: #ccc;
}

.figure-box__source a:hover {
  color: #C41230;
}

/* ==========================================================================
   MARGIN ANNOTATIONS
   ========================================================================== */

.margin-note {
  font-family: 'Caveat', cursive;
  color: #C41230;
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 0.75rem 0 0;
  padding-left: 1.5rem;
}

.margin-note p {
  margin: 0;
}

/* Desktop: position in right margin */
@media (min-width: 1100px) {
  .margin-note {
    position: absolute;
    right: -220px;
    width: 190px;
    margin: 0;
    padding-left: 0;
    font-size: 1.1rem;
    bottom: 0;
  }
}

/* ==========================================================================
   SECTION DIVIDERS
   ========================================================================== */

.divider__content {
  padding: 2rem;
}

.divider__label {
  display: block;
  font-family: 'Libre Baskerville', serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.6;
  margin-bottom: 1rem;
}

.divider__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
}

.divider__subtitle {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.75rem;
  font-style: italic;
}

.divider__hint {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.75rem;
  font-style: italic;
}

/* ==========================================================================
   CONCLUSION
   ========================================================================== */

.conclusion__body {
  text-align: left;
  margin: 1rem 0;
}

.conclusion__body p {
  margin-bottom: 1rem;
  font-size: 1rem;
  opacity: 0.92;
}

.conclusion__handwritten {
  font-family: 'Caveat', cursive;
  font-size: 1.75rem;
  color: #fff;
  text-align: center;
  margin: 1.5rem 0 0.5rem;
  opacity: 1;
}

.conclusion__tagline {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  text-align: center;
  opacity: 0.85;
  letter-spacing: 0.03em;
}

.conclusion__tagline strong {
  color: #C41230;
  font-size: 1.1em;
}

.conclusion__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ==========================================================================
   CITATIONS
   ========================================================================== */

.section--citations {
  background: #F8F6F1;
  padding: 3rem 0;
  scroll-snap-align: start;
}

.citation-group {
  margin-bottom: 1rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.75rem;
}

.citation-group:last-child {
  border-bottom: none;
}

.citation-group__title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1B2A4A;
  cursor: pointer;
  padding: 0.5rem 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.citation-group__title::before {
  content: '\25B6';
  font-size: 0.55rem;
  transition: transform 0.2s;
  color: #C41230;
}

details[open] .citation-group__title::before {
  transform: rotate(90deg);
}

.citation-group__title::-webkit-details-marker {
  display: none;
}

.citation-list {
  padding-left: 1.5rem;
  margin: 0.25rem 0 0.5rem;
}

.citation-list li {
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 0.35rem;
  color: #555;
}

.citation-list a {
  color: #555;
  text-decoration-color: #bbb;
}

.citation-list a:hover {
  color: #C41230;
}

.citation-pending {
  font-size: 0.8rem;
  font-style: italic;
  color: #888;
  padding: 0.25rem 0;
}

/* ==========================================================================
   FOOTER / DISCLAIMER
   ========================================================================== */

.section--footer {
  background: #F8F6F1;
  padding: 2rem 0 1.5rem;
  border-top: 1px solid #ddd;
}

.footer__disclaimer {
  font-size: 0.75rem;
  color: #888;
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto 1rem;
  text-align: center;
}

.footer__paid {
  font-size: 0.7rem;
  text-align: center;
  color: #aaa;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Small phones */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .snap-screen {
    padding: 2rem 0;
  }

  .key-message {
    padding: 1.25rem 1rem;
  }

  .figure-box {
    padding: 1rem;
  }

  .btn {
    width: 100%;
  }

  .note__ctas,
  .conclusion__ctas {
    flex-direction: column;
    align-items: center;
  }

  .chapter__header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }
}

/* Tablets */
@media (min-width: 768px) {
  .container,
  .container--chapter {
    padding: 0 2rem;
  }

  .key-message {
    padding: 2rem;
  }

  .figure-box {
    padding: 1.5rem 2rem;
  }
}

/* Desktop — margin notes float */
@media (min-width: 1100px) {
  .container--chapter {
    max-width: 680px;
  }
}

/* Large screens */
@media (min-width: 1280px) {
  .container {
    max-width: 700px;
  }
}
