/* Shared location and course controls use the existing public site's palette. */
.preference-location-field, .preference-courses { min-width: 0; }
.preference-location-field { display: grid; gap: .5rem; }
.preference-location-field input, .preference-location-field select,
.student-profile-form select { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; padding: .75rem; border: 1px solid var(--border, #cbd5e1); border-radius: .5rem; background: var(--white, #fff); color: var(--text, #14213d); font: inherit; }
.preference-location-field input[type=search] { font-size: .875rem; }
.preference-courses { margin: 0; padding: 0; border: 0; }
.preference-courses legend { font-weight: 700; margin-bottom: .5rem; }
.preference-courses p, .preference-courses small { line-height: 1.6; }
.preference-courses [data-custom-courses] { display: grid; gap: .75rem; margin-top: 1rem; }
.preference-courses [hidden] { display: none !important; }
.preference-courses ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.preference-courses li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .75rem; border: 1px solid var(--border, #cbd5e1); border-radius: .5rem; }
.preference-courses li span { min-width: 0; overflow-wrap: anywhere; }
.preference-courses button { min-height: 44px; padding: .5rem .75rem; font: inherit; color: inherit; background: transparent; border: 1px solid var(--border, #cbd5e1); border-radius: .5rem; cursor: pointer; }
.preference-courses li button { flex-shrink: 0; }
.preference-courses :is(button,input):focus-visible, .preference-location-field :is(input,select):focus-visible { outline: 3px solid var(--blue, #2563eb); outline-offset: 2px; }
.student-profile-form .preference-courses { grid-column: 1 / -1; }
.student-profile-form .visitor-survey-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 220px),1fr)); gap: .5rem; }
.student-profile-form .visitor-survey-options label { display: flex; align-items: center; gap: .75rem; min-height: 44px; overflow-wrap: anywhere; }
.student-profile-form .visitor-survey-options input { width: 18px; height: 18px; min-height: 0; flex: 0 0 18px; }
.visitor-survey-step .preference-location-field { margin-top: 1rem; }
.visitor-survey-step select { max-width: 100%; }
.visitor-survey-step :is(p,label,span) { overflow-wrap: anywhere; }
/* Course choices remain native checkboxes with a full, wrapping label target. */
.preference-courses .visitor-survey-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: .5rem; }
.preference-courses .visitor-survey-options label { display: flex; align-items: center; gap: .75rem; min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--border, #cbd5e1); border-radius: .5rem; }
.preference-courses .visitor-survey-options input[type=checkbox] { position: static; opacity: 1; pointer-events: auto; flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; }
.preference-courses .visitor-survey-options span { flex: 1; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; white-space: normal; overflow-wrap: anywhere; font-size: .875rem; line-height: 1.5; }
.preference-courses .visitor-survey-options input:checked + span { background: transparent; }
.visitor-survey-form label:has(> input[name=nationwideScholarships]) { display: flex; align-items: center; gap: .75rem; }
.visitor-survey-form input[name=nationwideScholarships] { width: 18px; height: 18px; min-height: 0; flex: 0 0 18px; }
@media(prefers-reduced-motion:reduce) { .visitor-survey-step.is-active { animation: none; } }
.preference-location-field small { display: block; font-size: .75rem; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.preference-location-field small:empty { display: none; }
.preference-courses [data-custom-courses] > label { display: grid; gap: .5rem; }
.preference-courses [data-custom-course-input] { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: .75rem; font: inherit; color: var(--text, #14213d); background: var(--white, #fff); border: 1px solid var(--border, #cbd5e1); border-radius: .5rem; }
html[data-theme=dark] :is(.preference-location-field,.preference-courses) { --border: #40546d; --white: #162337; --text: #edf4ff; color: var(--text); }
@media(max-width:640px) {
 .student-profile-form { grid-template-columns: minmax(0,1fr); }
 .student-profile-form .preference-courses { grid-column: auto; }
 .student-profile-form :is(.student-profile-field,.preference-location-field) { min-width: 0; }
}

/* Survey v2 uses the existing dialog palette and compact mobile form rhythm. */
.survey-v2 { width:min(640px,calc(100% - 32px)); max-height:calc(100dvh - 32px); overflow-y:auto; padding:28px; }
.survey-v2 progress { width:100%; height:6px; accent-color:var(--blue); }
.survey-v2-step { display:grid; gap:16px; padding-block:20px; }
.survey-v2-step[hidden] { display:none; }
.survey-v2-step h2 { font-size:clamp(21px,5vw,28px); line-height:1.25; margin:0; }
.survey-v2-step label { display:grid; gap:8px; font-weight:600; }
.survey-v2-step input,.survey-v2-step select { width:100%; min-width:0; min-height:44px; padding:12px; border:1px solid var(--border); border-radius:8px; background:var(--white); color:var(--text); font:inherit; }
.survey-v2-step p,.survey-v2-progress { color:var(--muted); font-size:14px; line-height:1.6; }
.survey-v2-check { display:flex!important; align-items:flex-start; gap:10px; padding-block:8px; }
.survey-v2-check input { flex:0 0 20px; width:20px; min-height:20px; margin-top:3px; }
.survey-v2 fieldset { border:0; padding:0; }
.survey-v2 [data-academic-details] { display:grid; gap:16px; }
.survey-v2 [data-academic-details][hidden] { display:none; }
.survey-v2-actions { display:flex; flex-wrap:wrap; gap:8px; border-top:1px solid var(--border); padding-top:16px; }
.survey-v2 button { min-height:44px; padding:10px 16px; border:1px solid var(--border); border-radius:8px; color:var(--text); background:var(--white); font:600 14px var(--font-body); cursor:pointer; }
.survey-v2 button[data-next],.survey-v2 button[data-finish] { background:var(--blue);color:#fff;border-color:var(--blue);margin-left:auto; }
.survey-v2 [data-status] { color:var(--text);line-height:1.5; }
.survey-v2 [data-review] p { margin:0;padding-block:12px;border-bottom:1px solid var(--border); }
@media(max-width:600px){.survey-v2{width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;padding:24px 20px calc(24px + env(safe-area-inset-bottom));}.survey-v2-step input,.survey-v2-step select{font-size:16px}.survey-v2-actions{position:sticky;bottom:0;background:var(--white);padding-bottom:8px}.survey-v2-actions button{flex:1}}
@media(max-width:600px){.survey-v2{padding-bottom:0}.survey-v2-actions{padding-bottom:calc(16px + env(safe-area-inset-bottom));margin-bottom:0}}
/* Focused survey upgrade; no changes to the public page shell. */
.visitor-survey-dialog.survey-v2 { width:min(720px,calc(100% - 40px)); padding:32px; border:1px solid var(--border); border-radius:18px; background:var(--white); color:var(--text); }
.survey-v2 .visitor-dialog-close { top:16px; right:16px; width:44px; padding:0; font-size:26px; border-radius:10px; }
.survey-v2 .visitor-survey-header { padding:0; margin:0; text-align:left; }
.survey-v2 .visitor-survey-header>span { color:var(--blue); font-size:11px; font-weight:800; letter-spacing:.1em; }
.survey-v2 .visitor-survey-header h1 { max-width:22ch; margin:12px 32px 12px 0; font-size:clamp(25px,4vw,32px); line-height:1.2; letter-spacing:-.035em; color:var(--navy); }
.survey-v2 .visitor-survey-header>p { margin:0; color:var(--muted); font-size:14px; line-height:1.65; }
.survey-v2 .survey-v2-stages { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); list-style:none; padding:0; margin:24px 0 16px; gap:8px; counter-reset:stage; }
.survey-v2-stages li { counter-increment:stage; display:flex; align-items:center; gap:6px; min-width:0; font-size:11px; color:var(--muted); line-height:1.4; }
.survey-v2-stages li::before { content:counter(stage); display:grid; place-items:center; width:24px; height:24px; flex:0 0 24px; border:1px solid var(--border); border-radius:50%; font-weight:700; }
.survey-v2-stages [aria-current=step] { color:var(--blue); font-weight:700; }
.survey-v2-stages [aria-current=step]::before { color:#fff; background:var(--blue); border-color:var(--blue); }
.survey-v2 .survey-v2-progress-row { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:8px; }
.survey-v2 .survey-v2-progress { margin:0; color:var(--navy); font-size:12px; font-weight:700; }
.survey-v2 [data-step-kind] { color:var(--muted); font-size:12px; }
.survey-v2 progress { display:block; appearance:none; width:100%; height:5px; border:0; background:var(--border); border-radius:4px; overflow:hidden; }
.survey-v2 progress::-webkit-progress-bar { background:var(--border); }
.survey-v2 progress::-webkit-progress-value { background:var(--blue); }
.survey-v2 progress::-moz-progress-bar { background:var(--blue); }
.survey-v2 .visitor-survey-header>.survey-v2-save-note { margin-top:10px; font-size:12px; }
.survey-v2 .survey-v2-step { padding:28px 0 20px; gap:16px; }
.survey-v2 .survey-v2-step h2 { font-size:clamp(21px,4vw,25px); line-height:1.35; letter-spacing:-.025em; color:var(--navy); outline:none; }
.survey-v2 .survey-v2-step label { font-size:14px; color:var(--text); }
.survey-v2 .survey-v2-step :is(input,select) { min-height:48px; background:var(--white); border-color:var(--border); }
.survey-v2 .survey-v2-step input[type=checkbox] { min-height:20px; height:20px; }
.survey-v2 :is(button,input,select,summary):focus-visible { outline:3px solid var(--blue); outline-offset:3px; }
.survey-v2 .survey-v2-check { padding:12px; border:1px solid var(--border); border-radius:8px; cursor:pointer; }
.survey-v2 .survey-v2-check:has(input:checked) { background:var(--blue-light); border-color:var(--blue); }
.survey-v2 [data-step=interests] fieldset { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.survey-v2 [data-step=interests] legend { padding-bottom:12px; font-size:13px; font-weight:700; }
.survey-v2 [data-academic-details] { padding:20px; border:1px solid var(--border); border-radius:12px; background:var(--background); }
.survey-v2 .survey-v2-actions { position:sticky; bottom:-32px; background:var(--white); padding:16px 0 8px; display:grid; grid-template-columns:auto auto 1fr auto; gap:8px; z-index:2; }
.survey-v2 .survey-v2-actions [hidden] { display:none; }
.survey-v2 .survey-v2-actions [data-back] { grid-column:1; }
.survey-v2 .survey-v2-actions [data-save] { grid-column:2; }
.survey-v2 .survey-v2-actions [data-skip] { grid-column:3; justify-self:end; border-color:transparent; color:var(--muted); }
.survey-v2 .survey-v2-actions :is([data-next],[data-finish]) { grid-column:4; grid-row:1; margin:0; }
.survey-v2 button:disabled { opacity:.55; cursor:wait; }
.survey-v2 [data-status]:empty { display:none; }
.survey-v2 [data-status]:not(:empty) { margin:12px 0; padding:12px 16px; border-left:3px solid var(--blue); border-radius:6px; background:var(--blue-light); font-size:14px; }
.survey-v2 [data-review] { margin:0; border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.survey-v2-review-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px; border-bottom:1px solid var(--border); }
.survey-v2-review-row:last-child { border-bottom:0; }
.survey-v2-review-row dt { color:var(--muted); font-size:12px; margin-bottom:4px; }
.survey-v2-review-row dd { margin:0; font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.survey-v2 .survey-v2-review-row button { flex-shrink:0; border:0; color:var(--blue); background:transparent; }
.survey-v2 .survey-v2-close-check { margin:16px 0; padding:20px; border:1px solid var(--border); border-radius:12px; background:var(--blue-light); }
.survey-v2-close-check h2 { font-size:19px; color:var(--navy); }
.survey-v2-close-check p { margin:8px 0 16px; font-size:14px; line-height:1.6; }
.survey-v2-close-check button { margin-top:8px; }
.survey-v2 .survey-v2-complete { padding:24px 0; }
@media(max-width:600px) {
 .visitor-survey-dialog.survey-v2 { width:100%; max-width:100%; height:100dvh; max-height:100dvh; margin:0; border:0; border-radius:0; padding:24px 20px 0; }
 .survey-v2 .survey-v2-stages { gap:8px; }
 .survey-v2-stages li { display:grid; align-content:start; gap:6px; font-size:10px; }
 .survey-v2 .survey-v2-actions { bottom:0; padding:12px 0 calc(16px + env(safe-area-inset-bottom)); grid-template-columns:1fr 1fr; }
 .survey-v2 .survey-v2-actions [data-back] { grid-column:1; grid-row:2; }
 .survey-v2 .survey-v2-actions [data-save] { grid-column:2; grid-row:2; }
 .survey-v2 .survey-v2-actions [data-skip] { grid-column:1; grid-row:1; justify-self:stretch; text-align:left; }
 .survey-v2 .survey-v2-actions :is([data-next],[data-finish]) { grid-column:2; grid-row:1; }
 .survey-v2 .survey-v2-actions button { font-size:13px; padding-inline:10px; }
 .survey-v2 .survey-v2-step :is(input,select) { font-size:16px; }
 .survey-v2 [data-step=interests] fieldset { grid-template-columns:1fr; }
 .survey-v2 [data-academic-details] { padding:16px; }
}
.survey-v2 .survey-v2-private-note { padding:12px 16px; border-left:3px solid var(--blue); background:var(--blue-light); border-radius:6px; font-size:13px; }
[data-theme=dark] .survey-v2 :is(.visitor-survey-header>span,.survey-v2-stages [aria-current=step],.survey-v2-review-row button) { color:#91bcff; }
/* School suggestions stay attached to the field; unlisted names remain valid. */
.survey-v2 [hidden] { display:none!important; }
.survey-v2 .survey-school-field { display:grid; gap:8px; min-width:0; }
.survey-v2 .survey-school-field>label { font-weight:600; }
.survey-v2 .survey-school-context { margin:0; font-size:13px; color:var(--muted); }
.survey-v2 .survey-school-suggestions { max-height:240px; overflow-y:auto; overscroll-behavior:contain; border:1px solid var(--border); border-radius:10px; background:var(--white); }
.survey-v2 .survey-school-suggestions [role=option] { padding:12px 16px; min-height:52px; border-bottom:1px solid var(--border); cursor:pointer; }
.survey-v2 .survey-school-suggestions [role=option]:last-child { border-bottom:0; }
.survey-v2 .survey-school-suggestions [role=option]:is(:hover,[aria-selected=true]) { background:var(--blue-light); box-shadow:inset 3px 0 0 var(--blue); }
.survey-v2 .survey-school-suggestions strong { display:block; color:var(--navy); font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.survey-v2 .survey-school-suggestions span { display:block; margin-top:3px; color:var(--muted); font-size:12px; line-height:1.5; }
.survey-v2 .survey-school-status { margin:0; font-size:13px; line-height:1.6; color:var(--muted); }
.survey-v2 .survey-school-input-wrap { position:relative; min-width:0; }
.survey-v2 .survey-school-suggestions { position:absolute; z-index:6; top:calc(100% + 4px); left:0; right:0; max-height:min(240px,30dvh); box-shadow:0 8px 24px rgb(11 31 58 / .12); }
.survey-v2 .survey-school-suggestions[data-placement=above] { top:auto; bottom:calc(100% + 4px); }
/* Grade disclosure has two meaningful actions, rather than overlapping reasons. */
.survey-v2 .survey-grade-choice { display:grid; gap:12px; min-width:0; }
.survey-v2 .survey-grade-choice legend { padding-bottom:12px; font-size:13px; font-weight:600; color:var(--muted); }
.survey-v2 .survey-grade-choice label { display:flex; align-items:flex-start; gap:12px; padding:16px; border:1px solid var(--border); border-radius:10px; cursor:pointer; }
.survey-v2 .survey-grade-choice input[type=radio] { position:static; opacity:1; width:20px; height:20px; min-height:20px; flex:0 0 20px; margin-top:3px; accent-color:var(--blue); }
.survey-v2 .survey-grade-choice span { min-width:0; }
.survey-v2 .survey-grade-choice strong { display:block; color:var(--navy); font-size:14px; line-height:1.5; }
.survey-v2 .survey-grade-choice small { display:block; margin-top:5px; color:var(--muted); font-size:13px; line-height:1.6; }
.survey-v2 .survey-grade-choice label:has(input:checked) { background:var(--blue-light); border-color:var(--blue); }

/* Keep the optional average short; disclose the report context only when needed. */
.survey-v2 .survey-grade-choice { grid-template-columns:1fr 1fr; gap:8px; }
.survey-v2 .survey-grade-choice label { align-items:center; padding:12px; }
.survey-v2 .survey-grade-choice input[type=radio] { margin:0; }
.survey-v2 [data-academic-details] { padding:0; border:0; background:transparent; }
.survey-v2 .survey-grade-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
.survey-v2 .survey-grade-row>label { min-width:0; }
.survey-v2 .survey-grade-hint { margin:0; font-size:13px; color:var(--muted); }
.survey-v2 .survey-grade-record { border:1px solid var(--border); border-radius:10px; padding:14px; }
.survey-v2 .survey-grade-record summary { cursor:pointer; font-weight:600; color:var(--navy); }
.survey-v2 .survey-grade-record summary span { display:block; padding-top:4px; font-size:12px; font-weight:400; color:var(--muted); }
.survey-v2 .survey-grade-record-fields { display:grid; gap:16px; margin-top:18px; }
@media(max-width:380px) { .survey-v2 .survey-grade-row { grid-template-columns:1fr; } }
