@font-face {
  font-family: 'Public Sans';
  src: url('/assets/public-sans-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --background: #b5c3cd;
  --ink: #20333f;
  --muted: #455e6b;
  --border: #657d8d;
  --surface: #ffffff20;
  --surface-hover: #ffffff30;
  --field-label-gap: 6px;
  --field-gap: 20px;
  --column-gap: 16px;
  --section-gap: 32px;
  --control-height: 48px;
  --radius: 4px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  padding: clamp(64px, 10vh, 104px) 32px 48px;
  background: var(--background);
  color: var(--ink);
  font-family: 'Public Sans', Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
main { width: 100%; max-width: 560px; margin: 0 auto; }
h1 {
  margin: 0 0 28px;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.2;
  text-wrap: pretty;
}
h1:focus { outline: none; }
p { margin: 0 0 24px; font-size: 16px; line-height: 1.55; max-width: 54ch; }
h1:has(+ p) { margin-bottom: 16px; }

/* A field is one visual unit; the same component serves every screen. */
.fields, .contact-fields-stack { display: grid; gap: var(--field-gap); }
.pair, .address-line, .locality { display: grid; gap: var(--column-gap); }
.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.address-line { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.address-line:not(:has(.unit-field)) { grid-template-columns: minmax(0, 1fr); }
.locality { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
.field {
  display: flex;
  flex-direction: column;
  gap: var(--field-label-gap);
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}
input:not([type=radio]):not([type=checkbox]), textarea, select {
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--control-height);
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  transition: border-color 100ms ease, background 100ms ease, box-shadow 100ms ease;
}
input:not([type=radio]):not([type=checkbox]):hover, textarea:hover, select:hover { background-color: var(--surface-hover); }
input:not([type=radio]):not([type=checkbox]):focus, textarea:focus, select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  background-color: var(--surface-hover);
}
input:disabled { opacity: .45; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
textarea { height: 144px; min-height: 144px; resize: vertical; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2320333f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}
@media (forced-colors: active) { select { appearance: auto; background-image: none; } }

/* Choices remain flat, with full-height targets and quiet, consistent marks. */
.choices { display: grid; gap: 0; }
.choices--property { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.choices--property .choice:last-child { grid-column: 1 / -1; }
/* Service selections are large multi-select tiles, not navigation buttons. */
.help-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.help-tile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 20px 1fr;
  align-items: start;
  gap: 12px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.help-tile > span { grid-column: 1 / -1; grid-row: 2; }
.help-icon { width: 20px; height: 20px; }
.help-tile:hover { background: var(--surface-hover); border-color: var(--ink); }
.help-tile:has(input:checked) { background: #e2e9ec; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.help-tile:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 4px; }
@media (max-width: 520px) {
  .help-tiles { grid-template-columns: 1fr; gap: 10px; }
  .help-tile { grid-template-columns: 24px minmax(0, 1fr); grid-template-rows: auto; align-items: center; min-height: 64px; font-size: 16px; padding: 14px 16px; }
  .help-tile > span { grid-column: 2; grid-row: 1; }
}
@media (forced-colors: active) {
  .help-tile:has(input:checked) { border: 2px solid Highlight; }
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 10px 0;
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
}
.choice input {
  appearance: none;
  flex-shrink: 0;
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  border: 1px solid var(--muted);
  background: transparent;
  color: var(--ink);
}
.choice input[type=radio] { border-radius: 50%; }
.choice input[type=checkbox] { border-radius: 3px; }
.choice input:checked { border-color: var(--ink); }
.choice input[type=radio]:checked::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.choice input[type=checkbox]:checked { background: var(--ink); }
.choice input[type=checkbox]:checked::after {
  content: ''; width: 5px; height: 9px; margin-top: -2px;
  border: solid var(--background); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.choice:hover { color: var(--muted); }
.choice input:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
#property-fields:not(:empty) { margin-top: 0; }
.unit-exception { margin-top: -12px; font-size: 14px; }

.address-search { position: relative; min-width: 0; }
#suggestions {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 5;
  margin-top: 4px; max-height: 300px; overflow: auto;
  background: #dce4e9; border-radius: var(--radius); box-shadow: 0 8px 20px #20333f18;
}
.address-option { display: block; width: 100%; padding: 12px 16px; border: 0; background: transparent; text-align: left; line-height: 1.4; }
.address-option strong { font-weight: 500; }
.address-option:hover, .address-option[aria-selected=true] { background: #cbd8e0; }
.address-option span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.maps-attribution { padding: 8px 16px; font-size: 12px; text-align: right; }

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
.navigation { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 32px; }
.navigation button { min-height: 48px; padding: 12px 0; background: none; border: 0; text-decoration: none; transition: opacity 100ms ease; }
.navigation button:hover:not(:disabled) { opacity: .65; }
.navigation #back { color: var(--muted); }
.navigation #next { margin-left: auto; min-width: 132px; padding: 12px 24px; border-radius: 6px; background: var(--ink); color: #eff3f5; font-weight: 500; }
.navigation #next:hover:not(:disabled) { opacity: 1; background: #304b5b; }
.step-guidance { color: var(--muted); margin-bottom: 24px; }
#error { margin: 16px 0 0; color: #733126; }
#error:empty, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* The +1 is the selector, integrated into the same field surface. */
.iti { width: 100%; font-size: 16px; color: var(--ink); --iti-country-selector-bg: #dce4e9; --iti-border-color: var(--border); --iti-hover-color: #cbd8e0; --iti-icon-color: var(--ink); }
.iti input.iti__search-input { padding: 10px 36px; }
.iti__country-selector { color: var(--ink); }
.iti__selected-country .iti__flag { display: none; }
.iti__selected-country .iti__selected-dial-code { order: 0; margin: 0; }
.iti__selected-country .iti__selected-country-primary { order: 1; padding: 0 12px 0 0; }
.iti .iti__selected-country { padding-left: 12px; border-radius: var(--radius); }
.iti__selected-country:hover { opacity: .65; }

@media (max-width: 520px) {
  body { padding: 40px 24px; }
  h1 { font-size: 28px; }
  .choices--property { grid-template-columns: 1fr; }
  .address-line { grid-template-columns: 1fr; gap: var(--field-gap); }
  .locality { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--field-gap) var(--column-gap); }
  .locality .field:first-child { grid-column: 1 / -1; }
}
@media (max-width: 400px) { .contact-name { grid-template-columns: 1fr; gap: var(--field-gap); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (forced-colors: active) { .choice input { appearance: auto; } .choice input::after { display: none; } }
