:root {
  --primary: #203b73;
  --accent: #f7b731;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #657188;
  --border: #dfe5f1;
  --danger: #c62828;
  --success: #1e8e3e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #eef3ff, #fff7df);
  color: var(--text);
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Layout */
.page-shell {
  width: min(1100px, 92%);
  margin: 0 auto;
  padding: 34px 0 60px;
}
.page-shell.narrow {
  width: min(760px, 92%);
}

/* Cards */
.hero-card,
.form-card,
.success-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(32, 59, 115, 0.12);
}

/* ─── Hero ─── */
.hero-card {
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 28px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, var(--primary), #365da6);
  color: #fff;
}
.hero-left {
  flex: 1;
}
.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  flex-shrink: 0;
}
.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.78rem;
  margin: 0 0 8px;
  color: #ffe7a3;
}
.hero-card h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0 0 10px;
}
.intro {
  margin: 0;
  max-width: 680px;
  color: #eef3ff;
}
.hero-hint {
  color: #ffe7a3;
  margin: 8px 0 0;
  font-size: 0.9rem;
}
.date-pill {
  background: #fff;
  color: var(--primary);
  font-weight: 800;
  border-radius: 999px;
  padding: 12px 18px;
  white-space: nowrap;
  text-align: center;
}

/* Camp days card in hero */
.camp-days-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 18px;
  padding: 18px 22px;
  width: 100%;
  min-width: 200px;
}
.camp-days-card h2 {
  color: #ffe7a3;
  font-size: 1rem;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.camp-days-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.camp-days-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.camp-days-list li:last-child {
  border-bottom: none;
}
.camp-days-list li::before {
  content: "📅";
  font-size: 0.85rem;
}

/* ─── Form card ─── */
.form-card {
  padding: 28px;
}

/* Fieldset reset */
fieldset.form-section {
  border: none;
  padding: 22px 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
fieldset.form-section:first-child {
  padding-top: 0;
}
fieldset.form-section:last-of-type {
  border-bottom: 0;
}
.fieldset-legend {
  float: left;
  width: 100%;
  padding: 0;
}
.fieldset-legend + * {
  clear: both;
}

/* Clear float after every fieldset legend so content takes full width */
fieldset.form-section::after {
  content: "";
  display: table;
  clear: both;
}

/* Ensure checkbox grid and inner content always take full width */
fieldset.form-section > .hint,
fieldset.form-section > .field-error,
fieldset.form-section > .checkbox-grid,
fieldset.form-section > .field,
fieldset.form-section > .grid,
fieldset.form-section > .radio-row,
fieldset.form-section > p,
fieldset.form-section > a {
  clear: both;
  width: 100%;
}

/* Prevent checkbox grid items from overflowing */
.checkbox-grid {
  overflow: hidden;
}

.choice {
  min-width: 0;
  word-break: break-word;
}

.fieldset-legend h2 {
  font-size: 1.2rem;
  margin: 0 0 16px;
  color: var(--primary);
}

/* Fields */
.field {
  margin-bottom: 16px;
}
.field:last-child {
  margin-bottom: 0;
}
label {
  display: block;
  font-weight: 700;
  margin-bottom: 7px;
}
label span {
  color: var(--danger);
}
h2 span {
  color: var(--danger);
}
input,
select {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s, outline-color 0.2s;
}
input:focus,
select:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.grid .field {
  margin-bottom: 0;
}
.grid.two {
  grid-template-columns: repeat(2, 1fr);
}
.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

/* Hints */
.hint {
  color: var(--muted);
  margin-top: -8px;
  margin-bottom: 12px;
}

/* Inline field errors */
.field-error {
  color: var(--danger);
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0 0 12px;
  padding: 10px 14px;
  background: #fff5f5;
  border: 1px solid #f5c6c6;
  border-radius: 10px;
  display: none;
}
.field-error.visible {
  display: block;
}

/* Checkbox & radio groups */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
  background: #fafcff;
  font-weight: 700;
  margin: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.choice:hover {
  background: #f0f4ff;
}
.choice input {
  width: auto;
  margin: 3px 0 0;
}
.choice input:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.choice.highlight {
  background: #fff8df;
  border-color: #f4cf65;
}
.radio-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 15px;
}

/* Policy box */
.policy-box {
  background: #f8fbff;
  padding: 22px !important;
  border: 1px solid var(--border);
  border-radius: 18px;
}
.policy-link {
  display: inline-block;
  margin: 6px 0 10px;
  font-weight: 800;
  color: var(--primary);
}
.policy-link:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Buttons */
.submit-btn {
  width: 100%;
  border: none;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  padding: 16px 22px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}
.submit-btn:hover {
  background: #162d5b;
}
.submit-btn:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.inline-btn {
  width: auto;
  margin-top: 12px;
}
.form-actions {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.form-actions .submit-btn {
  flex: 1 1 200px;
}
.secondary-btn {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.secondary-btn:hover {
  background: #eef3ff;
}

/* Footer */
.form-footer {
  text-align: center;
  color: var(--muted);
  margin-top: 22px;
  font-weight: 600;
}

/* Success page */
.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.success-card {
  text-align: center;
  padding: 42px;
}
.success-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  font-weight: 900;
}
.success-card h1 {
  color: var(--primary);
  margin: 0 0 10px;
}

/* Error page */
.error-card {
  padding: 42px;
}
.error-list {
  text-align: left;
  margin: 6px auto 18px;
  max-width: 520px;
  padding-left: 20px;
  color: var(--danger);
}
.error-list li {
  margin-bottom: 8px;
  font-weight: 600;
}

/* Content pages */
.content-page p {
  color: var(--muted);
}

/* ─── Responsive ─── */
@media (max-width: 760px) {
  .page-shell {
    width: 94%;
    padding: 18px 0 40px;
  }
  .hero-card {
    flex-direction: column;
    align-items: stretch;
    padding: 22px;
    border-radius: 20px;
  }
  .hero-right {
    align-items: stretch;
  }
  .date-pill {
    white-space: normal;
  }
  .camp-days-card {
    min-width: unset;
  }
  .form-card {
    padding: 20px;
    border-radius: 20px;
  }
  .grid.two,
  .grid.three,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
  .radio-row {
    flex-direction: column;
  }
  .submit-btn {
    padding: 15px;
  }
  .success-card {
    padding: 28px;
  }
  .form-actions {
    flex-direction: column;
  }
}