.signup-wizard { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; color: #202635; background: #fff; }
.signup-wizard::backdrop { background: rgba(17, 25, 40, .68); }
.signup-wizard-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: 100%; height: 100%; background: #fff; }
.signup-wizard-header { display: grid; grid-template-columns: 40px minmax(180px, 520px) 40px; align-items: center; justify-content: center; gap: 18px; min-height: 70px; padding: 12px 24px; }
.signup-wizard-back, .signup-wizard-close { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px; color: #667085; background: transparent; cursor: pointer; }
.signup-wizard-back:hover, .signup-wizard-close:hover { color: #26324a; background: #f1f3f6; }
.signup-wizard-back:disabled { visibility: hidden; }
.signup-wizard-back svg, .signup-wizard-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.signup-progress { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.signup-progress-segment { height: 5px; border-radius: 5px; background: #e8ebf0; }
.signup-progress-segment.is-complete { background: #1eb0f6; }
.signup-wizard-content { width: min(100%, 600px); margin: 0 auto; padding: 24px 24px 38px; box-sizing: border-box; overflow: auto; scrollbar-gutter: stable; scrollbar-color: #d5d9e1 transparent; }
.signup-wizard-content[data-direction="forward"] > * { animation: signup-step-forward 240ms cubic-bezier(.2,.75,.25,1) both; }
.signup-wizard-content[data-direction="back"] > * { animation: signup-step-back 240ms cubic-bezier(.2,.75,.25,1) both; }
@keyframes signup-step-forward { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes signup-step-back { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.signup-wizard-content h1 { margin: 0; color: #202635; font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -.5px; line-height: 1.2; }
.signup-wizard-lede { margin: 8px 0 24px; color: #717b8c; font-size: 14px; line-height: 1.55; }
.signup-choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.signup-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 11px 14px; border: 1px solid transparent; border-radius: 10px; color: #202635; background: #f4f5f7; text-align: left; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.signup-choice:hover { background: #eef0f5; }
.signup-choice.is-selected { border-color: #303746; background: #fff; }
.signup-choice-copy { display: grid; gap: 3px; font-size: 14px; font-weight: 400; }
.signup-choice-copy small { color: #7c8493; font-size: 12px; font-weight: 400; }
.signup-choice-mark { position: relative; flex: 0 0 16px; width: 16px; height: 16px; border: 1.5px solid #aeb4bf; border-radius: 50%; }
.signup-choice.is-selected .signup-choice-mark { border-color: #202635; }
.signup-choice.is-selected .signup-choice-mark::after { position: absolute; inset: 3px; border-radius: 50%; background: #202635; content: ""; }
.signup-subject-list { display: grid; gap: 10px; }
.signup-subject-row { overflow: hidden; border: 1px solid #e3e7ee; border-radius: 10px; background: #fff; }
.signup-subject-row.is-selected { border-color: #bfe9fd; }
.signup-subject-toggle { display: flex; width: 100%; min-height: 68px; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border: 0; color: #202635; background: #fff; text-align: left; cursor: pointer; }
.signup-subject-toggle:hover { background: #f7f8fa; }
.signup-subject-toggle.is-selected { background: #f7f8ff; }
.signup-subject-toggle .signup-choice-mark { border-radius: 4px; }
.signup-subject-toggle.is-selected .signup-choice-mark { border-color: #1eb0f6; background: #1eb0f6; }
.signup-subject-toggle.is-selected .signup-choice-mark::after { position: absolute; top: 1px; left: 4px; width: 4px; height: 7px; border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); content: ""; }
.signup-subject-name { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.signup-subject-name small { color: #737e91; font-size: 12px; font-weight: 400; }
.signup-grade-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; padding: 12px 16px 16px; }
.signup-grade-field { display: grid; align-content: start; gap: 7px; min-width: 0; color: #657084; font-size: 12px; }
.signup-grade-trigger { display: block; box-sizing: border-box; width: 100%; height: 42px; padding: 0 10px; border: 1px solid #dfe3ec; border-radius: 8px; color: #273044; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.signup-grade-trigger:hover { border-color: #8290ff; }
.signup-school-search { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #e1e4ea; border-radius: 8px; color: #273044; background: #fff; font: inherit; }
.signup-school-search { margin-bottom: 10px; }
.signup-school-results { display: grid; gap: 7px; max-height: min(42vh, 360px); overflow: auto; }
.signup-school-results .signup-choice { min-height: 44px; }
.signup-school-request { display: grid; gap: 4px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #edf0f4; }
.signup-school-request strong { color: #374055; font-size: 14px; font-weight: 600; }
.signup-school-request p { margin: 0 0 5px; color: #778294; font-size: 13px; line-height: 1.5; }
.signup-inline-note { margin: 16px 0 0; color: #747e8e; font-size: 12px; line-height: 1.5; }
.signup-inline-note.is-error { color: #a83737; }
.signup-partner-school { display: grid; gap: 7px; margin-top: 22px; padding: 18px; border: 1px solid #e2e5ec; border-radius: 10px; background: #f8f9fb; }
.signup-partner-school strong { color: #202635; font-size: 16px; font-weight: 600; }
.signup-partner-school span { color: #6e7889; font-size: 13px; line-height: 1.5; }
.signup-wizard-footer { display: flex; justify-content: center; gap: 10px; padding: 16px 24px max(22px, env(safe-area-inset-bottom)); border-top: 1px solid #edf0f3; background: #fff; }
.signup-wizard-next, .signup-wizard-skip { min-height: 44px; padding: 0 24px; border: 1px solid #1eb0f6; border-radius: 8px; color: #e0f2fe; background: #1eb0f6; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.signup-wizard-next { width: min(100%, 520px); }
.signup-wizard-next:hover { background: #17a0e2; }
.signup-wizard-skip { border-color: #e1e4ea; color: #5f6878; background: #fff; }
.signup-wizard-skip:hover { background: #f6f7f9; }
.signup-wizard-next:focus-visible, .signup-wizard-skip:focus-visible, .signup-choice:focus-visible, .signup-wizard-header button:focus-visible, .signup-subject-toggle:focus-visible, .signup-grade-trigger:focus-visible { outline: 3px solid #7fd4fb; outline-offset: 2px; }
@media (max-width: 560px) {
    .signup-wizard-header { min-height: 60px; grid-template-columns: 36px minmax(120px, 1fr) 36px; gap: 10px; padding: 8px 12px; }
    .signup-wizard-content { padding: 20px 18px 28px; }
    .signup-choice-list { grid-template-columns: 1fr; }
    .signup-choice { min-height: 44px; }
    .signup-wizard-footer { flex-direction: column; padding: 12px 18px max(16px, env(safe-area-inset-bottom)); }
    .signup-wizard-next { width: 100%; order: -1; }
    .signup-wizard-skip { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .signup-choice { transition: none; } .signup-wizard-content[data-direction] > * { animation: none; } }

/* Same full-screen layout as the sign-up page: blank left half, centred column on the right. */
.signup-wizard { font-family: Inter, ui-sans-serif, system-ui, sans-serif; zoom: calc(1 / 1.05); }
.signup-wizard[open] { display: grid; grid-template-columns: 1fr; }
.signup-wizard-shell { grid-column: 1; }
.signup-wizard-content { display: flex; flex-direction: column; justify-content: safe center; }
@media (max-width: 720px) {
    .signup-wizard[open] { grid-template-columns: 1fr; }
    .signup-wizard-shell { grid-column: 1; }
}
.signup-wizard-content { width: min(100%, 640px); }

/* Close X in the onboarding header: plain grey, no background, border or shadow. */
.signup-wizard-close, .signup-wizard-close:hover, .signup-wizard-close:focus { background: transparent; box-shadow: none; border: 0; color: #8a8a8f; }

/* Selected choices match the notes page checkboxes: green fill with a white checkmark instead of a dot. */
.signup-choice.is-selected .signup-choice-mark { border-color: #548b72; background: #548b72; }
.signup-choice.is-selected .signup-choice-mark::after { position: absolute; inset: auto; left: 3px; top: 0; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; border-radius: 0; transform: rotate(45deg); content: ""; }

/* No outline on the choice cards: the selected card has no dark border and no focus ring. */
.signup-choice.is-selected, .signup-choice:focus, .signup-choice:focus-visible { border-color: transparent; outline: none; }

/* Choice tick = the notes page syllabus subtopic button: 32px pale green box with a green check; solid green with a white check when selected. */
.signup-choice-mark { position: static; flex: 0 0 32px; box-sizing: border-box; display: grid; place-items: center; width: 32px; height: 32px; min-height: 32px; padding: 0; border: 1px solid #85c9a4; border-radius: 7px; color: #23855c; background: #effaf3; }
.signup-choice-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.signup-choice.is-selected .signup-choice-mark { border-color: #23855c; color: #fff; background: #2f9b68; }
.signup-choice.is-selected .signup-choice-mark::after { content: none; }

/* Back to circles: blank white when unselected, green with a white tick when selected (notes page colours). */
.signup-choice-mark { flex: 0 0 22px; width: 22px; height: 22px; min-height: 0; padding: 0; border: 1.5px solid #aeb4bf; border-radius: 50%; color: #fff; background: #fff; }
.signup-choice-mark svg { width: 13px; height: 13px; opacity: 0; stroke-width: 2.6; }
.signup-choice.is-selected .signup-choice-mark { border-color: #23855c; background: #2f9b68; color: #fff; }
.signup-choice.is-selected .signup-choice-mark svg { opacity: 1; }

/* Choice cards keep one background in every state, so selecting one never turns it white. */
.signup-choice, .signup-choice:hover, .signup-choice.is-selected, .signup-choice:focus-visible { background: #f4f5f7; }
/* Site font (Inter) everywhere in the onboarding, including buttons and inputs. */
.signup-wizard, .signup-wizard button, .signup-wizard input, .signup-wizard select, .signup-wizard textarea { font-family: Inter, ui-sans-serif, system-ui, sans-serif; }

/* No black outlines on the green ticks: the selected tick's border matches its green fill, and no focus ring is drawn on it. */
.signup-choice-mark, .signup-choice-mark:focus, .signup-choice-mark:focus-visible { outline: none; box-shadow: none; }
.signup-choice.is-selected .signup-choice-mark { border-color: #2f9b68; }

/* Helper lines under each onboarding question are removed; the questions and choices stay. */
.signup-wizard-lede { display: none; }

/* Spacing under each question heading, since the helper line above the choices is hidden. */
.signup-wizard-content h1 { margin: 0 0 28px; }

/* No divider line above the footer button. */
.signup-wizard-footer { border-top: 0; }

/* Progress bar: the grey track stays visible; the newest completed segment's blue slides in over it from the left. */
@keyframes signupSegmentFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.signup-progress-segment.is-filling { position: relative; overflow: hidden; background: #e8ebf0; }
.signup-progress-segment.is-filling::after { position: absolute; inset: 0; background: #1eb0f6; transform-origin: left center; animation: signupSegmentFill 200ms ease-out both; content: ""; }
@media (prefers-reduced-motion: reduce) { .signup-progress-segment.is-filling::after { animation: none; } }
