:root {
  --bg-1: #f7f3ff;
  --bg-2: #dbe8ff;
  --ink: #10131d;
  --muted: #516173;
  --card: #ffffff;
  --line: #d9dfea;
  --brand: #6f2dbd;
  --brand-2: #0f3f92;
  --accent: #f4c318;
  --danger: #b61d2b;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(14, 25, 48, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Archivo", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(111, 45, 189, 0.22), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(15, 63, 146, 0.18), transparent 26%),
    radial-gradient(circle at 82% 88%, rgba(244, 195, 24, 0.2), transparent 24%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-items: safe center;
  justify-items: safe center;
  padding: 18px;
}

.registration-closed-notice {
  display: none;
}

.registration-is-closed .card {
  display: none;
}

.registration-is-closed .registration-closed-notice {
  display: block;
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(17, 19, 29, 0.08);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}

.registration-closed-notice__image {
  display: block;
  width: 100%;
  height: auto;
}

.registration-closed-notice__content {
  padding: 24px;
}

.registration-closed-notice__content h1 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
}

.registration-closed-notice__content p:not(.eyebrow) {
  margin: 0 auto 20px;
  max-width: 46ch;
  color: var(--muted);
  line-height: 1.6;
}

.card {
  width: min(1200px, 100%);
  background: var(--card);
  border: 1px solid rgba(17, 19, 29, 0.08);
  border-radius: 28px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #f8f9ff);
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}

.hero-copy {
  padding: 18px 18px 8px;
}

.hero-copy h1,
.card-header h1 {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.75rem, 2.5vw, 2.35rem);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 700;
  font-size: 0.76rem;
  color: #000;
  font-style: italic;
  text-align: center;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 68ch;
  line-height: 1.5;
}

.error-msg {
  min-height: 1.25em;
  margin: 14px 2px 0;
  color: var(--danger);
  font-weight: 600;
}

.progress-wrap {
  margin: 12px 2px 0;
}

.progress-bar {
  height: 11px;
  border-radius: 999px;
  background: #ebeff7;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--brand));
  transition: width 160ms ease;
}

.progress-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.registration-form,
#registration-form {
  margin-top: 14px;
}

.sections-grid {
  display: block;
}

.form-section {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  display: none;
  margin-bottom: 24px;
}

.form-section.is-current {
  display: block;
}

.form-section.is-muted {
  background: linear-gradient(180deg, #fbfbfe, #f7f9fd);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.section-header h2 {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
}

.section-helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid--one {
  grid-template-columns: 1fr;
}

.field-group {
  display: grid;
  gap: 7px;
}

.field-group label,
.toggle-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.field-group .required {
  color: var(--danger);
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.field-group textarea {
  min-height: 110px;
  resize: vertical;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(111, 45, 189, 0.12);
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: #8a94a6;
}

.inline-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 2px 0 0;
}

.inline-toggle input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 10px 0 0;
}

.player-card {
  border: 1px solid rgba(111, 45, 189, 0.12);
  background: linear-gradient(180deg, rgba(111, 45, 189, 0.04), #fff);
}

.hidden {
  display: none !important;
}

.form-footer {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  padding: 6px 2px 2px;
}

.wizard-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.wizard-actions .btn {
  flex: 0 0 auto;
  width: auto;
  min-height: 44px;
}

.skip-btn {
  border-style: dashed;
}

.btn-ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.btn {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 63, 146, 0.2);
}

.btn-primary:hover {
  filter: brightness(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.footer-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 70ch;
}

.flow-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(111, 45, 189, 0.22);
  background: rgba(111, 45, 189, 0.08);
  color: #2f2457;
  font-weight: 600;
  font-size: 0.92rem;
}

.checkbox-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.checkbox-group-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
}

.checkbox-group-option input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

.checkbox-group-option span {
  display: block;
  line-height: 1.35;
}

.agreement-doc-links {
  margin: 6px 0 0 28px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.agreement-doc-links a {
  color: var(--brand-2);
  font-weight: 600;
  text-underline-offset: 2px;
}

.agreement-doc-links a:hover {
  color: var(--brand);
}

.agreement-doc-status {
  margin: 4px 0 0 28px;
  font-size: 0.85rem;
  color: #5a4c7e;
}

.scholarship-agreement-doc {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(29, 47, 64, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf8, #f8f6ef);
}

.scholarship-agreement-doc__header {
  display: grid;
  gap: 8px;
}

.scholarship-agreement-doc__kicker {
  margin: 0;
  color: var(--brand-2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scholarship-agreement-doc__title {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.3rem;
  color: var(--ink);
}

.scholarship-agreement-doc__intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.scholarship-agreement-doc__body {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(29, 47, 64, 0.1);
  background: rgba(255, 255, 255, 0.82);
}

.scholarship-agreement-doc__body p,
.scholarship-agreement-doc__body h4,
.scholarship-agreement-doc__body ul {
  margin: 0;
}

.scholarship-agreement-doc__lead {
  line-height: 1.62;
}

.scholarship-agreement-doc__coverage {
  padding: 14px 16px;
  border-left: 4px solid #0b5d3b;
  border-radius: 8px;
  background: #f3f8f5;
}

.scholarship-agreement-doc__body ul {
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.scholarship-agreement-doc__body h4 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--brand);
}

.scholarship-agreement-identity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(29, 47, 64, 0.12);
  border-radius: 16px;
  background: #f7f8fa;
}

.scholarship-agreement-identity__field {
  display: grid;
  gap: 4px;
}

.scholarship-agreement-identity__field span {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

.scholarship-agreement-identity__field strong {
  font-size: 1rem;
  color: var(--ink);
}

.scholarship-agreement-pages {
  display: grid;
  gap: 14px;
}

.scholarship-agreement-page {
  padding: 18px;
  border: 1px dashed rgba(29, 47, 64, 0.28);
  border-radius: 16px;
  background: #fff;
}

.scholarship-agreement-page__label {
  margin-bottom: 14px;
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scholarship-agreement-page__ack {
  display: grid;
  gap: 14px;
}

.scholarship-agreement-page__line {
  margin: 0;
  line-height: 1.65;
  color: var(--ink);
}

.scholarship-agreement-page__line span {
  display: inline-block;
  min-width: 160px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(29, 47, 64, 0.72);
}

.scholarship-agreement-empty {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 650px) {
  .scholarship-agreement-identity {
    grid-template-columns: 1fr;
  }
}

.agreement-signing-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.agreement-signing-title {
  margin: 0 0 10px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1rem;
}

.agreement-view-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.agreement-viewer {
  width: 100%;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  background: #fafcff;
}

.agreement-consent-wrap {
  margin: 8px 0 10px;
}

.signature-action-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.signature-preview {
  display: block;
  max-width: 320px;
  width: 100%;
  border: 1px dashed var(--line);
  border-radius: 10px;
  margin-top: 10px;
  background: #fff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.signature-modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 36, 0.56);
  display: grid;
  place-items: center;
  z-index: 9999;
  padding: 12px;
}

.signature-modal--draw {
  z-index: 10020;
}

.signature-modal-panel {
  width: min(740px, 100%);
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 12px;
}

.signature-modal-panel--agreement {
  max-height: min(92vh, 980px);
  overflow: auto;
}

.signature-modal-panel h4 {
  margin: 0 0 10px;
}

.signature-canvas {
  width: 100%;
  height: min(42vh, 320px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  touch-action: none;
}

.signature-modal-controls {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

body.signing-lock-scroll {
  overflow: hidden;
}

.result-panel {
  margin-top: 18px;
  border: 1px solid rgba(111, 45, 189, 0.18);
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(111, 45, 189, 0.06), rgba(15, 63, 146, 0.04));
}

.result-panel h2 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

@media (max-width: 640px) {
  .card {
    padding: 14px;
  }

  .hero-copy {
    padding: 14px 14px 6px;
  }

  .card {
    border-radius: 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-section {
    margin-bottom: 36px;
    padding-bottom: 64px;
  }

  .wizard-actions {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
    overflow-x: visible;
  }

  .wizard-actions .btn {
    flex: 0 0 auto;
    width: auto;
    padding: 10px 12px;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .form-footer {
    align-items: stretch;
    margin-top: 34px;
  }
}
