:root {
  --navy-950: #070d19;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --amber-600: #d97706;
  --amber-100: #fef3c7;
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-600: #475569;
}
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--navy-900);
  background: var(--slate-50);
}
body { margin: 0; padding: 0; line-height: 1.6; }
a { color: var(--emerald-700); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Sticky Top Navigation */
.top-alert-bar {
  background: var(--navy-950);
  color: #e2e8f0;
  font-size: 0.82rem;
  padding: 7px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(16, 185, 129, 0.3);
}
.top-alert-bar strong { color: #34d399; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--emerald-600);
  color: #fff;
}
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none !important;
}
.brand-badge {
  background: var(--emerald-500);
  color: var(--navy-950);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav-links a {
  color: #f1f5f9;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 8px;
  transition: all 0.15s ease;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}
.nav-links a.nav-cta-b2b {
  background: var(--emerald-600);
  color: #fff;
}
.nav-links a.nav-cta-b2b:hover {
  background: var(--emerald-500);
  color: var(--navy-950);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #070d19 0%, #0f172a 55%, #064e3b 100%);
  color: #fff;
  padding: 48px 20px 42px;
  border-bottom: 1px solid #1e293b;
}
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.7rem);
  line-height: 1.16;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero p.lead {
  font-size: 1.04rem;
  color: #cbd5e1;
  margin: 0 0 22px;
  max-width: 680px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
  transition: transform 0.12s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.99); }
.btn-emerald { background: var(--emerald-500); color: var(--navy-950); }
.btn-emerald:hover { background: #34d399; }
.btn-navy { background: var(--navy-900); color: #fff; border: 1px solid #334155; }
.btn-navy:hover { background: var(--navy-800); }
.btn-outline { background: #fff; color: var(--navy-900); border: 1.5px solid #cbd5e1; }
.btn-outline:hover { border-color: var(--emerald-600); color: var(--emerald-700); }
.btn-amber { background: #f59e0b; color: var(--navy-950); }
.btn-amber:hover { background: #fbbf24; }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}
.stat-box {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 12px 14px;
  border-radius: 10px;
}
.stat-box .num {
  font-size: 1.28rem;
  font-weight: 800;
  color: #34d399;
  display: block;
  font-variant-numeric: tabular-nums;
}
.stat-box .lbl {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.hero-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}
.hero-card h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  color: #34d399;
}
.hero-card ul {
  margin: 0 0 16px;
  padding-left: 18px;
  color: #e2e8f0;
  font-size: 0.88rem;
}
.hero-card li { margin-bottom: 7px; }

/* Sections */
.section { padding: 52px 0; }
.section-alt {
  background: #fff;
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
}
.section-header { margin-bottom: 28px; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--emerald-700);
  background: var(--emerald-100);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.section-header h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  margin: 0 0 8px;
  color: var(--navy-900);
}
.section-header p {
  margin: 0;
  color: var(--slate-600);
  max-width: 780px;
}

/* Tool Panels & Forms */
.tool-panel {
  background: #fff;
  border: 1.5px solid var(--slate-200);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.92rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--navy-900);
  font-family: inherit;
}
.form-control:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Result Banners & KPIs */
.result-banner {
  background: var(--emerald-50);
  border-left: 5px solid var(--emerald-600);
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.92rem;
}
.result-banner.warn {
  background: var(--amber-100);
  border-left-color: var(--amber-600);
}
.result-banner.danger {
  background: var(--red-100);
  border-left-color: var(--red-600);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.kpi-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 14px 16px;
}
.kpi-card .k-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--slate-600);
}
.kpi-card .k-val {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--navy-900);
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
}
.kpi-card .k-sub {
  font-size: 0.8rem;
  color: var(--slate-600);
}

/* Timeline Steps */
.timeline-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}
.timeline-step {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 14px;
  padding: 14px 16px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  align-items: start;
}
@media (max-width: 640px) {
  .timeline-step { grid-template-columns: 1fr; gap: 6px; }
}
.step-date {
  font-weight: 800;
  font-size: 0.84rem;
  color: var(--emerald-700);
  background: var(--emerald-100);
  padding: 5px 10px;
  border-radius: 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.step-date.critical {
  color: #991b1b;
  background: #fee2e2;
}

/* Badges & Tables */
.v-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.v-badge-emerald { background: var(--emerald-100); color: var(--emerald-700); }
.v-badge-navy { background: #e0e7ff; color: #1e40af; }
.v-badge-amber { background: var(--amber-100); color: #92400e; }
.v-badge-red { background: var(--red-100); color: #991b1b; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: #fff;
}
table.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  font-variant-numeric: tabular-nums;
}
table.comp-table th, table.comp-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--slate-200);
}
table.comp-table th {
  background: var(--navy-900);
  color: #fff;
  font-weight: 700;
  font-size: 0.79rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.comp-table tr:hover td { background: var(--slate-50); }

/* Provider Directory Cards (UX Section 3.3 Standard) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  background: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--slate-200);
  align-items: center;
}
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}
@media (max-width: 420px) {
  .provider-grid { grid-template-columns: 1fr; }
}
.provider-card {
  background: #fff;
  border: 1.5px solid var(--slate-200);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.provider-card:hover {
  border-color: var(--emerald-500);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}
.provider-card.emergency-card {
  border-top: 4px solid var(--red-600);
}
.provider-card.usda-card {
  border-top: 4px solid var(--emerald-600);
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.provider-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--navy-900);
}
.provider-meta-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.84rem;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.provider-meta-box div { margin-bottom: 4px; }
.provider-meta-box div:last-child { margin-bottom: 0; }
.highlights-list {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 0.84rem;
  color: var(--navy-800);
}
.highlights-list li { margin-bottom: 4px; }
.card-actions {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--slate-100);
}
@media (max-width: 420px) {
  .card-actions { grid-template-columns: 1fr; }
}
.card-actions .btn {
  padding: 9px 12px;
  font-size: 0.82rem;
  width: 100%;
}
.card-actions .btn-outline {
  font-size: 0.78rem;
  color: #475569;
}

/* Upsell & License Box */
.upsell-box {
  background: linear-gradient(135deg, #0f172a 0%, #064e3b 100%);
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 20px;
  align-items: center;
}
@media (max-width: 780px) {
  .upsell-box { grid-template-columns: 1fr; }
}
.upsell-box h3 { margin: 6px 0 10px; font-size: 1.22rem; color: #fff; }
.upsell-box p { font-size: 0.88rem; color: #e2e8f0; margin: 0 0 12px; }

.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 780px) {
  .faq-list { grid-template-columns: 1fr; }
}
.faq-item {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 18px 20px;
}
.faq-item h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
  color: var(--navy-900);
}
.faq-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--slate-600);
}

.seo-Internal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.seo-link-card {
  display: block;
  background: #fff;
  border: 1px solid var(--slate-200);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--navy-800);
}
.seo-link-card:hover {
  border-color: var(--emerald-500);
  color: var(--emerald-700);
  text-decoration: none;
}

.site-footer {
  background: var(--navy-950);
  color: #94a3b8;
  padding: 44px 0 32px;
  font-size: 0.85rem;
  border-top: 2px solid var(--emerald-600);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 0.96rem; }
.site-footer a { color: #cbd5e1; }

/* P0 Mobile Fold Fix (390x844 First-Fold Guarantee) */
@media (max-width: 820px) {
  .top-alert-bar {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px 12px;
    font-size: 0.72rem;
  }
  .nav-container {
    padding: 8px 12px;
    gap: 8px;
  }
  .brand-logo {
    font-size: 1rem;
  }
  .nav-links {
    width: 100%;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
    gap: 6px;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links a {
    white-space: nowrap;
    flex: 0 0 auto;
    font-size: 0.77rem;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
  }
  .hero {
    padding: 20px 14px 24px;
  }
  .trust-pill {
    font-size: 0.72rem;
    padding: 4px 10px;
    margin-bottom: 10px;
  }
  .hero h1 {
    font-size: 1.52rem;
    line-height: 1.18;
    margin-bottom: 10px;
  }
  .hero p.lead {
    font-size: 0.9rem;
    line-height: 1.42;
    margin-bottom: 14px;
  }
  .hero-actions {
    gap: 8px;
    margin-bottom: 16px;
  }
  .hero-actions .btn {
    padding: 10px 14px;
    font-size: 0.84rem;
    width: 100%;
  }
}

/* Section 3.3 4-Tab Segmented Control Above-the-Fold & Tabular Nums */
.tabular-nums, .stat-box .num, .kpi-card .k-val, .step-date, .provider-meta-box, table.comp-table td {
  font-variant-numeric: tabular-nums;
}
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0 6px;
}
@media (max-width: 900px) {
  .mode-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .mode-tabs {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
.mode-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(148, 163, 184, 0.28);
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.mode-tab:hover, .mode-tab.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: #34d399;
  color: #fff;
  transform: translateY(-1px);
}
.mode-tab .tab-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: #cbd5e1;
}
