:root { font-family: "Inter", system-ui, sans-serif; color: #211843; background: #f5f3ff; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; overflow-wrap: anywhere; }
header, main { width: min(100% - 2rem, 62rem); margin-inline: auto; }
header { display: flex; justify-content: space-between; align-items: center; min-height: 4.5rem; }
header a { display: flex; align-items: center; gap: .6rem; font-weight: 800; text-decoration: none; }
header img { width: 2rem; height: 2rem; border-radius: .5rem; }
main { padding-bottom: 3rem; }
h1 { font-size: clamp(1.7rem, 5vw, 3rem); line-height: 1.1; }
h2, h3 { margin-top: 0; }
section, .card { border: 1px solid #ded6f5; border-radius: 1rem; background: white; padding: clamp(.9rem, 3vw, 1.5rem); margin-block: 1rem; min-width: 0; }
.card .card { background: #faf8ff; }
form, label { display: grid; gap: .65rem; }
label:has(input[type=checkbox]) { display: flex; align-items: start; }
form { max-width: 34rem; margin-block: 1rem; }
input, select, button { font: inherit; color: inherit; min-width: 0; min-height: 2.75rem; }
input, select, button { border: 1px solid #998bb8; border-radius: .55rem; padding: .55rem .7rem; background: white; }
input[type=checkbox] { min-height: auto; width: 1.15rem; height: 1.15rem; flex: none; }
button { cursor: pointer; max-width: 100%; }
button:disabled { cursor: wait; opacity: .55; }
.primary, button[aria-pressed=true] { color: white; background: #5830b9; border-color: #5830b9; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
a { color: #492a9a; }
:focus-visible { outline: 3px solid #794be0; outline-offset: 3px; }
code { overflow-wrap: anywhere; font-size: 1rem; }
#notice:empty { display: none; }
.preview-label { padding: .75rem 1rem; border-radius: .55rem; background: #eae2ff; }
.teacher-welcome header, .teacher-welcome main { width: min(100% - 2rem, 69rem); }
.teacher-welcome header, .teacher-panel header { gap: .75rem; flex-wrap: wrap; padding-block: .65rem; }
.teacher-welcome header img, .teacher-panel header img { width: 2.7rem; height: 2.7rem; object-fit: contain; background: white; }
.welcome-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1rem, 4vw, 3.5rem); align-items: center; border: 1px solid #fff; background: linear-gradient(130deg, #ffffffef, #f5eefff2); padding: clamp(1.25rem, 4.5vw, 3.35rem); box-shadow: 0 1.5rem 3.5rem #44246e15; }
.welcome-hero h1 { max-width: 18ch; font-size: clamp(1.95rem, 4.2vw, 3.6rem); margin: .6rem 0 1rem; letter-spacing: -.045em; text-wrap: balance; }
.welcome-label { margin: 0; font-weight: 700; color: #553691; }
.welcome-hero p, .welcome-section p, .welcome-section li { line-height: 1.6; }
.welcome-lead { max-width: 52ch; color: #514466; }
.welcome-example { padding: clamp(.85rem, 3vw, 1.65rem); border-radius: 1rem; background: #2e214d; color: white; box-shadow: 0 .8rem 1.9rem #38244e33; }
.welcome-example .welcome-label { color: #e3d6ff; font-size: .88rem; }
.welcome-example h2 { margin: .4rem 0 1rem; }
.example-row { display: grid; gap: .28rem; padding: .72rem .85rem; background: #ffffff12; border: 1px solid #ffffff22; border-radius: .65rem; }
.example-row + .example-row { margin-top: .55rem; }
.example-row span, .example-row small { color: #e4d9f5; font-size: .84rem; }
.welcome-button { display: inline-block; border-radius: .65rem; padding: .8rem 1rem; text-decoration: none; font-weight: 700; }
.welcome-button.secondary { background: #fff; border: 1px solid #d8c9ed; }
.welcome-button:hover, button:hover { filter: brightness(.94); }
.welcome-hero .actions { gap: 1rem; margin-top: 1.5rem; }
.welcome-section { padding: clamp(1.1rem, 3.5vw, 2.5rem); }
.welcome-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.welcome-grid article { border-radius: .75rem; padding: 1.05rem; background: #f7f3ff; border: 1px solid #ebe1f7; }
.welcome-grid p { margin-bottom: 0; }
.welcome-section ol { padding-left: 1.4rem; }
.welcome-section li + li { margin-top: .65rem; }
.welcome-note { color: #554969; }
.welcome-start { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.5rem; }
.welcome-privacy { border-radius: .75rem; padding: 1rem; background: #fff6e8; align-self: start; }
.welcome-footer { display: flex; flex-wrap: wrap; gap: 1.25rem; padding: 1rem 0; }
.panel-intro { padding: clamp(1rem, 4vw, 2rem); border-radius: 1rem; background: #2e214d; color: white; }
.panel-intro h1 { margin: 0 0 .5rem; }
.panel-intro p { margin: 0; color: #e4d9f5; line-height: 1.5; }
.teacher-panel #workspace { padding: 0; background: transparent; border: 0; }
.teacher-panel .card, .teacher-panel #auth, .teacher-panel #verify { box-shadow: 0 .55rem 1.65rem #46256f12; }
.teacher-panel #auth, .teacher-panel #verify { max-width: 38rem; }
.teacher-panel .card > h2 { font-size: clamp(1.15rem, 3vw, 1.45rem); }
@media (max-width: 48rem) {
  .welcome-hero, .welcome-grid, .welcome-start { grid-template-columns: minmax(0, 1fr); }
}
.teacher-welcome, .teacher-panel { color: #172d29; }
.teacher-welcome a, .teacher-panel a { color: #22594b; }
.teacher-welcome .primary, .teacher-panel .primary { color: #fff; background: #25594c; border-color: #25594c; }
.teacher-welcome header, .teacher-panel header { min-height: 5rem; border-bottom: 1px solid #cddbd3; }
.teacher-welcome :focus-visible, .teacher-panel :focus-visible { outline-color: #24735f; }
.teacher-welcome .welcome-hero {
  margin-block: clamp(1rem, 3vw, 2.25rem);
  background: #203b34;
  color: #fff;
  border: 0;
  border-radius: 1.35rem;
  box-shadow: none;
}
.welcome-hero .welcome-label, .welcome-hero .welcome-lead { color: #dcece3; }
.welcome-hero .primary { background: #d7eddf; color: #173e32; }
.welcome-hero .actions > a:not(.primary) { color: #fff; }
.welcome-example { background: #f6faf7; color: #172d29; box-shadow: none; }
.welcome-example .welcome-label, .example-row span, .example-row small { color: #465f54; }
.example-row { border: 0; border-top: 1px solid #cfddd4; border-radius: 0; padding-inline: 0; }
.welcome-section { background: transparent; border: 0; padding-inline: 0; }
.welcome-grid { gap: 0; border-block: 1px solid #cddbd3; }
.welcome-grid article { background: transparent; border: 0; border-radius: 0; padding: 1.25rem; }
.welcome-grid article + article { border-left: 1px solid #cddbd3; }
.welcome-grid article:first-child { padding-left: 0; }
.welcome-start { background: #fff; padding: clamp(1rem, 4vw, 2rem); border: 1px solid #d7e1db; }
.welcome-privacy { background: #e8f1eb; }
.welcome-note { color: #465f54; }
.panel-intro { background: #203b34; margin-top: 1rem; }
.panel-intro p { color: #dcece3; }
.teacher-panel .card, .teacher-panel #auth, .teacher-panel #verify { border-color: #d7e1db; box-shadow: none; }
.teacher-panel .card .card { background: #f5f9f6; }
.teacher-panel input, .teacher-panel button { border-color: #9cafaa; }
.teacher-panel code { display: inline-block; background: #e8f1eb; padding: .45rem .65rem; border-radius: .45rem; }
.teacher-panel summary { cursor: pointer; font-weight: 650; color: #22594b; }
.panel-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.panel-overview > .card { margin-top: 0; }
.class-row > button { width: 100%; text-align: left; font-weight: 650; background: #e8f1eb; }
.teacher-panel .preview-label { background: #e0ede5; }
@media (max-width: 48rem) {
  .panel-overview { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .welcome-grid article, .welcome-grid article:first-child { padding-inline: 0; }
  .welcome-grid article + article { border-left: 0; border-top: 1px solid #cddbd3; }
}

.teacher-comparison { width: 100%; table-layout: fixed; border-collapse: collapse; background: #ffffff65; }
.teacher-comparison th, .teacher-comparison td { text-align: left; padding: .65rem clamp(.45rem, 2vw, 1rem); border-bottom: 1px solid #cddbd3; vertical-align: top; }
.teacher-comparison th { background: #e0ede5; }
.teacher-help details { padding: .8rem 0; border-bottom: 1px solid #cddbd3; }
.teacher-help summary { cursor: pointer; font-weight: 700; }
.teacher-help .welcome-button { margin-top: 1rem; }

.teacher-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .7rem; margin: 1rem 0; }
.teacher-metrics div { padding: .85rem; border-radius: .75rem; border: 1px solid #d7e1db; background: #ffffffd9; }
.teacher-metrics dt { color: #465f54; font-size: .85rem; }
.teacher-metrics dd { margin: .25rem 0 0; font-size: 1rem; font-weight: 750; }
.welcome-hero .actions > .secondary { background: #ffffff14; border-color: #ffffff65; }

.activity-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .55rem; margin-block: .8rem; }

.teacher-welcome .welcome-hero { background: linear-gradient(120deg, #dbe9dfeb, #f3eadb9e); color: #172d29; border: 1px solid #fff9; }
.teacher-welcome .welcome-hero h1 { max-width: 20ch; font-size: clamp(2rem, 4vw, 3.45rem); }
.teacher-welcome .welcome-hero .welcome-label, .teacher-welcome .welcome-hero .welcome-lead { color: #36534a; }
.teacher-welcome .welcome-hero .primary { background: #285e50; color: #fff; }
.teacher-welcome .welcome-hero .actions > .secondary { color: #22594b; background: #fff5; border-color: #45665b55; }
.teacher-hero-visual { display: flex; justify-content: center; align-items: center; margin: 0; padding: 1rem .3rem; }
.teacher-hero-visual img { display: block; width: 44%; max-width: 10.5rem; height: auto; border-radius: 1rem; border: 3px solid #fff9; box-shadow: 0 .6rem 1.5rem #25403630; }
.teacher-hero-visual img:first-child { transform: rotate(-8deg); }
.teacher-hero-visual img + img { transform: rotate(7deg) translateY(.6rem); }
.teacher-welcome .welcome-start { background: #f5ecdc82; border-color: #fff9; }
.teacher-welcome .welcome-privacy { background: #dbe9df9e; }
.teacher-welcome .teacher-offline { align-items: center; }

.teacher-panel .teacher-auth-card {
  max-width: 32rem;
  margin: clamp(1.3rem, 5vw, 3rem) auto;
  padding: clamp(1.15rem, 5vw, 2.6rem);
  border: 1px solid #fffc;
  border-radius: 1.35rem;
  background: #faf7f0f2;
  box-shadow: 0 1rem 3rem #253b3020;
  text-align: center;
}
.teacher-auth-card h1 { margin: 0 0 .8rem; font-size: clamp(1.65rem, 4.5vw, 2.55rem); letter-spacing: -.04em; text-wrap: balance; }
.teacher-auth-card p { color: #455c54; line-height: 1.55; }
.teacher-auth-card .actions { justify-content: center; }
.provider-options { display: grid; gap: .65rem; margin-top: 1.35rem; }
.teacher-auth-card .provider-button {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) 1.4rem;
  align-items: center;
  gap: .55rem;
  min-height: 3.15rem;
  padding: .65rem .9rem;
  border-radius: .7rem;
  font-weight: 650;
}
.provider-button svg { width: 1.4rem; height: 1.4rem; }
.teacher-auth-card .provider-button.google { background: #fff; color: #252525; border-color: #c8c9c4; }
.teacher-auth-card .provider-button.apple { background: #171717; color: #fff; border-color: #171717; }
.teacher-auth-card .auth-switch { margin: 1.15rem 0 0; font-size: .9rem; }

.teacher-panel .teacher-profile-setup { text-align: left; }
.teacher-profile-setup form { max-width: none; }
.teacher-profile-setup input[readonly] { background: #edf0e9; color: #40564e; }
.teacher-setup-documents { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding-top: .65rem; }
.teacher-setup-documents p { margin: 0; }

.teacher-profile-setup .teacher-setup-documents { padding: 0 0 .4rem 1.75rem; font-size: .84rem; }
.teacher-legal-dialog {
  width: min(36rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: clamp(.8rem, 3vw, 1.35rem);
  border: 1px solid #c8d8cf;
  border-radius: 1rem;
  background: #faf7f0;
  color: #172d29;
}
.teacher-legal-dialog::backdrop { background: #172d2966; }
.teacher-legal-dialog h2 { font-size: 1.2rem; }
.teacher-legal-scroll { max-height: 60vh; overflow: auto; font-size: .88rem; padding: .25rem .4rem .7rem; }
.teacher-legal-scroll h3 { margin: .7rem 0 .45rem; font-size: .95rem; }
.teacher-legal-scroll iframe { display: block; width: 100%; height: 13rem; border: 1px solid #ccd9d1; border-radius: .45rem; background: #fff; }
.teacher-legal-scroll .actions { margin-top: .8rem; }
.teacher-legal-dialog > button { margin-top: .65rem; }

.teacher-legal-scroll section { margin: .65rem 0; padding: .65rem 0; background: transparent; border: 0; border-bottom: 1px solid #ccd9d1; border-radius: 0; }
.teacher-legal-scroll h4 { margin: 0 0 .45rem; font-size: .92rem; }
.teacher-legal-scroll p, .teacher-legal-scroll li { line-height: 1.55; }
.teacher-legal-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.teacher-legal-scroll { min-height: 0; overscroll-behavior: contain; }
.teacher-legal-footer { flex: none; border-top: 1px solid #ccd9d1; padding-top: .75rem; }
.teacher-profile-setup label:has(input[name="accept"]),
.teacher-legal-footer label { font-size: .88rem; line-height: 1.45; }

.teacher-information-dialog {
  width: min(38rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1rem, 4vw, 1.8rem);
  border: 1px solid #d0dcd4;
  border-radius: 1.1rem;
  background: #faf7f0;
  color: #172d29;
}
.teacher-information-dialog::backdrop { background: #172d2966; }
.teacher-information-dialog form { max-width: none; }
.teacher-information-dialog details { margin-block: .8rem; }
.teacher-information-dialog summary { cursor: pointer; font-weight: 650; }

.teacher-information-dialog .agreement-review-button {
  justify-self: start;
  padding: .2rem 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: .88rem;
  text-align: left;
  text-decoration: underline;
  color: #22594b;
}
.teacher-legal-scroll h1 { font-size: 1.05rem; }
.teacher-legal-scroll section h2 { font-size: .95rem; }
.teacher-legal-footer label { font-size: .88rem; line-height: 1.45; }

.teacher-student-row, .teacher-task-row { border-top: 1px solid #d1ddd5; padding-block: .9rem; }
.teacher-student-row h3 { margin-bottom: .35rem; }
.teacher-student-row > button { margin: .25rem .35rem .25rem 0; }
.activity-filters select, .teacher-panel select { width: 100%; min-width: 0; max-width: 100%; }
.teacher-panel select[size] { min-height: 9rem; font-size: .88rem; }
.teacher-panel option { white-space: normal; overflow-wrap: anywhere; }
.teacher-panel header .actions { justify-content: flex-end; }
.teacher-panel .teacher-task-row p { margin: .3rem 0; }

.class-toolbar { margin: .7rem 0 1rem; }
.class-settings { margin-block: .65rem 1rem; font-size: .9rem; }
.student-picker-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid #d1ddd5; }
.student-picker-row small { display: block; color: #50635b; }
.student-picker-row button { flex: none; }
@media (max-width: 24rem) { .student-picker-row { flex-wrap: wrap; } }

.teacher-student-row.is-placed {
  background: #edf7f0;
  border: 1px solid #bfd9c8;
  border-left: 4px solid #33795d;
  border-radius: .8rem;
  padding: .9rem 1rem;
  margin-block: .65rem;
}
.student-placement { font-size: .88rem; font-weight: 650; color: #245d49; }
.teacher-metrics small { display: block; margin-top: .65rem; line-height: 1.5; color: #52675f; font-size: .78rem; }
.list-pagination { align-items: center; justify-content: space-between; margin-top: .85rem; }
.list-pagination span { font-size: .8rem; color: #52675f; }
button:disabled { opacity: .5; cursor: default; }
.teacher-student-dialog {
  width: min(48rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid #c8d8cf;
  border-radius: 1.1rem;
  background: #faf7f0;
  color: #172d29;
}
.teacher-student-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.teacher-student-dialog::backdrop { background: #172d2977; }
.student-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid #d1ddd5; flex: none; }
.student-dialog-header h2 { margin: 0; font-size: 1.15rem; }
.student-dialog-header button { flex: none; font-size: 1.6rem; padding: .1rem .65rem; }
.student-dialog-body { padding: 1rem 1.3rem 1.5rem; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.student-dialog-body form { max-width: none; }
.student-dialog-body details { margin-block: 1rem; }
.student-dialog-body summary { cursor: pointer; font-weight: 650; }
.student-dialog-body select { width: 100%; max-width: 100%; }
.student-dialog-body .actions { display: flex; gap: .4rem; flex-wrap: wrap; }

.class-students-hint { color: #52675f; font-size: .85rem; line-height: 1.5; margin: -.25rem 0 1rem; }
.class-student-list { border: 1px solid #d1ddd5; border-radius: .8rem; overflow: hidden; background: #fff; }
.class-student-list:empty { display: none; }
.class-student-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; }
.class-student-item + .class-student-item { border-top: 1px solid #e0e8e2; }
.class-student-identity { display: grid; gap: .25rem; min-width: 0; }
.class-student-identity strong { font-size: 1rem; }
.class-student-identity span { font-size: .78rem; color: #52675f; }
.class-student-item .student-inspect-button { flex: none; font-size: .84rem; min-height: 2.35rem; padding: .4rem .85rem; border-color: #c3d5c9; background: #f3f8f4; color: #245d49; }
.shared-student-list { border: 1px solid #d1ddd5; border-radius: .8rem; overflow: hidden; }
.shared-student-list:empty { display: none; }
.shared-student-row { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(10rem, 1.2fr) auto; gap: 1rem; align-items: center; padding: .85rem 1rem; background: #fff; border-left: 3px solid transparent; }
.shared-student-row + .shared-student-row { border-top: 1px solid #e0e8e2; }
.shared-student-row.is-placed { border-left-color: #33795d; background: #f3f9f5; }
.shared-student-identity, .shared-student-state { display: grid; justify-items: start; gap: .3rem; min-width: 0; }
.shared-student-identity strong { font-size: 1rem; }
.shared-student-row small { font-size: .76rem; color: #52675f; line-height: 1.45; }
.student-plan { font-size: .7rem; font-weight: 650; color: #64726b; border-radius: 1rem; background: #eef1ef; padding: .15rem .55rem; }
.student-plan.premium { color: #276247; background: #e0eee4; }
.shared-student-actions { display: flex; gap: .4rem; justify-content: flex-end; align-items: center; }
.shared-student-actions button { font-size: .8rem; min-height: 2.3rem; padding: .35rem .7rem; border-color: #c3d5c9; white-space: nowrap; }
.shared-student-actions small { max-width: 10rem; text-align: right; }
.placement-class-options { display: grid; gap: .5rem; }
.placement-class-options button { text-align: left; }
.placement-class-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem; border: 1px solid #d1ddd5; border-radius: .65rem; background: #fff; }
.placement-class-row small { display: block; margin-top: .25rem; font-size: .78rem; color: #52675f; }
.placement-class-row button { flex: none; font-size: .82rem; }
.placement-class-row .placement-remove { color: #8b3e34; border-color: #dfc8c3; background: #fff8f6; }
.panel-overview { align-items: stretch; }
.panel-overview > .compact-referral-card { margin-block: 0 1rem; }
.panel-overview > .compact-referral-card { padding: 1rem 1.2rem; }
.compact-referral-card h2 { font-size: 1.1rem; margin-bottom: .65rem; }
.compact-referral-card p { font-size: .85rem; line-height: 1.5; margin-block: .5rem; }
.compact-referral-card > a { font-size: .78rem; }
.compact-referral-card > button { font-size: .82rem; min-height: 2.35rem; padding: .4rem .75rem; }
.compact-referral-card .referral-total { font-weight: 650; }
.compact-referral-card .referral-family-note { font-size: .76rem; color: #52675f; }
.referral-summary-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; padding-block: .6rem; border-top: 1px solid #e0e8e2; }
.referral-summary-stats div { display: grid; gap: .2rem; }
.referral-summary-stats strong { font-size: 1.15rem; }
.referral-summary-stats span { font-size: .73rem; color: #52675f; }
.shared-student-identity .student-family-label { font-size: .68rem; color: #426459; }
.student-family-group + .student-family-group { border-top: 1px solid #c6d7cc; }
.student-family-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .8rem; padding: .6rem 1rem; background: #e6efe9; color: #365d4b; }
.student-family-heading strong { font-size: .8rem; }
.student-family-heading span { font-size: .75rem; }
.class-count-badge { display: inline-block; vertical-align: middle; margin-left: .7rem; padding: .25rem .6rem; border-radius: 1rem; background: #e6efe9; color: #426459; font-size: .75rem; font-weight: 550; }
.class-row { display: flex; align-items: center; gap: .65rem; margin-block: .7rem; }
.class-row > button:first-child, .class-row > span { flex: 1; min-width: 0; }
.class-row > .class-delete-button, .class-delete-button { width: auto; flex: none; color: #8b3e34; border-color: #dfc8c3; background: #fff8f6; font-size: .82rem; font-weight: 500; padding-inline: .85rem; }
@media (max-width: 42rem) {
  .shared-student-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .65rem; padding: .8rem; }
  .shared-student-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .shared-student-actions small { max-width: none; text-align: left; }
}
@media (max-width: 26rem) {
  .class-student-item { gap: .65rem; padding: .75rem; }
  .class-student-identity span { font-size: .72rem; }
}
