:root {
  --page-bg: #ffffff;
  --card-bg: #e8eef9;
  --text: #2d3546;
  --muted: #596272;
  --line: #cbd4e4;
  --input-bg: #ffffff;
  --input-border: #c6ccd8;
  --focus: #2f75da;
  --focus-ring: rgba(47, 117, 218, 0.22);
  --required: #e10000;
  --green: #18a65b;
  --green-hover: #14964f;
  --card-width: 752px;
  --inner-x: 52px;
  --section-y: 22px;
  --heading-gap-top: 82px;
  --heading-gap-bottom: 66px;
  --field-gap-x: 18px;
  --field-gap-y: 22px;
  --font: Inter, Arial, Helvetica, sans-serif;
  --h1: 30px;
  --h2: 36px;
  --label: 16px;
  --input: 15px;
  --helper: 12px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
}

body { padding-bottom: 56px; }

.hero-band {
  position: relative;
  width: 100%;
  min-height: 245px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  background: #fff;
}

.hero-water {
  display: block;
  width: min(100%, 1360px);
  height: 245px;
  object-fit: cover;
  object-position: center center;
  opacity: 0.98;
}

.hero-logo {
  position: absolute;
  top: 58px;
  left: 50%;
  width: 500px;
  max-width: 72vw;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 2px rgba(0,0,0,0.12));
}

.form-card {
  width: var(--card-width);
  max-width: calc(100vw - 32px);
  margin: 0 auto;
  background: var(--card-bg);
  color: var(--text);
}

.section-pad {
  padding: var(--section-y) var(--inner-x);
}

.intro {
  padding-top: 42px;
  padding-bottom: 28px;
}

h1, h2, p, fieldset, legend { margin-top: 0; }

h1 {
  margin-bottom: 10px;
  font-size: var(--h1);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  margin: 0;
  padding: var(--heading-gap-top) var(--inner-x) var(--heading-gap-bottom);
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: var(--h2);
  line-height: 1.15;
  font-weight: 700;
}

p {
  margin-bottom: 15px;
  font-size: 15.5px;
  line-height: 1.55;
}

.text-panel { padding-top: 10px; padding-bottom: 8px; }

.grid {
  display: grid;
  gap: var(--field-gap-y) var(--field-gap-x);
}

.grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.full { grid-column: 1 / -1; }

.field {
  display: block;
  min-width: 0;
}

.field > span,
.label-text,
legend {
  display: block;
  margin: 0 0 9px;
  color: var(--text);
  font-size: var(--label);
  line-height: 1.35;
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 10px 9px;
  border: 1px solid var(--input-border);
  border-radius: 0;
  background: var(--input-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--input);
  line-height: 1.4;
  outline: none;
  box-shadow: none;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.dropbox:focus-visible,
button:focus-visible {
  border-color: var(--focus);
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: var(--helper);
  line-height: 1.35;
}

.date-field { position: relative; }
.date-field > input[type="text"] { padding-right: 42px; }
.date-field::after { content: none; }

.date-picker-source {
  position: absolute;
  right: 12px;
  top: 32px;
  width: 20px;
  height: 20px;
  opacity: 0;
  border: 0;
  padding: 0;
  pointer-events: none;
}

.date-picker-button {
  position: absolute;
  right: 8px;
  top: 27px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  color: #aeb7c8;
  cursor: pointer;
}
.date-picker-button:focus-visible {
  outline: 2px solid #4A6DE5;
  outline-offset: 2px;
  border-radius: 3px;
}

/* iPhone/iPad Safari requires a direct user touch on the native date input.
   Keep the approved desktop text field + calendar-button experience, but on
   touch-first screens place that native control over the full date field. */
@media (hover: none) and (pointer: coarse) {
  .date-picker-source {
    left: 0;
    right: auto;
    top: 27px;
    width: 100%;
    height: 42px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 2;
  }
  .date-picker-button {
    pointer-events: none;
  }
}

.address { display: grid; gap: 12px; }
.address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--field-gap-x);
}

fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}

.radio-field label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 9px 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
}

input[type="radio"] {
  width: 13px;
  height: 13px;
  margin: 3px 0 0;
  flex: 0 0 auto;
  accent-color: var(--focus);
}

input[type="checkbox"] {
  width: 38px;
  height: 38px;
  margin: 0 18px 0 0;
  flex: 0 0 auto;
  accent-color: var(--focus);
}

.helper-copy {
  padding: 16px;
  border-left: 4px solid var(--focus);
  background: rgba(255,255,255,0.48);
  color: var(--text);
  font-size: 15px;
  line-height: 1.48;
}

.generated-locations {
  margin-top: 4px;
}

[data-show-when] {
  display: none;
}

[data-show-when].is-visible {
  display: block;
}

.grid[data-show-when].is-visible,
.address[data-show-when].is-visible,
.generated-locations[data-show-when].is-visible,
.location-grid[data-show-when].is-visible,
.location-pair[data-show-when].is-visible {
  display: grid;
}

.generated-locations .classification {
  padding: 0 0 8px;
}

.visual-widget,
.upload-zone { margin-top: 2px; }

.photo-button,
.submit-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.photo-button {
  min-height: 38px;
  padding: 9px 18px;
  background: var(--focus);
  font-size: 15px;
  font-weight: 700;
}

.submit-row button {
  padding: 12px 28px;
}

.photo-button:hover,
.submit-row button:hover { background: var(--green-hover); }
.photo-button:hover { background: #286bc9; }

.dropbox {
  min-height: 94px;
  border: 1px dashed #b8bdca;
  background: #fff;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  cursor: pointer;
}

.dropbox strong {
  font-size: 15px;
  font-weight: 700;
}

.dropbox small {
  margin-top: 5px;
}

.terms-section { padding-top: 30px; }

.terms-label {
  display: flex;
  align-items: flex-start;
  gap: 0;
  color: var(--text);
}

.terms-copy {
  display: inline;
  flex: 1 1 auto;
  font-size: 30px;
  line-height: 1.31;
  letter-spacing: -0.02em;
}

.terms-copy strong { font-weight: 400; }

.required-mark {
  display: inline-block;
  margin-left: 10px;
  color: var(--required);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  align-self: flex-end;
}

.submit-row {
  padding-top: 30px;
  padding-bottom: 48px;
}

[hidden] { display: none !important; }

.request-errors {
  background: #fff6f6;
  border: 1px solid #e32225;
  color: var(--text);
  margin: 0 var(--inner-x) 18px;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.45;
}
.request-errors strong { display:block; margin-bottom:8px; }
.request-errors ul { margin:0; padding-left:20px; }
.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  :root {
    --card-width: 100%;
    --inner-x: 24px;
    --heading-gap-top: 54px;
    --heading-gap-bottom: 32px;
    --h2: 30px;
  }
  .hero-band { min-height: auto; }
  .hero-water { width: 100%; height: auto; min-height: 170px; }
  .hero-logo { top: 42px; width: 420px; }
  .form-card { max-width: 100%; }
  .grid.two { grid-template-columns: 1fr; }
  .address-row { grid-template-columns: 1fr; }
  .terms-copy { font-size: 23px; }
}


.prefill-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.secondary-action {
  border: 0;
  border-radius: 6px;
  background: #2f6fed;
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
  min-height: 40px;
  cursor: pointer;
}

.terms-section {
  padding-top: 6px;
  padding-bottom: 8px;
}

.terms-label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  color: #2f3747;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
}

.terms-label input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
}

.terms-copy {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.5;
}

.required-mark {
  color: #d10000;
  font-weight: 700;
  white-space: nowrap;
}

.request-confirm {
  margin-top: -18px;
}

.confirm-intro {
  padding-top: 42px;
  padding-bottom: 48px;
}

.confirm-lead {
  color: var(--muted);
  font-size: 16px;
}

.submission-id-panel {
  margin: 24px 0 26px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: #fff;
}

.submission-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.submission-number {
  margin: 0 0 8px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.05;
}

.submission-instruction {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.confirm-summary {
  display: grid;
  gap: 13px;
  margin: 0;
}

.confirm-summary div {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 14px;
}

.confirm-summary dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.confirm-summary dd {
  margin: 0;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.45;
}

.confirm-divider {
  height: 1px;
  margin: 28px 0;
  background: var(--line);
}

.prefill-note {
  color: var(--muted);
}

.confirm-actions {
  margin: 28px 0 0;
}

.confirm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 12px 24px;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.confirm-button:hover {
  background: var(--green-hover);
}

@media (max-width: 720px) {
  .prefill-inline {
    grid-template-columns: 1fr;
  }
  .request-confirm {
    margin-top: 0;
  }
  .submission-number {
    font-size: 34px;
  }
  .confirm-summary div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .confirm-button {
    width: 100%;
  }
}
