:root {
  --deep: #004a70;
  --field-line: #658391;
  --muted: #45636f;
}

body {
  background: var(--cloud);
  color: var(--deep);
  font-size: 17px;
}

[hidden] { display: none !important; }

header {
  padding: 16px max(16px, calc((100vw - 1060px) / 2)) clamp(25px, 4vw, 44px);
  background: var(--deep);
  color: #fff;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.top a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 800;
  text-decoration: none;
}

.top a:first-child {
  padding: 7px 10px;
  border-radius: 10px;
  background: #fff;
}

.top img {
  width: 165px;
  max-width: 38vw;
}

.top a:last-child {
  padding: 8px 14px;
  border: 1px solid rgb(255 255 255 / .6);
  border-radius: 50px;
}

.estimate-hero {
  max-width: 62ch;
  margin-top: clamp(20px, 3.5vw, 39px);
}

.estimate-hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 4.25rem);
  line-height: 1.1;
}

.estimate-hero p {
  margin-top: 10px;
  font-size: clamp(1rem, 1.75vw, 1.13rem);
}

main {
  width: min(1060px, calc(100% - 32px));
  margin: clamp(18px, 3vw, 32px) auto 36px;
}

.app {
  min-height: 260px;
  padding: clamp(16px, 3.8vw, 40px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.progress {
  padding-bottom: 15px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.progress p {
  font-size: .96rem;
  font-weight: 750;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  max-width: 28rem;
  margin-top: 9px;
}

.steps span { height: 5px; background: #c6dbe4; }
.steps .done { background: #006b9d; }
.steps .current { background: var(--yellow); }

#stage h2 {
  font-size: clamp(1.55rem, 2.95vw, 2.65rem);
  line-height: 1.14;
  text-align: start;
  margin-bottom: 10px;
}

.lead {
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 64ch;
}

.cards, .services, .cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card, .service {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 78px;
  padding: 16px;
  color: var(--deep);
  background: #fff;
  border: 1px solid var(--field-line);
  border-radius: 12px;
  text-align: start;
  cursor: pointer;
}

.card {
  min-height: 110px;
  background: var(--chalk);
}

.service {
  position: relative;
  padding-inline-end: 32px;
}
.card strong { font-size: 1.18rem; line-height: 1.2; }
.card small { font-size: .95rem; color: var(--muted); }
.card i, .service i { font-size: 1.17rem; color: #006b9d; }
.card:hover, .service:hover { border-color: var(--deep); background: #edf5f8; }
.service.sel { background: #e6f2f7; box-shadow: inset 0 0 0 2px var(--deep); }
.service strong { font-size: 1rem; line-height: 1.25; }
.service .check {
  display: none;
  position: absolute;
  inset: 12px 12px auto auto;
}
.service.sel .check { display: inline-block; }

.panel {
  padding: clamp(13px, 3vw, 22px);
  margin: 14px 0;
  background: var(--cloud);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.panel h3 { margin-bottom: 14px; font-size: 1.27rem; }

label {
  display: block;
  margin-bottom: 5px;
  font-size: .96rem;
  font-weight: 750;
}

input, select, textarea {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  color: var(--deep);
  background: #fff;
}

textarea { min-height: 105px; resize: vertical; }
.field { margin-bottom: 14px; }
.hint, .fine { color: var(--muted); font-size: .92rem; }
.fine { margin-top: 12px; }
.selection-status { margin: 12px 0 0; font-size: .95rem; font-weight: 700; }

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 9px 20px;
  color: var(--deep);
  background: var(--yellow);
  border: 1px solid transparent;
  border-radius: 40px;
  text-decoration: none;
  text-align: center;
  font-weight: 800;
  cursor: pointer;
}

.btn.ghost { background: var(--cloud); }
.btn.border { background: #fff; border-color: var(--deep); }
.btn:disabled { opacity: .64; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.line span:last-child { text-align: end; font-weight: 800; font-variant-numeric: tabular-nums; }
.status { padding: 12px 15px; margin: 14px 0; border-inline-start: 1px solid var(--deep); background: #f9f2dd; }
.status.error { background: #fff0eb; border-color: #a84226; color: #7c311d; }
.status.good { background: #e7f6ea; border-color: #287c4a; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill, .slot { padding: 11px 14px; background: #fff; border: 1px solid var(--field-line); color: var(--deep); cursor: pointer; font-weight: 750; }
.pill { border-radius: 30px; }
.pill.on, .slot.active { background: var(--deep); color: #fff; }
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.slot { border-radius: 10px; text-align: start; }
footer { padding: 8px 16px 25px; font-size: .92rem; color: var(--muted); text-align: center; }

:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; }
header a:focus-visible { outline-color: var(--yellow); }
#stage h2[tabindex="-1"] { scroll-margin-top: 22px; }

@media (min-width: 760px) {
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .cards, .cols, .slot-grid { grid-template-columns: minmax(0, 1fr); }
  .service { padding-block: 12px; padding-inline-start: 12px; }
  .top a:last-child { padding-inline: 12px; }
}

/* Accurate service pictograms use a local, same-origin SVG sprite; Kit UI icons remain intact. */
.service svg.service-illustration { display:block; width:24px; height:24px; flex:none; color:#006b9d; overflow:visible; }


/* Customer-friendly form validation. */
.field-error { margin: 6px 0 0; color: #963b25; font-size: .9rem; font-weight: 700; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: #963b25; box-shadow: 0 0 0 1px #963b25; }
#contact-validation { margin: 10px 0 20px; }
#stage [role="alert"] a { font-weight: 800; text-decoration: underline; }
