/* Of Good Report - Main Stylesheet
   Clean, reverent aesthetic inspired by churchofjesuschrist.org
   "If there is anything virtuous, lovely, or of good report or praiseworthy, we seek after these things."
*/

/* ===== CSS Variables ===== */
:root {
  /* Primary Colors */
  --navy: #2a4a6a;
  --navy-dark: #1e3a55;
  --navy-light: #3a5a7d;

  /* Accent Colors */
  --gold: #c4a84b;
  --gold-light: #d4bc6a;
  --gold-dark: #a89040;

  /* Neutrals */
  --white: #ffffff;
  --off-white: #f8f9fa;
  --light-gray: #e9ecef;
  --medium-gray: #6c757d;
  --dark-gray: #343a40;
  --blue-light: #f1f5fb;
  --slate: #8a9db0;
  --text-color: #212529;

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold-dark);
}

/* Underline links in body text for credibility */
.purpose__text a,
.about-content a,
.quote__attribution a,
.purpose__callout-attribution a {
  text-decoration: underline;
  text-decoration-color: var(--medium-gray);
  text-underline-offset: 2px;
}

.purpose__text a:hover,
.about-content a:hover,
.quote__attribution a:hover,
.purpose__callout-attribution a:hover {
  text-decoration-color: var(--gold-dark);
}

/* Focus styles for keyboard navigation */
a:focus-visible,
.btn:focus-visible,
select:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(var(--spacing-lg), 4vw, var(--spacing-xxl));
}

.section {
  padding: var(--spacing-xxl) 0;
}

.section--alt {
  background-color: var(--off-white);
}

.section--framing {
  background-color: var(--off-white);
  border-top: 1px solid var(--light-gray);
  border-bottom: 1px solid var(--light-gray);
}

/* ===== Navigation ===== */
.nav {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 40%, rgba(0,0,0,0.1) 100%),
    var(--navy);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.nav__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.nav__logo-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
}

.nav__logo:hover {
  color: var(--gold-light);
}

.nav__links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--spacing-lg);
}

.nav__link {
  color: var(--white);
  font-size: 0.95rem;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav__link:hover {
  color: var(--gold-light);
}

.nav__link--active {
  color: var(--gold);
}

.nav__link--active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: var(--spacing-sm);
  right: var(--spacing-sm);
  height: 2px;
  background-color: var(--gold);
  border-radius: 1px;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Hero Section ===== */
.hero {
  background:
    linear-gradient(to right, rgba(10, 22, 38, 0.93) 0%, rgba(21, 42, 69, 0.88) 45%, rgba(30, 58, 95, 0.8) 100%),
    url("../ofgoodreport_hero.png");
  color: var(--white);
  padding: clamp(var(--spacing-xxl), 6vw, 5rem) 0;
  text-align: left;
  background-size: cover;
  background-position: center;
}

.hero__title {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
  margin-bottom: var(--spacing-md);
}

.hero__layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--spacing-xl);
  text-align: left;
}

.hero__copy {
  max-width: 720px;
}

.hero__tagline {
  font-size: 1.1rem;
  color: var(--light-gray);
  max-width: 700px;
  margin: 0;
}

.hero__aof {
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(233, 236, 239, 0.85);
  margin: 0.75rem 0 1.25rem;
  max-width: 720px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  border-left: 2px solid rgba(196, 168, 75, 0.6);
  padding-left: 0.75rem;
}

.hero__aof-highlight {
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
}

.hero__aof-cite {
  display: block;
  font-size: 0.85rem;
  font-style: normal;
  color: rgba(233, 236, 239, 0.6);
  margin-top: 0.25rem;
}

.hero__aof-cite a {
  color: var(--gold-light);
}

.hero__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-top: 0.15rem;
  align-self: center;
}

/* ===== Framing Section ===== */
.framing {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.framing__quote {
  margin: 0 0 var(--spacing-lg);
}

.framing__text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--dark-gray);
  line-height: 1.7;
  margin-bottom: var(--spacing-sm);
}

.framing__text em {
  font-style: normal;
  color: var(--navy);
  font-weight: 600;
}

.framing__attribution {
  font-size: 0.95rem;
  color: var(--medium-gray);
  font-weight: 600;
}

.framing__attribution a {
  color: inherit;
  text-decoration: none;
}

.framing__attribution a:hover {
  text-decoration: underline;
}

.framing__desc {
  font-size: 1.15rem;
  color: var(--dark-gray);
  margin: var(--spacing-lg) 0 var(--spacing-xl);
  line-height: 1.6;
}

.btn--lg {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 1.1rem;
}

/* ===== Quote Block ===== */
.quote {
  position: relative;
  overflow: hidden;
  background-color: var(--off-white);
  border-left: 4px solid var(--gold);
  padding: var(--spacing-lg) var(--spacing-xl);
  margin: var(--spacing-xl) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.quote::before {
  content: "\201C";
  position: absolute;
  top: -0.15em;
  right: 0.1em;
  font-family: var(--font-serif);
  font-size: 6rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.12;
  pointer-events: none;
}

.quote--featured {
  background: linear-gradient(to right, rgba(196, 168, 75, 0.1), transparent);
  max-width: 750px;
  margin: var(--spacing-xl) auto;
}

/* Article of Faith 13 - Special styling for the core scriptural quote */
.quote--aof {
  background: linear-gradient(135deg, rgba(196, 168, 75, 0.15), rgba(196, 168, 75, 0.05));
  border-left-width: 6px;
  text-align: center;
  max-width: 560px;
  margin: var(--spacing-lg) auto;
  padding: var(--spacing-md) var(--spacing-lg);
}

.quote--aof .quote__text {
  font-size: 1.05rem;
}

.quote--aof .quote__text em {
  color: var(--gold-dark);
  font-style: normal;
  font-weight: 600;
}

.quote--aof .quote__attribution {
  font-weight: 600;
  color: var(--navy);
}

.quote--aof .quote__attribution::before {
  content: "";
}

.quote__text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--dark-gray);
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
}

.quote__attribution {
  font-size: 0.95rem;
  color: var(--medium-gray);
  font-weight: 500;
}

.quote__attribution::before {
  content: "— ";
}

.quote__attribution a {
  color: inherit;
  text-decoration: none;
}

.quote__attribution a:hover,
.quote__attribution a:focus-visible {
  text-decoration: underline;
}

.quote__intro {
  text-align: center;
  color: var(--medium-gray);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
}

/* Hero Quote Variation */
.hero .quote {
  background-color: rgba(255, 255, 255, 0.1);
  border-left-color: var(--gold);
  text-align: left;
  max-width: 800px;
  margin: var(--spacing-xl) auto;
}

.hero .quote__text {
  color: var(--light-gray);
}

.hero .quote__attribution {
  color: var(--gold-light);
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
  border: 1px solid var(--light-gray);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

.card__title {
  font-size: 1.15rem;
  margin-bottom: var(--spacing-xs);
  color: var(--navy);
}

.card__subtitle {
  font-size: 0.85rem;
  color: var(--medium-gray);
}

.card__rank {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 40px;
  text-align: center;
}

.card__stats {
  display: flex;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--light-gray);
}

.card__stat {
  font-size: 0.85rem;
}

.card__stat-label {
  color: var(--medium-gray);
  display: block;
}

.card__stat-value {
  font-weight: 600;
  color: var(--navy);
}

.card--link {
  text-decoration: none;
  color: inherit;
}

.card__cta {
  display: block;
  margin-top: var(--spacing-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy);
  transition: color var(--transition-fast);
}

.card:hover .card__cta {
  color: var(--gold-dark);
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  background-color: var(--light-gray);
  color: var(--dark-gray);
}

.badge--newspaper {
  background-color: #e3f2fd;
  color: #1565c0;
}

.badge--magazine {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.badge--wire {
  background-color: #fff3e0;
  color: #e65100;
}

.badge--broadcast {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.badge--church {
  background-color: #fef3e2;
  color: #8b6914;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

.btn--primary {
  background-color: var(--gold);
  color: var(--navy-dark);
}

.btn--primary:hover {
  background-color: var(--gold-dark);
  color: var(--white);
}

.btn--icon {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.btn__icon {
  flex-shrink: 0;
}

.btn__arrow {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.btn--icon:hover .btn__arrow {
  transform: translateX(4px);
}

.btn--hero {
  background-color: var(--gold-dark);
  color: var(--navy-dark);
  padding: var(--spacing-md) var(--spacing-xl);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn--hero::before {
  content: "\201C";
  position: absolute;
  top: 80%;
  right: 10%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: 10rem;
  line-height: 1;
  color: var(--navy-dark);
  opacity: 0.1;
  pointer-events: none;
}

.btn--hero:hover {
  background-color: var(--gold);
  color: var(--navy-dark);
}

.btn--hero-navy {
  background-color: var(--navy);
  color: var(--white);
  padding: var(--spacing-md) var(--spacing-xl);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn--hero-navy::before {
  content: "\201C";
  position: absolute;
  top: 80%;
  right: 10%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: 10rem;
  line-height: 1;
  color: var(--white);
  opacity: 0.1;
  pointer-events: none;
}

.btn--hero-navy:hover {
  background-color: var(--navy-light);
  color: var(--white);
}

.btn__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.btn__stack-top {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

.btn__stack-bottom {
  font-size: 1.4rem;
  font-weight: 700;
}

.btn--secondary {
  background-color: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.btn--secondary:hover {
  background-color: var(--navy);
  color: var(--white);
}

.btn--light {
  background-color: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn--light:hover {
  background-color: var(--white);
  color: var(--navy);
}

/* ===== Tables ===== */
.table-container {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th,
.table td {
  padding: var(--spacing-md) var(--spacing-lg);
  text-align: left;
}

.table th {
  background-color: var(--navy);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr {
  border-bottom: 1px solid var(--light-gray);
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background-color: var(--off-white);
}

.table tbody tr:last-child {
  border-bottom: none;
}

.table--clickable tbody tr {
  cursor: pointer;
}

.table-link {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 2px;
}

.table-link:hover {
  color: var(--gold-dark);
}

/* Responsive table - progressively hide columns */
@media (max-width: 900px) {
  .col-hide-md {
    display: none;
  }

  .table th,
  .table td {
    padding: var(--spacing-sm) var(--spacing-md);
  }
}

@media (max-width: 600px) {
  .col-hide-sm {
    display: none;
  }

  .table th,
  .table td {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.9rem;
  }

  .table th {
    font-size: 0.8rem;
  }
}

/* ===== Page Headers ===== */
.page-header {
  background: linear-gradient(135deg, #4a5568 0%, #718096 100%);
  color: var(--white);
  padding: var(--spacing-xxl) 0;
}

.page-header__title {
  color: var(--white);
  margin-bottom: var(--spacing-sm);
}

.page-header__subtitle {
  color: var(--light-gray);
  font-size: 1.1rem;
  max-width: 600px;
}

.page-intro {
  color: var(--dark-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
}

/* ===== Source Detail ===== */
.source-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.source-header__info {
  flex: 1;
}

.source-header__meta {
  display: flex;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-md);
}

.source-header__stat {
  text-align: center;
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}

.source-header__stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
}

.source-header__stat-label {
  font-size: 0.85rem;
  color: var(--light-gray);
}

.source-back {
  margin-bottom: var(--spacing-xs);
}

.source-back__link {
  color: var(--gold);
}

.source-header__country {
  margin-left: var(--spacing-sm);
}

.source-header__logo {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.source-header__logo img {
  max-width: 220px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .source-header__logo img {
    max-width: 160px;
    max-height: 60px;
  }
}

.source-blurb {
  font-size: 0.95rem;
  color: var(--light-gray);
  margin: var(--spacing-sm) 0 var(--spacing-md);
  line-height: 1.5;
}

/* ===== Citations List ===== */
.citations-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.citations-helper-text {
  font-size: 0.85rem;
  color: var(--medium-gray);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.citations-helper-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.35rem;
  color: var(--medium-gray);
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid var(--medium-gray);
  border-radius: var(--radius-sm);
}

.citation-card {
  display: block;
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gold);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.citation-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.citation-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.citation-card__talk {
  font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--spacing-xs);
}

.citation-card__footnote {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  background-color: transparent;
  color: var(--medium-gray);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--medium-gray);
  border-radius: var(--radius-sm);
}

.citation-card__speaker {
  font-size: 0.9rem;
  color: var(--medium-gray);
  margin-bottom: var(--spacing-md);
}

.citation-card__snippet {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--dark-gray);
  padding: var(--spacing-md);
  background-color: var(--off-white);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
}

.citation-card__link {
  font-size: 0.9rem;
  color: var(--navy);
  font-weight: 500;
}

.citation-card__link:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}

.citations-intro {
  color: var(--medium-gray);
  margin-bottom: var(--spacing-xl);
}

/* ===== Sources Toolbar ===== */
.sources-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--off-white);
  border-radius: var(--radius-md);
}

.sources-toolbar__stats {
  display: flex;
  gap: var(--spacing-sm);
}

.toolbar-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-sm);
  min-width: 90px;
}

.toolbar-stat__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.toolbar-stat__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--medium-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sources-toolbar__filters {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.toolbar-note {
  font-size: 0.85rem;
  color: var(--medium-gray);
  margin-bottom: var(--spacing-md);
  font-style: italic;
}

/* ===== Filters ===== */
.filters {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-md);
  background-color: var(--off-white);
  border-radius: var(--radius-md);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.filter-group__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--medium-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group__select,
.filter-group__input {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background-color: var(--white);
  min-width: 130px;
}

.filter-group__input {
  min-width: 200px;
}

.filter-group__input::placeholder {
  color: var(--medium-gray);
}

.filter-group--checkbox {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.filter-group--toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-sm);
}

.filter-group--toggle .filter-group__label {
  text-transform: none;
  letter-spacing: normal;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--light-gray);
  transition: 0.2s;
  border-radius: 999px;
}

.switch__slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--white);
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .switch__slider {
  background-color: var(--gold);
}

.switch input:checked + .switch__slider:before {
  transform: translateX(20px);
}


/* ===== Purpose Section ===== */
.purpose {
  max-width: 750px;
  margin: 0 auto;
}

.purpose__title {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.purpose__body {
  text-align: left;
}

.purpose__text {
  font-size: 1.05rem;
  color: var(--dark-gray);
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}

.purpose__scripture {
  color: var(--navy);
  text-decoration: underline;
  font-weight: 600;
}

.purpose__intro {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-lg);
}

.purpose__intro .purpose__text {
  flex: 1;
}

.purpose__stat-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--spacing-md);
  border-left: 2px solid var(--gold);
  min-width: 100px;
}

.purpose__stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.purpose__stat-label {
  font-size: 0.75rem;
  color: var(--medium-gray);
  line-height: 1.3;
  margin-top: var(--spacing-xs);
}

.purpose__stat-source {
  font-size: 0.7rem;
  color: var(--gold-dark);
  margin-top: var(--spacing-xs);
}

.purpose__stat-source:hover {
  color: var(--navy);
}

@media (max-width: 600px) {
  .purpose__intro {
    flex-direction: column;
  }

  .purpose__stat-aside {
    border-left: none;
    border-top: 2px solid var(--gold);
    padding-top: var(--spacing-md);
    width: 100%;
  }
}

.purpose__callout {
  position: relative;
  overflow: hidden;
  margin: var(--spacing-lg) 0;
  padding: var(--spacing-md) var(--spacing-lg);
  border-left: 4px solid var(--gold);
  background: linear-gradient(90deg, rgba(196, 168, 75, 0.12), rgba(196, 168, 75, 0.02));
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.purpose__callout::before {
  content: "\201C";
  position: absolute;
  top: -0.15em;
  right: 0.1em;
  font-family: var(--font-serif);
  font-size: 6rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.12;
  pointer-events: none;
}

.purpose__callout-attribution a {
  color: inherit;
  text-decoration: none;
}

.purpose__callout-attribution a:hover,
.purpose__callout-attribution a:focus-visible {
  color: var(--navy);
  text-decoration: underline;
}

.purpose__callout-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--dark-gray);
  margin-bottom: var(--spacing-sm);
  line-height: 1.7;
}

.purpose__callout-attribution {
  font-size: 0.9rem;
  color: var(--medium-gray);
  font-weight: 600;
}

.purpose__callout-attribution::before {
  content: "— ";
}

.purpose__callout--aof {
  text-align: center;
  border-left: none;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(196, 168, 75, 0.08), transparent, rgba(196, 168, 75, 0.08));
  padding: var(--spacing-lg);
}

.purpose__callout--aof::before {
  display: none;
}

.purpose__callout--aof .purpose__callout-text {
  font-size: 1.15rem;
}

.purpose__callout--aof .purpose__callout-attribution {
  justify-content: center;
}

.purpose__highlight {
  color: var(--gold-dark);
  font-weight: 600;
  font-style: normal;
}

.highlight-phrase {
  font-weight: 600;
  color: var(--gold-dark);
}

.footer__motto .highlight-phrase {
  color: var(--gold);
}

/* ===== Section Headers ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.section-header__title {
  margin-bottom: 0;
}

.section-header--centered {
  justify-content: center;
}

.section-footer {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-xl);
}

/* ===== About Page ===== */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content h2 {
  margin-top: var(--spacing-xl);
}

.about-content h2:first-child {
  margin-top: 0;
}

.methodology-list {
  list-style: none;
  padding: 0;
}

.methodology-list li {
  position: relative;
  padding-left: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

.methodology-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background-color: var(--gold);
  border-radius: 50%;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  width: 44px;
  height: 44px;
  background-color: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal), background-color var(--transition-fast);
  box-shadow: var(--shadow-md);
  z-index: 99;
}

.back-to-top:hover {
  background-color: var(--gold);
  color: var(--navy-dark);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ===== Footer ===== */
.footer {
  background-color: var(--navy-dark);
  color: var(--light-gray);
  padding: var(--spacing-xl) 0;
  margin-top: auto;
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.footer__links {
  display: flex;
  gap: var(--spacing-lg);
}

.footer__link {
  color: var(--light-gray);
  font-size: 0.9rem;
}

.footer__link:hover {
  color: var(--gold);
}

.footer__brand {
  font-weight: 600;
  color: var(--white);
  font-size: 1rem;
}

.footer__tagline {
  font-size: 0.85rem;
  color: var(--medium-gray);
  display: block;
  margin-top: var(--spacing-xs);
}

.footer__motto {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--gold-light);
  text-align: center;
  margin: var(--spacing-md) 0;
  padding: var(--spacing-sm) 0;
}

.footer__context {
  font-size: 0.9rem;
  color: var(--medium-gray);
  text-align: center;
  line-height: 1.7;
  margin: var(--spacing-md) auto 0;
  max-width: 820px;
}

.footer__disclaimer {
  font-size: 0.85rem;
  color: var(--medium-gray);
  text-align: center;
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* ===== Responsive Design ===== */
@media (max-width: 900px) {
  .hero__layout {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__copy {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .nav__links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--navy);
    padding: 0 var(--spacing-md);
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, gap 0.3s ease;
  }

  .nav__links--open {
    max-height: 300px;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
  }

  .nav__link {
    padding: var(--spacing-sm) var(--spacing-md);
    line-height: 1.3;
  }

  .nav__link--active::after {
    bottom: 2px;
    left: var(--spacing-md);
    right: auto;
    width: 20px;
  }

  .nav__toggle {
    display: block;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .source-header__meta {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .filters {
    flex-direction: column;
  }

  .footer__content {
    flex-direction: column;
    text-align: center;
  }

  .section-header {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.75rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }

  .table th,
  .table td {
    padding: var(--spacing-sm);
    font-size: 0.9rem;
  }

  .quote {
    padding: var(--spacing-md);
  }

  .quote__text {
    font-size: 1rem;
  }
}

/* ===== Loading & Error States ===== */
.loading {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--medium-gray);
  font-size: 0.95rem;
}

.error-message {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--medium-gray);
  font-size: 0.95rem;
  background-color: var(--off-white);
  border-radius: var(--radius-md);
}

.empty-state {
  text-align: center;
  padding: var(--spacing-xl) !important;
  color: var(--medium-gray);
  font-size: 0.95rem;
}

/* ===== Stats Logo Strip ===== */
.stats-sources {
  margin-top: var(--spacing-xl);
  text-align: center;
}

.stats-sources__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--medium-gray);
  margin-bottom: var(--spacing-lg);
}

.stats-logos-wrapper {
  overflow: hidden;
  width: 100%;
}

.stats-logos {
  display: flex;
  align-items: center;
  gap: var(--spacing-xxl);
  width: max-content;
  animation: scroll-logos 60s linear infinite;
  padding: var(--spacing-md) 0;
}

.stats-logos:hover {
  animation-play-state: paused;
}

@keyframes scroll-logos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.stats-logo {
  text-decoration: none;
  opacity: 0.4;
  transition: opacity var(--transition-normal);
}

.stats-logo:hover {
  opacity: 1;
}

.stats-logo__img {
  width: auto;
  height: auto;
  max-width: 160px;
  max-height: 44px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter var(--transition-normal);
}

.stats-logo:hover .stats-logo__img {
  filter: grayscale(0%);
}

@media (max-width: 768px) {
  .stats-logo__img {
    max-width: 120px;
    max-height: 32px;
  }
}

.stats-logo__wordmark {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy-dark);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .stats-logo__wordmark {
    font-size: 1rem;
  }
}

/* ===== Stats Section ===== */
.section--stats {
  background-color: var(--blue-light);
  padding: var(--spacing-xl) 0;
}

.stats-section {
  text-align: center;
  padding: var(--spacing-md) 0 var(--spacing-sm);
  border-top: none;
}

.stats-section__label {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--navy-dark);
  margin-bottom: 0.4rem;
}

.stats-section__divider {
  display: block;
  width: 64px;
  height: 2px;
  background-color: var(--gold);
  margin: 0 auto var(--spacing-lg);
  border-radius: 2px;
}

.stats {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
  padding: var(--spacing-md) 0;
}

.stat {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-xl);
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  border-radius: var(--radius-md);
  min-width: 140px;
  box-shadow: var(--shadow-sm);
  min-height: 120px;
}

.stat__value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--light-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Chart Styles ===== */
.chart {
  background-color: var(--white);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.chart__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 220px;
  padding-bottom: 30px;
  position: relative;
  border-bottom: 2px solid var(--light-gray);
}

.chart__bar-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.chart__bar {
  width: 100%;
  max-width: 30px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all var(--transition-fast);
  position: relative;
  min-height: 2px;
}

.chart__bar:hover {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
}

.chart__bar-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

.chart__bar-label {
  position: absolute;
  bottom: -25px;
  font-size: 0.7rem;
  color: var(--medium-gray);
  white-space: nowrap;
}

/* ===== Dimension Cards ===== */
.dimension-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-xl);
  margin: var(--spacing-xl) 0;
}

.dimension-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--gold);
  text-align: center;
}

.dimension-card__icon {
  color: var(--navy);
  margin-bottom: var(--spacing-md);
}

.dimension-card h3 {
  margin-bottom: var(--spacing-sm);
}

.dimension-card p {
  color: var(--dark-gray);
  margin-bottom: 0;
}

/* ===== Chart Embed ===== */
.chart-embed {
  margin: var(--spacing-xl) 0;
  text-align: center;
}

.chart-link {
  display: block;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.chart-link:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.chart-image {
  width: 100%;
  height: auto;
  display: block;
}

.chart-link__overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 58, 95, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}

.chart-link:hover .chart-link__overlay {
  background: rgba(30, 58, 95, 0.8);
}

.chart-link__text {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-normal);
}

.chart-link:hover .chart-link__text {
  opacity: 1;
  transform: translateY(0);
}

.chart-caption {
  margin-top: var(--spacing-md);
  font-size: 0.9rem;
  color: var(--medium-gray);
}

.chart-caption a {
  color: var(--navy);
  text-decoration: underline;
}

/* ===== Principles Grid ===== */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
}

.principle {
  padding: var(--spacing-lg);
  background: var(--white);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--gold);
}

.principle h4 {
  color: var(--navy);
  margin-bottom: var(--spacing-sm);
  font-size: 1.1rem;
}

.principle p {
  color: var(--dark-gray);
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Chart responsive */
@media (max-width: 768px) {
  .chart__bars {
    overflow-x: auto;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }

  .chart__bar-container {
    min-width: 20px;
  }

  .chart__bar-value {
    display: none;
  }

  .stats {
    gap: var(--spacing-md);
  }

  .stat {
    min-width: 120px;
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .stat__value {
    font-size: 1.5rem;
  }

  .sources-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
  }

  .sources-toolbar__stats {
    justify-content: center;
  }

  .toolbar-stat {
    flex: 1;
    min-width: 80px;
  }

  .sources-toolbar__filters {
    justify-content: center;
    gap: var(--spacing-sm);
  }

  .filter-group {
    flex: 1;
    min-width: 100px;
  }

  .filter-group--toggle {
    flex: none;
    width: 100%;
    justify-content: center;
    padding-top: var(--spacing-sm);
  }
}
