/* Project cost calculator (start/calculator/). Builds on assets/flow.css and its --demo-* colors. */

.calc-page { padding-bottom: 80px; }
.calc-intro .eyebrow { margin-bottom: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.calc-page button:focus-visible,
.calc-page a:focus-visible,
.calc-page input:focus-visible,
.calc-page select:focus-visible { outline: 3px solid #008cac; outline-offset: 2px; }

/* ---------- calculator card ---------- */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .9fr); gap: 22px; align-items: start; }
.calc-questions { padding: 26px; }
.calc-q + .calc-q,
#calc-details .calc-q:first-child { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--demo-line); }
.calc-q-label { display: flex; align-items: center; gap: 10px; font: 500 1.22rem/1.3 var(--demo-serif); margin: 0 0 14px; }
.calc-num { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: #12233d; color: #fff; font: 600 .72rem/1 var(--demo-sans); }

.calc-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc-services button { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 7px 10px 7px 7px; border: 1px solid var(--demo-line); border-radius: 10px; background: #fff; color: var(--demo-ink); text-align: left; font-size: .86rem; line-height: 1.25; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.calc-services img { flex: none; width: 56px; height: 42px; object-fit: cover; border-radius: 6px; background: var(--demo-soft); }
.calc-services button:hover { border-color: var(--demo-mint-strong); }
.calc-services button[aria-pressed="true"] { border-color: #12233d; background: var(--demo-soft); box-shadow: inset 0 0 0 1px #12233d; font-weight: 500; }

.calc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-chip { border: 1px solid var(--demo-line); border-radius: 999px; background: #fff; color: var(--demo-ink); padding: 9px 16px; font-size: .86rem; transition: background-color .15s ease, border-color .15s ease; }
.calc-chip:hover { border-color: var(--demo-mint-strong); }
.calc-chip[aria-pressed="true"] { background: #12233d; border-color: #12233d; color: #fff; }
.calc-layout { margin: 16px 0 0; max-width: 340px; }

.calc-size { display: flex; align-items: center; gap: 12px; }
.calc-size input { width: 140px; border: 1px solid var(--demo-line); border-radius: 8px; padding: 11px 12px; background: #fff; color: var(--demo-ink); font: 500 1.05rem/1.2 var(--demo-sans); }
.calc-unit { color: var(--demo-muted); font-size: .9rem; }
.calc-size + .side-note { margin-top: 10px; }

.calc-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.calc-count label { display: block; margin-bottom: 6px; color: var(--demo-muted); font-size: .82rem; }
.calc-stepper { display: flex; align-items: stretch; width: max-content; border: 1px solid var(--demo-line); border-radius: 8px; background: #fff; overflow: hidden; }
.calc-stepper button { width: 40px; border: 0; background: var(--demo-soft); color: var(--demo-ink); font-size: 1.1rem; line-height: 1; }
.calc-stepper button:hover { background: #e2ede5; }
.calc-stepper input { width: 58px; border: 0; padding: 10px 4px; text-align: center; font: 500 1rem/1.2 var(--demo-sans); color: var(--demo-ink); -moz-appearance: textfield; appearance: textfield; }
.calc-stepper input::-webkit-outer-spin-button,
.calc-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Finish level: radio cards (question 4) */
.calc-finish { margin: 0; padding: 0; border: 0; min-width: 0; }
.calc-finish legend { padding: 0; float: left; width: 100%; }
.calc-finish legend + * { clear: both; }
.calc-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc-opts label { position: relative; display: block; cursor: pointer; }
.calc-opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.calc-opts span { display: block; height: 100%; padding: 13px 14px; border: 1px solid var(--demo-line); border-radius: 10px; background: #fff; color: var(--demo-ink); font-size: .92rem; font-weight: 500; line-height: 1.3; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.calc-opts small { display: block; margin-top: 4px; color: var(--demo-muted); font-size: .78rem; font-weight: 400; line-height: 1.4; }
.calc-opts label:hover span { border-color: var(--demo-mint-strong); }
.calc-opts input:checked + span { border-color: #12233d; background: var(--demo-soft); box-shadow: inset 0 0 0 1px #12233d; }
.calc-opts input:focus-visible + span { outline: 3px solid #008cac; outline-offset: 2px; }

/* ---------- result ---------- */
.calc-result { position: sticky; top: 20px; padding: 26px; }
.calc-result-title { margin: 0 0 12px; color: var(--demo-muted); font: 500 .68rem/1.4 var(--demo-sans); letter-spacing: .18em; text-transform: uppercase; }
.calc-estimate { margin: 12px 0 8px; font-family: var(--demo-sans); font-variant-numeric: tabular-nums; }
.calc-estimate.is-updated { animation: calc-update .35s ease; }
@keyframes calc-update { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.calc-summary { color: var(--demo-muted); font-size: .88rem; }
/* Where the finish level sits in the full range */
.calc-scale { margin: 16px 0 4px; }
.calc-scale-track { position: relative; height: 8px; border-radius: 99px; background: #eef1ee; }
.calc-scale-track span { position: absolute; top: 0; bottom: 0; border-left: 2px solid #fff; background: #dfe7e1; }
.calc-scale-track span:first-child { border-left: 0; border-radius: 99px 0 0 99px; }
.calc-scale-track span:last-child { border-radius: 0 99px 99px 0; }
.calc-scale-track span.is-on { background: #12233d; }
.calc-scale-names { position: relative; height: 18px; margin-top: 6px; font-size: .7rem; color: var(--demo-muted); }
.calc-scale-names span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.calc-scale-names span:first-child { transform: translateX(-30%); }
.calc-scale-names span:last-child { transform: translateX(-70%); }
.calc-scale-names span.is-on { color: var(--demo-ink); font-weight: 600; }
.calc-scale-ends { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; font-size: .72rem; color: var(--demo-muted); font-variant-numeric: tabular-nums; }
.calc-breakdown { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--demo-line); font-size: .86rem; }
.calc-breakdown li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.calc-breakdown li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-callout { margin: 18px 0; padding: 12px 14px; border: 1px solid #efdfbd; border-radius: 10px; background: #fcf6ea; color: var(--demo-ink); font-size: .84rem; line-height: 1.55; }
.calc-book { width: 100%; justify-content: center; text-decoration: none; }
.calc-carry { margin-top: 10px; }
.calc-alt { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--demo-line); font-size: .86rem; text-align: center; }
.calc-alt a { text-underline-offset: 3px; }

/* Phone-only bar that keeps the price in view while answering. */
.calc-peek { display: none; }

/* ---------- price list ---------- */
.calc-section { margin-top: 72px; }
.calc-section h2 { font: 500 2rem/1.15 var(--demo-serif); letter-spacing: -.01em; }
.calc-section-lead { max-width: 660px; margin-top: 12px; color: var(--demo-muted); }
.price-table { width: 100%; margin-top: 24px; border: 1px solid var(--demo-line); border-radius: 12px; border-collapse: separate; border-spacing: 0; background: #fff; overflow: hidden; font-size: .9rem; }
.price-table th,
.price-table td { padding: 14px 18px; border-top: 1px solid var(--demo-line); text-align: left; vertical-align: top; }
.price-table thead th { border-top: 0; background: #fbfaf6; color: var(--demo-muted); font-size: .68rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.price-table tbody th { font-weight: 500; white-space: nowrap; }
.price-table .price-cell strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.price-table .price-cell small { display: block; margin-top: 3px; color: var(--demo-muted); font-size: .8rem; }
.price-table .note-cell { color: var(--demo-muted); font-size: .84rem; }
.price-table .pick-cell { text-align: right; white-space: nowrap; }
.price-table tbody tr:hover { background: #fbfaf6; }
.price-table tr.is-visit .price-cell strong { font-weight: 500; color: var(--demo-muted); }

/* ---------- why + call to action ---------- */
.calc-why { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 36px; align-items: start; }
.calc-why-body p { color: var(--demo-ink); }
.calc-why-body p + p { margin-top: 14px; }
.calc-cta { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin-top: 72px; padding: 34px; border-radius: 14px; background: #12233d; color: #fff; }
.calc-cta h2 { font: 500 1.9rem/1.2 var(--demo-serif); }
.calc-cta p { margin-top: 8px; max-width: 520px; color: rgba(255, 255, 255, .78); }
.calc-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; flex: none; }
.calc-cta .btn { text-decoration: none; }
.calc-btn-outline { border: 1px solid rgba(255, 255, 255, .45); background: transparent; color: #fff; }
.calc-btn-outline:hover { background: rgba(255, 255, 255, .08); }
.calc-cta a:focus-visible { outline-color: #fff; }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-result { position: static; scroll-margin-top: 16px; }
  .calc-peek { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: #12233d; color: #fff; box-shadow: 0 10px 30px rgba(18, 35, 61, .28); cursor: pointer; transform: translateY(160%); transition: transform .25s ease; }
  .calc-peek.is-on { transform: none; }
  .calc-peek span:first-child { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
  .calc-peek strong { font: 500 1.05rem/1.2 var(--demo-serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .calc-peek-go { margin-left: auto; flex: none; font-size: .8rem; color: var(--demo-mint); }
  .calc-why { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 760px) {
  .calc-intro { flex-direction: column; gap: 6px; }
  .calc-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-cta { flex-direction: column; align-items: flex-start; padding: 26px; }
}
@media (max-width: 620px) {
  .calc-questions, .calc-result { padding: 20px; }
  .calc-counts { grid-template-columns: 1fr 1fr; }
  .calc-section { margin-top: 56px; }
  .calc-section h2 { font-size: 1.65rem; }
  .price-table thead { display: none; }
  .price-table, .price-table tbody, .price-table tr, .price-table th, .price-table td { display: block; }
  .price-table tbody tr { padding: 14px 16px; border-top: 1px solid var(--demo-line); }
  .price-table tbody tr:first-child { border-top: 0; }
  .price-table th, .price-table td { padding: 0; border: 0; }
  .price-table tbody th { white-space: normal; margin-bottom: 4px; }
  .price-table .note-cell { margin-top: 4px; }
  .price-table .pick-cell { margin-top: 6px; text-align: left; }
}
@media (max-width: 560px) {
  .calc-opts { grid-template-columns: 1fr; }
  .calc-services button { min-height: 50px; padding: 9px 11px; }
  .calc-services img { display: none; }
  .calc-cta-actions, .calc-cta-actions .btn { width: 100%; justify-content: center; }
}
@media (max-width: 420px) {
  .calc-peek span:first-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .calc-estimate.is-updated { animation: none; }
  .calc-peek { transition: none; }
  .calc-services button, .calc-chip, .calc-opts span { transition: none; }
}
