html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { color: var(--ink); }
button, input, select, textarea { font: inherit; }
button:disabled { cursor: wait; opacity: .6; }
[hidden] { display: none !important; }
[data-spacing="22"] { margin-top: 22px; }
[data-spacing="16"], .mt16 { margin-top: 16px; }
[data-spacing="18"] { margin-top: 18px; }
[data-white] { color: #fff; }

.skip-link { position: fixed; top: -100px; inset-inline-start: 20px; z-index: 100; padding: 12px 16px; border-radius: 10px; color: var(--navy); background: #fff; box-shadow: var(--shadow-md); font-weight: 800; }
.skip-link:focus { top: 10px; }
.preview-note { padding: 10px 16px; color: #003d7f; background: #e2f5fa; text-align: center; font: 700 13px var(--ar); }

#register { position: relative; overflow: clip; isolation: isolate; background: linear-gradient(180deg, #f8fbfd 0%, #f1f7fb 100%); }
#register::before { content: ""; position: absolute; z-index: 0; pointer-events: none; width: 420px; height: 420px; inset-inline-end: -250px; top: 100px; border: 1px solid rgba(1,148,180,.08); border-radius: 50%; box-shadow: 0 0 0 78px rgba(1,148,180,.025); }
.form-heading { position: relative; z-index: 1; max-width: 800px; margin-bottom: 42px; }
.registration-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(24px, 4vw, 46px); align-items: start; }

.registration-aside {
  position: sticky;
  top: 102px;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}
.registration-aside::after { content: ""; position: absolute; width: 120px; height: 120px; inset-inline-end: -60px; bottom: -60px; border: 1px solid rgba(1,148,180,.12); border-radius: 50%; }
.registration-logos { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 24px; }
.registration-logos img { object-fit: contain; background: transparent; }
.registration-logos .ucas-logo { width: 68px; height: 68px; }
.registration-logos .incubator-logo { width: 62px; height: 62px; transform: translateX(-4px); }
.registration-aside p { position: relative; margin: 0; padding-inline-start: 20px; line-height: 1.75; }
.registration-aside p::before { content: ""; position: absolute; inset-inline-start: 0; top: .75em; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(1,148,180,.07); }
.registration-aside p + p { margin-top: 16px; }
.registration-aside a { display: inline-flex; margin-top: 23px; color: var(--navy); font-weight: 800; text-decoration: none; }
.registration-aside a:hover { text-decoration: underline; }

.form-card {
  min-width: 0;
  overflow: hidden;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 34px 75px -52px rgba(0,61,127,.45), inset 0 1px 0 rgba(255,255,255,.9);
}
.form-progress { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.form-progress::before { content: ""; position: absolute; inset-inline: 5%; top: 18px; z-index: 0; height: 1px; background: var(--line); }
.form-progress li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: 9px; padding: 0 5px 14px; color: var(--muted-2); border-bottom: 2px solid transparent; font-size: 13px; line-height: 1.55; transition: color .18s ease, border-color .18s ease; }
.form-progress li[aria-current] { color: var(--navy); border-color: var(--teal); font-weight: 800; }
.step-number { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 12px; color: #60768a; background: #fff; box-shadow: 0 7px 18px -16px rgba(0,61,127,.55); font-family: var(--en-display); font-size: 12px; font-weight: 800; }
[aria-current] .step-number { color: #fff; border-color: var(--navy); background: linear-gradient(145deg, var(--navy), #075992); box-shadow: 0 11px 22px -14px rgba(0,61,127,.85); }

.form-step h3 { margin-top: 24px; color: #16324d; font-size: clamp(23px, 2.4vw, 29px); font-weight: 800; }
.step-description { max-width: 66ch; margin: 8px 0 28px !important; color: var(--muted); font-size: 14px; line-height: 1.75; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.form-field { min-width: 0; }
.full { grid-column: 1 / -1; }
.form-field > label, legend { display: block; margin-bottom: 8px; color: #243b52; font-size: 14px; font-weight: 800; }
.form-field small { margin-inline-start: 4px; color: #8192a3; font-size: 11px; font-weight: 600; }
.form-field b { color: var(--teal); }
.form-field input:not([type=checkbox]), .form-field select, .form-field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid #c6d5e2;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-size: 15px;
  box-shadow: 0 1px 0 rgba(0,35,76,.015);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.form-field input:hover, .form-field select:hover, .form-field textarea:hover { border-color: #aebfce; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(1,148,180,.11); background: #fff; }
.form-field textarea { min-height: 118px; resize: vertical; }
.form-field input[type=file] { padding: 10px; border-style: dashed; background: #f9fcfd; cursor: pointer; }
.form-field input[type=file]::file-selector-button { margin-inline-end: 10px; padding: 8px 12px; border: 0; border-radius: 9px; color: var(--navy); background: #eaf4f8; font-weight: 800; cursor: pointer; }
.input-help { margin: 0 0 10px !important; color: var(--muted); font-size: 13px; line-height: 1.7; }

.choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.choice {
  position: relative;
  display: flex !important;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  margin: 0 !important;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #344b61;
  background: #fff;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600 !important;
  line-height: 1.65;
  word-break: break-word;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.choice:hover { transform: translateY(-1px); border-color: #b8cedc; box-shadow: 0 12px 24px -22px rgba(0,61,127,.45); }
.choice:has(input:checked) { border-color: rgba(1,148,180,.58); background: linear-gradient(145deg, #f7fcfd, #edf9fb); box-shadow: 0 0 0 2px rgba(1,148,180,.06); }
.choice input { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--navy); }
.choice.toggle { padding: 16px; }
.choice.toggle span { color: #2c4359; }

.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 11px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-actions #form-back { margin-inline-end: auto; }
.form-actions .btn { min-width: 126px; }
.field-error { margin-top: 6px; color: var(--danger); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.field-error:empty { display: none; }
[aria-invalid=true] { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(165,31,50,.08) !important; }
#form-status:not(:empty) { max-width: 100%; margin-top: 20px; padding: 13px 15px; border: 1px solid #f1cbd0; border-radius: 12px; color: var(--danger); background: #fff6f7; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.honeypot {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.honeypot label,
.honeypot input {
  width: 1px;
  min-width: 0;
  max-width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
}

#privacy { padding-block: 54px; background: #fff; }
.privacy { max-width: 900px; }
.privacy p { margin-top: 14px; color: var(--muted); font-size: 14px; }
.privacy a { color: var(--navy); font-weight: 700; }
.foot-contact a { overflow-wrap: anywhere; }
#form-success { padding: 48px 10px; text-align: center; }
#form-success p { max-width: 52ch; margin: 18px auto 0; color: var(--muted); }
.success-mark { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 22px; border-radius: 22px; color: #fff; background: linear-gradient(145deg, var(--navy), var(--teal)); box-shadow: 0 18px 38px -24px rgba(0,61,127,.68); font-size: 30px; font-weight: 800; }
#captcha-wrap { max-width: 100%; margin-top: 20px; overflow: hidden; }

.action-page { min-height: 100vh; display: grid; place-items: center; margin: 0; padding: 24px; font-family: var(--ar); background: radial-gradient(circle at top, #f9fcfe, #edf5fa); }
.action-card { width: min(650px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 26px; background: #fff; text-align: center; box-shadow: var(--shadow-md); }
.action-card > img { width: 230px; max-width: 100%; height: auto; margin: 0 auto 30px; }
.action-card h1 { color: var(--navy-900); font-size: 28px; }
.action-card p { margin: 20px 0; color: var(--muted); line-height: 1.9; }
.action-card .btn { color: #fff; background: var(--navy); }
.action-card form { margin: 24px 0; }
.action-card a { color: var(--navy); }

#page[dir=ltr] .form-progress { letter-spacing: 0; }
#page[dir=ltr] .choice { line-height: 1.58; }

@media (max-width: 1040px) {
  .registration-layout { grid-template-columns: 1fr; }
  .registration-aside { position: static; display: grid; grid-template-columns: 118px 1fr; gap: 7px 20px; }
  .registration-logos { grid-row: 1 / 5; align-self: start; margin: 0; }
  .registration-logos .ucas-logo { width: 58px; height: 58px; }
  .registration-logos .incubator-logo { width: 54px; height: 54px; }
  .registration-aside p { margin: 0 0 7px; }
  .registration-aside p + p { margin-top: 0; }
  .registration-aside a { grid-column: 2; margin-top: 5px; }
}

@media (max-width: 720px) {
  .form-grid, .choice-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px 17px; border-radius: 22px; }
  .registration-layout { gap: 22px; }
  .registration-aside { grid-template-columns: 98px 1fr; padding: 20px; }
  .registration-logos .ucas-logo { width: 48px; height: 48px; }
  .registration-logos .incubator-logo { width: 45px; height: 45px; }
  .form-progress { gap: 6px; }
  .form-progress li { font-size: 11px; padding-inline: 2px; }
  .step-number { width: 32px; height: 32px; border-radius: 10px; }
  .form-progress::before { top: 16px; }
}

@media (max-width: 500px) {
  .registration-aside { display: block; }
  .registration-logos { margin-bottom: 18px; }
  .registration-aside p + p { margin-top: 13px; }
  .registration-aside a { margin-top: 18px; }
  .form-progress { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .form-progress li > span:last-child { display: none; }
  .form-progress li { align-items: center; border-bottom: 0; padding-bottom: 2px; }
  .form-progress li[aria-current] .step-number { box-shadow: 0 0 0 5px rgba(1,148,180,.08); }
  .form-actions { flex-direction: column-reverse; }
  .form-actions > * { width: 100%; }
  .form-actions #form-back { margin-inline-end: 0; }
  .field-error, #form-status:not(:empty) { font-size: 12.5px; }
  .action-card { padding: 30px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
