:root {
  --purple: #5C2966;
  --dark: #5C2966;
  --light: #f5f0f8;
  --text: #28252c;
  --muted: #66616c;
  --border: #ded8e4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: #f7f7f9;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

header {
  background: var(--purple);
  color: white;
  padding: 20px 24px;
}

.header-inner {
  max-width: 820px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.brand {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -2px;
}

.brand span { color: #dfb9f4; }
.header-caption { font-size: 14px; }

main {
  max-width: 820px;
  margin: 30px auto;
  padding: 0 20px;
}

.intro { margin-bottom: 28px; }

.eyebrow {
  color: var(--purple);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 2px;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
  color: var(--dark);
  margin: 12px 0 18px;
}

h2 {
  font-size: 20px;
  color: var(--dark);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  font-size: 14px;
}

.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px #00000005;
}

.booking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.booking-item {
  background: var(--light);
  border-radius: 7px;
  padding: 12px;
  overflow-wrap: anywhere;
}

.booking-item strong {
  display: block;
  font-size: 12px;
  color: var(--purple);
  margin-bottom: 4px;
}

.notice {
  background: var(--light);
  border-left: 3px solid var(--purple);
  padding: 14px;
  margin-top: 18px;
  font-size: 14px;
}

label:not(.choice):not(.upload-button) {
  display: block;
  font-weight: 600;
  margin: 18px 0 7px;
}

input:not([type=checkbox]):not([type=radio]):not([type=file]),
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #bdb6c5;
  border-radius: 7px;
  font: inherit;
  background: white;
}

textarea { resize: vertical; }

input:focus, textarea:focus, button:focus-visible,
.upload-button:focus-within {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  margin: 8px 0;
  cursor: pointer;
}

.choice:has(input:checked) {
  background: var(--light);
  border-color: var(--purple);
}

input[type=checkbox], input[type=radio] {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  accent-color: var(--purple);
  margin: 3px 0 0;
}

.hazard-group { margin: 24px 0; }

.hazard-group h3 {
  font-size: 15px;
  color: var(--purple);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.hazard-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.required { color: #a02540; }
.centre { text-align: center; }

#filePicker {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-button, .primary {
  display: inline-block;
  background: var(--purple);
  color: white;
  padding: 14px 20px;
  border-radius: 7px;
  border: 0;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.primary {
  width: 100%;
  padding: 18px;
}

.primary:disabled { opacity: .6; cursor: wait; }

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--light);
  margin: 8px 0;
  border-radius: 7px;
  overflow-wrap: anywhere;
}

.remove-file {
  border: 0;
  background: transparent;
  color: #a02540;
  cursor: pointer;
  padding: 8px;
  font-weight: bold;
}

.message {
  padding: 15px;
  border-radius: 7px;
  margin: 15px 0;
}

.error {
  background: #fff0f0;
  border: 1px solid #e5b4b4;
  color: #8a2020;
}

.success {
  text-align: center;
  padding: 40px 25px;
}

.success-icon {
  color: #26744a;
  font-size: 50px;
}

.reference {
  background: var(--light);
  color: var(--purple);
  font-size: 22px;
  font-weight: bold;
  padding: 20px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

footer {
  text-align: center;
  background: var(--dark);
  color: white;
  padding: 28px;
  margin-top: 45px;
}

footer strong { font-size: 26px; }
footer p { margin: 7px 0; }
footer a { color: white; }

@media (max-width: 600px) {
  main { padding: 0 12px; margin-top: 20px; }
  .panel { padding: 18px; }
  .booking-grid, .hazard-options {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 27px; }
  h2 { font-size: 18px; }
  .header-caption { font-size: 12px; text-align: right; }
}
