:root {
  --cream: #1a1916;
  --surface: #201f1c;
  --charcoal: #e8e5de;
  --off-white: #1a1916;
  --border-light: #2e2c28;
  --border-strong: #3a3834;
  --muted: #9a9a98;
  --muted-soft: #6e6c68;
  --accent: #c9a36a;
  --accent-soft: rgba(201, 163, 106, 0.14);
  --charcoal-40: rgba(232, 229, 222, 0.35);
  --charcoal-04: rgba(232, 229, 222, 0.06);
  --ring-blue: rgba(59, 130, 246, 0.5);
  --danger: #e06c5a;
  --shadow-inset:
    rgba(255, 255, 255, 0.1) 0 0.5px 0 0 inset,
    rgba(0, 0, 0, 0.4) 0 0 0 0.5px inset,
    rgba(0, 0, 0, 0.2) 0 1px 2px 0;
  --font-primary: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1200px 600px at 80% -20%, rgba(201, 163, 106, 0.06), transparent 60%),
    radial-gradient(800px 500px at -10% 10%, rgba(201, 163, 106, 0.04), transparent 60%),
    var(--cream);
}

/* HERO */
.hero {
  padding: 56px 24px 28px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: 44px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -1.2px;
  color: var(--charcoal);
  margin-bottom: 14px;
}
.hero p {
  font-size: 16px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

/* MAIN */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 20px 48px;
}

/* PERSON BLOCK */
.person-block {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
}

.person-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.person-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.person-title .person-number {
  color: var(--charcoal);
  font-weight: 600;
}

.remove-person {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
}
.remove-person:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* NAME */
.name-row {
  margin-bottom: 20px;
}

.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.name-input,
.notes-input {
  width: 100%;
  background: var(--cream);
  color: var(--charcoal);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.name-input::placeholder,
.notes-input::placeholder {
  color: var(--muted-soft);
}
.name-input:focus,
.notes-input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--ring-blue);
}

/* COURSES GRID */
.courses {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 860px) {
  .courses {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

.course {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.course legend {
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 10px;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* OPTION as compact clickable row */
.option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--cream);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.option:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.015);
}
.option:active {
  transform: translateY(1px);
}
.option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.option-dot {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  margin-top: 3px;
  position: relative;
  transition: border-color 0.15s;
}
.option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.option:has(input:checked) .option-dot {
  border-color: var(--accent);
}
.option:has(input:checked) .option-dot::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  background: var(--accent);
  border-radius: 999px;
}
.option:focus-within {
  box-shadow: 0 0 0 2px var(--ring-blue);
  border-color: transparent;
}
.option-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
  min-width: 0;
}
.option-body strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: -0.1px;
}
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
  background: rgba(125, 187, 133, 0.14);
  color: #8dc795;
  border: 1px solid rgba(125, 187, 133, 0.3);
  width: fit-content;
}
.option-body small {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* NOTES as accordion */
.notes {
  margin-top: 10px;
}
.notes summary {
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 0;
  user-select: none;
  transition: color 0.15s;
}
.notes summary::-webkit-details-marker {
  display: none;
}
.notes summary::before {
  content: "+ ";
  font-weight: 600;
  color: var(--accent);
}
.notes[open] summary::before {
  content: "− ";
}
.notes summary:hover {
  color: var(--charcoal);
}
.notes input {
  margin-top: 8px;
  font-size: 14px;
  padding: 10px 12px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
  text-decoration: none;
  letter-spacing: -0.1px;
}
.btn-primary {
  background: var(--charcoal);
  color: var(--off-white);
  box-shadow: var(--shadow-inset);
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
}
.btn-primary:hover {
  opacity: 0.88;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--charcoal-40);
}
.btn-ghost:hover {
  border-color: var(--charcoal);
  background: var(--charcoal-04);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}
.actions .btn {
  width: 100%;
  max-width: 340px;
}

.status {
  text-align: center;
  margin-top: 14px;
  min-height: 1.4em;
  font-size: 14px;
  font-weight: 500;
}
.status.error {
  color: var(--danger);
}
.status.success {
  color: #7dbb85;
}

/* SUCCESS CARD */
.success-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 40px 28px;
  border-radius: 16px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.success-card .check {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 28px;
  font-weight: 600;
}
.success-card h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-bottom: 10px;
}
.success-card p {
  color: var(--muted);
  font-size: 15px;
}

/* FOOTER */
footer {
  text-align: center;
  color: var(--muted-soft);
  font-size: 12px;
  padding: 24px 20px 36px;
  letter-spacing: 0.2px;
}

/* Responsive tweaks */
@media (min-width: 860px) {
  .hero {
    padding: 80px 24px 40px;
  }
  .hero h1 {
    font-size: 56px;
    letter-spacing: -1.5px;
  }
  .person-block {
    padding: 28px;
  }
  .actions {
    flex-direction: row-reverse;
    justify-content: center;
  }
  .actions .btn {
    width: auto;
  }
}
