:root {
  --action: var(--brand-accent);
  --action-hover: var(--brand-accent-hover);
  --accent: var(--brand-accent-deep);
  --accent-strong: var(--brand-accent-deeper);
  --accent-wash: var(--brand-accent-wash-deep);
  --cream: #fbfaf8;
  --paper: #ffffff;
  --ink: #080808;
  --muted: #5f5f5f;
  --line: #dedad2;
  --danger: #9f2f3a;
  --display: Georgia, "Times New Roman", serif;
  --ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--cream); color: var(--ink); font: 15px/1.5 var(--ui); }
button, input, select { font: 650 14px/1.35 var(--ui); }
.smart-header { min-height: 78px; padding: 11px 16px; display: flex; align-items: center; color: #fff; background: var(--action); }
.smart-brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.smart-brand img { width: 39px; height: 48px; border-radius: 3px; object-fit: contain; }
.smart-brand strong, .smart-brand small { display: block; }
.smart-brand strong { font: 20px/1.05 var(--display); }
.smart-brand small { margin-top: 4px; color: var(--brand-accent-on-ink); font-size: 11px; }
main { width: min(100% - 24px, 1120px); margin: 0 auto; padding: 26px 0 48px; }
.booking-progress { max-width: 900px; margin: 0 auto 24px; }
.booking-progress ol { position: relative; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; }
.booking-progress ol::before { content: ""; position: absolute; z-index: 0; top: 17px; left: 16.66%; right: 16.66%; border-top: 1px solid #c9c4b9; }
.booking-progress li { z-index: 1; display: grid; justify-items: center; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 650; text-align: center; }
.booking-progress li span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: #dedad2; }
.booking-progress li.is-active { color: var(--accent); }
.booking-progress li.is-active span { color: #fff; background: var(--accent); }
.smart-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); box-shadow: 0 18px 50px rgba(8,8,8,.08); }
.smart-intro { padding: 28px 20px 23px; border-bottom: 1px solid var(--line); }
h1 { max-width: 760px; margin: 0; font: 500 clamp(34px, 7vw, 50px)/1.08 var(--display); letter-spacing: -.02em; }
.smart-intro p { margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.booking-layout { display: grid; }
form { padding: 24px 20px 28px; display: grid; gap: 24px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend, h2 { margin: 0 0 17px; font: 500 25px/1.15 var(--display); }
.field-grid { display: grid; gap: 16px; }
.service-area-field { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
input, select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #c9c4b9; border-radius: 8px; color: var(--ink); background: var(--paper); outline: none; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-color: var(--accent-strong); box-shadow: var(--brand-focus-ring); }
input:invalid:not(:focus):not(:placeholder-shown) { border-color: var(--danger); }
.details-fields { padding-top: 24px; border-top: 1px solid var(--line); }
.contact-help { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.website-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-message { min-height: 22px; margin: -8px 0 0; color: var(--danger); font-size: 13px; }
.form-actions { display: grid; gap: 10px; }
.primary-button { min-height: 51px; padding: 0 20px; border: 1px solid var(--action); border-radius: 8px; color: #fff; background: var(--action); cursor: pointer; font-weight: 750; }
.primary-button:hover { background: var(--action-hover); }
.primary-button:disabled { opacity: .58; cursor: wait; }
.submit-button { color: var(--accent-strong); border-color: var(--brand-accent-line); background: var(--accent-wash); }
.submit-button:hover { color: #fff; }
[hidden] { display: none !important; }
.estimate-panel { padding: 28px 22px; border-top: 1px solid var(--line); background: var(--brand-accent-wash); }
.estimate-panel h2 { color: var(--accent); }
.estimate-placeholder { min-height: 180px; display: grid; align-content: center; color: var(--muted); }
.estimate-placeholder p { max-width: 270px; margin: 0; }
.estimate-price { margin: 0 0 24px; color: var(--accent); font: 500 54px/1 var(--display); }
.estimate-status { padding: 20px 0; border-block: 1px solid var(--brand-accent-line); }
.estimate-status h3, .booking-confirmation h3 { margin: 0; color: var(--accent); font: 700 17px/1.25 var(--ui); }
.estimate-status p, .booking-confirmation p { margin: 8px 0 0; color: var(--muted); }
.estimate-lines { margin: 18px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; font-size: 13px; }
.estimate-lines dt, .estimate-lines dd { margin: 0; }
.estimate-lines dd { font-variant-numeric: tabular-nums; }
.estimate-lines .is-total { padding-top: 12px; border-top: 1px solid var(--brand-accent-line); font-weight: 800; }
.booking-confirmation { margin-top: 22px; padding: 17px; display: grid; grid-template-columns: auto 1fr; gap: 13px; border: 1px solid var(--brand-accent-line); border-radius: 8px; background: rgba(255,255,255,.72); }
.booking-confirmation > span { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 20px; }
.fallback-link { margin: 0; padding: 20px; border-top: 1px solid var(--line); text-align: center; }
.fallback-link a { color: var(--accent); text-underline-offset: 3px; }
footer { padding: 0 15px 34px; color: var(--muted); text-align: center; font-size: 12px; }

@media (min-width: 680px) {
  .smart-header { padding-inline: max(24px, calc((100vw - 1120px) / 2)); }
  main { padding-top: 36px; }
  .smart-intro { padding: 36px 38px 30px; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-wide { grid-column: 1 / -1; }
  form { padding: 32px 36px 36px; }
}

@media (max-width: 679px) {
  form { padding-inline: 14px; }
  .service-area-field select { font-size: 13px; }
}

@media (min-width: 900px) {
  .booking-layout { grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); align-items: stretch; }
  .estimate-panel { padding: 36px 30px; border-top: 0; border-left: 1px solid var(--line); }
  .estimate-panel h2 { position: sticky; top: 20px; }
}

@media (prefers-reduced-motion: no-preference) {
  .primary-button { transition: color .16s ease, background-color .16s ease, opacity .16s ease; }
  .booking-confirmation { animation: confirmation-in .28s ease-out; }
  @keyframes confirmation-in { from { opacity: 0; transform: translateY(7px); } }
}
