:root {
  --ink: #0c345c;
  --muted: #49657e;
  --paper: #fff;
  --sand: #e8f4fd;
  --accent: #0c345c;
  --teal: #5c8cb4;
  --line: #94c4eb;
  --danger: #8e281f;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: linear-gradient(135deg, #fff 0%, var(--sand) 58%, #94c4eb 100%);
  font: 16px/1.55 Georgia, "Times New Roman", serif;
}
button, input, textarea, select { font-size: 16px; }
.page-shell { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 max(54px, env(safe-area-inset-bottom)); }
.return-home { margin: 0 0 16px; font: 700 .9rem Arial, sans-serif; }
.return-home a { color: var(--ink); text-decoration: none; }
.return-home a:hover, .return-home a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.brand-header {
  max-width: 680px;
  margin: 0 auto 28px;
  padding: 30px clamp(22px, 5vw, 42px);
  border-radius: 18px;
  color: #fff;
  text-align: center;
  background: var(--ink);
  box-shadow: 0 14px 34px rgba(12,52,92,.22);
}
.brand-header h1, .wizard-card h1, h2 { font-family: Arial, sans-serif; line-height: 1.15; }
.brand-header h1 { margin: 7px 0 14px; color: #fff; font-size: clamp(2rem, 6vw, 3.25rem); }
.brand-header p, .brand-header .eyebrow { color: #fff; }
.eyebrow { margin: 0 0 9px; color: var(--ink); font: 700 .75rem/1.2 Arial, sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.wizard-card { padding: clamp(24px, 5vw, 48px); border: 2px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 18px 45px rgba(12,52,92,.18); }
.progress-row { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); font: 600 .8rem Arial, sans-serif; }
.progress-track { height: 8px; margin: 10px 0 38px; overflow: hidden; border-radius: 99px; background: #dceefa; }
.progress-fill { width: 0; height: 100%; background: var(--teal); transition: width .3s ease; }
.question h2 { margin: 0 0 8px; color: var(--ink); font-size: clamp(1.7rem, 4vw, 2.25rem); overflow-wrap: anywhere; }
.question-description { margin: 0 0 25px; color: var(--muted); }
.field-list { display: grid; gap: 22px; }
label, legend { display: block; margin-bottom: 8px; font: 700 .95rem/1.35 Arial, sans-serif; overflow-wrap: anywhere; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
input:not([type=radio]):not([type=checkbox]), textarea, select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  color: #000;
  background: #fff;
  font-family: inherit;
}
textarea { min-height: 118px; resize: vertical; }
select option { color: #000; background: #fff; }
input:focus, textarea:focus, select:focus, summary:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(92,140,180,.48); outline-offset: 2px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 10px; }
.choice { display: flex; align-items: flex-start; gap: 9px; min-width: 0; margin: 0; padding: 11px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 400; }
.choice:has(input:checked) { border-color: var(--teal); color: var(--ink); background: #dceefa; }
.choice input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--ink); }
.choice span { min-width: 0; overflow-wrap: anywhere; }
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 20px; border: 0; border-radius: 7px; color: #fff; background: var(--ink); cursor: pointer; text-align: center; text-decoration: none; font: 700 .95rem/1.2 Arial, sans-serif; }
.button:hover { color: #fff; background: var(--teal); }
.button:disabled { cursor: wait; opacity: .65; }
.button-secondary { border: 1px solid var(--teal); color: var(--ink); background: transparent; }
.button-secondary:hover { color: #fff; background: var(--ink); }
.form-error { margin: 22px 0 0; padding: 14px 16px; border-left: 4px solid var(--danger); border-radius: 4px; color: var(--danger); background: #fff3f1; font: 700 1rem/1.45 Arial, sans-serif; overflow-wrap: anywhere; }
.privacy-note { max-width: 680px; margin: 18px auto; color: var(--ink); text-align: center; font-size: .85rem; }
.analytics-consent { position: fixed; right: 18px; bottom: 18px; z-index: 1000; width: min(560px, calc(100% - 36px)); padding: 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; box-shadow: 0 18px 55px rgba(5,34,60,.28); font: .9rem/1.45 Arial, sans-serif; }
.analytics-consent p { margin: 0 0 14px; }
.analytics-consent div { display: flex; flex-wrap: wrap; gap: 10px; }
.analytics-consent button { min-height: 42px; padding: 9px 14px; border: 1px solid var(--ink); border-radius: 6px; color: #fff; background: var(--ink); cursor: pointer; font-weight: 700; }
.analytics-consent button:last-child { color: var(--ink); background: #fff; }
.thank-you { margin-top: 15vh; text-align: center; }
.thank-you .button { margin-top: 10px; }
.text-link { color: var(--ink); }
.optional-label { color: var(--muted); font-weight: 400; }
.field-help { margin: -2px 0 10px; color: var(--muted); font-size: .9rem; }
.field-warning { margin: 8px 0 0; color: #000; font-size: .88rem; }
.multi-select details { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.multi-select summary { padding: 12px; color: #000; cursor: pointer; font: 600 .95rem Arial, sans-serif; }
.multi-options { max-height: min(350px, 48vh); overflow: auto; padding: 0 12px 12px; color: #000; overscroll-behavior: contain; }
.multi-option-group { padding: 10px 0 2px; border-top: 1px solid #d7eafb; }
.multi-option-group:first-child { border-top: 0; }
.multi-option-group p { margin: 0 0 5px; color: var(--ink); font: 700 .76rem Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.multi-option { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 3px; cursor: pointer; font-weight: 400; }
.multi-option input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--ink); }
.multi-option:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.traveler-counts, .traveler-ages { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.traveler-ages { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.traveler-ages h3 { grid-column: 1 / -1; margin: 0; font: 700 1rem Arial, sans-serif; }
.calculated-field { padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--sand); }
.calculated-field span { display: block; margin-bottom: 4px; font: 700 .9rem Arial, sans-serif; }
.calculated-field output { font-size: 1.15rem; }
.selection-limit { margin: 10px 0 0; color: #000; font-weight: 700; }

@media (max-width: 520px) {
  .page-shell { width: min(100% - 20px, 760px); padding-top: 22px; }
  .return-home { margin-left: 2px; }
  .brand-header { margin-bottom: 16px; padding: 22px 16px; border-radius: 12px; }
  .brand-header h1 { font-size: clamp(1.8rem, 9vw, 2.45rem); }
  .brand-header > p:last-child { font-size: .95rem; }
  .wizard-card { padding: 22px 18px; border-radius: 12px; }
  .progress-track { margin-bottom: 28px; }
  .question h2 { font-size: clamp(1.55rem, 7.5vw, 1.9rem); }
  .choice-grid, .traveler-counts, .traveler-ages { grid-template-columns: 1fr; }
  .wizard-actions { align-items: stretch; }
  .wizard-actions .button { flex: 1 1 0; min-width: 0; padding-left: 10px; padding-right: 10px; }
  .form-error { padding: 12px 13px; font-size: .95rem; }
  .privacy-note { padding: 0 8px; }
  .analytics-consent { right: 10px; bottom: 10px; width: calc(100% - 20px); padding: 16px; }
  .analytics-consent div { align-items: stretch; flex-direction: column; }
  .analytics-consent button { width: 100%; }
}

@media (max-width: 350px) {
  .progress-row { font-size: .7rem; }
  .wizard-actions { flex-direction: column-reverse; }
  .wizard-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
