:root {
  --ink: #17211d;
  --muted: #5d6963;
  --green: #1f5b45;
  --green-dark: #154434;
  --lime: #bdd74d;
  --paper: #ffffff;
  --wash: #f3f6f1;
  --line: #d9e1dc;
  --danger: #a72b2b;
  --shadow: 0 18px 55px rgba(23, 33, 29, .12);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--wash); font: 16px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.quote-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.quote-header-inner { width: min(1180px, calc(100% - 32px)); min-height: 76px; margin: auto; display: flex; align-items: center; gap: 24px; }
.quote-logo img { display: block; width: 205px; height: auto; }
.quote-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.quote-nav a { text-decoration: none; font-weight: 700; }
.quote-lang { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; }

.quote-hero { padding: 28px 16px 66px; background: linear-gradient(135deg, #173f31, #28634c); color: white; }
.quote-hero-inner { width: min(1120px, 100%); margin: auto; }
.eyebrow { margin: 0 0 8px; color: var(--lime); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 800; }
.quote-hero h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; }
.quote-hero p:last-child { margin: 10px 0 0; color: #e8f0eb; font-size: 1rem; }

.quote-shell { width: min(1120px, calc(100% - 32px)); margin: -52px auto 64px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.quote-progress, .quote-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.quote-progress { position: sticky; top: 20px; padding: 22px; }
.quote-progress ol { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 16px; counter-reset: steps; }
.quote-progress li { color: var(--muted); display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; font-weight: 700; }
.quote-progress li::before { counter-increment: steps; content: counter(steps); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--wash); }
.quote-progress li.is-active { color: var(--green); }
.quote-progress li.is-active::before, .quote-progress li.is-complete::before { color: white; background: var(--green); }
.quote-progress li.is-complete::before { content: "✓"; }
.security-note { color: var(--muted); font-size: .84rem; }

.quote-card { padding: clamp(22px, 4vw, 42px); }
.quote-card h2 { margin: 0 0 8px; font-size: clamp(1.45rem, 3vw, 2rem); }
.quote-card > p { color: var(--muted); }
.question-avatar { display: grid; place-items: center; flex: 0 0 auto; color: white; background: var(--green); border: 2px solid #e8f1ec; border-radius: 50%; font-size: .75rem; font-weight: 900; }
.conversation-progress { display: grid; gap: 8px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.conversation-progress-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 8px 14px; }
.conversation-progress-heading strong { color: var(--green); font-size: .88rem; }
.conversation-progress-heading span { color: var(--muted); text-align: right; font-size: .83rem; }
.conversation-progress-track { height: 9px; overflow: hidden; background: #e5ebe7; border-radius: 999px; }
.conversation-progress-track span { display: block; width: 8%; height: 100%; background: linear-gradient(90deg, var(--green), var(--lime)); border-radius: inherit; transition: width .3s ease; }
.conversation-progress-next { margin: 0; color: var(--green-dark); font-size: .86rem; }
.conversation-progress-next strong { font-weight: 900; }
.conversation-progress.is-complete .conversation-progress-track span { background: var(--lime); }
.step-intro { margin-top: 0; color: var(--muted); }
.quote-form { display: grid; gap: 22px; margin-top: 28px; }
.conversation-response > .field-grid { margin-left: clamp(0px, 7vw, 70px); padding: 18px; border: 1px solid #cfe0d5; border-radius: 18px 5px 18px 18px; background: #edf5e8; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; font-weight: 700; }
.field--wide { grid-column: 1 / -1; }
.field small, .helper { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: white; border: 1px solid #acb9b1; border-radius: 10px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(189, 215, 77, .4); border-color: var(--green); }
.question-stack { display: grid; gap: 24px; }
.quote-history { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f5f8f6; }
.quote-history h3 { margin: 0; }
.quote-history-list { display: grid; gap: 9px; margin-top: 12px; }
.quote-history-message { max-width: 88%; padding: 10px 13px; border-radius: 12px; background: white; border: 1px solid var(--line); }
.quote-history-message--user { justify-self: end; background: #edf5e8; }
.quote-history-message p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.question-card { min-width: 0; margin: 0; padding: 0; border: 0; }
.question-card.is-active { animation: question-arrive .22s ease-out both; }
.question-card.is-resolved { opacity: .82; }
.question-card.is-resolved .question-prompt-bubble { background: #f7f9f7; }
.question-card.is-resolved .choice { cursor: default; }
.measure-card, .privacy-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfb; }
.estimate-preview { margin-bottom: 24px; padding: 20px; border: 1px solid #aec3b6; border-radius: 14px; background: #edf5e8; }
.estimate-preview h3 { margin: 0 0 8px; }
.estimate-total { display: block; font-size: clamp(1.5rem, 5vw, 2rem); color: var(--green-dark); }
.estimate-preview dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
.estimate-preview dd { margin: 0; font-weight: 700; }
.estimate-preview dt, .estimate-preview li { overflow-wrap: anywhere; }
.question-prompt { display: flex; align-items: flex-start; gap: 10px; }
.question-avatar { width: 34px; height: 34px; border-width: 2px; }
.question-prompt-bubble { max-width: min(620px, calc(100% - 44px)); padding: 11px 14px; border: 1px solid var(--line); border-radius: 4px 16px 16px; background: white; }
.question-prompt-bubble strong { display: block; }
.question-hint { margin: 3px 0 0; color: var(--muted); font-size: .9rem; }
.choices { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 10px 0 0 44px; }
.choice { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 9px 12px; color: var(--green-dark); background: #f8faf9; border: 1px solid #aec3b6; border-radius: 11px; cursor: pointer; font-weight: 800; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:hover, .choice:focus-within { background: #edf5e8; border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 91, 69, .1); }
.choice:has(input:checked) { color: white; background: var(--green); border-color: var(--green); }
.choice-marker { width: 19px; height: 19px; background: white; border: 2px solid #769080; border-radius: 50%; }
.choice:has(input[type="checkbox"]) .choice-marker { border-radius: 5px; }
.choice input:checked ~ .choice-marker { background: var(--lime); border-color: var(--lime); box-shadow: inset 0 0 0 4px var(--green); }
.choice-label { min-width: 0; }
.choice-indicator { color: #688075; font-size: 1.35rem; font-weight: 500; line-height: 1; }
.choice:has(input:checked) .choice-indicator { color: white; }
.choice input:focus-visible ~ .choice-label { outline: 3px solid var(--lime); outline-offset: 4px; border-radius: 3px; }
.question-free-response { display: grid; gap: 7px; margin: 10px 0 0 44px; padding: 12px; background: #f5f8f6; border: 1px solid var(--line); border-radius: 11px; }
.question-free-response > label { color: var(--green-dark); font-size: .84rem; font-weight: 800; }
.question-free-composer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: stretch; }
.question-free-composer textarea { width: 100%; min-height: 50px; max-height: 150px; padding: 10px 12px; resize: vertical; color: var(--ink); background: white; border: 1px solid #acb9b1; border-radius: 9px; }
.question-free-composer textarea:focus { outline: 3px solid rgba(189, 215, 77, .4); border-color: var(--green); }
.question-assistant-reply { margin: 0; color: var(--muted); font-size: .84rem; }
.question-assistant-reply::before { content: "MC · "; color: var(--green); font-weight: 900; }
.question-card.is-resolved .question-free-response { padding: 10px 12px; background: #edf5e8; }
.question-card.is-resolved .question-free-composer textarea { min-height: 44px; color: var(--green-dark); background: transparent; border: 0; resize: none; }
.question-turn-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 9px 0 0 44px; }
.question-turn-actions button { min-height: 38px; padding: 7px 11px; border: 0; border-radius: 10px; color: var(--green); background: transparent; cursor: pointer; font-weight: 800; }
.question-turn-actions .question-send { color: white; background: var(--green); }
.question-turn-actions .question-send:disabled { opacity: .45; cursor: not-allowed; }
.question-turn-actions .question-send[data-pending="true"]:disabled { cursor: wait; }
.question-turn-actions button:focus-visible { outline: 3px solid rgba(189, 215, 77, .55); }
.question-skipped-label { margin-right: auto; padding: 7px 10px; color: var(--muted); font-size: .82rem; font-style: italic; }
.question-complete { margin: 0 0 0 44px; padding: 12px 14px; color: var(--green-dark); background: #edf5e8; border-radius: 16px 4px 16px 16px; font-weight: 800; }
@keyframes question-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.button { min-height: 48px; padding: 11px 19px; border: 0; border-radius: 10px; cursor: pointer; font-weight: 800; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; }
.button--primary { color: white; background: var(--green); }
.button--primary:hover { background: var(--green-dark); }
.button--secondary { color: var(--green); background: white; border: 1px solid var(--green); }
.button:disabled { opacity: .55; cursor: wait; }
.status { padding: 12px 14px; border-radius: 10px; background: #edf5e8; color: var(--green-dark); }
.status.is-error { background: #fbecec; color: var(--danger); }

.measurement-fields { display: grid; gap: 12px; margin-top: 14px; }
.room-calculator { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.room-calculator-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.room-calculator-header h4 { margin: 0; font-size: 1rem; }
.room-add { flex: 0 0 auto; gap: 7px; min-height: 42px; padding: 8px 13px; }
.room-add-icon { display: grid; place-items: center; width: 21px; height: 21px; color: white; background: var(--green); border-radius: 50%; font-size: 1.05rem; line-height: 1; }
.room-list { display: grid; gap: 14px; margin: 0; }
.room-row { display: grid; grid-template-columns: repeat(4, minmax(76px, 1fr)); gap: 10px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.room-row label:first-child { grid-column: span 2; }
.room-row label { display: grid; gap: 4px; color: var(--muted); font-size: .78rem; }
.room-row input { min-width: 0; width: 100%; min-height: 42px; padding: 9px; border: 1px solid #b8c4bc; border-radius: 8px; background: white; }
.room-row input:focus { outline: 3px solid rgba(189, 215, 77, .4); border-color: var(--green); }
.room-row-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.room-row .room-ceiling { display: flex; align-items: center; gap: 5px; }
.room-row .room-ceiling input { flex: 0 0 auto; width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--green); }
.room-remove { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 7px 11px; color: var(--danger); background: #fff8f8; border: 1px solid #e4bcbc; border-radius: 9px; cursor: pointer; font-weight: 800; }
.room-remove:hover { background: #fbecec; border-color: var(--danger); }
.room-remove:focus-visible, .room-add:focus-visible { outline: 3px solid rgba(189, 215, 77, .55); outline-offset: 2px; }
.room-remove-icon { font-size: 1.15rem; line-height: 1; }

.drop-zone { padding: 28px; text-align: center; border: 2px dashed #9daf9f; border-radius: 16px; background: #f9fbf8; }
.drop-zone.is-dragging { border-color: var(--green); background: #edf5e8; }
.drop-zone input { max-width: 100%; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.photo-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--wash); }
.photo-card div { padding: 10px; }
.photo-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-card progress { display: block; width: 100%; margin-top: 8px; accent-color: var(--green); }
.photo-card button { margin-top: 6px; border: 0; padding: 0; color: var(--danger); background: transparent; cursor: pointer; }
.photo-card .photo-retry { margin-right: 14px; color: var(--green); font-weight: 800; }
.photo-card .photo-error { color: var(--danger); }
.customer-guidance, .reference-gallery { margin: 14px 0; padding: 16px; border: 1px solid #cfe0d5; border-radius: 14px; background: #edf5e8; }
.customer-guidance h3, .customer-guidance h4, .reference-gallery h3 { margin: 0 0 8px; color: var(--green-dark); }
.customer-guidance h4 { margin-top: 12px; font-size: .95rem; }
.customer-guidance p, .customer-guidance ul { margin: 0; }
.reference-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.reference-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; }
.reference-gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--wash); }
.reference-gallery figcaption { display: grid; gap: 3px; padding: 10px; font-size: .84rem; }
.reference-gallery figcaption span { color: var(--muted); }

.review-grid { display: grid; gap: 16px; }
.review-block { padding: 16px; border-left: 4px solid var(--lime); background: var(--wash); }
.review-block h3 { margin: 0 0 8px; }
.review-block dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.review-block dt { font-weight: 800; }
.review-block dd { margin: 0; overflow-wrap: anywhere; }
.confirmation { text-align: center; padding: 22px 0; }
.confirmation-copy { max-width: 620px; margin: 12px auto; color: var(--muted); }
.reference { font-size: 1.45rem; font-weight: 900; color: var(--green); }

.quote-footer { padding: 28px 16px; color: #eaf1ed; background: #132a21; }
.quote-footer-inner { width: min(1120px, 100%); margin: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }

@media (max-width: 800px) {
  .quote-shell { grid-template-columns: 1fr; }
  .quote-progress { position: static; }
  .quote-progress ol { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .quote-progress li { grid-template-columns: 1fr; justify-items: center; text-align: center; font-size: .75rem; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .reference-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-row { grid-template-columns: repeat(2, 1fr); padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
}

@media (max-width: 460px) {
  .reference-gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .quote-header-inner { min-height: 66px; }
  .quote-logo img { width: 165px; }
  .quote-nav a:not(.quote-lang) { display: none; }
  .quote-hero { padding: 24px 16px 60px; }
  .quote-shell { width: min(100% - 20px, 1120px); margin-top: -44px; }
  .quote-progress { padding: 14px; }
  .quote-progress > strong, .security-note { display: none; }
  .quote-card { padding: 18px 14px 24px; }
  .conversation-progress-heading { grid-template-columns: 1fr; gap: 2px; }
  .conversation-progress-heading span { text-align: left; }
  .conversation-response > .field-grid { margin-left: 22px; padding: 14px; }
  .question-prompt-bubble { max-width: calc(100% - 44px); }
  .choices, .question-free-response, .question-turn-actions, .question-complete { margin-left: 22px; }
  .field-grid, .photo-grid { grid-template-columns: 1fr; }
  .room-calculator { padding: 13px; }
  .room-calculator-header { align-items: stretch; flex-direction: column; }
  .room-add { width: 100%; }
  .room-row { padding: 12px; }
  .room-row-actions { align-items: stretch; flex-direction: column; }
  .room-row .room-ceiling { min-height: 40px; }
  .room-remove { width: 100%; }
  .actions { flex-direction: column-reverse; }
  .button { width: 100%; }
  .review-block dl { grid-template-columns: 1fr; }
  .review-block dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } .conversation-progress-track span { transition: none; } .question-card.is-active { animation: none; } }
