:root {
  --ink: #24211f;
  --muted: #6d6862;
  --paper: #fffdf9;
  --soft: #f3f1ec;
  --line: #d9d4cc;
  --red: #e30613;
  --red-dark: #b9000a;
  --yellow: #ffbb18;
  --teal: #126d72;
  --max: 1180px;
  --narrow: 920px;
  --radius: 4px;
  --shadow: 0 20px 60px rgba(36, 33, 31, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.08; }
h1 { font-size: clamp(2.8rem, 6vw, 5.8rem); font-weight: 760; }
h2 { font-size: clamp(2rem, 4vw, 3.65rem); font-weight: 720; }
h3 { font-size: 1.35rem; }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.narrow-shell { width: min(calc(100% - 40px), var(--narrow)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 10px 15px; background: var(--ink); color: white; }
.skip-link:focus { top: 16px; }
.eyebrow { margin-bottom: 14px; color: var(--red); font-size: .76rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.lead { font-size: 1.2rem; color: var(--muted); }
.muted { color: var(--muted); }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(36,33,31,.08); background: rgba(255,253,249,.94); backdrop-filter: blur(16px); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand img { width: 165px; height: auto; }
nav { display: flex; align-items: center; gap: 30px; }
nav a { text-decoration: none; font-size: .9rem; font-weight: 650; }
nav a:not(.button):hover { color: var(--red); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 54px; padding: 0 24px; border: 1px solid var(--red); border-radius: var(--radius); background: var(--red); color: white; font-weight: 800; text-decoration: none; transition: .2s ease; box-shadow: 0 8px 20px rgba(227,6,19,.16); }
.button:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-2px); }
.button:focus-visible, .text-link:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(255,187,24,.75); outline-offset: 3px; }
.button-small { min-height: 42px; padding: 0 18px; font-size: .86rem; }
.text-link { text-underline-offset: 5px; font-weight: 750; }

.hero { padding: 70px 0 0; overflow: hidden; background: linear-gradient(145deg, #fffdf9 35%, #f3f2ef 100%); }
.hero-grid { min-height: 610px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 55px; }
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { max-width: 800px; margin-bottom: 25px; }
.hero-lead { max-width: 610px; margin-bottom: 34px; color: var(--muted); font-size: 1.22rem; }
.hero-actions { display: flex; align-items: center; gap: 28px; }
.hero-visual { position: relative; }
.hero-visual::before { content: ""; position: absolute; inset: 10% -8% -8% 12%; z-index: -1; background: var(--yellow); }
.hero-visual img { width: 100%; box-shadow: var(--shadow); }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat-strip > div { min-height: 150px; display: flex; align-items: center; gap: 14px; padding: 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-strip strong { flex: 0 0 auto; font-size: 2.65rem; line-height: 1; }
.stat-strip span { color: var(--muted); font-size: .94rem; }
.stat-label { max-width: 145px; line-height: 1.35; }
.eligibility-strip { margin-top: 70px; margin-bottom: 24px; padding: 18px 24px; border-left: 4px solid var(--red); background: rgba(227,6,19,.045); color: var(--red); font-size: 1rem; font-weight: 800; text-align: center; }
.eligibility-strip span { margin-inline: 8px; color: rgba(227,6,19,.35); }

.section { padding: 110px 0; }
.section-soft { background: var(--soft); }
.two-column { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; }
.prose { font-size: 1.15rem; color: var(--muted); }
.prose strong { color: var(--ink); }
.material-code { display: inline-block; margin-top: 10px; color: var(--ink); font-size: .8rem; font-weight: 700; letter-spacing: .02em; }
.learning-grid { margin-top: 70px; display: grid; grid-template-columns: 1fr 1fr; }
.learning-card { min-height: 370px; position: relative; padding: 45px; color: white; overflow: hidden; }
.learning-card-dark { background: var(--ink); }
.learning-card-red { background: var(--red); }
.learning-card .eyebrow { color: var(--yellow); }
.learning-card h3 { max-width: 480px; margin-top: 70px; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.learning-card p:last-child { max-width: 480px; color: rgba(255,255,255,.75); }
.card-number { position: absolute; right: 30px; top: -35px; color: rgba(255,255,255,.08); font-size: 10rem; font-weight: 900; line-height: 1; }

.coordinators-section { background: var(--ink); color: white; }
.coordinators-heading { max-width: 720px; margin-bottom: 50px; }
.coordinators-heading .eyebrow { color: var(--yellow); }
.coordinators-heading h2 { margin-bottom: 0; }
.coordinator-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.coordinator-card { display: grid; grid-template-columns: minmax(190px, .82fr) 1.18fr; min-height: 360px; background: var(--paper); color: var(--ink); overflow: hidden; }
.coordinator-card > img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.coordinator-card:first-child > img { object-position: center 28%; }
.coordinator-card:last-child > img { object-position: center; }
.coordinator-copy { display: flex; flex-direction: column; align-items: flex-start; padding: 38px 34px; }
.coordinator-copy h3 { margin-bottom: 18px; font-size: 1.55rem; }
.coordinator-copy h3 span { display: block; margin-top: 5px; color: var(--muted); font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.coordinator-copy p { margin-bottom: 28px; color: var(--muted); }
.coordinator-copy .text-link { margin-top: auto; color: var(--red); }

.section-heading { margin-bottom: 50px; display: grid; grid-template-columns: 1fr 380px; align-items: end; gap: 80px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { margin-bottom: 8px; color: var(--muted); }
.edition-list { border-top: 1px solid var(--line); }
.edition-card { display: grid; grid-template-columns: 110px 1fr .75fr 1.25fr; gap: 35px; align-items: center; min-height: 142px; padding: 24px 10px; border-bottom: 1px solid var(--line); }
.edition-card > div:not(.edition-index) { display: flex; flex-direction: column; }
.edition-card strong { line-height: 1.3; }
.edition-card small { color: var(--muted); }
.edition-index { display: flex; flex-direction: column; }
.edition-index span { color: var(--red); font-size: 2.4rem; font-weight: 850; line-height: 1; }
.detail-label { margin-bottom: 8px; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.edition-card.is-current { background: white; box-shadow: 0 8px 35px rgba(36,33,31,.06); }
.fine-print { margin: 20px 0 0; color: var(--muted); font-size: .78rem; }

.benefit-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.benefit-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.benefit-list li { display: grid; grid-template-columns: 55px 1fr; gap: 25px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.benefit-list li > span { color: var(--red); font-size: .76rem; font-weight: 800; }
.benefit-list h3 { margin-bottom: 8px; }
.benefit-list p { margin-bottom: 0; color: var(--muted); }
.phase-one-section { padding-top: 0; padding-bottom: 30px; }
.phase-one-card { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding: 65px; border: 1px solid var(--line); background: white; }
.phase-one-card h2 { margin-bottom: 24px; font-size: clamp(2rem, 3.5vw, 3.2rem); }
.phase-summary { margin-bottom: 0; color: var(--muted); font-size: 1.13rem; }
.phase-details { display: grid; gap: 10px; align-content: center; margin: 0; padding: 0; list-style: none; }
.phase-details li { position: relative; padding-left: 24px; }
.phase-details li::before { content: "—"; position: absolute; left: 0; color: var(--red); font-weight: 800; }
.prize-section { padding-top: 0; }
.prize-card { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; padding: 65px; background: rgb(250,181,0); color: var(--ink); }
.prize-card .eyebrow { color: var(--ink); }
.phase-kicker { margin-bottom: 14px; color: rgba(36,33,31,.72); font-size: .76rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.prize-card h2 { margin-bottom: 0; }
.prize-card > p { margin-bottom: 0; color: rgba(36,33,31,.82); font-size: 1.13rem; }
.application-panel { display: grid; grid-template-columns: 1.3fr .8fr auto; align-items: center; gap: 55px; }
.application-panel h2 { font-size: clamp(2rem, 3.5vw, 3.2rem); }
.application-panel p { margin-bottom: 0; color: var(--muted); }
.application-steps { display: flex; flex-direction: column; gap: 8px; font-weight: 700; font-size: .9rem; }

.site-footer { padding: 70px 0 20px; background: var(--ink); color: white; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr; gap: 60px; padding-bottom: 60px; }
.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-grid img { width: 135px; filter: brightness(0) invert(1); }
.footer-grid p { max-width: 400px; color: rgba(255,255,255,.58); }
.footer-grid a { color: white; text-underline-offset: 4px; }
.footer-grid .muted { color: rgba(255,255,255,.42); }
.institutional-logos { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.footer-grid .institutional-logos > img { width: 150px; height: 58px; object-fit: contain; filter: none; }
.footer-grid .institutional-logos > .logo-nms-dark { width: 240px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.5); font-size: .75rem; }

/* Application form */
.form-page { background: var(--soft); }
.form-intro { padding: 80px 0 65px; background: var(--ink); color: white; }
.form-intro h1 { max-width: 780px; margin-bottom: 20px; font-size: clamp(2.6rem, 6vw, 5rem); }
.form-intro > div > p:not(.eyebrow) { max-width: 700px; color: rgba(255,255,255,.68); font-size: 1.12rem; }
.form-meta { margin-top: 35px; display: flex; flex-wrap: wrap; gap: 14px 35px; font-size: .9rem; }
.form-meta span { display: flex; gap: 8px; }
.application-form { padding: 45px 0 110px; }
.form-section { display: grid; grid-template-columns: 72px 1fr; gap: 22px; margin-bottom: 24px; padding: 48px; background: var(--paper); box-shadow: 0 4px 20px rgba(36,33,31,.04); }
.section-number { color: var(--red); font-size: .78rem; font-weight: 900; letter-spacing: .1em; }
.form-section-content h2 { margin-bottom: 38px; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 22px; }
.field { display: flex; flex-direction: column; gap: 8px; color: var(--ink); font-size: .83rem; font-weight: 750; }
.field > span, .field legend span, .location-options legend span, .declaration-block legend span { color: var(--red); }
.field input, .field select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 2px; background: white; color: var(--ink); }
.field input:hover, .field select:hover { border-color: #aaa49b; }
.field small { color: var(--muted); font-weight: 500; }
.span-2 { grid-column: span 2; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-field legend { margin-bottom: 9px; }
.choice-field > label { display: inline-flex; align-items: center; gap: 8px; margin: 8px 18px 0 0; font-weight: 600; }
input[type="radio"], input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--red); flex: 0 0 auto; }
.schedule-note { margin: -10px 0 32px; display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); }
.schedule-note > div { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); }
.schedule-note span { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.location-options legend, .declaration-block legend { margin-bottom: 15px; font-weight: 800; }
.location-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.location-options legend { grid-column: 1/-1; }
.location-options > label { display: flex; align-items: center; gap: 12px; min-height: 88px; padding: 14px; border: 1px solid var(--line); cursor: pointer; }
.location-options > label:has(input:checked) { border-color: var(--red); background: rgba(227,6,19,.04); }
.location-options span { display: flex; flex-direction: column; }
.location-options small { color: var(--muted); }
.future-editions, .privacy-details { margin-top: 25px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
summary { padding: 18px 0; cursor: pointer; color: var(--ink); font-weight: 800; }
.mini-table { display: grid; padding-bottom: 18px; }
.mini-table span { display: grid; grid-template-columns: 120px 1fr; padding: 8px 0; color: var(--muted); font-size: .87rem; }
.mini-table strong { color: var(--ink); }
.declaration-block { padding: 25px 0; border-top: 1px solid var(--line); }
.declaration-block h3 { margin-bottom: 15px; font-size: 1rem; letter-spacing: 0; }
.declaration-block p { color: var(--muted); font-size: .88rem; }
.check-row { display: flex; align-items: flex-start; gap: 13px; margin: 12px 0; cursor: pointer; }
.check-row input { margin-top: 3px; }
.check-row > span { font-size: .92rem; }
.check-row small { display: block; margin-top: 5px; color: var(--muted); }
.required { color: var(--red); }
.signature-grid { margin-top: 20px; }
.document-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-bottom: 25px; background: var(--line); border: 1px solid var(--line); }
.document-list span { padding: 14px; background: white; font-size: .85rem; font-weight: 700; }
.document-list span::before { content: "✓"; margin-right: 9px; color: var(--teal); }
.upload-zone { position: relative; border: 2px dashed #bab4ab; background: var(--soft); text-align: center; transition: .2s ease; }
.upload-zone.is-dragging { border-color: var(--red); background: rgba(227,6,19,.05); }
.upload-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.upload-zone label { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.upload-icon { width: 45px; height: 45px; margin-bottom: 14px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: white; font-size: 1.4rem; }
.upload-zone small { margin-top: 4px; color: var(--muted); }
.upload-summary { margin-top: 20px; }
.upload-summary > div:first-child { display: flex; justify-content: space-between; font-size: .82rem; }
.meter { height: 7px; margin-top: 8px; background: var(--line); overflow: hidden; }
.meter span { display: block; width: 0; height: 100%; background: var(--teal); transition: width .2s; }
#file-list { margin: 12px 0 0; padding: 0; list-style: none; }
#file-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .8rem; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); white-space: nowrap; }
.file-remove { padding: 4px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--red); font-size: .72rem; font-weight: 800; }
.file-remove:hover { color: var(--red-dark); }
.size-explanation { margin-top: 20px; padding: 15px 18px; border-left: 3px solid var(--yellow); background: #fff8e5; font-size: .82rem; }
.size-explanation p { margin: 3px 0 0; color: var(--muted); }
.oversize-notice { margin-top: 18px; padding: 18px; border: 1px solid var(--red); background: #fff0f1; }
.oversize-notice p { margin: 6px 0 0; }
.privacy-copy { padding-bottom: 20px; color: var(--muted); font-size: .86rem; }
.privacy-copy h3 { margin: 20px 0 5px; color: var(--ink); font-size: 1rem; letter-spacing: 0; }
.privacy-accept { margin-top: 25px; padding: 18px; background: var(--soft); }
.form-submit { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 32px; background: var(--ink); color: white; }
.form-submit > div { display: flex; flex-direction: column; }
.form-submit span { color: rgba(255,255,255,.62); font-size: .82rem; }
.form-submit .button span { color: white; font-size: inherit; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.certificate-note { padding: 20px 32px; background: #fff8e5; font-size: .82rem; }
.form-error { margin-bottom: 20px; padding: 16px 20px; border-left: 4px solid var(--red); background: #fff0f1; color: #7a0007; }
.form-error a { font-weight: 800; }
.hp-field { position: absolute; left: -9999px; }
.success-panel { margin-block: 80px; padding: 70px; background: white; text-align: center; box-shadow: var(--shadow); }
.success-icon { width: 64px; height: 64px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: white; font-size: 2rem; }
.success-panel .button { margin-top: 20px; }
.form-footer { padding-top: 20px; }
.form-footer-logos { padding: 20px 0 35px; }
.form-footer-logos .institutional-logos > img { width: 150px; height: 58px; object-fit: contain; }
.form-footer-logos .institutional-logos > .logo-nms-dark { width: 240px; }

@media (max-width: 900px) {
  nav a:not(.button) { display: none; }
  .hero-grid, .two-column, .benefit-layout, .phase-one-card, .prize-card { grid-template-columns: 1fr; gap: 45px; }
  .coordinator-card { grid-template-columns: 1fr; }
  .coordinator-card > img { height: 360px; min-height: 0; }
  .hero { padding-top: 50px; }
  .hero-grid { min-height: 0; }
  .hero-visual { max-width: 680px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .section { padding: 80px 0; }
  .section-heading { grid-template-columns: 1fr; gap: 15px; }
  .edition-card { grid-template-columns: 80px 1fr 1fr; }
  .edition-card > div:last-child { grid-column: 2/-1; }
  .application-panel { grid-template-columns: 1fr 1fr; }
  .application-panel > div:first-child { grid-column: 1/-1; }
  .footer-grid { grid-template-columns: 1.4fr 1fr; }
  .form-section { grid-template-columns: 1fr; }
  .section-number { margin-bottom: -10px; }
}

@media (max-width: 620px) {
  .shell, .narrow-shell { width: min(calc(100% - 28px), var(--max)); }
  .header-inner { min-height: 70px; }
  .brand img { width: 125px; }
  .button-small { min-height: 38px; padding: 0 13px; }
  .hero { padding-top: 42px; }
  .hero-copy h1 { font-size: 2.65rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .eligibility-strip { margin-top: 45px; padding: 16px; }
  .stat-strip > div { min-height: 120px; padding: 18px 16px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; }
  .stat-strip strong { font-size: 1.6rem; }
  .stat-label { max-width: none; }
  .learning-grid { grid-template-columns: 1fr; }
  .coordinator-grid { grid-template-columns: 1fr; }
  .coordinator-copy { padding: 28px 24px; }
  .learning-card { min-height: 310px; padding: 30px; }
  .edition-card { grid-template-columns: 62px 1fr; gap: 20px; }
  .edition-card > div { grid-column: 2; }
  .edition-card .edition-index { grid-column: 1; grid-row: 1 / span 3; }
  .prize-card { padding: 35px 25px; }
  .phase-one-card { padding: 35px 25px; }
  .application-panel { grid-template-columns: 1fr; }
  .application-panel > * { grid-column: 1 !important; }
  .footer-grid { grid-template-columns: 1fr; }
  .institutional-logos { flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; }
  .form-intro { padding: 55px 0 45px; }
  .form-section { padding: 28px 20px; }
  .field-grid, .schedule-note, .document-list { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .location-options { grid-template-columns: 1fr; }
  .mini-table span { grid-template-columns: 1fr; }
  .form-submit { align-items: stretch; flex-direction: column; padding: 25px 20px; }
  .certificate-note { padding: 18px 20px; }
  .success-panel { padding: 45px 25px; }
  #file-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .file-remove { grid-column: 1 / -1; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
