:root {
  --ink: #34383b;
  --muted: #687176;
  --brand: #79a9c7;
  --brand-dark: #436f8b;
  --brand-pale: #e6f0f5;
  --paper: #fffefa;
  --canvas: #f2f0e9;
  --line: #d9ddd9;
  --error: #a33b32;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(121, 169, 199, 0.08) 1px, transparent 1px) 0 0 / 5rem 5rem,
    var(--canvas);
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
}

.site-header {
  width: min(74rem, calc(100% - 3rem));
  min-height: 8.5rem;
  margin: 0 auto;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(52, 56, 59, 0.18);
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-link img {
  width: 8.75rem;
  height: 5.35rem;
  object-fit: contain;
}

.site-header__label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-main {
  width: min(74rem, calc(100% - 3rem));
  margin: 0 auto;
  flex: 1;
}

.lookup-layout {
  min-height: 35rem;
  padding: 5rem 0 6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 29rem);
  gap: clamp(3rem, 9vw, 8rem);
  align-items: start;
}

.lookup-introduction {
  max-width: 35rem;
  padding-top: 2rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.introduction-copy {
  max-width: 33rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.7;
}

.privacy-note {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.privacy-note__mark {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.3rem;
  border: 2px solid var(--brand-dark);
  border-radius: 50%;
  flex: 0 0 auto;
}

.privacy-note p {
  max-width: 29rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.lookup-card,
.summary-card {
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(52, 56, 59, 0.14);
  box-shadow: 0.8rem 0.8rem 0 var(--brand-pale);
}

.lookup-card {
  padding: clamp(1.75rem, 4vw, 2.75rem);
}

.lookup-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 5rem;
  height: 0.28rem;
  background: var(--brand);
  content: "";
}

.lookup-card h2 {
  margin: 0;
  font-size: 2rem;
}

.form-instruction {
  margin: 0.55rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.field-label-with-action {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.field-label-with-action label {
  margin-bottom: 0;
}

.copy-lead-action {
  flex: none;
  white-space: nowrap;
}

.text-action.copy-lead-action:disabled {
  color: var(--muted);
  cursor: default;
  text-decoration: none;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #92999d;
  border-radius: 0;
  color: var(--ink);
  background: #fff;
  font: inherit;
  letter-spacing: 0.04em;
}

.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #92999d;
  border-radius: 0;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.lookup-card .form-field input,
.vehicle-editor-row .form-field input {
  text-transform: uppercase;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--brand-dark);
  outline: 3px solid rgba(121, 169, 199, 0.32);
  outline-offset: 1px;
}

.form-field input.input-validation-error,
.form-field select.input-validation-error,
.form-field textarea.input-validation-error {
  border: 2px solid var(--error);
}

.field-hint,
.field-error {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.field-hint {
  color: var(--muted);
}

.field-error,
.validation-summary,
.alert-message {
  color: var(--error);
}

.field-error:empty,
.validation-summary-valid {
  display: none;
}

.validation-summary,
.alert-message {
  margin-bottom: 1.5rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--error);
  background: #f9e9e6;
  font-size: 0.9rem;
}

.validation-summary ul {
  margin: 0;
  padding-left: 1.1rem;
}

.primary-action,
.secondary-action {
  min-height: 3.2rem;
  border-radius: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  cursor: pointer;
}

.primary-action {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1.2rem;
  color: #fff;
  background: var(--ink);
  border: 2px solid var(--ink);
}

.primary-action:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.lookup-submit__loading {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: center;
}

.lookup-submit__loading[hidden] {
  display: none;
}

.lookup-spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lookup-spinner 0.75s linear infinite;
}

#booking-lookup-submit:disabled {
  cursor: wait;
  opacity: 0.86;
}

@keyframes lookup-spinner {
  to {
    transform: rotate(360deg);
  }
}

.primary-action:focus,
.secondary-action:focus,
.brand-link:focus {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.booking-summary {
  padding: 4.5rem 0 6rem;
}

.booking-summary__heading {
  margin-bottom: 2.5rem;
}

.booking-summary__heading h1 {
  max-width: 16ch;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
}

.booking-summary__heading > p:last-child {
  max-width: 42rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.status-label {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin: 0 0 1rem;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-label span {
  width: 0.65rem;
  height: 0.65rem;
  background: var(--brand);
  border-radius: 50%;
}

.summary-card {
  max-width: 58rem;
}

.summary-card__header {
  padding: 1.7rem 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.summary-card__header span,
.booking-facts dt {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-card__header strong {
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}

.registration-state {
  padding: 0.5rem 0.7rem;
  color: var(--brand-dark);
  background: var(--brand-pale);
  font-size: 0.78rem;
  font-weight: 700;
}

.booking-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.booking-facts > div {
  min-height: 7rem;
  padding: 1.5rem 2rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.booking-facts > div:nth-child(4n) {
  border-right: 0;
}

.booking-facts > div:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.booking-facts dd {
  margin: 0.7rem 0 0;
  font-size: 1rem;
  line-height: 1.4;
}

.booking-facts__updates > * {
  visibility: hidden;
}

.summary-actions {
  max-width: 58rem;
  margin-top: 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
}

.empty-registration,
.registration-details {
  max-width: 58rem;
  margin-top: 4rem;
}

.empty-registration {
  padding: 2.5rem;
  background: rgba(255, 254, 250, 0.62);
  border: 1px dashed #aeb5b7;
}

.empty-registration h2,
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.empty-registration > p:last-child {
  margin: 1rem 0 0;
  color: var(--muted);
}

.section-heading {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
}

.update-restriction {
  max-width: 17rem;
  margin: 0;
  padding-left: 0.8rem;
  color: var(--error);
  border-left: 3px solid var(--error);
  font-size: 0.85rem;
  line-height: 1.45;
}

.submission-details {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr 1fr;
  background: var(--paper);
  border: 1px solid var(--line);
}

.submission-details > div {
  min-height: 8.5rem;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
}

.submission-details > div:last-child {
  border-right: 0;
}

.submission-details h3,
.guest-section-heading h3 {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.submission-details p {
  margin: 0;
  line-height: 1.45;
}

.submitted-time {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.vehicle-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
}

.vehicle-list li {
  padding: 0.35rem 0.5rem;
  background: var(--brand-pale);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.not-provided,
.no-guests {
  color: var(--muted);
  font-style: italic;
}

.guest-section-heading {
  margin: 3rem 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.guest-section-heading h3 {
  margin-bottom: 0.65rem;
}

.guest-section-heading span {
  padding-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.guest-list {
  display: grid;
  gap: 1.25rem;
}

.guest-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}

.guest-card__header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: #f8f7f2;
  border-bottom: 1px solid var(--line);
}

.guest-card__header span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.guest-card__header h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 400;
}

.guest-card__header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
}

.departure-badge {
  align-items: flex-start;
  background: #f4f0e8;
  border-left: 3px solid #92764a;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.75rem;
}

.departure-badge strong {
  color: var(--brand-dark);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.departure-badge span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: normal;
  margin-bottom: 0;
  white-space: nowrap;
  text-transform: none;
}

.lead-guest {
  padding: 0.4rem 0.6rem;
  color: var(--brand-dark);
  background: var(--brand-pale);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.guest-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guest-facts > div {
  min-width: 0;
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--line);
}

.guest-facts > div:last-child {
  border-right: 0;
}

.guest-facts dt {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guest-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.overseas-details {
  border-top: 1px solid var(--line);
}

.overseas-details h5 {
  margin: 0;
  padding: 1rem 1.5rem;
  color: var(--brand-dark);
  background: var(--brand-pale);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guest-facts--overseas {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guest-facts--overseas > div {
  border-bottom: 1px solid var(--line);
}

.guest-facts--overseas > div:nth-child(3n) {
  border-right: 0;
}

.guest-facts--overseas .guest-address {
  grid-column: span 3;
  border-right: 0;
  border-bottom: 0;
}

.guest-address dd {
  white-space: pre-line;
}

.summary-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.secondary-action {
  padding: 0.7rem 1rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  white-space: nowrap;
}

.secondary-action:hover {
  color: #fff;
  background: var(--ink);
}

.primary-action--inline {
  width: auto;
  margin: 0;
  padding: 0.75rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-action--inline:hover {
  color: #fff;
}

.secondary-action--link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.summary-alert {
  max-width: 58rem;
}

.summary-actions__buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.summary-actions__buttons form {
  margin: 0;
}

.registration-editor,
.registration-review {
  max-width: 64rem;
  margin: 0 auto;
  padding: 4rem 0 6rem;
}

.editor-heading {
  margin-bottom: 3rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: end;
}

.editor-heading h1,
.review-heading h1 {
  max-width: none;
  font-size: clamp(2.8rem, 6vw, 4.7rem);
}

.editor-heading > div > p:last-child,
.review-heading > p:last-child {
  max-width: 38rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.editor-booking-dates {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 2rem;
}

.editor-booking-dates dt,
.review-confirmation dt {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.editor-booking-dates dd,
.review-confirmation dd {
  margin: 0;
}

.registration-form {
  display: grid;
  gap: 1.5rem;
}

.form-validation-summary {
  margin: 0;
}

.warning-message {
  padding: 1rem 1.1rem;
  color: #604d1c;
  background: #fff4cf;
  border-left: 3px solid #d1a82a;
  font-size: 0.9rem;
  line-height: 1.5;
}

.editor-section {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--paper);
  border: 1px solid var(--line);
}

.editor-section__heading {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
}

.section-number {
  margin: 0 0 0.45rem;
  color: var(--brand-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.editor-section__heading h2,
.review-section__heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.editor-section__heading > div > p:last-child {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.text-action,
.remove-action {
  padding: 0;
  color: var(--brand-dark);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.text-action:hover,
.remove-action:hover {
  color: var(--ink);
}

.text-action:focus,
.remove-action:focus,
.lead-selector input:focus,
.confirmation-check input:focus {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.vehicle-editor-list,
.guest-editor-list {
  display: grid;
  gap: 1rem;
}

.vehicle-editor-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.vehicle-editor-row .form-field {
  margin: 0;
}

.remove-action {
  color: #8d3a33;
}

.lead-selection-error {
  margin: -0.75rem 0 1.25rem;
}

.guest-editor-card {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
}

.guest-editor-card > legend {
  width: auto;
  margin: 0 0 0 1rem;
  padding: 0 0.5rem;
  float: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guest-editor-card__toolbar {
  padding: 0.5rem 1.25rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.guest-editor-card__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
}

.pending-departure {
  padding: 0.4rem 0.6rem;
  color: #654f2c;
  background: #f4f0e8;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.departed-guest-notice {
  background: #f4f0e8;
  border-left: 3px solid #92764a;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
}

.guest-editor-card :disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.lead-selector {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.lead-selector input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--brand-dark);
}

.guest-input-grid {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.25rem;
}

.guest-input-grid .form-field {
  min-width: 0;
}

.overseas-editor-fields {
  min-width: 0;
  margin: 0;
  padding: 1.5rem;
  background: #f5f9fb;
  border: 0;
  border-top: 1px solid var(--line);
}

.overseas-editor-fields > legend {
  width: auto;
  margin: 0;
  padding: 0 0.5rem;
  float: none;
  color: var(--brand-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.gender-field {
  margin-bottom: 1.5rem;
  padding: 0;
  border: 0;
}

.gender-field--core {
  min-width: 0;
  margin: 0 0 1.5rem;
  padding: 0;
}

.field-label {
  display: block;
  margin: 0 0 0.55rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
}

.gender-options {
  display: flex;
  gap: 1.5rem;
}

.gender-options label {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  cursor: pointer;
}

.gender-options input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--brand-dark);
}

.gender-options input:focus {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.overseas-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1.25rem;
}

.overseas-address-field {
  grid-row: span 2;
}

.confirmation-fields {
  max-width: 42rem;
}

.safety-information-prompt {
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.safety-information-prompt .text-action {
  font-size: inherit;
}

.safety-information-unavailable {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: rgba(187, 149, 67, 0.12);
  border-left: 3px solid var(--brand);
  line-height: 1.5;
}

.confirmation-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
}

.confirmation-check input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.1rem;
  accent-color: var(--brand-dark);
}

.confirmation-check label {
  line-height: 1.5;
}

.confirmation-check .field-error {
  grid-column: 2;
}

.editor-actions,
.review-actions {
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.review-heading {
  margin-bottom: 2.5rem;
}

.review-warning {
  margin-bottom: 1.5rem;
}

.review-section {
  margin-bottom: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
}

.review-section__heading {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.review-section__heading .section-number {
  margin-bottom: 0.25rem;
}

.review-section__heading h2 {
  font-size: 1.75rem;
}

.review-empty,
.review-vehicle-list {
  margin: 1.5rem;
}

.review-empty {
  color: var(--muted);
  font-style: italic;
}

.review-guest-list {
  display: grid;
}

.review-guest {
  border-bottom: 1px solid var(--line);
}

.review-guest:last-child {
  border-bottom: 0;
}

.review-guest > header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: #f8f7f2;
}

.review-guest > header span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-guest > header h3 {
  margin: 0.2rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  font-weight: 400;
}

.review-confirmation {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-overseas-details {
  border-top: 1px solid var(--line);
}

.review-overseas-details h4 {
  margin: 0;
  padding: 1rem 1.5rem;
  color: var(--brand-dark);
  background: var(--brand-pale);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-confirmation > div {
  padding: 1.5rem;
  border-right: 1px solid var(--line);
}

.review-confirmation > div:last-child {
  border-right: 0;
}

.review-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.review-actions form,
.review-actions .primary-action {
  margin: 0;
}

.inactivity-warning {
  width: min(32rem, calc(100% - 2rem));
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 1.5rem 4rem rgba(18, 29, 35, 0.28);
}

.inactivity-warning::backdrop {
  background: rgba(18, 29, 35, 0.62);
}

.inactivity-warning__content {
  padding: clamp(1.5rem, 5vw, 2.5rem);
}

.inactivity-warning__content h2 {
  margin-bottom: 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 400;
}

.inactivity-warning__actions {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.inactivity-warning__actions .primary-action {
  margin: 0;
}

.fewer-guests-dialog {
  width: min(36rem, calc(100% - 2rem));
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 1.5rem 4rem rgba(18, 29, 35, 0.28);
}

.fewer-guests-dialog::backdrop {
  background: rgba(18, 29, 35, 0.62);
}

.fewer-guests-dialog__content {
  padding: clamp(1.5rem, 5vw, 2.5rem);
}

.fewer-guests-dialog__content h2 {
  margin-bottom: 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 400;
}

.fewer-guests-dialog__content > p:last-of-type {
  line-height: 1.6;
}

.fewer-guests-dialog__actions {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 0.75rem;
}

.fewer-guests-dialog__actions .primary-action,
.fewer-guests-dialog__actions .secondary-action {
  margin: 0;
}

.safety-information-dialog {
  width: min(48rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 1.5rem 4rem rgba(18, 29, 35, 0.28);
}

.safety-information-dialog::backdrop {
  background: rgba(18, 29, 35, 0.62);
}

.safety-information-dialog__content {
  display: flex;
  max-height: calc(100dvh - 2rem);
  flex-direction: column;
}

.safety-information-dialog__content > h2 {
  margin: 0;
  padding: clamp(1.5rem, 5vw, 2.5rem) clamp(1.5rem, 5vw, 2.5rem) 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 400;
}

.safety-information-dialog__body {
  min-height: 0;
  padding: 0 clamp(1.5rem, 5vw, 2.5rem);
  overflow-y: auto;
  line-height: 1.6;
}

.safety-information-dialog__body > :last-child {
  margin-bottom: 0;
}

.safety-information-dialog__actions {
  padding: 1.5rem clamp(1.5rem, 5vw, 2.5rem) clamp(1.5rem, 5vw, 2.5rem);
}

.safety-information-dialog__actions .primary-action {
  margin: 0;
}

@media (max-width: 36rem) {
  .inactivity-warning__actions,
  .fewer-guests-dialog__actions {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  width: min(74rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  border-top: 1px solid rgba(52, 56, 59, 0.18);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 850px) {
  .lookup-layout {
    padding-top: 2.5rem;
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .lookup-introduction {
    padding-top: 0;
  }

  .booking-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-facts > div:nth-child(2n) {
    border-right: 0;
  }

  .booking-facts > div:nth-child(4n + 1),
  .booking-facts > div:nth-child(4n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .submission-details {
    grid-template-columns: 1fr;
  }

  .submission-details > div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .submission-details > div:last-child {
    border-bottom: 0;
  }

  .editor-heading {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 540px) {
  .site-header,
  .site-main,
  .site-footer {
    width: min(100% - 2rem, 74rem);
  }

  .site-header {
    min-height: 6.5rem;
  }

  .brand-link img {
    width: 6.5rem;
    height: 4rem;
  }

  .site-header__label {
    font-size: 0.65rem;
  }

  h1 {
    font-size: 2.75rem;
  }

  .lookup-layout,
  .booking-summary {
    padding-bottom: 4rem;
  }

  .lookup-card {
    padding: 1.5rem;
    box-shadow: 0.45rem 0.45rem 0 var(--brand-pale);
  }

  .summary-card__header,
  .summary-actions,
  .section-heading,
  .editor-section__heading,
  .editor-actions,
  .review-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-actions__buttons {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .summary-actions__buttons .primary-action,
  .summary-actions__buttons .secondary-action {
    width: 100%;
    justify-content: center;
  }

  .booking-facts {
    grid-template-columns: 1fr;
  }

  .booking-facts > div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .booking-facts > div:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .booking-facts > div:last-child {
    border-bottom: 0;
  }

  .empty-registration {
    padding: 1.5rem;
  }

  .guest-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .guest-card__header-actions {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
  }

  .departure-badge span {
    white-space: normal;
  }

  .guest-facts,
  .guest-facts--overseas {
    grid-template-columns: 1fr;
  }

  .guest-facts > div,
  .guest-facts--overseas > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .guest-facts > div:last-child,
  .guest-facts--overseas > div:last-child {
    border-bottom: 0;
  }

  .guest-facts--overseas .guest-address {
    grid-column: auto;
  }

  .registration-editor,
  .registration-review {
    padding-top: 2.5rem;
  }

  .editor-booking-dates {
    gap: 1rem;
  }

  .editor-section {
    padding: 1.25rem;
  }

  .vehicle-editor-row {
    grid-template-columns: 1fr;
  }

  .vehicle-editor-row .remove-action {
    justify-self: start;
  }

  .guest-editor-card__toolbar,
  .guest-editor-card__actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .guest-input-grid {
    padding: 1.25rem;
    grid-template-columns: 1fr;
  }

  .overseas-input-grid {
    grid-template-columns: 1fr;
  }

  .overseas-address-field {
    grid-row: auto;
  }

  .review-confirmation {
    grid-template-columns: 1fr;
  }

  .review-confirmation > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .review-confirmation > div:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .lookup-spinner {
    animation: none;
  }
}


.birth-date-input::-webkit-calendar-picker-indicator {
  display: none;
}

.birth-date-picker-trigger {
  margin-top: 0.5rem;
}

.birth-date-picker {
  width: min(24rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: 1.25rem;
  border: 1px solid var(--brand-dark);
  color: var(--ink);
}

.birth-date-picker::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.birth-date-picker__navigation {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0.75rem;
}

.birth-date-picker__weekdays,
.birth-date-picker__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
}

.birth-date-picker__days {
  margin: 0.5rem 0 1rem;
}

.birth-date-picker__days button {
  min-height: 2.75rem;
  border: 1px solid #92999d;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.birth-date-picker__days button[aria-pressed="true"] {
  background: var(--brand-dark);
  color: #fff;
}

.birth-date-picker button:focus-visible {
  outline: 3px solid var(--brand-dark);
  outline-offset: 2px;
}
