/* =====================================================================
   PEST CONTROL COST CALCULATOR (uses variables from design-system.css)
   ===================================================================== */
#section-calc-hero h1 { font-weight: 900; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.15; margin-bottom: 14px; }
#section-calc-hero p:last-child { max-width: 720px; color: var(--gray-mid); }
#section-calculator [hidden], #section-calc-quote[hidden] { display: none; }
.calc-notice { background: var(--white); border-left: 4px solid var(--green); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; }
.calc-notice.warn { background: #FFF3CD; border-left-color: #8A6100; font-weight: 600; }

#calc-layout { display: grid; gap: 24px; align-items: start; }
#calc-form { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.calc-group { border: 0; border-radius: 16px; background: var(--white); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.calc-group legend { float: left; width: 100%; font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; }
.calc-group legend + * { clear: left; }
.calc-sub { border: 0; }
.calc-sub legend { float: none; font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.calc-hint { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; min-height: 48px; padding: 12px; border: 2px solid var(--gray-mid); border-radius: 8px; cursor: pointer; font-size: 0.93rem; line-height: 1.4; }
.choice input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--navy); }
.choice small { display: block; color: var(--text-muted); }
.choice:has(input:checked) { border-color: var(--navy); background: var(--gray-light); }
#c-severity { display: grid; gap: 8px; }
#c-questions { display: grid; gap: 16px; }
#calc-progress-wrap { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; }
#calc-progress { width: 100%; height: 12px; accent-color: var(--green-dark); }

#calc-summary { background: var(--navy); color: var(--white); border-radius: 16px; padding: 24px 20px; min-width: 0; }
#calc-summary h3 { font-weight: 800; font-size: 1.2rem; margin-bottom: 12px; }
#calc-result { display: flex; flex-direction: column; gap: 14px; }
#calc-result p { margin: 0; }
#r-class { font-family: var(--font-head); font-weight: 700; color: var(--green); }
.calc-list > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 0.92rem; }
.calc-list dt { color: var(--gray-mid); }
.calc-list dd { font-weight: 600; text-align: right; margin-left: auto; }
#r-total { display: flex; flex-direction: column; background: rgba(46,204,113,0.12); border: 1px solid var(--green); border-radius: var(--radius); padding: 14px 16px; }
#r-total[hidden] { display: none; }
#r-total strong { font-family: var(--font-head); font-weight: 900; font-size: 1.7rem; line-height: 1.3; color: var(--green); }
#r-disclaimer { font-size: 0.84rem; color: var(--gray-mid); border-left: 3px solid var(--green); padding-left: 12px; }
#r-services li, #r-limits li { font-size: 0.9rem; padding: 4px 0; }
#calc-result summary { cursor: pointer; font-weight: 600; min-height: 32px; }
#r-meta { font-size: 0.8rem; color: var(--gray-mid); }
#calc-actions { display: grid; gap: 10px; }
#calc-actions .btn-navy { border-color: var(--gray-mid); }
#calc-result .calc-notice { color: var(--navy); }
#calc-compare { margin-top: 32px; }
#compare-table { width: 100%; min-width: 760px; border-collapse: collapse; background: var(--white); font-size: 0.9rem; }
#compare-table th, #compare-table td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--gray-mid); }
#compare-table thead th { background: var(--navy); color: var(--white); font-family: var(--font-head); font-size: 0.8rem; }
#quote-card { max-width: 720px; margin: 0 auto; }
#quote-card > p { margin-bottom: 16px; }
#calc-article { max-width: 820px; }
#calc-article h3 { font-weight: 700; font-size: 1.15rem; margin: 28px 0 8px; }

@media (min-width: 901px) {
  #calc-layout { grid-template-columns: 1.1fr 0.9fr; }
  #calc-summary { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; }
}

/* ---------- Print: the estimate only ---------- */
@media print {
  #site-header, #site-footer, #section-calc-hero, #calc-form, #section-calc-quote, #section-calc-guide, #section-faq, #back-to-top, #calc-actions, #a-status, .skip-link, .calc-notice:not(.warn), #calculator-heading { display: none !important; }
  body, #section-calculator, #calc-summary { background: #fff !important; color: #000 !important; }
  #calc-layout { display: block; }
  #calc-summary::before { content: "Maricopa Pest Control"; display: block; font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
  #calc-summary { position: static; max-height: none; overflow: visible; padding: 0; }
  #calc-summary *, #calc-compare * { color: #000 !important; background: transparent !important; }
  #calc-compare { break-inside: avoid; }
  #compare-table { min-width: 0; font-size: 0.75rem; }
  #compare-table th, #compare-table td { padding: 4px; border: 1px solid #999; }
}
