/* ============================================
   INEC Revalidate NOW — Custom Styles
   Design System: Section 3 of Product Brief
   ============================================ */

:root {
  --color-primary: #1A5632;
  --color-primary-mid: #2E7D51;
  --color-accent: #B8972A;
  --color-accent-light: #F5EDD0;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F3F4F6;
  --color-bg-green: #E8F5EE;
  --color-text: #0D1B2A;
  --color-text-secondary: #6B7280;
  --color-danger: #C0392B;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  line-height: 1.25;
  margin: 0;
}

h1 {
  font-weight: 700;
  font-size: 28px;
  color: var(--color-primary);
}

h2 {
  font-weight: 700;
  font-size: 22px;
  color: var(--color-primary);
}

h3 {
  font-weight: 600;
  font-size: 22px;
  color: var(--color-accent);
}

h4 {
  font-weight: 600;
  font-size: 18px;
  color: var(--color-text);
}

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 30px; }
}

p { margin: 0 0 1rem; }

.body-large {
  font-size: 18px;
  line-height: 1.75;
}

.caption {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.2s;
}

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

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-primary);
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  line-height: 1.2;
}

.btn-primary:hover { background: var(--color-primary-mid); }
.btn-primary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--color-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid var(--color-primary);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
  line-height: 1.2;
}

.btn-secondary:hover { background: var(--color-bg-green); }
.btn-secondary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #FFFFFF;
  color: var(--color-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid #FFFFFF;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  line-height: 1.2;
}

.btn-hero-primary:hover {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-hero-primary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid #FFFFFF;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  line-height: 1.2;
}

.btn-hero-secondary:hover {
  background: #FFFFFF;
  color: var(--color-primary);
  border-color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-hero-secondary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- Info Card --- */
.info-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-top: 4px solid var(--color-primary);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.info-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* --- Warning Box --- */
.warning-box {
  background: #FEF2F2;
  border-left: 6px solid var(--color-danger);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
}

.warning-box p { color: var(--color-danger); font-weight: 500; }

/* --- Green Info Box --- */
.green-info-box {
  background: var(--color-bg-green);
  border-left: 6px solid var(--color-primary);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
}

/* --- Accent Info Box --- */
.accent-info-box {
  background: var(--color-accent-light);
  border-left: 6px solid var(--color-accent);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
}

/* --- FAQ Accordion --- */
.faq-item {
  border-bottom: 1px solid #E5E7EB;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--color-text);
  line-height: 1.4;
  gap: 16px;
}

.faq-question:hover { color: var(--color-primary); }

.faq-question:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.faq-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-arrow {
  transform: rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer {
  max-height: 600px;
  padding-bottom: 20px;
}

.faq-answer-inner {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  padding-right: 36px;
}

/* --- Countdown --- */
.countdown-number {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 48px;
  color: var(--color-accent);
  line-height: 1;
}

@media (min-width: 768px) {
  .countdown-number { font-size: 64px; }
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -32px;
  top: 4px;
  width: 22px;
  height: 22px;
  background: var(--color-accent);
  border: 4px solid var(--color-primary);
  border-radius: 50%;
}

.timeline-item.active .timeline-dot {
  background: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-bg-green);
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--color-accent-light);
  border-top: 3px solid var(--color-accent);
  border-bottom: 3px solid var(--color-accent);
}

.stat-item {
  text-align: center;
  padding: 24px 16px;
}

.stat-number {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--color-primary);
  line-height: 1.1;
}

@media (min-width: 768px) {
  .stat-number { font-size: 36px; }
}

.stat-label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  margin-top: 4px;
}

/* --- Step Cards --- */
.step-card {
  position: relative;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: box-shadow 0.2s ease;
}

.step-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 20px;
  border-radius: 50%;
  margin-bottom: 16px;
}

/* --- Checklist --- */
.checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  line-height: 1.6;
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 18px;
}

/* --- Mobile Menu --- */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #E5E7EB;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 16px 0;
  z-index: 40;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 12px 24px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: background 0.15s;
}

.mobile-menu a:hover { background: var(--color-bg-alt); }

/* --- Focus States (Global) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- Links --- */
a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover { color: var(--color-primary-mid); }

/* --- Section Spacing --- */
.section-padding {
  padding: 48px 0;
}

@media (min-width: 768px) {
  .section-padding { padding: 80px 0; }
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 14px;
  color: var(--color-text-secondary);
  padding: 16px 0;
}

.breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.breadcrumb span { margin: 0 8px; }

/* --- Tab Navigation (FAQ) --- */
.tab-btn {
  padding: 10px 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text-secondary);
  background: none;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

.tab-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* --- Search Input --- */
.search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--color-text);
  transition: border-color 0.2s;
  background: #fff;
}

.search-input::placeholder { color: var(--color-text-secondary); }

.search-input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 86, 50, 0.15);
}

/* --- Eligibility Boxes --- */
.must-box {
  background: #FEF2F2;
  border: 2px solid var(--color-danger);
  border-radius: 12px;
  padding: 28px;
}

.exempt-box {
  background: var(--color-bg-green);
  border: 2px solid var(--color-primary);
  border-radius: 12px;
  padding: 28px;
}

/* --- Form Styles --- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E5E7EB;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--color-text);
  transition: border-color 0.2s;
  background: #fff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 86, 50, 0.15);
}

.form-textarea { resize: vertical; min-height: 120px; }

/* --- Resource Card --- */
.resource-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 28px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.resource-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: var(--color-primary);
}

/* --- Social Share Widget --- */
.share-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.share-widget-options {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.share-widget.open .share-widget-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.share-btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.share-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}

.share-btn--whatsapp { background: #25D366; color: #fff; }
.share-btn--facebook { background: #1877F2; color: #fff; }
.share-btn--twitter  { background: #0D1B2A; color: #fff; }
.share-btn--copy     { background: var(--color-accent); color: #fff; }

.share-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 86, 50, 0.35);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.share-toggle:hover {
  background: var(--color-primary-mid);
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(26, 86, 50, 0.4);
}

.share-toggle:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.share-toggle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: transform 0.25s ease;
}

.share-widget.open .share-toggle svg {
  transform: rotate(45deg);
}

.share-btn--copy.copied {
  background: var(--color-primary);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .share-widget {
    bottom: 16px;
    right: 16px;
    gap: 8px;
  }

  .share-widget-options {
    gap: 6px;
  }

  .share-btn {
    padding: 8px 12px;
    font-size: 12px;
    gap: 6px;
  }

  .share-btn svg {
    width: 16px;
    height: 16px;
  }

  .share-toggle {
    width: 46px;
    height: 46px;
  }

  .share-toggle svg {
    width: 20px;
    height: 20px;
  }
}

/* --- Scam / Fraud Alert Box --- */
.scam-alert-box {
  background: #FDF2F1;
  border: 2px solid var(--color-danger);
  border-radius: 12px;
  padding: 32px 28px;
  position: relative;
}

.scam-alert-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.scam-alert-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  color: var(--color-danger);
}

.scam-alert-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--color-danger);
  line-height: 1.3;
  margin: 0;
}

@media (min-width: 768px) {
  .scam-alert-title { font-size: 26px; }
}

.scam-alert-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.scam-alert-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.65;
  color: #1a1a1a;
}

.scam-alert-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23C0392B'%3E%3Cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center / contain;
}

.scam-alert-list li strong {
  color: var(--color-danger);
  font-weight: 700;
}

.scam-alert-report {
  font-size: 14px;
  color: #555;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(192, 57, 43, 0.2);
}

/* --- Accessibility Widget --- */
.a11y-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9998;
  font-family: 'Inter', sans-serif;
}

.a11y-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: 2px solid #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.a11y-toggle:hover {
  background: var(--color-primary-mid);
  transform: scale(1.08);
}

.a11y-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.a11y-panel {
  position: absolute;
  bottom: 60px;
  left: 0;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  padding: 20px;
  min-width: 240px;
  display: none;
  animation: a11y-fade-in 0.2s ease;
}

.a11y-panel.open {
  display: block;
}

@keyframes a11y-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.a11y-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-bg-green);
}

.a11y-panel-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-primary);
  margin: 0;
}

.a11y-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: background 0.15s;
  padding: 0;
}

.a11y-close:hover {
  background: #E5E7EB;
}

.a11y-close svg {
  width: 14px;
  height: 14px;
}

.a11y-section {
  margin-bottom: 16px;
}

.a11y-section:last-child {
  margin-bottom: 0;
}

.a11y-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.a11y-font-controls {
  display: flex;
  gap: 8px;
}

.a11y-font-btn {
  flex: 1;
  padding: 8px 4px;
  border: 2px solid #E5E7EB;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  text-align: center;
}

.a11y-font-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.a11y-font-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.a11y-contrast-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #E5E7EB;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  transition: border-color 0.15s, background 0.15s;
}

.a11y-contrast-toggle:hover {
  border-color: var(--color-primary);
}

.a11y-contrast-toggle.active {
  background: var(--color-bg-green);
  border-color: var(--color-primary);
}

.a11y-contrast-indicator {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: #D1D5DB;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.a11y-contrast-toggle.active .a11y-contrast-indicator {
  background: var(--color-primary);
}

.a11y-contrast-indicator::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.a11y-contrast-toggle.active .a11y-contrast-indicator::after {
  transform: translateX(16px);
}

/* High-contrast mode */
body.high-contrast {
  --color-text: #000000;
  --color-text-secondary: #333333;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F0F0F0;
}

body.high-contrast p,
body.high-contrast li,
body.high-contrast span,
body.high-contrast td,
body.high-contrast th,
body.high-contrast label,
body.high-contrast .faq-answer-inner {
  color: #000 !important;
}

body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4 {
  color: #0A3D1F !important;
}

body.high-contrast a {
  color: #0A3D1F !important;
  text-decoration: underline !important;
}

/* Hero section — boost contrast on dark backgrounds */
body.high-contrast .bg-primary h1,
body.high-contrast .bg-primary h2,
body.high-contrast .bg-primary p,
body.high-contrast .bg-primary span,
body.high-contrast .bg-primary a {
  color: #FFFFFF !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

body.high-contrast .bg-primary a {
  text-decoration: underline !important;
}

body.high-contrast .bg-primary a.btn-hero-primary {
  background: #FFFFFF !important;
  color: #000000 !important;
  border-color: #FFFFFF !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

body.high-contrast .bg-primary a.btn-hero-secondary {
  background: transparent !important;
  color: #FFFFFF !important;
  border-color: #FFFFFF !important;
  border-width: 3px !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}

/* Deadline banner */
body.high-contrast .deadline-banner p,
body.high-contrast .deadline-banner span,
body.high-contrast .deadline-banner a {
  color: #FFFFFF !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Footer — keep light text on dark bg */
body.high-contrast .site-footer p,
body.high-contrast .site-footer span,
body.high-contrast .site-footer a,
body.high-contrast .site-footer li,
body.high-contrast .site-footer h3,
body.high-contrast .site-footer h4 {
  color: #FFFFFF !important;
  text-shadow: none;
}

/* Stats bar — keep dark text readable */
body.high-contrast .stats-bar p,
body.high-contrast .stats-bar span {
  color: #000000 !important;
}

/* Nav CTA button */
body.high-contrast .site-header .btn-primary {
  color: #FFFFFF !important;
}

body.high-contrast .a11y-panel {
  border-color: #333;
}

@media (max-width: 480px) {
  .a11y-widget {
    bottom: 16px;
    left: 16px;
  }

  .a11y-toggle {
    width: 44px;
    height: 44px;
  }

  .a11y-panel {
    min-width: 220px;
    padding: 16px;
    bottom: 56px;
  }
}

/* ============================================
   DARK MODE — Toggle Button
   ============================================ */
.dark-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  color: var(--color-text);
  flex-shrink: 0;
}

.dark-mode-btn:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-accent);
}

.dark-mode-btn svg {
  width: 20px;
  height: 20px;
}

.dark-mode-btn .icon-sun { display: none; }
.dark-mode-btn .icon-moon { display: block; }

/* Mobile dark mode toggle row */
.dark-mode-mobile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-top: 1px solid #E5E7EB;
  margin-top: 8px;
}

.dark-mode-mobile-row span {
  font-weight: 500;
  font-size: 16px;
  color: var(--color-text);
}

/* ============================================
   DARK MODE — CSS Overrides (html.dark)
   ============================================ */

html.dark {
  --color-bg: #0D1B2A;
  --color-bg-alt: #152238;
  --color-bg-green: #0F2A1D;
  --color-text: #E5E7EB;
  --color-text-secondary: #9CA3AF;
  --color-accent-light: #2A2518;
}

html.dark body {
  background: #0D1B2A;
  color: #E5E7EB;
}

/* Header */
html.dark .site-header {
  background: #0F1A2E !important;
  border-bottom-color: #1E293B;
}

html.dark .site-header .nav-link {
  color: #D1D5DB;
}

html.dark .site-header .nav-link:hover {
  color: #4ADE80;
}

html.dark #mobile-menu-btn {
  color: #D1D5DB;
}

html.dark #mobile-menu-btn:hover {
  background: #1E293B;
}

/* Mobile Menu */
html.dark .mobile-menu {
  background: #0F1A2E;
  border-bottom-color: #1E293B;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

html.dark .mobile-menu a {
  color: #D1D5DB;
}

html.dark .mobile-menu a:hover {
  background: #1E293B;
}

html.dark .dark-mode-mobile-row {
  border-top-color: #1E293B;
}

html.dark .dark-mode-mobile-row span {
  color: #D1D5DB;
}

/* Dark Mode Toggle in dark mode */
html.dark .dark-mode-btn {
  border-color: #374151;
  color: #E5E7EB;
}

html.dark .dark-mode-btn:hover {
  background: #1E293B;
  border-color: var(--color-accent);
}

/* Deadline Banner */
html.dark .deadline-banner {
  background: #0B1420 !important;
}

/* Hero / primary bg */
html.dark .bg-primary {
  background-color: #0F3D24 !important;
}

/* General Section backgrounds */
html.dark .bg-white {
  background-color: #0D1B2A !important;
}

html.dark .bg-gray-50,
html.dark .bg-bg-alt {
  background-color: #152238 !important;
}

html.dark .bg-bg-green {
  background-color: #0F2A1D !important;
}

/* Text Color overrides */
html.dark .text-gray-700,
html.dark .text-gray-800 {
  color: #D1D5DB !important;
}

html.dark .text-gray-600,
html.dark .text-gray-500 {
  color: #9CA3AF !important;
}

html.dark .text-gray-900,
html.dark .text-\[\#0D1B2A\] {
  color: #E5E7EB !important;
}

html.dark .text-gray-400 {
  color: #6B7280 !important;
}

html.dark .text-gray-300 {
  color: #9CA3AF !important;
}

/* Cards */
html.dark .info-card {
  background: #1E293B;
  border-color: #334155;
}

html.dark .step-card {
  background: #1E293B;
  border-color: #334155;
}

html.dark .resource-card {
  background: #1E293B;
  border-color: #334155;
}

html.dark .resource-card:hover {
  border-color: #4ADE80;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Info Boxes */
html.dark .green-info-box {
  background: #0F2A1D;
  border-left-color: #2E7D51;
}

html.dark .accent-info-box {
  background: #2A2518;
  border-left-color: var(--color-accent);
}

html.dark .warning-box {
  background: #2A1215;
  border-left-color: var(--color-danger);
}

/* Eligibility Boxes */
html.dark .must-box {
  background: #2A1215;
  border-color: var(--color-danger);
}

html.dark .exempt-box {
  background: #0F2A1D;
  border-color: #2E7D51;
}

/* Stats Bar */
html.dark .stats-bar {
  background: #1A1F14;
  border-top-color: #B8972A;
  border-bottom-color: #B8972A;
}

html.dark .stat-label {
  color: #D1D5DB;
}

/* FAQ */
html.dark .faq-item {
  border-bottom-color: #334155;
}

html.dark .faq-question {
  color: #E5E7EB;
}

html.dark .faq-question:hover {
  color: #4ADE80;
}

html.dark .faq-answer-inner {
  color: #D1D5DB;
}

/* Tabs */
html.dark .tab-btn {
  color: #9CA3AF;
  border-color: #334155;
}

html.dark .tab-btn:hover {
  border-color: #4ADE80;
  color: #4ADE80;
}

html.dark .tab-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Timeline */
html.dark .timeline::before {
  background: #2E7D51;
}

html.dark .timeline-item.active .timeline-dot {
  box-shadow: 0 0 0 4px #0F2A1D;
}

/* Search Input */
html.dark .search-input {
  background: #1E293B;
  border-color: #334155;
  color: #E5E7EB;
}

html.dark .search-input::placeholder {
  color: #6B7280;
}

html.dark .search-input:focus {
  border-color: #2E7D51;
  box-shadow: 0 0 0 3px rgba(46, 125, 81, 0.25);
}

/* Form Inputs */
html.dark .form-input,
html.dark .form-select,
html.dark .form-textarea {
  background: #1E293B;
  border-color: #334155;
  color: #E5E7EB;
}

html.dark .form-input:focus,
html.dark .form-select:focus,
html.dark .form-textarea:focus {
  border-color: #2E7D51;
  box-shadow: 0 0 0 3px rgba(46, 125, 81, 0.25);
}

html.dark .form-label {
  color: #D1D5DB;
}

/* Buttons */
html.dark .btn-secondary {
  color: #4ADE80;
  border-color: #4ADE80;
}

html.dark .btn-secondary:hover {
  background: #0F2A1D;
}

/* Links */
html.dark a {
  color: #4ADE80;
}

html.dark a:hover {
  color: #86EFAC;
}

/* Keep CTA buttons white text */
html.dark .btn-primary {
  color: #FFFFFF;
}

/* Breadcrumb */
html.dark .breadcrumb {
  color: #9CA3AF;
}

html.dark .breadcrumb a {
  color: #9CA3AF;
}

html.dark .breadcrumb a:hover {
  color: #4ADE80;
}

/* Footer */
html.dark .site-footer,
html.dark footer {
  background: #070D16 !important;
}

html.dark footer .border-gray-700 {
  border-color: #1E293B !important;
}

/* Border overrides */
html.dark .border-gray-200 {
  border-color: #1E293B !important;
}

html.dark .border-gray-100 {
  border-color: #1E293B !important;
}

/* Tailwind bg-white overrides for any remaining elements */
html.dark [class*="bg-white"] {
  background-color: #0D1B2A !important;
}

html.dark .divide-gray-200 > * + * {
  border-color: #1E293B;
}

/* Countdown */
html.dark .countdown-number {
  color: #D4A82A;
}

/* Checklist */
html.dark .checklist li {
  color: #D1D5DB;
}

/* Wizard result cards */
html.dark .bg-red-50 {
  background-color: #2A1215 !important;
}

html.dark .bg-blue-50 {
  background-color: #0D1B3A !important;
}

/* Accent light backgrounds */
html.dark .bg-accent-light {
  background-color: #2A2518 !important;
}

html.dark .ring-white {
  --tw-ring-color: #1E293B;
}

/* Share widget */
html.dark .share-btn--twitter {
  background: #1E293B;
}

/* Accessibility panel */
html.dark .a11y-panel {
  background: #1E293B;
  border-color: #334155;
}

html.dark .a11y-panel-title {
  color: #4ADE80;
}

html.dark .a11y-font-btn {
  background: #0D1B2A;
  border-color: #334155;
  color: #D1D5DB;
}

html.dark .a11y-font-btn:hover {
  border-color: #4ADE80;
  color: #4ADE80;
}

html.dark .a11y-font-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

html.dark .a11y-contrast-toggle {
  background: #0D1B2A;
  border-color: #334155;
  color: #D1D5DB;
}

html.dark .a11y-contrast-toggle:hover {
  border-color: #4ADE80;
}

html.dark .a11y-close {
  background: #334155;
  color: #9CA3AF;
}

html.dark .a11y-close:hover {
  background: #475569;
}

/* Scam alert box */
html.dark .scam-alert-box {
  background: #2A1215;
}

html.dark .scam-alert-list li {
  color: #D1D5DB;
}

/* Smooth transition for theme switching */
body,
.site-header,
.mobile-menu,
.info-card,
.step-card,
.resource-card,
.form-input,
.form-select,
.form-textarea,
.search-input {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* --- Print Styles --- */
@media print {
  .site-header, .deadline-banner, .site-footer, .btn-primary, .btn-secondary, .share-widget, .a11y-widget, .dark-mode-btn { display: none; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
}
