/* ================================================================
   ClearCost — Shared Design System
   Clean design: Roboto/Poppins, #3B82F6 primary, 8pt grid
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;600&family=Poppins:wght@400;500;600;700;800&family=Roboto:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --primary-darker: #1D4ED8;
  --primary-light: #DBEAFE;
  --primary-lighter: #EFF6FF;
  --secondary: #8B5CF6;
  --success: #16A34A;
  --success-light: #DCFCE7;
  --warning: #D97706;
  --warning-light: #FEF3C7;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --surface: #FFFFFF;
  --text: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand svg { flex-shrink: 0; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.4;
}
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
}
.btn-secondary {
  background: var(--gray-100);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--gray-200);
}
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--gray-300);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--text);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}
.btn-white {
  background: white;
  color: var(--primary-dark);
  font-weight: 700;
}
.btn-white:hover {
  background: var(--gray-50);
  color: var(--primary-darker);
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.card-padded { padding: 32px; }

/* ── Form elements ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input::placeholder { color: var(--text-light); }
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-input:disabled {
  background: var(--gray-50);
  cursor: not-allowed;
}
.form-error {
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--danger-light);
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}
.form-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  font-size: 13px;
  color: var(--text-light);
}
.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ── Badge / Chip ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: var(--success-light); color: var(--success); }

/* ── Footer ── */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 48px 24px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}
.footer-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: white;
  margin-bottom: 12px;
}
.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #9CA3AF;
  max-width: 320px;
}
.footer-heading {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  margin-bottom: 16px;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 14px;
  color: #9CA3AF;
  transition: color 0.15s;
}
.footer-links a:hover { color: white; }
.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 13px;
  color: #6B7280;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ── Mobile Nav ── */
.nav-mobile-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
  padding: 16px 24px;
  z-index: 99;
}
.nav-mobile-menu.open { display: block; }
.nav-mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--gray-100);
}
.nav-mobile-menu a:last-child { border: none; }
.nav-mobile-menu a:hover { color: var(--primary); }
.nav-mobile-menu .btn {
  width: 100%;
  margin-top: 12px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .section { padding: 48px 0; }
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .nav-mobile-toggle { display: block; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  h1 { font-size: 32px !important; }
  h2 { font-size: 24px !important; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
}

/* ================================================================
   Enriched Assistance Programs
   ================================================================ */

/* ── Status badges ── */
.assist-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 8px; border-radius: 4px;
  line-height: 1.4;
}
.assist-status--open     { background: #DCFCE7; color: #166534; }
.assist-status--closed   { background: #FEE2E2; color: #991B1B; }
.assist-status--waitlist { background: #FEF3C7; color: #92400E; }
.assist-status--unknown  { background: #F3F4F6; color: #6B7280; }

/* ── Type badges ── */
.assist-type {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .03em; padding: 2px 6px; border-radius: 3px;
  line-height: 1.3;
}
.assist-type--manufacturer { background: #DBEAFE; color: #1E40AF; }
.assist-type--foundation   { background: #EDE9FE; color: #5B21B6; }
.assist-type--copay_card   { background: #D1FAE5; color: #065F46; }

/* ── Compact card ── */
.assist-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--gray-50);
}
.assist-card__header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.assist-card__name {
  font-weight: 600; font-size: 14px; color: var(--text);
}
.assist-card__cost {
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 4px;
}
.assist-card__elig {
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 12px;
}
.assist-card__actions {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.assist-card__more {
  font-size: 12px; color: var(--primary);
  cursor: pointer; font-weight: 500;
  margin-top: 10px;
}
.assist-card__more:hover { text-decoration: underline; }

/* ── Copy / detail buttons ── */
.assist-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 5px;
  cursor: pointer; border: 1px solid var(--gray-300);
  background: #fff; color: var(--text-secondary);
  transition: all .15s ease;
}
.assist-btn:hover { border-color: var(--primary); color: var(--primary); }
.assist-btn--primary {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}
.assist-btn--primary:hover { background: var(--primary-dark); }

/* ── Expanded detail ── */
.assist-detail {
  margin-top: 12px;
  border-top: 1px solid var(--gray-200);
  padding-top: 12px;
}
.assist-detail__program {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  background: #fff;
}
.assist-detail__program:last-child { margin-bottom: 0; }
.assist-detail__section {
  margin-top: 10px;
}
.assist-detail__section-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted);
  margin-bottom: 4px;
}
.assist-detail__row {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.6;
}
.assist-detail__row strong { color: var(--text); font-weight: 500; }
.assist-detail__link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--primary); font-weight: 500; text-decoration: none;
  font-size: 13px;
}
.assist-detail__link:hover { text-decoration: underline; }
.assist-detail__note {
  font-size: 12px; color: var(--warning);
  font-style: italic; margin-top: 6px;
}
