/* Styles for the instant quote page (/quote/). */
.iq [hidden], .iq-result[hidden] { display: none !important; }
.iq { max-width: 860px; margin: 0 auto; scroll-margin-top: 90px; }
.iq-form { max-width: none; }
.iq-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; }
.iq-hint { font-size: 0.85rem; color: var(--color-muted); margin: 0.75rem 0 1rem; }
.iq-q { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 1.5rem; text-align: center; }

/* progress */
.iq-dots { list-style: none; display: flex; justify-content: center; gap: 0.5rem 1.5rem; flex-wrap: wrap; padding: 0; margin: 0 0 2.5rem; font-size: 0.85rem; font-weight: 600; color: var(--color-muted); }
.iq-dots li { display: flex; align-items: center; gap: 0.5rem; }
.iq-dots span { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid var(--color-border); background: #fff; color: var(--color-muted); transition: all 0.25s; }
.iq-dots .is-current { color: var(--color-text); }
.iq-dots .is-current span { border-color: var(--color-accent); background: var(--color-accent); color: #fff; transform: scale(1.12); }
.iq-dots .is-done span { border-color: var(--color-accent); color: var(--color-accent); }

.iq-step { animation: iq-in 0.35s ease both; }
@keyframes iq-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* step 1: big building-type buttons */
.iq-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.iq-type { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 1.75rem 1rem 1.5rem; background: #fff; border: 2px solid var(--color-border); border-radius: var(--radius-lg); cursor: pointer; font: inherit; color: var(--color-text); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.iq-type svg { width: 100%; max-width: 190px; height: auto; fill: none; stroke: var(--color-text); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.2s; }
.iq-type svg path { stroke-dasharray: 600; stroke-dashoffset: 0; }
.iq-type:hover, .iq-type:focus-visible, .iq-type.is-picked { transform: translateY(-6px); border-color: var(--color-accent); box-shadow: 0 14px 34px rgba(44, 127, 245, 0.2); background: var(--color-surface); outline: none; }
.iq-type:hover svg, .iq-type:focus-visible svg, .iq-type.is-picked svg { stroke: var(--color-accent); }
.iq-type:hover svg path { animation: iq-draw 0.9s ease both; }
@keyframes iq-draw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
.iq-type-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 0.5rem; }
.iq-type-sub { font-size: 0.85rem; color: var(--color-muted); text-align: center; }

/* step 2: address, aerial, sq ft */
.iq-chip { display: table; margin: 0 auto 0.75rem; padding: 0.25rem 0.8rem; border-radius: 999px; background: var(--color-accent-soft); color: var(--color-accent-dark); font-size: 0.8rem; font-weight: 700; }
.iq-addr { position: relative; }
.iq-form .iq-addr input { font-size: 1.1rem; padding: 0.9rem 1rem; }
.iq-suggest { list-style: none; margin: 0.25rem 0 0; padding: 0.3rem; position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: 0 14px 34px rgba(10, 31, 61, 0.16); }
.iq-suggest li { padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.95rem; color: var(--color-text); }
.iq-suggest li:hover, .iq-suggest li.is-active { background: var(--color-surface-blue); }
.iq-link { background: none; border: 0; padding: 0; margin: 0.4rem 0 1rem; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--color-accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.iq-link:hover { color: var(--color-accent-dark); }
.iq-aerial { margin: 0.5rem 0 1.5rem; animation: iq-in 0.4s ease both; }
.iq-aerial-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-bg-dark); aspect-ratio: 640 / 400; box-shadow: 0 10px 30px rgba(10, 31, 61, 0.18); }
.iq-aerial-frame img, .iq-aerial-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.iq-aerial-frame img { object-fit: cover; }
.iq-aerial-frame { cursor: pointer; }
.iq-zoom { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.iq-zoom button { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px; background: #fff; color: #0A1F3D; font-size: 1.35rem; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.iq-outline { fill: rgba(44, 127, 245, 0.28); stroke: #fff; stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; animation: iq-pulse 1.8s ease-in-out infinite; }
.iq-pin { fill: #2C7FF5; stroke: #fff; stroke-width: 3; }
@keyframes iq-pulse { 50% { fill: rgba(44, 127, 245, 0.45); } }
.iq-aerial figcaption { font-size: 0.9rem; font-weight: 600; margin-top: 0.6rem; color: var(--color-text); }
.iq-help { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.iq-help-title { font-weight: 800; margin-bottom: 0.6rem; }
.iq-help p { font-size: 0.95rem; margin: 0 0 0.75rem; }
.iq-help-sub { margin-top: 1rem !important; }
.iq-est-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.iq-form .iq-est-row label { margin: 0; }
.iq-form .iq-est-row input { width: 5rem; }
.iq-lookup { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; }
.iq-lookup a { display: inline-block; padding: 0.4rem 0.85rem; border: 1px solid var(--color-accent); border-radius: 999px; font-size: 0.85rem; font-weight: 600; text-decoration: none; background: #fff; }
.iq-lookup a:hover { background: var(--color-accent); color: #fff; }
.iq-lookup a::after { content: " \2197"; }

.iq-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.iq-back { background: none; border: 0; font: inherit; font-weight: 600; color: var(--color-muted); cursor: pointer; padding: 0.5rem 0; }
.iq-back:hover { color: var(--color-text); }

/* step 3: scopes and running total */
.iq-form .iq-choice { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.75rem; font-weight: 500; cursor: pointer; }
.iq-form .iq-choice input { width: 1.1rem; height: 1.1rem; margin: 0; padding: 0; flex: none; accent-color: var(--color-accent); }
.iq-form .iq-multi { margin: 0 0 1rem; padding: 0.9rem 1rem; border-left: 3px solid var(--color-accent); background: var(--color-surface, #F5F8FC); border-radius: 6px; }
.iq-form .iq-multi .form-row + .form-row { margin-top: 0.75rem; }
.iq-form input[readonly] { background: #EEF2F7; color: #334; }
.iq-form .iq-scope { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 0.85rem 1rem; transition: border-color 0.15s, background 0.15s; }
.iq-form .iq-scope:hover { border-color: var(--color-accent); }
.iq-form .iq-scope:has(input:checked) { border-color: var(--color-accent); background: var(--color-accent-soft); }
.iq-scopes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.iq-running-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.iq-running-list { list-style: none; margin: 0 0 0.75rem; padding: 0 0 0.6rem; border-bottom: 1px solid rgba(255, 255, 255, 0.18); max-height: 38vh; overflow-y: auto; }
.iq-running-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.3rem 0; font-size: 0.9rem; }
.iq-running-list li + li { border-top: 1px dashed rgba(255, 255, 255, 0.12); }
.iq-rl-desc { font-weight: 600; }
.iq-rl-desc small { display: block; font-weight: 400; font-size: 0.78rem; color: var(--color-muted-on-dark); margin-top: 0.1rem; }
.iq-rl-amt { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.iq-running-list li.is-discount .iq-rl-amt { color: #7FD99A; }
.iq-running { display: block; margin-top: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius-lg); background: var(--color-bg-dark); color: #fff; position: sticky; bottom: 0.75rem; box-shadow: 0 10px 30px rgba(10, 31, 61, 0.3); }
.iq-running-label { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted-on-dark); font-weight: 700; }
.iq-running-note { font-size: 0.85rem; color: var(--color-muted-on-dark); }
.iq-running-num { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; white-space: nowrap; }
.iq-running.is-bump .iq-running-num { animation: iq-bump 0.3s ease; }
@keyframes iq-bump { 40% { transform: scale(1.1); color: var(--color-accent-light); } }
@media (prefers-reduced-motion: reduce) { .iq-step, .iq-aerial, .iq-outline, .iq-type:hover svg path, .iq-running.is-bump .iq-running-num { animation: none; } }
.iq-scope small { display: block; color: var(--color-muted); font-weight: 400; font-size: 0.8rem; }
.iq-count { margin: -0.25rem 0 0.9rem 1.7rem; }
.iq-count label { font-size: 0.8rem; margin: 0 0 0.2rem; }
.iq-form .iq-count input { width: 6rem; }
.iq-error { background: #FDECEC; color: #8A1C1C; border: 1px solid #F3B4B4; border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.iq-fine { font-size: 0.85rem; color: var(--color-muted); margin-top: 0.75rem; }

.iq-result { max-width: 860px; margin: 3rem auto 0; }
.iq-result-title { margin-bottom: 1rem; }
.iq-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem; }
.iq-status { font-size: 0.95rem; color: var(--color-muted); margin-top: 1rem; }

/* The quote sheet is always a white page with dark ink, on screen and on paper. */
.iq-sheet { --iq-band: 26px; display: flex; flex-direction: column; box-sizing: border-box; background: linear-gradient(to bottom, #8EC5F3, #0B7FE0) left top / var(--iq-band) 100% no-repeat, #fff; color: #0A1F3D; border: 1px solid #D5DCE6; border-left: 0; border-radius: 4px; padding: 2rem 2rem 2rem calc(2rem + var(--iq-band)); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 0.88rem; line-height: 1.45; box-shadow: 0 8px 30px rgba(10, 31, 61, 0.12); }
.iq-sheet p { color: #0A1F3D; font-size: 0.85rem; margin: 0 0 0.35rem; }
/* Same layout as the invoice and receipt: company name top left, red document word top right. */
.iq-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.9rem; }
.iq-brand-top { font-weight: 700; font-size: 3rem; letter-spacing: 0; line-height: 1; }
.iq-brand-bottom { font-size: 0.68rem; letter-spacing: 0.8em; margin-top: 0.35rem; padding-left: 0.2em; }
.iq-word { text-align: right; color: #EE1111; font-size: 3rem; font-weight: 700; line-height: 1; }
.iq-num { text-align: right; margin-top: 0.3rem; font-size: 1rem; font-weight: 700; letter-spacing: 0.04em; color: #0A1F3D; }
.iq-kv { display: flex; gap: 1rem; justify-content: space-between; }
.iq-dates { margin-bottom: 1.4rem; }
.iq-dates .iq-kv { justify-content: flex-start; gap: 0; }
.iq-dates .iq-k { min-width: 2.8rem; font-weight: 700; color: #0A1F3D; }
.iq-k { color: #44546A; }
.iq-v { font-weight: 600; text-align: right; }
.iq-dates .iq-v { font-weight: 400; }
.iq-h { font-weight: 700; margin-bottom: 0.2rem; }
.iq-h-gap { margin-top: 0.6rem; }
.iq-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 1.4rem; overflow-wrap: anywhere; line-height: 1.5; }
.iq-from { display: flex; flex-direction: column; }
.iq-from .iq-kv { margin-top: 0.45rem; justify-content: flex-start; gap: 0.6rem; }
.iq-from .iq-kv .iq-k { color: #0A1F3D; font-weight: 700; }
.iq-from .iq-kv .iq-k::after { content: ':'; }
.iq-from .iq-kv .iq-v { font-weight: 400; }
.iq-to { text-align: right; }
.iq-label { font-size: 0.72rem; line-height: 1.5; color: #6B7A90; }
.iq-name { font-size: 1.2rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.1rem; }
.iq-facts .iq-kv { justify-content: flex-end; gap: 0.5rem; }
.iq-facts .iq-k { color: #0A1F3D; font-weight: 700; }
.iq-facts .iq-v { min-width: 6rem; font-weight: 400; }
.iq-table-wrap { overflow-x: auto; }
.iq-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.iq-table th { text-align: left; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; border: 0; padding: 0.55rem 0.5rem; white-space: nowrap; color: #fff; background: #55ACEE; }
.iq-table thead tr { background: #55ACEE; }
/* Blank ruled rows that fill the sheet down to the totals, like the paper quote form. */
.iq-fill { display: flex; flex-direction: column; flex: 1 0 auto; }
.iq-fill-row { flex: 1 1 2.15rem; min-height: 2.15rem; border-bottom: 1px solid #C8D2E1; }
/* Every row stays on one line, as on the invoice. */
.iq-table td { border-bottom: 1px solid #C8D2E1; padding: 0.55rem 0.5rem; vertical-align: top; color: #0A1F3D; background: none; white-space: nowrap; }
.iq-table th:last-child, .iq-table td:last-child { text-align: right; }
.iq-table td:nth-child(4), .iq-table td:nth-child(5), .iq-table th:nth-child(4), .iq-table th:nth-child(5) { text-align: right; }
.iq-bottom { display: grid; grid-template-columns: 1fr 250px; gap: 2rem; margin: 1.5rem 0 1.25rem; align-items: start; }
.iq-est .iq-kv { justify-content: flex-start; gap: 0.5rem; font-size: 0.8rem; }
.iq-est .iq-v { font-weight: 700; }
.iq-big { margin-bottom: 0.5rem; }
.iq-big .iq-h { letter-spacing: 0.02em; margin-bottom: 0; }
.iq-big-num { font-size: 2.4rem; font-weight: 700; color: #0A1F3D; line-height: 1.2; }
.iq-totals .iq-kv { padding: 0.5rem 0.45rem; border-bottom: 1px solid #C8D2E1; }
.iq-totals .iq-k { color: #0A1F3D; font-size: 0.82rem; }
.iq-totals .iq-v { font-weight: 400; }
.iq-totals .iq-deposit .iq-k, .iq-totals .iq-deposit .iq-v { color: #EE1111; font-weight: 700; }
.iq-due { text-align: right; white-space: nowrap; font-size: 0.7rem; letter-spacing: 0.04em; color: #6B7A90; margin-top: 0.3rem; padding-right: 0.45rem; }
.iq-terms { margin-top: 0.5rem; text-align: center; }
.iq-sheet .iq-final { font-weight: 700; text-decoration: underline; margin-bottom: 0.5rem; }
.iq-sign { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: end; margin: 1.5rem 0 1rem; }
/* The signature box: signed on screen with a finger or mouse, and printed with the sheet. */
.iq-sigwrap { position: relative; height: 7.5rem; background: #F5F8FC; border: 1.5px dashed #9DB4D0; border-bottom: 0; border-radius: 6px 6px 0 0; }
.iq-sigpad { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: left bottom; touch-action: none; cursor: crosshair; }
.iq-sighint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 0.5rem; color: #6B7A90; font-size: 0.85rem; pointer-events: none; }
.iq-sighint[hidden] { display: none; }
.iq-sign-locked .iq-sigwrap { background: none; border-color: transparent; }
.iq-sign-locked .iq-sigpad { cursor: default; }
.iq-dateval { min-height: 1.6rem; padding: 0 0.2rem 0.3rem; font-size: 1rem; }
.iq-accept { margin-top: 1.5rem; padding: 1.25rem; border: 1px solid #D5DCE6; border-radius: 8px; background: #F5F8FC; }
.iq-accept-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.3rem; }
.iq-accept p { margin: 0 0 0.9rem; }
.iq-accept .iq-actions { margin-bottom: 0; }
.iq-accept .iq-accept-status { margin: 0.8rem 0 0; font-weight: 600; }
.iq-accept .iq-accept-status:empty { display: none; }
.iq-line { border-top: 1px solid #0A1F3D; padding-top: 0.3rem; font-size: 0.75rem; color: #44546A; }
.iq-sheet .iq-thanks { font-weight: 400; font-style: italic; text-align: center; margin-top: 0.75rem; }

@media (max-width: 640px) {
  .iq-row-3, .iq-scopes, .iq-parties, .iq-facts, .iq-bottom, .iq-types { grid-template-columns: 1fr; }
  .iq-type { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; padding: 1rem; gap: 0 1rem; }
  .iq-type svg { max-width: 90px; flex: none; }
  .iq-dots { font-size: 0; gap: 0.75rem; }
  .iq-dots span { font-size: 0.85rem; }
  .iq-sheet { --iq-band: 10px; padding: 1.25rem 1rem 1.25rem calc(1rem + var(--iq-band)); }
  .iq-brand-top, .iq-word { font-size: 2rem; }
  .iq-to { text-align: left; }
  .iq-facts .iq-kv { justify-content: flex-start; }
  .iq-from .iq-kv { margin-top: 0.4rem; }
  .iq-sign { grid-template-columns: 1fr; gap: 1rem; }
  .iq-table td:first-child { white-space: normal; }
}

/* Printing: only the quote sheet goes on the page. */
@media print {
  .site-header, .site-footer, .mobile-cta-bar, .hero, .iq-no-print, .iq-actions, .iq-status, .iq-result-title { display: none !important; }
  body, main { background: #fff !important; }
  section { padding: 0 !important; }
  .container { max-width: none; padding: 0; }
  .iq-result { margin: 0; max-width: none; }
  html, body { margin: 0 !important; padding: 0 !important; }
  main { margin: 0 !important; padding: 0 !important; }
  /* The sheet is the whole page: no page margin, so the blue band runs edge to edge, top to bottom. */
  .iq-sheet { --iq-band: 11mm; min-height: 100vh; box-shadow: none; border: 0; border-radius: 0; padding: 12mm 13mm 8mm calc(11mm + var(--iq-band)); font-size: 10pt; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .iq-table-wrap { overflow: visible; }
  .iq-fill-row { flex: 1 1 0; min-height: 1.2mm; }
  .iq-brand-top, .iq-word { font-size: 36pt; }
  .iq-dates { margin-bottom: 6mm; }
  .iq-parties { line-height: 1.45; margin-bottom: 6mm; }
  .iq-name { font-size: 13pt; }
  .iq-table { font-size: 9pt; }
  .iq-table td { padding: 0.38rem 0.5rem; }
  .iq-bottom { margin: 4mm 0 3mm; }
  .iq-totals .iq-kv { padding: 0.3rem 0.45rem; }
  .iq-big-num { font-size: 24pt; }
  .iq-sign { margin: 2mm 0 2mm; }
  .iq-sigwrap { height: 22mm; background: none; border: 0; }
  .iq-sheet .iq-thanks { margin-top: 1.5mm; }
  .iq-sighint { display: none; }
  .iq-dateval { font-size: 11pt; }
  /* Long quotes: tighten everything so the sheet still fits one page. */
  .iq-dense { font-size: 9pt; padding-top: 8mm; padding-bottom: 6mm; }
  .iq-dense .iq-table { font-size: 8.5pt; }
  .iq-dense .iq-table td { padding: 0.19rem 0.5rem; }
  .iq-dense .iq-fill-row { min-height: 0.8mm; }
  .iq-dense .iq-brand-top, .iq-dense .iq-word { font-size: 30pt; }
  .iq-dense .iq-dates, .iq-dense .iq-parties { margin-bottom: 3mm; }
  .iq-dense .iq-parties { line-height: 1.35; }
  .iq-dense .iq-totals .iq-kv { padding: 0.18rem 0.45rem; }
  .iq-dense .iq-bottom { margin: 3mm 0 2mm; }
  .iq-dense .iq-big-num { font-size: 20pt; }
  .iq-dense p { margin-bottom: 0.12rem; }
  .iq-dense .iq-thanks { margin-top: 1.5mm; }
  .iq-dense .iq-sign { margin: 2mm 0 2mm; }
  .iq-dense .iq-sigwrap { height: 14mm; }
  .iq-dense .iq-terms { margin-top: 0; }
  @page { margin: 0; }
}
