:root {
  color-scheme: light;
  --ink: #0c1c2f;
  --muted: #546276;
  --line: #d8deea;
  --panel: #ffffff;
  --field: #f8fafc;
  --gold: #c99a35;
  --gold-dark: #8d6420;
  --navy: #07172b;
  --page: #eef2f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, var(--navy) 0, #102946 240px, var(--page) 240px);
  color: var(--ink);
}

.page-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.form-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 22px 70px rgba(10, 22, 38, 0.22);
}

.is-hidden {
  display: none;
}

.pathway-screen {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 22px 70px rgba(10, 22, 38, 0.22);
  padding: 34px 30px;
}

.pathway-brand {
  max-width: 720px;
  margin-bottom: 26px;
}

.pathway-logo {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: var(--navy);
  margin-bottom: 18px;
}

.pathway-intro {
  color: var(--muted);
  line-height: 1.5;
}

.pathway-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pathway-button {
  min-height: 64px;
  text-align: left;
  background: #ffffff;
  color: var(--navy);
  border-color: #b9c4d6;
}

.pathway-button:hover,
.pathway-button:focus {
  border-color: var(--gold);
  outline: 3px solid rgba(201, 154, 53, 0.18);
}

.selected-pathway {
  margin: 0 0 10px;
  color: var(--gold-dark);
  font-weight: 700;
}

.back-button {
  min-height: 38px;
  margin-top: 14px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--navy);
  border-color: #b9c4d6;
}

.brand-header {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 22px;
  align-items: center;
  padding: 30px;
  border-bottom: 4px solid var(--gold);
}

.brand-logo {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: var(--navy);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

form {
  padding: 28px 30px 34px;
}

.section-card {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.section-card:first-of-type {
  padding-top: 0;
}

.section-card h2 {
  margin-bottom: 18px;
  color: var(--navy);
  font-size: 22px;
  line-height: 1.2;
}

.section-card h3 {
  margin: 24px 0 14px;
  color: var(--gold-dark);
  font-size: 16px;
  line-height: 1.3;
}

.section-card h3:first-of-type {
  margin-top: 0;
}

.student-only.is-hidden,
.training-section.is-hidden,
.work-section.is-hidden,
.skills-section.is-hidden,
.volunteer-section.is-hidden,
.language-test-details.is-hidden,
.other-test-field.is-hidden,
[data-present-work].is-hidden,
[data-previous-work].is-hidden {
  display: none;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

label {
  display: grid;
  gap: 7px;
  color: #26364d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.field-title {
  color: #26364d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

input,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid #c7d0df;
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

input[type="file"] {
  min-height: auto;
  padding: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(201, 154, 53, 0.2);
  border-color: var(--gold);
  background: #ffffff;
}

.declaration-card p {
  color: var(--muted);
  line-height: 1.55;
}

.check-row {
  grid-template-columns: 20px 1fr;
  align-items: start;
  margin-top: 18px;
  font-weight: 700;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 1px;
}

.signature-field {
  display: grid;
  gap: 7px;
  grid-column: 1 / -1;
}

.signature-pad {
  width: 100%;
  height: 220px;
  border: 1px solid #c7d0df;
  border-radius: 6px;
  background: #ffffff;
  touch-action: none;
}

.signature-help {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.small-button,
.upload-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #b9c4d6;
  border-radius: 6px;
  background: #ffffff;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.upload-control {
  position: relative;
  overflow: hidden;
}

.upload-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.action-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 28px;
}

.form-status {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 6px;
  background: #eef7ee;
  color: #24522c;
  line-height: 1.45;
}

.form-status:empty {
  display: none;
}

.form-status.error {
  background: #fff3f0;
  color: #8d2d1f;
}

button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 6px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  background: var(--gold);
  color: #111827;
  border-color: var(--gold);
}

.secondary-button {
  background: #ffffff;
  color: var(--navy);
  border-color: #b9c4d6;
}

button:hover {
  filter: brightness(0.96);
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  body {
    background: #ffffff;
  }

  .page-shell {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .form-panel {
    border: 0;
    box-shadow: none;
  }

  .brand-header {
    padding: 0 0 14px;
  }

  form {
    padding: 16px 0 0;
  }

  .section-card {
    break-inside: avoid;
    padding: 14px 0;
  }

  .action-bar,
  .back-button,
  .pathway-screen,
  .signature-actions,
  .signature-help,
  .form-status {
    display: none;
  }

  input,
  textarea,
  .signature-pad {
    background: #ffffff;
    border-color: #9aa4b2;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: 100%;
    padding: 0;
  }

  .form-panel {
    min-height: 100vh;
    box-shadow: none;
  }

  .brand-header {
    grid-template-columns: 88px 1fr;
    gap: 16px;
    padding: 20px;
  }

  .brand-logo {
    width: 88px;
    height: 88px;
  }

  form {
    padding: 22px 20px 30px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .pathway-screen {
    min-height: 100vh;
    padding: 24px 20px;
  }

  .pathway-grid {
    grid-template-columns: 1fr;
  }

  .action-bar {
    flex-direction: column-reverse;
  }

  button {
    width: 100%;
  }
}
