:root {
  --maroon: #98181D;
  --maroon-dark: #7A1316;
  --navy: #1B3D8F;
  --cream-bg: #F7F6F1;
  --tan-section: #F0D7BD;
  --peach-section: #F3E6DA;
  --border-red: #B5433E;
  --text-dark: #2b2b2b;
  --muted: #6b6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
  background: var(--cream-bg);
  color: var(--text-dark);
}

.page {
  display: flex;
  min-height: 100vh;
}

/* ---------- Left sticky panel ---------- */
.side-panel {
  /*flex: 0 0 340px;*/
  flex: 0 0 400px;
  background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  color: #fff;
  padding: 48px 34px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.side-logo {
  width: 100%;
  max-width: 220px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 32px;
}
.side-panel h1 {
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 14px;
}
.side-copy {
  font-size: 14px;
  line-height: 1.6;
  color: #f0d7bd;
  margin-bottom: 30px;
}
.side-courses-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  font-weight: 700;
  color: #f0d7bd;
  margin-bottom: 10px;
}
.side-courses ul {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}
.side-courses li {
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.side-footnote {
  font-size: 12px;
  color: #e9c9ae;
  line-height: 1.5;
}

/* ---------- Right form panel ---------- */
.form-panel {
  flex: 1;
  padding: 48px 60px 80px;
  /*max-width: 760px;*/
  /*max-width: 960px;*/
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: 28px 30px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: 1px solid #ece5da;
}
.declaration-card {
  background: var(--peach-section);
  border: none;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-head h2 {
  font-size: 18px;
  margin: 0;
  color: var(--navy);
}
.card-note {
  color: var(--muted);
  font-size: 13px;
  margin: -8px 0 18px;
}

.field-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
}
.field-grid .field {
  flex: 0 0 calc(50% - 12px);
  max-width: calc(50% - 12px);
}
.field-full {
  flex-basis: 100% !important;
  max-width: 100% !important;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  border: 1px solid #ddd3c4;
  border-radius: 8px;
  background: #fbfaf7;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus,
.field select:focus {
  border-color: var(--maroon);
  background: #fff;
}

.other-field {
  margin-top: 18px;
}

/* Pill choices */
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pill-grid .pill {
  flex: 0 0 calc(50% - 6px);
  max-width: calc(50% - 6px);
}
.pill-grid-small .pill {
  flex: 0 0 calc(33.333% - 8px);
  max-width: calc(33.333% - 8px);
}
.pill {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #e3d7c4;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}
.pill input {
  accent-color: var(--maroon);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.pill.is-checked,
.pill:has(input:checked) {
  border-color: var(--maroon);
  background: #fbeeea;
  color: var(--maroon-dark);
}

/* Declaration */
.declaration-copy {
  color: var(--navy);
  font-style: italic;
  line-height: 1.6;
}
.check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  margin-bottom: 20px;
}
.check-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--maroon);
}
.sig-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.sig-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
}
.sig-line {
  border-bottom: 1px solid var(--navy);
  height: 34px;
}

/* Errors + submit */
.error-msg {
  display: block;
  color: #c0392b;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  min-height: 14px;
}
.form-response {
  text-align: center;
  font-weight: 700;
  margin-bottom: 16px;
}
.form-response.success { color: #1e7e34; }
.form-response.error { color: #c0392b; }

#submitBtn {
  width: 100%;
  background: var(--maroon);
  color: #fff;
  border: none;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.4px;
  transition: background 0.2s ease;
}
#submitBtn:hover { background: var(--maroon-dark); }
#submitBtn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Responsive */
@media (max-width: 900px) {
  .page { flex-direction: column; }
  .side-panel {
    position: static;
    height: auto;
    flex: none;
  }
  .form-panel {
    padding: 32px 20px 60px;
    max-width: 100%;
  }
}
@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
  .pill-grid { grid-template-columns: 1fr; }
  .pill-grid-small { grid-template-columns: 1fr 1fr; }
  .sig-grid { grid-template-columns: 1fr; gap: 14px; }
}
