/* Quote wizard (/quote) */
.qw-container { max-width: 900px; }
.qw { padding: 40px; }
.qw:hover, .qw-thanks:hover { transform: none; box-shadow: var(--shadow); }
.qw fieldset { border: 0; margin: 0 0 36px; padding: 0; min-width: 0; }
.qw.qw-js fieldset { display: none; margin: 0; }
.qw.qw-js fieldset.active { display: block; animation: qw-in .3s ease; }
@keyframes qw-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.qw [hidden] { display: none !important; }

/* progress */
.qw-progress { display: none; margin-bottom: 30px; }
.qw-js .qw-progress { display: block; }
.qw-progress-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.qw-reset { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.qw-reset:hover { color: var(--danger); }
.qw-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.qw-bar span { display: block; height: 100%; width: 12.5%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .35s ease; }

/* step head */
.qw-step-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 26px; }
.qw-step-no { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--brand); background: rgba(94, 159, 31, .1); border: 1px solid rgba(94, 159, 31, .25); }
.qw-step-head h2 { font-size: clamp(22px, 3vw, 28px); margin: 4px 0 6px; }
.qw-step-head p { color: var(--muted); margin: 0; }

/* tiles (step 1) */
.qw-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.qw-tile { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 20px 44px 20px 18px; margin: 0; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; transition: .2s; background: #fff; font-weight: 400; color: var(--text); }
.qw-tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 12px 30px -18px rgba(15, 23, 42, .35); }
.qw-tile input { position: absolute; opacity: 0; pointer-events: none; }
.qw-tile-icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--brand); background: linear-gradient(135deg, rgba(94, 159, 31, .12), rgba(13, 148, 136, .08)); }
.qw-tile-text { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.qw-tile-text b { display: block; font-size: 16px; line-height: 1.3; margin-bottom: 4px; }
.qw-tile-text small { display: block; color: var(--muted); font-size: 14px; line-height: 1.45; }
.qw-tile-check { position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; transition: .2s; }
.qw-tile:has(input:checked) { border-color: var(--brand); background: rgba(94, 159, 31, .06); box-shadow: 0 0 0 3px rgba(94, 159, 31, .15); }
.qw-tile:has(input:checked) .qw-tile-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.qw-tile:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* goal (step 2) */
.qw-goal { min-height: 170px; font-size: 16px; }
.qw-examples { margin-top: 18px; padding: 16px 20px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.qw-examples-title { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.qw-examples-title .ic { color: var(--brand); }
.qw-examples ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* questions */
.qw-q { padding: 20px 0; border-top: 1px solid var(--line); }
.qw-step-head + .qw-q, .qw-type-qs > .qw-q:first-child { border-top: 0; padding-top: 0; }
.qw-q.invalid .qw-q-text { color: var(--danger); }
.qw-q-head { margin-bottom: 10px; }
.qw-q-text { display: block; font-weight: 700; font-size: 16px; line-height: 1.4; color: var(--text); margin: 0; }
label.qw-q-text { margin-bottom: 10px; }
.qw-help-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; margin: -2px 0 10px; border: 0; background: none; color: var(--brand); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.qw-help-btn:hover { text-decoration: underline; }
.qw-help { margin: -2px 0 14px; padding: 12px 16px; border-radius: 10px; background: rgba(13, 148, 136, .07); border-left: 3px solid var(--brand-2); font-size: 14px; color: #334155; }
.qw-choices { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qw-pill { position: relative; margin: 0; cursor: pointer; font-weight: 500; }
.qw-pill input { position: absolute; opacity: 0; pointer-events: none; }
.qw-pill span { display: inline-flex; align-items: center; min-height: 42px; padding: 9px 16px; border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff; font-size: 14px; line-height: 1.3; color: var(--text); transition: .15s; }
.qw-pill:hover span { border-color: var(--brand); }
.qw-pill input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.qw-pill input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.qw-pill-dk span { border-style: dashed; color: var(--muted); }
.qw-pill-dk input:checked + span { background: #64748b; border-color: #64748b; border-style: solid; }
.qw-number { max-width: 180px; }
.qw-choices .qw-text { flex: 1 1 100%; min-height: 90px; }

/* products */
.qw-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qw-product { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin: 0; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; font-weight: 400; transition: .15s; }
.qw-product input { position: absolute; opacity: 0; pointer-events: none; }
.qw-product img { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; flex-shrink: 0; }
.qw-product span { min-width: 0; }
.qw-product b { display: block; font-size: 15px; }
.qw-product small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.qw-product:hover, .qw-product:has(input:checked) { border-color: var(--brand); }
.qw-product:has(input:checked) { background: rgba(94, 159, 31, .06); box-shadow: 0 0 0 3px rgba(94, 159, 31, .15); }

/* files */
.qw-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 18px; margin: 0; border: 2px dashed var(--line-2); border-radius: var(--radius); background: var(--bg-2); text-align: center; cursor: pointer; font-weight: 500; transition: .2s; }
.qw-drop:hover, .qw-drop:focus-within { border-color: var(--brand); background: rgba(94, 159, 31, .05); }
.qw-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.qw-drop-icon { color: var(--brand); transform: rotate(180deg); }
.qw-drop b { font-size: 16px; color: var(--text); }
.qw-drop small { color: var(--muted); font-size: 13px; }
.qw-file-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.qw-file-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 14px; }
.qw-file-list li span { min-width: 0; overflow-wrap: anywhere; }
.qw-file-list small { color: var(--muted); }
.qw-file-del { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; cursor: pointer; font-size: 18px; line-height: 1; color: var(--muted); }
.qw-file-del:hover { color: var(--danger); border-color: var(--danger); }
.field-hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* errors */
.qw .input.invalid, .qw .check.invalid { border-color: var(--danger); }
.qw .check.invalid { color: var(--danger); }
.qw-error { display: none; margin-top: 16px; padding: 12px 16px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 14px; font-weight: 600; }
.qw-error.show { display: block; }

/* review */
.qw-review { display: grid; gap: 14px; }
.qw-r-section { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 16px 20px; }
.qw-r-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.qw-r-head h3 { font-size: 16px; margin: 0; }
.qw-edit { flex-shrink: 0; display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--brand); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.qw-edit:hover { border-color: var(--brand); }
.qw-r-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.qw-r-row:first-child { border-top: 0; }
.qw-r-row span { color: var(--muted); }
.qw-r-row b { font-weight: 600; overflow-wrap: anywhere; }
.qw-r-goal { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.qw-r-section .muted { margin: 0; font-size: 14px; }

/* navigation */
.qw-nav { display: none; justify-content: space-between; align-items: center; gap: 12px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.qw-js .qw-nav { display: flex; }
.qw-back .ic { transform: rotate(180deg); }
.qw-next, .qw-submit { margin-left: auto; }
.qw:not(.qw-js) .qw-submit { display: inline-flex; }
.qw:not(.qw-js) .qw-nav { display: flex; }
.qw:not(.qw-js) .qw-back, .qw:not(.qw-js) .qw-next { display: none; }
.qw-autosave { display: flex; align-items: center; gap: 6px; margin: 16px 0 0; font-size: 12px; }
.qw-server-errors ul { margin-top: 6px; }

/* thanks */
.qw-thanks { padding: 46px 40px; text-align: center; }
.qw-thanks-icon { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 14px 36px -12px rgba(94, 159, 31, .7); }
.qw-ref-label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.qw-ref { display: inline-block; margin: 8px 0 16px; padding: 10px 22px; border-radius: 12px; border: 1.5px dashed var(--brand); background: rgba(94, 159, 31, .06); font: 800 clamp(22px, 5vw, 30px)/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; color: #3f6b12; }
.qw-thanks h3 { margin: 26px 0 14px; }
.qw-next-steps { list-style: none; padding: 0; margin: 0 auto 28px; max-width: 520px; display: grid; gap: 10px; text-align: left; }
.qw-next-steps li { display: flex; gap: 12px; align-items: flex-start; }
.qw-next-steps li span { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--brand); background: rgba(94, 159, 31, .1); }

@media (max-width: 720px) {
    .qw { padding: 24px 18px; }
    .qw-tiles, .qw-products { grid-template-columns: 1fr; }
    .qw-tile { padding: 16px 44px 16px 14px; }
    .qw-tile-icon { width: 42px; height: 42px; border-radius: 12px; }
    .qw-step-head { gap: 12px; }
    .qw-step-no { width: 34px; height: 34px; font-size: 14px; }
    .qw-r-row { grid-template-columns: 1fr; gap: 2px; }
    .qw-nav .btn { padding: 12px 18px; }
    .qw-submit.btn-lg { padding: 13px 18px; font-size: 15px; }
    .qw-thanks { padding: 32px 18px; }
}
