html { scroll-padding-top: 100px; }
.student-form-page { background: #f4f7f3; padding: 28px 0 44px; }
.form-shell { width: min(840px, calc(100% - 40px)); margin: 0 auto; }
.form-back { display: inline-flex; align-items: center; min-height: 44px; color: #294735; text-underline-offset: 4px; font-size: .9rem; }
.form-intro { margin: 12px 0 20px; }
.form-intro h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 12px; }
.form-intro p { margin: 0; color: #52635b; text-align: justify; }
.form-section { min-width: 0; margin: 0 0 28px; padding: 22px 24px 24px; border: 1px solid #cbdacf; border-radius: 12px; background: #fff; }
.form-section > legend { padding: 0 8px; background: #fff; border-radius: 4px; font-family: var(--font-display); font-size: 1.45rem; color: #113b2d; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.form-field { min-width: 0; }
.form-field > label { display: block; font-weight: 700; margin-bottom: 7px; }
.form-field > label span { font-weight: 400; color: #52635b; font-size: .88rem; }
.form-field input, .form-field select, .form-field textarea { display: block; width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid #7f9187; border-radius: 7px; background: #fff; color: #113b2d; font: inherit; font-size: 16px; line-height: 1.5; }
.form-field textarea { resize: vertical; }
.form-field small { display: block; color: #52635b; font-size: .82rem; line-height: 1.5; margin-top: 6px; }
.full-width { grid-column: 1 / -1; }
.grade-field { padding: 14px 16px; border-radius: 7px; background: #f0f5ef; }
.grade-value { display: flex; align-items: baseline; gap: 12px; margin: 0; }
.grade-value > span { font-size: .9rem; color: #52635b; }
.grade-value > strong { color: #113b2d; }
.grade-note { margin: 5px 0 0; color: #52635b; font-size: .88rem; line-height: 1.5; }
.subject-field { min-width: 0; border: 0; padding: 0; margin: 0; }
.subject-field legend { padding: 0; font-weight: 700; }
.subjects-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; color: #52635b; font-size: .85rem; }
.subjects-caption p { margin: 0; }
.subject-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.subject-option { display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 48px; border: 1px solid #cbdacf; border-radius: 7px; cursor: pointer; font-size: .94rem; line-height: 1.5; }
.subject-option:hover { background: #f4f7f3; }
.subject-option:has(input:checked) { background: #eaf2ec; border-color: #113b2d; }
.subject-option input { accent-color: #113b2d; width: 20px; height: 20px; flex: 0 0 20px; margin: 0; }
.field-error { color: #9c2525; font-size: .9rem; margin: 6px 0 0; }
[aria-invalid="true"] { border-color: #9c2525 !important; }
.form-errors { border: 2px solid #9c2525; padding: 18px; margin: 0 0 24px; background: #fff; border-radius: 8px; }
.form-errors h2 { font: 700 1.1rem/1.5 var(--font-body); margin: 0 0 10px; letter-spacing: 0; }
.form-errors ul { padding-left: 20px; margin: 0; }
.form-errors li + li { margin-top: 6px; }
.form-errors a { color: #9c2525; text-underline-offset: 3px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.application-privacy { margin-top: 24px; padding-top: 22px; border-top: 1px solid #cbdacf; }
.application-privacy p { margin: 0 0 8px; color: #52635b; font-size: .875rem; line-height: 1.7; }
.application-privacy a { display: inline-block; padding: 10px 0; color: #52635b; text-underline-offset: 4px; font-size: .875rem; font-weight: 400; }
.parent-declaration-field { margin: 12px 0 0; }
.parent-declaration { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; cursor: pointer; color: #113b2d; font-size: .94rem; line-height: 1.6; }
.parent-declaration input { flex: 0 0 20px; width: 20px; height: 20px; margin: 2px 0 0; accent-color: #113b2d; }
.parent-declaration-field .field-error { margin: 0 0 0 32px; }
.privacy-document { padding-bottom: 24px; }
.privacy-document h2 { margin: 28px 0 10px; font-size: 1.3rem; }
.privacy-document p { line-height: 1.75; color: #52635b; }
.privacy-document ul { padding-left: 22px; color: #52635b; line-height: 1.75; }
.privacy-document li + li { margin-top: 8px; }
.privacy-return { border-top: 1px solid #cbdacf; padding-top: 20px; }
.privacy-dialog-open { overflow: hidden; }
.privacy-dialog { width: min(720px, calc(100% - 32px)); height: min(600px, 80dvh); max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid #cbdacf; border-radius: 18px; background: #fff; color: #113b2d; box-shadow: 0 24px 80px #082d2440; }
.privacy-dialog::backdrop { background: #082d2499; }
.privacy-dialog-layout { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.privacy-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid #cbdacf; }
.privacy-dialog-header h2 { margin: 0; font-size: .875rem; line-height: 1.3; }
.privacy-dialog-close { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid #cbdacf; border-radius: 50%; background: #f4f7f3; color: #113b2d; font: 400 28px/1 var(--font-body); cursor: pointer; }
.privacy-dialog-close:hover { background: #eaf2ec; }
.privacy-dialog-frame { display: block; width: 100%; height: 100%; min-height: 0; border: 0; background: #fff; }
.privacy-dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 24px; border-top: 1px solid #cbdacf; }
.privacy-dialog-footer button { cursor: pointer; font-family: inherit; font-size: .875rem; min-height: 44px; }
.privacy-dialog :focus-visible, .privacy-embedded :focus-visible { outline: 3px solid #3569b3; outline-offset: 3px; }
.privacy-embedded { scroll-padding-top: 0; }
.privacy-embedded body { background: #fff; }
.privacy-embedded .site-header, .privacy-embedded .site-footer, .privacy-embedded .skip-link, .privacy-embedded .form-intro, .privacy-embedded .privacy-return { display: none; }
.privacy-embedded .student-form-page { padding: 0; background: #fff; }
.privacy-embedded .privacy-document { width: 100%; margin: 0; padding: 8px 24px 24px; font-size: .75rem; }
.privacy-embedded .privacy-document h2 { margin: 22px 0 8px; font-size: .875rem; }
.privacy-embedded .privacy-document a { color: #113b2d; overflow-wrap: anywhere; }
.form-actions button { cursor: pointer; font-family: inherit; }
.form-result { padding: 18px; border-left: 4px solid #9c2525; background: #fff3f1; color: #9c2525; border-radius: 6px; }
.form-help { margin-top: 24px; font-size: .9rem; color: #52635b; }
.form-help a { color: #113b2d; text-underline-offset: 4px; }
.student-form-page :focus-visible { outline: 3px solid #3569b3; outline-offset: 3px; }
.student-form-page [id] { scroll-margin-top: 105px; }
[hidden] { display: none !important; }
@media(max-width:600px) {
 .privacy-dialog { width: calc(100% - 16px); height: min(600px, 84dvh); border-radius: 14px; }
 .privacy-dialog-header { padding: 16px; gap: 12px; }
 .privacy-dialog-footer { padding: 12px 16px; }
 .privacy-embedded .privacy-document { padding: 4px 18px 18px; }
 .student-form-page { padding-top: 16px; }
 .form-shell { width: calc(100% - 32px); }
 .form-grid, .subject-options { grid-template-columns: 1fr; }
 .form-section { padding: 18px 16px; }
 .form-section > legend { font-size: 1.25rem; }
 .form-actions button { width: 100%; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } .student-form-page * { transition: none !important; } }

.form-field input::placeholder, .form-field textarea::placeholder { color: #a3ada7; opacity: 1; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: 400; }

.application-conditions-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 4px; color: #113b2d; font-size: .9rem; font-weight: 700; text-underline-offset: 4px; }
.application-conditions-link:hover { text-decoration-thickness: 2px; }
