:root {
  --navy: #0f172a;
  --slate: #1e293b;
  --slate-light: #334155;
  --teal: #0f766e;
  --teal-bright: #14b8a6;
  --teal-soft: #ccfbf1;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #cbd5e1;
  --border-soft: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --input-bg: #eff6ff;
  --input-border: #93c5fd;
  --input-text: #1d4ed8;
  --go-bg: #dcfce7;
  --go-text: #166534;
  --caution-bg: #fef3c7;
  --caution-text: #92400e;
  --pass-bg: #fee2e2;
  --pass-text: #991b1b;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Nav */
.site-header {
  background: var(--navy);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.3px;
}
.brand-logo:hover { text-decoration: none; }

.brand-badge {
  background: var(--teal-bright);
  color: #042f2e;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-links a {
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 600;
}
.nav-links a:hover {
  color: #ffffff;
  text-decoration: none;
}

.nav-cta {
  background: var(--teal);
  color: #ffffff !important;
  padding: 7px 14px;
  border-radius: 8px;
  font-weight: 700 !important;
  border: 1px solid var(--teal-bright);
}
.nav-cta:hover {
  background: #115e59;
}

/* Hero & Page Banners */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--slate) 60%, var(--teal) 100%);
  color: #ffffff;
  padding: 44px 0 40px;
}

.hero-compact {
  padding: 28px 0 26px;
}

.eyebrow {
  display: inline-block;
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(94, 234, 212, 0.5);
  color: #99f6e4;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.hero p.lead {
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal-bright);
  color: #042f2e;
}
.btn-primary:hover { background: #2dd4bf; }

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.2); }

.btn-dark {
  background: var(--navy);
  color: #ffffff;
}
.btn-dark:hover { background: var(--slate-light); }

.btn-outline {
  background: #ffffff;
  color: var(--teal);
  border-color: var(--teal);
}
.btn-outline:hover { background: var(--teal-soft); }

/* Main Sections & Cards */
main {
  padding: 28px 0 48px;
}

.section {
  margin-bottom: 36px;
}

.section-title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
}

.section-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.96rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 22px;
  align-items: start;
}

.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.calc-layout > * {
  min-width: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-hdr {
  margin: -20px -20px 16px -20px;
  padding: 12px 20px;
  background: var(--slate);
  color: #ffffff;
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 700;
  font-size: 0.98rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.card-hdr.teal {
  background: var(--teal);
}

.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.tool-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
}
.tool-card h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--navy);
}
.tool-card p {
  margin: 0 0 14px;
  font-size: 0.92rem;
  color: var(--muted);
}

.tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #0f766e;
  margin-bottom: 8px;
}

/* Form Controls */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--slate);
}

.field input,
.field select,
.field textarea,
.inline-input,
.inline-select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1.5px solid var(--input-border);
  background: var(--input-bg);
  color: var(--input-text);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
}
.field textarea {
  font-weight: 500;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.inline-input:focus,
.inline-select:focus {
  outline: 2px solid var(--teal-bright);
  outline-offset: 1px;
}

.import-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  color: var(--navy);
  list-style: none;
}
.import-summary::-webkit-details-marker { display: none; }

.import-status {
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: 9px;
  background: #f0fdfa;
  border: 1px solid #5eead4;
  font-size: 0.88rem;
  color: var(--navy);
}
.rf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.rf-chip {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--caution-bg);
  color: var(--caution-text);
  border: 1px solid #fcd34d;
}
.rf-chip.high {
  background: var(--pass-bg);
  color: var(--pass-text);
  border-color: #fca5a5;
}
.import-hint {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.inline-input {
  padding: 6px 8px;
  font-size: 0.88rem;
  min-width: 72px;
  text-align: right;
}

/* Mode Toggle Buttons (Pro / DIY / Skip) */
.mode-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}

.mode-btn {
  border: none;
  background: transparent;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.mode-btn.active[data-mode="Pro"] {
  background: var(--navy);
  color: #ffffff;
}
.mode-btn.active[data-mode="DIY"] {
  background: var(--teal);
  color: #ffffff;
}
.mode-btn.active[data-mode="Skip"] {
  background: #64748b;
  color: #ffffff;
}

/* Category Pills */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.cat-pill {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--slate);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.cat-pill.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

/* KPI Cards & Verdict */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kpi-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.kpi-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.4px;
}

.kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  margin-top: 2px;
}

.kpi-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  margin-top: 2px;
}

.verdict-banner {
  padding: 13px 16px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1.08rem;
  text-align: center;
  margin-bottom: 14px;
  border: 1.5px solid transparent;
}
.verdict-go { background: var(--go-bg); color: var(--go-text); border-color: #86efac; }
.verdict-caution { background: var(--caution-bg); color: var(--caution-text); border-color: #fcd34d; }
.verdict-pass { background: var(--pass-bg); color: var(--pass-text); border-color: #fca5a5; }

.alert-banner {
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  color: #92400e;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 14px;
}

.info-banner {
  background: var(--teal-soft);
  border: 1px solid var(--teal-bright);
  color: #0f766e;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Progress Bars */
.bar-row {
  margin-bottom: 10px;
}
.bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.bar-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-bright) 100%);
  border-radius: 999px;
  transition: width 0.2s ease;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.89rem;
}

th {
  background: var(--navy);
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  white-space: nowrap;
}

td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.total-row td {
  background: #e2e8f0;
  font-weight: 800;
  border-top: 2px solid var(--navy);
}

/* State Chips Grid */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}

.state-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
}
.state-chip:hover {
  border-color: var(--teal);
  background: #f0fdfa;
  text-decoration: none;
}
.state-mult {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 7px;
  border-radius: 6px;
}

/* Ecosystem Cross-Promo Banner */
.promo-box {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 70%, #0f766e 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 24px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.promo-box h2, .promo-box h3 {
  margin: 0 0 6px;
  color: #ffffff;
}
.promo-box p {
  margin: 0;
  color: #cbd5e1;
  max-width: 660px;
  font-size: 0.95rem;
}

.ecosystem-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 18px;
}
.ecosystem-card.soon {
  border-top-color: #64748b;
}

/* FAQ & Breadcrumbs */
.breadcrumb {
  font-size: 0.84rem;
  color: #cbd5e1;
  margin-bottom: 10px;
}
.breadcrumb a { color: #99f6e4; }

.faq-item {
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--navy);
}
.faq-item p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: #cbd5e1;
  padding: 30px 0;
  font-size: 0.86rem;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  color: #99f6e4;
}

.hidden { display: none !important; }

/* Mobile Responsiveness */
@media (max-width: 920px) {
  .calc-layout,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container { padding: 0 14px; }
  .nav-inner { padding: 10px 14px; }
  .nav-links { gap: 8px 12px; font-size: 0.84rem; }
  .form-grid,
  .kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .card { padding: 14px; max-width: 100%; }
  .card-hdr { margin: -14px -14px 12px -14px; padding: 10px 14px; }
  .hero { padding: 24px 0; }
  .hero h1 { font-size: 1.55rem; }
  .btn { max-width: 100%; text-align: center; }
  .hero-actions .btn { width: 100%; }
}
