/* Farewell Fund — Component styles */

/* ============ BUTTONS ============ */
.btn {
  --btn-fg: var(--color-on-primary);
  --btn-bg: var(--color-primary);
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  border: 2px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-heading);
  font-size: var(--fs-300);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-standard),
              border-color var(--duration-base) var(--ease-standard),
              color var(--duration-base) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-base) var(--ease-standard);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary { --btn-bg: var(--color-primary); --btn-fg: var(--white); --btn-border: var(--color-primary); }
.btn-primary:hover { --btn-bg: var(--color-primary-hover); --btn-border: var(--color-primary-hover); box-shadow: var(--shadow-md); }
.btn-primary:active { --btn-bg: var(--color-primary-active); }

.btn-secondary { --btn-bg: var(--color-secondary); --btn-fg: var(--white); --btn-border: var(--color-secondary); }
.btn-secondary:hover { --btn-bg: var(--color-secondary-hover); --btn-border: var(--color-secondary-hover); box-shadow: var(--shadow-md); }

.btn-outline { --btn-bg: transparent; --btn-fg: var(--color-primary); --btn-border: var(--color-primary); }
.btn-outline:hover { --btn-bg: var(--navy-050); }

/* WhatsApp share — WhatsApp brand green, white text (AA contrast) */
.btn-whatsapp { --btn-bg: #128c7e; --btn-fg: var(--white); --btn-border: #128c7e; }
.btn-whatsapp:hover { --btn-bg: #0f7367; --btn-border: #0f7367; box-shadow: var(--shadow-md); }
.btn-whatsapp:active { --btn-bg: #0c5c53; }

.btn-outline-light { --btn-bg: rgba(255,255,255,0.06); --btn-fg: var(--white); --btn-border: rgba(255,255,255,0.7); }
.btn-outline-light:hover { --btn-bg: rgba(255,255,255,0.16); --btn-border: var(--white); }

.btn-ghost { --btn-bg: transparent; --btn-fg: var(--color-primary); --btn-border: transparent; padding-inline: var(--space-3); min-height: 44px; }
.btn-ghost:hover { --btn-bg: var(--slate-100); }

.btn-lg { min-height: 56px; padding: var(--space-4) var(--space-8); font-size: var(--fs-400); }
.btn-sm { min-height: 40px; padding: var(--space-2) var(--space-4); font-size: var(--fs-200); border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

.btn-group { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* ============ SITE HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark { width: 42px; height: 42px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--navy-900);
}
.brand-tagline { font-size: 0.7rem; font-weight: 600; color: var(--color-secondary); letter-spacing: 0.01em; }

.nav-primary { display: flex; align-items: center; gap: var(--space-8); flex: 1; justify-content: center; }
.nav-links { display: flex; align-items: center; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink-700);
  font-weight: 500;
  font-size: var(--fs-300);
  text-decoration: none;
  padding: var(--space-2) 0;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--color-secondary);
  border-radius: var(--radius-full);
  transition: right var(--duration-base) var(--ease-standard);
}
.nav-links a:hover { color: var(--navy-900); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { right: 0; }
.nav-links a[aria-current="page"] { color: var(--navy-900); font-weight: 600; }

.nav-actions { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--white);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-menu-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu-close { display: block; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-primary {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--space-8) var(--space-6);
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--ease-standard);
    overflow-y: auto;
  }
  .nav-primary.is-open { transform: translateX(0); }
  .nav-links { flex-direction: column; align-items: flex-start; gap: var(--space-1); width: 100%; }
  .nav-links a { display: block; width: 100%; padding: var(--space-4) var(--space-2); font-size: var(--fs-400); }
  .nav-links a::after { display: none; }
  .nav-actions { flex-direction: column; width: 100%; margin-top: var(--space-8); }
  .nav-actions .btn { width: 100%; }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-block: var(--space-24) var(--space-20);
  color: var(--color-text-on-dark);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(9,26,48,0.92) 0%, rgba(9,26,48,0.78) 32%, rgba(9,26,48,0.42) 58%, rgba(9,26,48,0.22) 100%),
    linear-gradient(0deg, rgba(9,26,48,0.55) 0%, rgba(9,26,48,0) 35%);
}
.hero-grid {
  position: relative;
  z-index: 1;
}
.hero-copy { max-width: 640px; }
.hero h1 { font-size: var(--fs-900); color: var(--white); }
@media (max-width: 640px) {
  .hero { padding-block: var(--space-16); }
  .hero h1 { font-size: var(--fs-800); }
}
.hero .eyebrow { color: var(--gold-400); }
.hero .eyebrow::before { background: var(--gold-400); }
.hero-sub { font-size: var(--fs-400); max-width: 46ch; margin-bottom: var(--space-8); color: var(--color-text-on-dark-muted); }
.hero-note { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-8); color: var(--color-text-on-dark-muted); font-size: var(--fs-200); }
.hero-note svg { width: 20px; height: 20px; color: var(--gold-400); flex-shrink: 0; }

/* ============ TRUST STRIP ============ */
.trust-strip { border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); background: var(--white); }
.hero + .trust-strip { padding-top: var(--space-6); }
.trust-item { text-align: center; padding: var(--space-4); }
.trust-icon {
  width: 60px; height: 60px;
  margin: 0 auto var(--space-4);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: var(--teal-050);
  color: var(--color-secondary);
}
.trust-icon svg { width: 30px; height: 30px; }
.trust-item h3 { font-size: var(--fs-400); margin-bottom: var(--space-2); }
.trust-item p { font-size: var(--fs-200); max-width: 26ch; margin-inline: auto; }

/* ============ CARDS ============ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
.card--interactive { transition: transform var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard); }
.card--interactive:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.icon-tile {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-050);
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile--teal { background: var(--teal-050); color: var(--color-secondary); }
.icon-tile--gold { background: var(--gold-100); color: var(--gold-600); }

/* ============ AUDIENCE SPLIT (For Families / For Donors) ============ */
.audience-card {
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  position: relative;
  overflow: hidden;
}
.audience-card--families { background: var(--navy-900); color: var(--color-text-on-dark); }
.audience-card--donors { background: var(--white); border: 1px solid var(--color-border); }
.audience-card--families h3 { color: var(--white); }
.audience-card--families p { color: var(--color-text-on-dark-muted); opacity: 0.88; }
.audience-card ul { list-style: none; padding: 0; margin: var(--space-6) 0; display: grid; gap: var(--space-3); }
.audience-card ul li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--fs-300); }
.audience-card--families ul li { color: var(--color-text-on-dark); }
.audience-card--donors ul li { color: var(--color-text-muted); }
.audience-card ul li svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--color-accent); }

/* ============ STEP TIMELINE (How It Works) ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  counter-reset: step;
  position: relative;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .steps--3 { grid-template-columns: 1fr; } }

.step {
  position: relative;
  text-align: center;
  padding-top: var(--space-4);
}
.step-number {
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-500);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-5);
  box-shadow: var(--shadow-md);
}
.step h3 { font-size: var(--fs-500); margin-bottom: var(--space-2); }
.step p { font-size: var(--fs-300); max-width: 30ch; margin-inline: auto; }

/* ============ STATS STRIP ============ */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  text-align: center;
}
@media (max-width: 760px) { .stats-strip { grid-template-columns: repeat(2, 1fr); gap: var(--space-10) var(--space-6); } }
.stat-value {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--fs-800);
  color: var(--white);
  display: block;
  letter-spacing: -0.01em;
}
.on-dark .stat-value { color: var(--white); }
.stat-value .accent { color: var(--gold-400); }
.stat-label {
  font-size: var(--fs-200);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--color-text-on-dark-muted);
  margin-top: var(--space-2);
}

/* ============ BADGES ============ */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--fs-100);
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge svg { width: 14px; height: 14px; }
.badge-verified { background: var(--green-100); color: var(--green-700); }
.badge-urgent { background: var(--red-100); color: var(--red-600); }
.badge-gold { background: var(--gold-100); color: var(--gold-600); }
.badge-neutral { background: var(--slate-100); color: var(--slate-600); }

/* ============ CAMPAIGN CARDS (Donate / Browse) ============ */
.campaign-card[hidden] { display: none; }
.campaign-card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard);
}
.campaign-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.campaign-media {
  aspect-ratio: 16/10;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
}
.campaign-media svg { width: 48px; height: 48px; opacity: 0.9; }
.campaign-media .badge { position: absolute; top: var(--space-3); left: var(--space-3); }
.campaign-body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.campaign-eyebrow { font-size: var(--fs-100); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; color: var(--color-secondary); }
.campaign-body h3 { font-size: var(--fs-500); margin-bottom: 0; }
.campaign-excerpt { font-size: var(--fs-300); flex: 1; }

.progress { height: 10px; border-radius: var(--radius-full); background: var(--slate-100); overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--teal-600), var(--navy-900)); }
.campaign-meta { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-200); }
.campaign-meta strong { font-family: var(--font-heading); color: var(--navy-900); font-size: var(--fs-400); }
.campaign-footer { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding-top: var(--space-2); }
.campaign-donors { font-size: var(--fs-100); color: var(--color-text-muted); }

/* Palette rotation for placeholder media tiles (no fabricated photography) — usable on any media tile (.campaign-media, .article-thumb, .blog-featured-media) */
.tile-grad-1 { background: linear-gradient(135deg, var(--navy-800), var(--navy-900)); }
.tile-grad-2 { background: linear-gradient(135deg, var(--teal-600), var(--navy-800)); }
.tile-grad-3 { background: linear-gradient(135deg, var(--gold-500), var(--teal-700)); }
.tile-grad-4 { background: linear-gradient(135deg, var(--teal-500), var(--teal-700)); }

/* ============ FORMS ============ */
.form-grid { display: grid; gap: var(--space-6); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
@media (max-width: 640px) { .form-row-2 { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-weight: 600; font-size: var(--fs-300); color: var(--ink-900); }
.field .hint { font-size: var(--fs-100); color: var(--color-text-muted); margin-top: -2px; }
.field .required { color: var(--color-danger); margin-left: var(--space-1); }

.input, .textarea, .select {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-300);
  color: var(--color-text);
  transition: border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard);
}
.textarea { min-height: 140px; resize: vertical; padding-top: var(--space-3); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 4px var(--teal-100);
}
.input::placeholder, .textarea::placeholder { color: var(--slate-400); }

.amount-presets { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.amount-chip { padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); border: 1.5px solid var(--color-border); background: var(--white); font-weight: 600; font-size: var(--fs-200); color: var(--ink-700); cursor: pointer; min-height: 44px; transition: all var(--duration-base) var(--ease-standard); }
.amount-chip:hover { border-color: var(--color-secondary); }
.amount-chip.is-active { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }

.input-prefix-group { position: relative; }
.input-prefix-group .prefix {
  position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%);
  color: var(--color-text-muted); font-weight: 600; pointer-events: none;
}
.input-prefix-group .input { padding-left: calc(var(--space-4) * 2 + 0.6em); }

.field.has-error .input, .field.has-error .textarea, .field.has-error .select {
  border-color: var(--color-danger);
}
.error-text { display: none; font-size: var(--fs-100); color: var(--color-danger); font-weight: 600; }
.field.has-error .error-text { display: block; }

.checkbox-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-3); }
.checkbox-row input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--color-secondary); }
/* flex-basis: 0 (not the label's own long, unwrapped text) is what the
   wrap decision is based on, so the label shares the row with the
   checkbox instead of the whole label dropping to its own line. */
.checkbox-row label { flex: 1 1 0%; min-width: 0; text-align: left; font-size: var(--fs-200); color: var(--color-text-muted); font-weight: 400; }
.checkbox-row.has-error input[type="checkbox"] { outline: 2px solid var(--color-danger); outline-offset: 2px; }
.checkbox-row .error-text { flex-basis: 100%; margin-left: calc(20px + var(--space-3)); }
.checkbox-row.has-error .error-text { display: block; }

/* ---- Checkout payment breakdown (donate.html, Story 21) ---- */
.donate-breakdown {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--cream-050);
}
.donate-breakdown-title {
  font-size: var(--fs-200);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-3);
}
.breakdown-list { margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  font-size: var(--fs-300);
  color: var(--color-text);
}
.breakdown-row dt { font-weight: 400; }
.breakdown-row dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown-note { color: var(--color-text-muted); font-size: var(--fs-100); }
.breakdown-row--muted { color: var(--color-text-muted); }
.breakdown-row--muted dd { font-weight: 400; }
.breakdown-row--total {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1.5px solid var(--color-border);
  font-size: var(--fs-400);
}
.breakdown-row--total dt { font-weight: 700; color: var(--ink-900); }
.breakdown-row--total dd { font-weight: 800; color: var(--navy-900); }

/* ---- Optional contribution to Farewell Fund (donate.html, Story 22) ---- */
.contribution-section {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1.5px solid var(--color-border);
}
.contribution-section legend {
  font-size: var(--fs-300);
  margin-bottom: var(--space-2);
}
.contribution-section .hint { margin-bottom: var(--space-3); }

.upload-dropzone {
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  text-align: center;
  background: var(--cream-050);
  cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard);
}
.upload-dropzone:hover, .upload-dropzone.is-dragover { border-color: var(--color-secondary); background: var(--teal-050); }
.upload-dropzone svg { width: 36px; height: 36px; color: var(--color-secondary); margin: 0 auto var(--space-3); }
.upload-dropzone .filename { margin-top: var(--space-3); font-weight: 600; color: var(--navy-900); font-size: var(--fs-200); }

.range-field { display: flex; flex-direction: column; gap: var(--space-2); }
.range-value { font-family: var(--font-heading); font-weight: 700; color: var(--navy-900); font-size: var(--fs-500); }
input[type="range"] { width: 100%; accent-color: var(--color-secondary); height: 44px; }

fieldset { border: none; padding: 0; margin: 0; }
legend { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-500); color: var(--navy-900); padding: 0; margin-bottom: var(--space-4); }

/* ============ NOTICE / FLAG BANNERS ============ */
.notice {
  display: flex; gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--cream-050);
  font-size: var(--fs-200);
}
.notice[hidden] { display: none; }
.notice svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--gold-600); }
.notice strong { display: block; color: var(--navy-900); margin-bottom: var(--space-1); font-size: var(--fs-300); }
.notice-warning { background: var(--gold-100); border-color: var(--gold-200); }
.notice-warning svg { color: var(--gold-600); }
.notice-info { background: var(--teal-050); border-color: var(--teal-100); }
.notice-info svg { color: var(--color-secondary); }
.notice-danger { background: var(--color-danger-bg); border-color: var(--color-danger); }
.notice-danger svg { color: var(--color-danger); }
.notice-danger strong { color: var(--color-danger); }

/* ============ FOOTER ============ */
.footer-cta {
  background: var(--navy-900);
  color: var(--color-text-on-dark);
  text-align: center;
  padding-block: var(--space-20);
}
.footer-cta h2 { color: var(--white); margin-bottom: var(--space-4); }
.footer-cta p { color: var(--color-text-on-dark-muted); font-size: var(--fs-400); max-width: 56ch; margin-inline: auto var(--space-8); margin-top: 0; }
.footer-cta .btn-group { justify-content: center; }

.footer-cta--photo { position: relative; overflow: hidden; isolation: isolate; background: var(--navy-900); }
.footer-cta-media { position: absolute; inset: 0; z-index: -1; }
.footer-cta-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.footer-cta-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,26,48,0.82) 0%, rgba(9,26,48,0.93) 100%); }

.site-footer { background: #0a2245; color: var(--color-text-on-dark); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-10);
  padding-block: var(--space-16);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; margin-bottom: var(--space-4); }
.footer-brand img { width: 40px; height: 40px; }
.footer-brand span { font-family: var(--font-heading); font-weight: 800; color: var(--white); font-size: 1.05rem; }
.footer-about p { color: var(--color-text-on-dark-muted); font-size: var(--fs-200); max-width: 32ch; }

.footer-col h4 { color: var(--white); font-size: var(--fs-300); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-5); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.footer-col a { color: var(--color-text-on-dark-muted); text-decoration: none; font-size: var(--fs-300); }
.footer-col a:hover { color: var(--white); }

.footer-social { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.footer-social a {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: background var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}
.footer-social a:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); }
.footer-social svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-block: var(--space-6);
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--fs-100);
  color: var(--color-text-on-dark-muted);
}
.footer-bottom-links { display: flex; gap: var(--space-5); list-style: none; padding: 0; margin: 0; }
.footer-bottom-links a { color: var(--color-text-on-dark-muted); text-decoration: none; }
.footer-bottom-links a:hover { color: var(--white); }

/* ============ MISC ============ */
.divider-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.5; }

.quote-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
}
.quote-card svg.quote-mark { width: 32px; height: 32px; color: var(--gold-400); margin-bottom: var(--space-3); }
.quote-card p { font-size: var(--fs-400); color: var(--ink-700); font-style: italic; }
.quote-author { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-4); }
.quote-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--teal-100); color: var(--color-secondary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700;
}
.quote-name { font-weight: 700; color: var(--navy-900); font-size: var(--fs-300); }
.quote-role { font-size: var(--fs-100); color: var(--color-text-muted); }

.article-card { display: flex; flex-direction: column; gap: var(--space-4); text-decoration: none; }
.article-thumb {
  aspect-ratio: 16/10; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; color: var(--white);
}
.article-thumb svg { width: 40px; height: 40px; opacity: 0.9; }
.article-card h3 { font-size: var(--fs-500); color: var(--navy-900); }
.article-card:hover h3 { color: var(--color-secondary); }
.article-meta { font-size: var(--fs-100); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }

.pill-filter { display: inline-flex; align-items: center; padding: var(--space-2) var(--space-5); border-radius: var(--radius-full); border: 1.5px solid var(--color-border); background: var(--white); font-weight: 600; font-size: var(--fs-200); color: var(--ink-700); cursor: pointer; min-height: 44px; transition: all var(--duration-base) var(--ease-standard); }
.pill-filter:hover { border-color: var(--color-secondary); }
.pill-filter.is-active { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-300); }
th, td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); }
th { font-family: var(--font-heading); color: var(--navy-900); }

/* Modal (used by Login/Sign Up stub) */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(14,47,86,0.55);
  display: none; align-items: center; justify-content: center; padding: var(--space-6);
  z-index: 500; overflow-y: auto;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius-lg); padding: var(--space-10);
  max-width: 440px; width: 100%; box-shadow: var(--shadow-lg); position: relative;
  text-align: center;
  /* Content can run taller than the viewport (long forms, small laptop
     screens); the backdrop itself doesn't scroll, so the card must, or
     everything past the fold becomes permanently unreachable. */
  max-height: calc(100vh - var(--space-6) * 2);
  overflow-y: auto;
}
.modal-close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--slate-100);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.modal-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--teal-050); color: var(--color-secondary); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-5); }
.modal-icon svg { width: 30px; height: 30px; }
