/* ============================================================
   COBRACalculator.com — Shared Stylesheet
   Design system: white bg, blue/green accents, Inter font
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

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

:root {
  --blue: #185FA5;
  --blue-light: #E6F1FB;
  --green: #1D9E75;
  --green-light: #E1F5EE;
  --amber: #EF9F27;
  --amber-light: #FFF8E6;
  --red: #DC2626;
  --red-light: #FEF2F2;
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --border: rgba(0, 0, 0, 0.12);
  --bg: #ffffff;
  --surface: #f9f9f8;
  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-input: 8px;
  --radius-box: 8px;
  --shadow-card: 0 1px 4px rgba(0,0,0,0.07);
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-logo {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.site-nav a {
  font-size: 14px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover {
  text-decoration: underline;
}

/* ============================================================
   AD UNITS
   ============================================================ */

.ad-unit {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-box);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 12px;
  margin: 20px 0;
  text-align: center;
  padding: 8px;
}

.ad-unit::before {
  content: "Advertisement";
}

/* ============================================================
   DISCLAIMER / INFO BANNERS
   ============================================================ */

.banner-amber {
  background: var(--amber-light);
  border: 1px solid var(--amber);
  color: #92610a;
  border-radius: var(--radius-box);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
}

.banner-amber strong { color: #7a5000; }

.banner-blue {
  background: var(--blue-light);
  border: 1px solid #b3d4f0;
  color: #1a4a7a;
  border-radius: var(--radius-box);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
}

.banner-blue strong { color: #0f3460; }

.banner-green {
  background: var(--green-light);
  border: 1px solid #a7e0cc;
  color: #145c44;
  border-radius: var(--radius-box);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
}

.banner-green strong { color: #0d3d2c; }

.banner-gray {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #374151;
  border-radius: var(--radius-box);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
   PAGE HERO
   ============================================================ */

.page-hero {
  padding: 32px 0 20px;
}

.page-hero h1 {
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.page-hero .subheadline {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 680px;
}

/* ============================================================
   CALCULATOR FORM
   ============================================================ */

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

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

.form-section h2 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

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

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

.field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.field input,
.field select {
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg);
  width: 100%;
  transition: border-color 0.15s;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24,95,165,0.12);
}

.field-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

.field-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  margin: 4px 0;
}

.field-divider::before,
.field-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */

.btn-calculate {
  width: 100%;
  padding: 16px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  min-height: 52px;
}

.btn-calculate:hover { background: #134d8a; }
.btn-calculate:active { transform: translateY(1px); }

/* ============================================================
   RESULTS SECTION
   ============================================================ */

#results {
  display: none;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
  margin-bottom: 32px;
}

#results.visible { display: flex; }

/* Recommendation banner */
.result-banner {
  border-radius: var(--radius-card);
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.6;
}

.result-banner.green {
  background: var(--green-light);
  border: 1.5px solid var(--green);
  color: #145c44;
}

.result-banner.blue {
  background: var(--blue-light);
  border: 1.5px solid var(--blue);
  color: #1a4a7a;
}

.result-banner.gray {
  background: #f3f4f6;
  border: 1.5px solid #9ca3af;
  color: #374151;
}

/* Comparison cards */
.comparison-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.comparison-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  position: relative;
}

.comparison-card.winner {
  border-color: var(--green);
}

.winner-badge {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.comparison-card h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comparison-card .big-number {
  font-size: 36px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1.1;
}

.comparison-card .big-number.green { color: var(--green); }
.comparison-card .big-number.blue { color: var(--blue); }

.comparison-card .card-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.comparison-card .card-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.5;
}

/* Metric cards row */
.metric-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  text-align: center;
}

.metric-card .metric-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.metric-card .metric-value.green { color: var(--green); }
.metric-card .metric-value.amber { color: var(--amber); }
.metric-card .metric-value.blue { color: var(--blue); }

.metric-card .metric-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

/* ============================================================
   60-DAY TIMELINE
   ============================================================ */

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

.timeline-section h2 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--border);
}

.timeline-step {
  position: relative;
  padding-bottom: 24px;
}

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

.timeline-dot {
  position: absolute;
  left: -27px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--border);
  background: var(--bg);
}

.timeline-dot.blue { background: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.timeline-dot.green { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.timeline-dot.amber { background: var(--amber); box-shadow: 0 0 0 2px var(--amber); }
.timeline-dot.red { background: var(--red); box-shadow: 0 0 0 2px var(--red); }

.timeline-step h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline-step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-step .tip-box {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-box);
  font-size: 13px;
  line-height: 1.5;
}

.tip-box.green { background: var(--green-light); color: #145c44; border: 1px solid #a7e0cc; }
.tip-box.amber { background: var(--amber-light); color: #92610a; border: 1px solid #f5c87a; }

/* ============================================================
   PROFESSIONAL ADVICE SECTION
   ============================================================ */

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

.advice-section h2 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}

.advice-section .advice-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.advice-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.advice-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
}

.advice-card .advice-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.advice-card h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.advice-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.advice-card a {
  color: var(--blue);
  font-size: 13px;
}

/* ============================================================
   CTA BUTTON
   ============================================================ */

.btn-cta {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s;
  min-height: 52px;
  line-height: 1.4;
}

.btn-cta:hover { background: #134d8a; color: #fff; }

.btn-cta.green {
  background: var(--green);
}

.btn-cta.green:hover { background: #157a5a; }

/* ============================================================
   BOTTOM DISCLAIMER
   ============================================================ */

.bottom-disclaimer {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-box);
  padding: 16px 18px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.bottom-disclaimer strong { color: var(--text-primary); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 40px;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.site-footer p,
.site-footer a {
  font-size: 13px;
  color: var(--text-secondary);
}

.site-footer a {
  color: var(--blue);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */

.article-content {
  padding: 24px 0 32px;
}

.article-content h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 28px 0 10px;
  color: var(--text-primary);
}

.article-content h2:first-child { margin-top: 0; }

.article-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.article-content p strong { color: var(--text-primary); }

.article-content ul {
  margin: 0 0 14px 20px;
}

.article-content ul li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
}

.article-cta-box {
  background: var(--blue-light);
  border: 1px solid #b3d4f0;
  border-radius: var(--radius-card);
  padding: 24px;
  margin: 32px 0;
  text-align: center;
}

.article-cta-box h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.article-cta-box p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ============================================================
   LEAD GENERATION STRIP
   ============================================================ */

.lead-gen-strip {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #0f3d6e 0%, #185FA5 100%);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  color: #fff;
}

.lead-gen-strip-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lead-gen-strip-text strong {
  font-size: 15px;
  font-weight: 600;
}

.lead-gen-strip-text span {
  font-size: 13px;
  opacity: 0.88;
  line-height: 1.5;
}

.btn-lead-gen {
  flex-shrink: 0;
  background: #fff;
  color: var(--blue);
  border: none;
  border-radius: var(--radius-btn);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  min-height: 48px;
}

.btn-lead-gen:hover { background: #e8f0fa; }
.btn-lead-gen:active { transform: translateY(1px); }

/* ============================================================
   LEAD GEN MODAL
   ============================================================ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 900;
}

.modal-overlay.open { display: block; }

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 1000;
  background: var(--bg);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: min(560px, calc(100vw - 32px));
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
  transition: transform 0.18s ease, opacity 0.18s ease;
  opacity: 0;
}

.modal.open {
  display: block;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.modal-close:hover { background: var(--surface); color: var(--text-primary); }

.modal-header {
  margin-bottom: 16px;
  padding-right: 24px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}

.modal-header p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Results summary strip inside modal */
.lead-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-box);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.lead-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 100px;
}

.lead-summary-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.lead-summary-item strong {
  font-size: 15px;
  font-weight: 600;
}

.c-green { color: var(--green); }
.c-amber { color: var(--amber); }

.modal-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--blue);
  cursor: pointer;
}

.checkbox-label a { color: var(--blue); }

.lead-status {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
}

.lead-status.error {
  background: var(--red-light);
  color: var(--red);
}

.modal-fine-print {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}

.req { color: var(--red); }

/* Lead success state */
.lead-success {
  text-align: center;
  padding: 20px 0 8px;
}

.lead-success-icon {
  width: 52px;
  height: 52px;
  background: var(--green-light);
  color: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin: 0 auto 16px;
}

.lead-success h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.lead-success p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
}

.lead-success a { color: var(--blue); }

/* ============================================================
   STATE INFO CARD
   ============================================================ */

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

.state-info-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.state-info-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  align-items: start;
}

.state-info-row:last-child { border-bottom: none; }

.state-info-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  padding-top: 2px;
}

.state-info-ok .state-info-label { color: var(--green); }
.state-info-warn .state-info-label { color: var(--amber); }

.state-info-ok { color: var(--text-secondary); }
.state-info-warn { color: var(--text-secondary); }

.state-info-row a { color: var(--blue); }
.state-info-row strong { color: var(--text-primary); }

/* Tobacco inline notes in form */
.tobacco-note {
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.tobacco-ban {
  background: var(--green-light);
  color: #145c44;
}

.tobacco-warn {
  background: var(--amber-light);
  color: #92610a;
}

/* ============================================================
   UTILITY
   ============================================================ */

.hidden { display: none !important; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ============================================================
   MOBILE — max 600px
   ============================================================ */

@media (max-width: 600px) {
  html { font-size: 14px; }

  .page-hero { padding: 20px 0 16px; }
  .page-hero h1 { font-size: 22px; }
  .page-hero .subheadline { font-size: 15px; }

  .form-section { padding: 16px; }
  .timeline-section { padding: 16px; }
  .advice-section { padding: 16px; }

  .two-col { grid-template-columns: 1fr; }

  .comparison-cards { grid-template-columns: 1fr; }

  .metric-cards {
    grid-template-columns: 1fr 1fr;
  }

  .metric-cards .metric-card:last-child {
    grid-column: 1 / -1;
  }

  .advice-cards { grid-template-columns: 1fr; }

  .ad-unit { min-height: 50px; }

  .comparison-card .big-number { font-size: 30px; }

  .site-header .container {
    flex-direction: column;
    height: auto;
    padding: 12px 20px;
    gap: 6px;
  }

  .state-info-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .lead-gen-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .btn-lead-gen {
    width: 100%;
  }

  .modal {
    padding: 22px 18px 20px;
  }

  .lead-summary-strip {
    gap: 8px;
  }

  .lead-summary-item {
    min-width: 80px;
  }
}
