/* fit.css: PolicyWren main-site layout fixes (2026-11-18). Loaded after style.css.
   Layout only: no copy, claims, disclaimers, phone numbers, tel: links or tracking are changed. */

/* Button labels stay centred, even when a long label has to wrap */
main .btn{text-align:center}

/* Header is never sticky */
.site-header{position:relative;top:auto}

/* Price / label rows: the label wraps, the amount stays on one line */
.dec td:first-child,.dec th:first-child{min-width:0;overflow-wrap:break-word}
.dec td:last-child,.dec th:last-child{white-space:nowrap}

/* ---------- below desktop (< 1024px): the phone layout, centred in a ~720px column ---------- */
@media (max-width:1023px){
  main .wrap{max-width:720px}
  .hero .wrap{grid-template-columns:minmax(0,1fr);gap:28px}
  .hero .eyebrow,.hero h1,.hero .lede{text-align:center}
  .hero .lede{margin-inline:auto}
  .hero .quote-box,.hero .dec{width:100%;max-width:520px;margin-inline:auto}
  .hero .trust-row{justify-content:center}
  .grid-2,.grid-3,.grid-4,.steps,.call-btns,.guide-grid,.expert-grid,.terms-list,.dg-matrix,.article-grid{grid-template-columns:minmax(0,1fr)}
  .article-side{position:static}
  .steps.steps-4,.prose .steps{grid-template-columns:minmax(0,1fr)}
  .calc{grid-template-columns:minmax(0,1fr)}
  .calc-out{position:static}
  /* Call buttons: one per row, centred column; icon + text centred together as one unit */
  .call-row .call-btns,.call-btns{grid-template-columns:minmax(0,1fr);max-width:520px;margin-inline:auto}
  main .call-btns .call-btn{grid-template-columns:auto auto;justify-content:center;text-align:left}
  .call-row .call-btn small{font-size:.8rem}
  .flow-actions{justify-content:center}
}
/* Tablet only: guide cards use the phone's compact card (photo left, text right) with a larger photo and normal text size;
   other stacked card photos use a wider crop so they don't push the page down. Subjects stay in frame. */
@media (min-width:641px) and (max-width:1023px){
  .guide-card{display:grid;grid-template-columns:160px minmax(0,1fr);gap:4px 18px;padding:16px;align-items:start}
  main .guide-card .card-photo.card-photo{grid-area:1/1/span 4;width:160px;height:120px;margin:0;aspect-ratio:auto;border-radius:10px;object-fit:cover;object-position:50% 35%}
  .guide-card>:not(.card-photo){grid-column:2}
}
@media (min-width:768px) and (max-width:1023px){
  main .card-photo.card-photo:not(.guide-card .card-photo){aspect-ratio:21/9;object-fit:cover;object-position:50% 35%}
}

/* ---------- phone (< 768px) ---------- */
@media (max-width:767px){
  .section{padding-block:40px}
  .hero{padding-block:32px 40px}
  .zip-form .btn,.flow-actions .btn-accent{width:100%}
  /* In-article quote boxes: text and button stacked and centred, button full width */
  .inline-cta{flex-direction:column;align-items:center;text-align:center}
  .inline-cta .btn{width:100%;max-width:520px}
  /* Worksheet print / download buttons: stacked, centred, full width */
  main p.no-print:has(.btn){display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
  main p.no-print .btn{width:100%;max-width:520px}
}

/* ---------- very small phones: header items never spill off the edge ---------- */
@media (max-width:400px){
  .site-header .wrap{gap:10px}
  .site-header .secure-note{min-width:0;white-space:normal;text-align:right;line-height:1.2}
}
