/* Expansion Path Academy — registration journey + admin dashboard */

:root {
  --navy: #0f2c52;
  --navy-700: #16406f;
  --navy-100: #e8eef6;
  /* Sampled from the academy logo. The darker tone is for text: pure #ff6e03
     on white is only ~2.9:1 and too faint to read at label sizes. */
  --brand: #ff6e03;
  --brand-ink: #b8500a;
  --ink: #16202e;
  --muted: #5d6b7f;
  --line: #dde4ed;
  --bg: #f4f6fa;
  --white: #fff;
  --danger: #c0392b;
  --ok: #17805a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 54, .05), 0 12px 32px rgba(16, 32, 54, .08);
  --font: "Segoe UI", Roboto, "Helvetica Neue", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- brand bar */

.brandbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

/* The logo is a full lockup with the academy name in it, so no text beside it. */
.brandbar-logo {
  height: 34px;
  width: auto;
  max-width: 62%;
  flex: none;
}

.brandbar-program {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

@media (max-width: 460px) {
  .brandbar-logo { height: 28px; }
  .brandbar-program { font-size: 11px; padding-left: 10px; }
}

/* ---------------------------------------------------------------- progress */

.progress {
  position: sticky;
  top: 59px; /* clears the brand bar: 12px padding + 34px logo + 12px + 1px border */
  z-index: 19;
  background: var(--bg);
  padding: 12px 20px 4px;
}

@media (max-width: 460px) {
  .progress { top: 53px; }
}

.progress-track {
  height: 5px;
  background: var(--navy-100);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--navy-700), var(--brand));
  border-radius: 99px;
  transition: width .32s cubic-bezier(.4, 0, .2, 1);
}

.progress-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: .02em;
}

/* ---------------------------------------------------------------- stage */

.stage {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 20px 140px;
}

.step { animation: rise .34s cubic-bezier(.2, .7, .3, 1); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .step { animation: none; }
  .progress-fill { transition: none; }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--brand-ink);
  text-transform: uppercase;
}

.question {
  margin: 0 0 6px;
  font-size: 23px;
  line-height: 1.28;
  font-weight: 650;
  color: var(--navy);
  letter-spacing: -.01em;
}

.step-hint { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- intro */

.card-intro h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.24;
  color: var(--navy);
  letter-spacing: -.02em;
}

.lede { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

.inclusions {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.inclusions li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  color: var(--ink);
}

.inclusions li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--ok);
  font-weight: 700;
}

.keyhint { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }

kbd {
  font: inherit;
  font-size: 11.5px;
  background: var(--navy-100);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ---------------------------------------------------------------- fields */

.fields { margin-top: 22px; display: grid; gap: 20px; }
.field[hidden] { display: none; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: .01em;
}

.field-label.is-optional .req { display: none; }
.req { color: var(--brand); }

input[type=text], input[type=tel], input[type=email], input[type=date],
input[type=number], input[type=password], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fcfdff;
  transition: border-color .16s, box-shadow .16s;
  min-height: 50px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3.5px rgba(22, 64, 111, .13);
}

.select-wrap { position: relative; }

.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

select { appearance: none; -webkit-appearance: none; padding-right: 38px; }

.field.has-error input, .field.has-error select, .field.has-error textarea {
  border-color: var(--danger);
  background: #fffafa;
}

.field-error {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--danger);
  min-height: 0;
}

.field-error:empty { display: none; }
.field-hint { margin: 7px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- choices */

.choices { border: 0; margin: 0; padding: 0; }
.choices legend { padding: 0; }
.choice-group { display: grid; gap: 9px; }
.choice-group[hidden] { display: none; }

/* Short labels such as target years read better side by side than stacked. */
.choice-group--grid { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.choice-group--grid .choice { justify-content: center; gap: 9px; padding: 14px 10px; }
.choice-group--grid .choice-key { display: none; }
.choice-group--grid .choice-text { font-weight: 600; letter-spacing: .01em; }

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fcfdff;
  cursor: pointer;
  font-size: 16px;
  transition: border-color .14s, background .14s;
}

.choice:hover { border-color: var(--navy-700); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice-key {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--navy-100);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.choice:has(input:checked) {
  border-color: var(--navy);
  background: var(--navy-100);
  box-shadow: 0 0 0 3px rgba(22, 64, 111, .1);
}

.choice:has(input:checked) .choice-key { background: var(--navy); color: #fff; }
.choice:has(input:focus-visible) { border-color: var(--navy-700); }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  cursor: pointer;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: #fcfdff;
}

.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--navy); }
.check:has(input:checked) { border-color: var(--ok); background: #f2fbf7; }

/* ---------------------------------------------------------- terms */

.terms {
  margin-top: 18px;
  padding: 18px 20px;
  background: #fafbfd;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  font-size: 14px;
  color: #35435a;
  max-height: 46vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.terms-block + .terms-block { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }

.terms-block h4 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
}

.terms-block p { margin: 0 0 8px; }
.terms-block p:last-child { margin-bottom: 0; }
.terms-block ul { margin: 6px 0 0; padding-left: 20px; }
.terms-block li { margin-bottom: 4px; }
.terms-note { margin-top: 9px; font-style: italic; color: var(--muted); }

/* ---------------------------------------------------------------- review */

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

.review-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  width: 100%;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.review-row:hover { background: #f8fafd; }
.review-label { font-size: 13px; color: var(--muted); flex: none; max-width: 45%; }
.review-value { font-size: 15px; font-weight: 550; text-align: right; word-break: break-word; }
.review-row.is-missing .review-value { color: var(--danger); }
.form-error { margin-top: 16px; font-size: 14px; }

/* ---------------------------------------------------------------- done */

.card-done { text-align: center; }

.tick {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #e7f7f0;
  color: var(--ok);
  font-size: 32px;
  display: grid;
  place-items: center;
}

.card-done h2 { margin: 0 0 8px; color: var(--navy); font-size: 25px; }

.regno {
  margin: 22px 0 8px;
  padding: 16px;
  border: 1.5px dashed var(--navy-100);
  border-radius: 12px;
  background: #fbfcfe;
}

.regno span { display: block; font-size: 11px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.regno strong { display: block; font-size: 24px; color: var(--navy); letter-spacing: .02em; margin-top: 4px; }
.done-name { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; }
.done-actions { display: grid; gap: 10px; }
.inclusions-done { margin-top: 26px; text-align: left; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 50px;
  transition: background .15s, border-color .15s, opacity .15s;
}

.btn-lg { width: 100%; font-size: 16px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); background: #fff; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c8c2; }
.btn-danger:hover { background: #fff5f4; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 13.5px; }

/* ---------------------------------------------------------------- navbar */

.navbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: flex;
  gap: 12px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}

.navbar .btn-primary { flex: 1; }
.navbar .btn-ghost { flex: none; min-width: 96px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- footer */

.sitefoot {
  display: none;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 24px 20px 40px;
}

.sitefoot strong { display: block; letter-spacing: .04em; color: #3d4a5d; }
.sitefoot span { display: block; }

@media (min-width: 700px) {
  .sitefoot { display: block; }
  .journey-body .stage { padding-bottom: 110px; }
}

/* ================================================================= admin */

.admin-body { background: var(--bg); }

.admin-shell { max-width: 1240px; margin: 0 auto; padding: 22px 20px 60px; }

.admin-top {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.admin-top h1 { margin: 0; font-size: 21px; color: var(--navy); }
.admin-top .sub { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }

.stat {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.stat span { display: block; font-size: 11px; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.stat strong { display: block; font-size: 24px; color: var(--navy); margin-top: 5px; letter-spacing: -.01em; }

.filters {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}

.filters .field-label { margin-bottom: 5px; }
.filters input, .filters select { font-size: 15px; min-height: 44px; padding: 10px 12px; }
.filters .filter-actions { display: flex; gap: 8px; }

.table-wrap { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow-x: auto; }

table.records { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 900px; }

table.records th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: #fbfcfe;
}

table.records th a { color: inherit; text-decoration: none; }
table.records th a:hover { color: var(--navy); }
table.records td { padding: 13px 14px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
table.records tr:last-child td { border-bottom: 0; }
table.records tr:hover td { background: #fafcff; }
.cell-reg { font-weight: 650; color: var(--navy); white-space: nowrap; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.row-actions { display: flex; gap: 6px; white-space: nowrap; align-items: center; }
.row-actions form { display: flex; margin: 0; }

.badge {
  display: inline-block;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--navy-100);
  color: var(--navy-700);
  white-space: nowrap;
}

.badge-year { background: #fdeee1; color: var(--brand-ink); }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); }

.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 20px; font-size: 14px; color: var(--muted); }

.login-wrap { max-width: 400px; margin: 8vh auto; padding: 0 20px; }
.login-wrap .card { text-align: left; }
.login-wrap h1 { margin: 0 0 6px; font-size: 22px; color: var(--navy); }
.login-logo { display: block; height: 38px; width: auto; max-width: 100%; margin: 0 0 20px; }

.notice {
  padding: 12px 15px;
  border-radius: 9px;
  font-size: 14px;
  margin-bottom: 18px;
}

.notice-ok { background: #eef9f4; color: #14624a; border: 1px solid #c7ebdb; }
.notice-err { background: #fdf1f0; color: #8c2f22; border: 1px solid #f2cfca; }

.edit-grid { display: grid; gap: 26px; }

.edit-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 22px 22px 24px;
}

.edit-section h2 {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--brand-ink);
}

.edit-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 16px; }
.edit-fields .choice-group { gap: 7px; }
.edit-fields .choice { padding: 10px 13px; font-size: 15px; }
.sticky-save { position: sticky; bottom: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 14px 0; margin-top: 8px; display: flex; gap: 10px; justify-content: flex-end; }

.meta-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; font-size: 13px; }
.meta-list div span { display: block; color: var(--muted); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
