:root {
    --navy-950: #082f55;
    --navy-900: #0b3c69;
    --navy-800: #155285;
    --blue: #3e8edb;
    --blue-soft: #eaf4ff;
    --green: #459b6d;
    --green-soft: #eaf7ee;
    --coral: #df6548;
    --coral-soft: #fff0ea;
    --gold: #c99a45;
    --gold-soft: #fff8df;
    --ink: #142d49;
    --muted: #657386;
    --border: #d9e0e6;
    --paper: #fffdfa;
    --canvas: #f6f4ef;
    --white: #fff;
    --danger: #b83b37;
    --radius: 16px;
    --shadow: 0 14px 38px rgba(20, 45, 73, .08);
    --serif: Georgia, "Times New Roman", serif;
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { min-height: 100vh; margin: 0; color: var(--ink); font-family: var(--sans); }
a { color: var(--navy-800); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(62, 142, 219, .35); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; margin-bottom: .55rem; }
h2 { margin-bottom: .4rem; }
p { line-height: 1.6; }
.muted { color: var(--muted); }
.eyebrow { margin-bottom: .55rem; color: var(--coral); font-size: .74rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.optional { color: var(--muted); font-size: .78rem; font-weight: 500; }

.button {
    display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: .45rem;
    border: 1px solid transparent; border-radius: 10px; padding: .72rem 1.15rem;
    cursor: pointer; font-weight: 750; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20, 45, 73, .13); }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-primary { background: var(--coral); color: var(--white); }
.button-secondary { border-color: #b8d3e8; background: var(--blue-soft); color: var(--navy-900); }
.button-full { width: 100%; }
.text-link { font-weight: 750; text-decoration: none; }
.text-button { padding: 0; border: 0; background: none; cursor: pointer; font-weight: 700; }
.danger { color: var(--danger); }
.icon-button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1.2rem; }

label { display: grid; gap: .42rem; color: var(--ink); font-size: .83rem; font-weight: 750; }
input, select, textarea {
    width: 100%; min-height: 44px; border: 1px solid #cbd4dc; border-radius: 9px;
    background: var(--white); color: var(--ink); padding: .68rem .78rem;
}
input::placeholder { color: #96a1ad; }
textarea { resize: vertical; }
fieldset { margin: 0; border: 0; border-top: 1px solid var(--border); padding: 1.25rem 0 0; }
legend { padding-right: .75rem; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }
.stacked-form { display: grid; gap: 1rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.check-field { display: flex; align-items: flex-start; gap: .6rem; margin-top: .85rem; font-weight: 550; }
.check-field input { width: 18px; min-height: 18px; margin-top: 2px; }
.inline-form { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)) auto; align-items: end; gap: .85rem; }

.alert { margin: 1rem 0; border: 1px solid; border-radius: 10px; padding: .8rem 1rem; font-size: .88rem; }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert-error { border-color: #edc5c2; background: #fff0ee; color: #8b2f2a; }
.alert-success { border-color: #b8dfc6; background: var(--green-soft); color: #2e704d; }
.alert-warning { border-color: #e4cf91; background: var(--gold-soft); color: #745b20; }

.auth-body { background: radial-gradient(circle at 10% 10%, #fff 0, #f8f5ef 38%, #eef3f6 100%); }
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(340px, .85fr) minmax(540px, 1.15fr); }
.auth-brand {
    display: flex; flex-direction: column; justify-content: center; overflow: hidden; position: relative;
    background: linear-gradient(155deg, var(--navy-950), var(--navy-800)); color: #eaf4ff; padding: clamp(3rem, 7vw, 7rem);
}
.auth-brand::after {
    content: ""; position: absolute; width: 350px; height: 350px; right: -180px; bottom: -150px;
    border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 120px rgba(255,255,255,.02);
}
.auth-brand h1 { max-width: 620px; color: var(--white); }
.auth-brand > p:not(.eyebrow) { max-width: 540px; color: #c5d9eb; font-size: 1.05rem; }
.auth-brand .eyebrow { color: #f1c477; }
.brand-note { display: flex; gap: .75rem; align-items: center; margin-top: 2rem; color: #dce9f3; font-size: .86rem; }
.brand-note-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.23); border-radius: 50%; color: #f1c477; }
.auth-panel { display: grid; place-items: center; padding: 2rem; }
.form-card { width: min(460px, 100%); border: 1px solid rgba(188, 198, 207, .75); border-radius: 18px; background: rgba(255,255,255,.88); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.form-card-wide { width: min(780px, 100%); margin: 2rem auto; }
.auth-switch { margin: 1.2rem 0 0; color: var(--muted); text-align: center; font-size: .83rem; }
.requirement-list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }
.requirement-list span { border-radius: 999px; padding: .42rem .65rem; background: #edf1f4; color: var(--muted); font-size: .75rem; }
.requirement-list .passed { background: var(--green-soft); color: #2e704d; }
.requirement-list .failed { background: #fff0ee; color: var(--danger); }
.brand-mark {
    display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid rgba(255,255,255,.22);
    border-radius: 14px; color: #f2c778; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; text-decoration: none;
}
.brand-mark-large { width: 74px; height: 74px; margin-bottom: 3rem; font-size: 1.45rem; }

.dashboard-body { background: var(--canvas); }
.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar {
    display: flex; position: sticky; top: 0; height: 100vh; flex-direction: column;
    background: linear-gradient(180deg, var(--navy-950), var(--navy-900)); color: #d9e7f2; padding: 1.5rem 1rem;
}
.sidebar .brand-mark { margin: .25rem .4rem 2rem; }
.sidebar-label { margin: 0 .65rem .55rem; color: #86aac8; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: .35rem; }
.sidebar-nav a, .nav-soon {
    display: flex; min-height: 46px; align-items: center; gap: .7rem; border-radius: 9px;
    color: #d9e7f2; padding: .7rem .8rem; font-size: .88rem; text-decoration: none;
}
.sidebar-nav a.active { background: rgba(96, 164, 220, .22); color: white; box-shadow: inset 3px 0 #f3c67a; }
.nav-soon { color: #7fa2bf; }
.nav-soon small { margin-left: auto; color: #7794aa; font-size: .62rem; text-transform: uppercase; }
.sidebar-user { display: flex; align-items: center; gap: .65rem; margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 1rem .4rem 0; }
.sidebar-user > span:nth-child(2) { display: grid; min-width: 0; flex: 1; font-size: .78rem; }
.sidebar-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: #8fb0ca; }
.avatar {
    display: grid; flex: 0 0 auto; width: 44px; height: 44px; place-items: center;
    border: 1px solid #bdd2e3; border-radius: 50%; background: #deecf7; color: var(--navy-800); font-weight: 800;
}
.avatar-small { width: 36px; height: 36px; }
.avatar-large { width: 72px; height: 72px; font-size: 1.25rem; }
.dashboard-main { width: 100%; max-width: 1500px; padding: clamp(1.5rem, 4vw, 3.2rem); }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.page-header p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.metric-card { overflow: hidden; position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); padding: 1.25rem; box-shadow: 0 6px 20px rgba(20,45,73,.04); }
.metric-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -35px; top: -35px; border-radius: 50%; background: currentColor; opacity: .08; }
.metric-card span, .metric-card small { display: block; color: var(--muted); }
.metric-card strong { display: block; margin: .35rem 0 .1rem; color: var(--ink); font-family: var(--serif); font-size: 2.2rem; }
.accent-blue { color: var(--blue); } .accent-green { color: var(--green); } .accent-coral { color: var(--coral); } .accent-gold { color: var(--gold); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .7fr); gap: 1.2rem; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); padding: 1.35rem; box-shadow: 0 6px 20px rgba(20,45,73,.04); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.panel-heading h2 { margin: 0; }
.status-pill { display: inline-flex; border-radius: 999px; padding: .4rem .7rem; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.status-good { background: var(--green-soft); color: #2f7951; }
.status-muted { background: #edf0f2; color: var(--muted); }
.activity-list > div { display: flex; align-items: center; gap: .7rem; border-bottom: 1px solid #edf0f2; padding: .85rem 0; }
.activity-list > div:last-child { border-bottom: 0; }
.activity-list p { display: grid; margin: 0; font-size: .86rem; }
.activity-list small { color: var(--muted); }
.activity-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.check-list { display: grid; gap: .75rem; margin: 1.3rem 0; padding: 0; list-style: none; font-size: .86rem; }
.check-list span { display: inline-grid; width: 22px; height: 22px; place-items: center; margin-right: .4rem; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: .72rem; }
.empty-state { padding: 2.8rem 1rem; text-align: center; color: var(--muted); }
.empty-state > span { display: grid; width: 50px; height: 50px; place-items: center; margin: 0 auto 1rem; border-radius: 14px; background: var(--blue-soft); color: var(--blue); font-size: 1.4rem; }
.empty-state h2, .empty-state h3 { color: var(--ink); }
.toggle-panel { margin-bottom: 1rem; }
.toggle-panel .inline-form .button { grid-column: 1 / -1; }
.account-list { display: grid; gap: 1rem; }
.account-card { position: relative; }
.account-summary { display: flex; align-items: center; gap: .85rem; }
.account-summary > div { min-width: 0; flex: 1; }
.account-summary h2 { margin-bottom: .2rem; font-size: 1.25rem; }
.account-summary p { overflow: hidden; margin: 0; color: var(--muted); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.license-details { display: flex; flex-wrap: wrap; gap: 1.6rem; margin: 1.1rem 0; border-block: 1px solid #edf0f2; padding: .85rem 0; }
.license-details div { display: grid; gap: .15rem; }
.license-details small { color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.license-details strong { font-size: .82rem; }
.license-action summary { cursor: pointer; color: var(--navy-800); font-size: .82rem; font-weight: 750; }
.license-action[open] summary { margin-bottom: .85rem; }
.revoke-form { position: absolute; right: 1.35rem; bottom: 1.35rem; }

.family-shell { display: grid; min-height: 100vh; grid-template-columns: 96px minmax(0, 1fr); }
.family-sidebar { display: flex; position: sticky; top: 0; height: 100vh; flex-direction: column; align-items: center; background: linear-gradient(180deg, var(--navy-950), var(--navy-900)); padding: 1.3rem 0; }
.family-sidebar .brand-mark { width: 58px; margin-bottom: 2rem; }
.family-nav { display: grid; width: 100%; gap: .4rem; }
.family-nav a, .family-nav span { display: grid; min-height: 52px; place-items: center; color: #aac4d9; font-size: 1.2rem; text-decoration: none; }
.family-nav a.active { border-left: 3px solid #f0c478; background: rgba(80,147,202,.22); color: white; }
.family-logout { margin-top: auto; }
.family-logout button { cursor: pointer; }
.family-main { width: 100%; max-width: 1500px; padding: clamp(1.5rem, 4vw, 3.2rem); }
.family-header { align-items: center; }
.license-banner { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; border: 1px solid #bedfc9; border-radius: 12px; background: var(--green-soft); padding: .75rem 1rem; color: #2e704d; }
.license-banner > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #cfead8; }
.license-banner p { display: grid; margin: 0; }
.license-banner small { opacity: .8; }
.student-grid { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 1rem; }
.student-card { display: flex; min-height: 150px; align-items: center; gap: 1rem; border: 1px solid #c9dff0; border-radius: var(--radius); background: linear-gradient(145deg, #fbfdff, var(--blue-soft)); padding: 1.3rem; }
.student-card > div { flex: 1; }
.student-card h2 { margin-bottom: .25rem; }
.student-card p { margin: 0; color: var(--muted); }
.student-empty { display: block; min-height: 220px; grid-column: 1 / -1; border-style: dashed; text-align: center; }
.student-book { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 1rem; border-radius: 50%; background: #dceeff; color: var(--blue); font-size: 1.4rem; }
.family-widget-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.empty-widget { display: flex; min-height: 150px; align-items: flex-start; gap: .8rem; }
.empty-widget > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 10px; background: var(--coral-soft); color: var(--coral); }
.empty-widget h2 { margin-top: .35rem; font-size: 1.1rem; }
.empty-widget p { color: var(--muted); font-size: .83rem; }

/* Learning studio */
.learning-header { margin-bottom: 1.2rem; }
.learner-switcher { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: .7rem; margin: 0 0 1.1rem; border: 1px solid #c9dff0; border-radius: 12px; background: #fbfdff; padding: .65rem .8rem; }
.learner-switcher label { display: block; white-space: nowrap; }
.learner-switcher select { min-width: 220px; min-height: 38px; }
.learning-cycle { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin-bottom: 1.5rem; border: 1px solid #c9dff0; border-radius: var(--radius); background: #c9dff0; }
.learning-cycle > div { display: grid; grid-template-columns: 30px 1fr; column-gap: .65rem; background: #f9fcff; padding: .9rem; }
.learning-cycle span { grid-row: span 2; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--navy-900); color: white; font-size: .78rem; font-weight: 800; }
.learning-cycle strong { font-size: .82rem; }.learning-cycle small { color: var(--muted); font-size: .7rem; }
.learning-empty { padding: 3rem 1rem; text-align: center; }.learning-empty > span { display: grid; width: 50px; height: 50px; place-items: center; margin: 0 auto 1rem; border-radius: 15px; background: var(--gold-soft); color: var(--gold); font-size: 1.4rem; }
.starter-lesson { display: grid; grid-template-columns: 1fr minmax(280px, .7fr); align-items: center; gap: 2rem; border-color: #b8d3e8; background: linear-gradient(135deg, #fffdfa, #eef7ff); }.starter-lesson h2 { font-size: 1.7rem; }.starter-lesson p { margin-bottom: 0; color: var(--muted); }
.starter-form { display: grid; gap: .8rem; }.starter-form label { font-size: .8rem; }.starter-form select { margin-top: .2rem; }
.lesson-grid { display: grid; grid-template-columns: repeat(3, minmax(230px, 1fr)); gap: 1rem; }.lesson-card { display: block; position: relative; overflow: hidden; min-height: 220px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); padding: 1.2rem; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }.lesson-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }.lesson-card .subject-swatch { position: absolute; right: 1.2rem; top: 1.2rem; }.lesson-card > p { margin: 0 2rem .55rem 0; color: var(--muted); font-size: .73rem; font-weight: 750; }.lesson-card h3 { margin-bottom: .45rem; font-size: 1.3rem; }.lesson-card > small { color: var(--muted); text-transform: capitalize; }.lesson-card em { display: block; margin-top: .8rem; color: var(--navy-800); font-size: .76rem; font-style: normal; font-weight: 800; text-transform: capitalize; }
.lesson-progress { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; }.lesson-progress span { display: block; overflow: hidden; height: 7px; flex: 1; border-radius: 99px; background: #e6edf2; }.lesson-progress i { display: block; height: 100%; border-radius: inherit; background: var(--green); }.lesson-progress strong { font-size: .75rem; }
.back-link { display: inline-block; margin-bottom: 1rem; color: var(--navy-800); font-size: .82rem; font-weight: 800; text-decoration: none; }.lesson-header { margin-bottom: 1.25rem; }.mastery-chip { display: grid; width: 92px; height: 92px; place-items: center; border: 7px solid #d4eadc; border-radius: 50%; background: #f9fdf9; text-align: center; }.mastery-chip span { display: block; margin-top: .6rem; color: var(--green); font-family: var(--serif); font-size: 1.35rem; font-weight: 800; }.mastery-chip small { display: block; margin-top: -1rem; color: var(--muted); font-size: .63rem; font-weight: 800; text-transform: uppercase; }
.teach-panel { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); margin-bottom: 1.4rem; border: 1px solid #c9dff0; border-radius: var(--radius); background: linear-gradient(135deg, #eef8ff, #fffdfa); padding: clamp(1.2rem, 3vw, 2rem); }.teach-panel h2 { font-size: 1.6rem; }.teach-panel p:not(.eyebrow) { color: var(--muted); }
.water-cycle-visual { position: relative; min-height: 260px; overflow: hidden; border-radius: 14px; background: linear-gradient(#9ed7f5 0 64%, #c8e7ab 64% 73%, #5da8d1 73%); color: #12496f; }.water-cycle-visual > div { position: absolute; font-size: .76rem; font-weight: 800; text-align: center; }.sun { top: 24px; left: 30px; width: 54px; height: 54px; border-radius: 50%; background: #ffd76b; padding-top: 18px; box-shadow: 0 0 0 8px rgba(255,219,111,.24); }.cloud { top: 35px; right: 45px; min-width: 112px; border-radius: 28px; background: rgba(255,255,255,.92); padding: 17px 12px; }.cloud small { color: #668399; }.rain { top: 109px; right: 74px; color: #3f83c8; font-size: 1.2rem !important; letter-spacing: 6px; }.lake { bottom: 28px; left: 44px; min-width: 102px; border-radius: 8px; background: rgba(57,139,184,.78); color: white; padding: 8px; }.vapor { bottom: 83px; left: 145px; color: white; text-shadow: 0 1px 4px #316b8a; }.cycle-arrow { position: absolute; color: white; font-size: 2rem; font-style: normal; font-weight: 300; text-shadow: 0 1px 4px rgba(8,47,85,.3); }.arrow-one { top: 81px; left: 92px; }.arrow-two { top: 92px; right: 27px; }.arrow-three { bottom: 38px; right: 145px; }
.vocab-pills { display: flex; flex-wrap: wrap; gap: .45rem; }.vocab-pills span { border: 1px solid #b8d3e8; border-radius: 999px; background: white; padding: .38rem .6rem; color: var(--navy-800); font-size: .72rem; font-weight: 800; }
.activity-stack { display: grid; gap: .9rem; }.activity-card { display: grid; grid-template-columns: 160px minmax(0, 1fr); border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); }.activity-stage { border-right: 1px solid var(--border); background: #f8fbfd; padding: 1.25rem; }.activity-stage span { display: grid; width: 32px; height: 32px; place-items: center; margin-bottom: .7rem; border-radius: 50%; background: var(--blue-soft); color: var(--navy-800); font-weight: 800; }.activity-stage p { margin: 0; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }.activity-content { padding: 1.25rem; }.activity-content h2 { margin-bottom: .4rem; font-size: 1.25rem; }.activity-content > p { color: var(--muted); font-size: .9rem; }.activity-form { display: grid; gap: .9rem; margin-top: 1rem; }.activity-form textarea { width: min(640px, 100%); }.activity-form .button { width: fit-content; }
.answer-options { display: flex; flex-wrap: wrap; gap: .55rem; }.answer-options label { position: relative; display: block; cursor: pointer; }.answer-options input { position: absolute; width: 1px; min-height: 1px; opacity: 0; }.answer-options span { display: block; border: 1px solid #c6d5e0; border-radius: 9px; background: white; padding: .62rem .8rem; color: var(--ink); font-size: .83rem; font-weight: 650; }.answer-options input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--navy-900); box-shadow: 0 0 0 2px rgba(62,142,219,.15); }
.answer-feedback { width: min(720px, 100%); margin: 1rem 0 0; border: 1px solid; border-radius: 10px; padding: .8rem .9rem; }.answer-feedback strong { font-size: .83rem; }.answer-feedback p { margin: .25rem 0 0; color: inherit; font-size: .84rem; }.answer-feedback small { display: block; margin-top: .5rem; font-weight: 750; }.feedback-good { border-color: #b8dfc6; background: var(--green-soft); color: #2e704d; }.feedback-review { border-color: #ecd49c; background: var(--gold-soft); color: #765b1f; }.feedback-neutral { border-color: #bdd8e9; background: var(--blue-soft); color: var(--navy-800); }.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 1050px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { min-height: 370px; padding: 3rem; }
    .auth-panel { padding: 1.5rem; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .content-grid { grid-template-columns: 1fr; }
    .inline-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .student-grid, .family-widget-grid { grid-template-columns: 1fr; }
    .learning-cycle { grid-template-columns: repeat(2, 1fr); }.lesson-grid { grid-template-columns: repeat(2, 1fr); }.starter-lesson, .teach-panel { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .admin-shell, .family-shell { display: block; }
    .sidebar { position: static; width: 100%; height: auto; padding: .75rem; }
    .sidebar .brand-mark, .sidebar-label, .nav-soon, .sidebar-user > span:nth-child(2) { display: none; }
    .sidebar-nav { display: flex; }
    .sidebar-nav a { flex: 1; justify-content: center; }
    .sidebar-user { position: absolute; right: .75rem; top: .95rem; margin: 0; border: 0; padding: 0; }
    .dashboard-main, .family-main { padding: 1.25rem; }
    .page-header { display: grid; gap: 1rem; }
    .page-header .button { width: 100%; }
    .field-grid, .inline-form, .metric-grid { grid-template-columns: 1fr; }
    .account-summary { align-items: flex-start; flex-wrap: wrap; }
    .account-summary .status-pill { margin-left: 58px; }
    .revoke-form { position: static; margin-top: 1rem; }
    .family-sidebar { display: flex; position: fixed; z-index: 10; width: 100%; height: 68px; left: 0; right: 0; bottom: 0; top: auto; flex-direction: row; padding: 0 .6rem; }
    .family-sidebar .brand-mark { display: none; }
    .family-nav { display: flex; flex: 1; }
    .family-nav a, .family-nav span { min-height: 68px; flex: 1; }
    .family-nav a.active { border-left: 0; border-bottom: 3px solid #f0c478; }
    .family-logout { margin: 0; }
    .family-main { padding-bottom: 90px; }
    .learner-switcher { width: 100%; align-items: stretch; flex-direction: column; }.learner-switcher select { min-width: 0; }.learning-cycle, .lesson-grid { grid-template-columns: 1fr; }.mastery-chip { width: 76px; height: 76px; }.activity-card { grid-template-columns: 1fr; }.activity-stage { display: flex; align-items: center; gap: .7rem; border-right: 0; border-bottom: 1px solid var(--border); padding: .8rem 1rem; }.activity-stage span { margin: 0; }.answer-options { display: grid; }.answer-options span { width: 100%; }.water-cycle-visual { min-height: 220px; }
}

/* Attendance and gradebook records */
.records-page-header { margin-bottom: 1.35rem; }
.attendance-form { padding: 1.2rem; }
.attendance-list { display: grid; margin: 1rem 0 1.2rem; border-top: 1px solid var(--border); }
.attendance-row { display: grid; grid-template-columns: minmax(160px, 1fr) 160px minmax(180px, 1.5fr); align-items: center; gap: .8rem; border-bottom: 1px solid var(--border); padding: .75rem 0; }
.attendance-row > div { display: grid; gap: .12rem; }.attendance-row small { color: var(--muted); font-size: .72rem; }
.attendance-row select, .attendance-row input { margin: 0; min-height: 38px; }
.records-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }
.records-summary-grid article { display: flex; min-height: 94px; align-items: center; gap: .75rem; border: 1px solid var(--border); border-radius: 13px; background: var(--paper); padding: .9rem; }
.records-summary-grid article > span { display: grid; min-width: 46px; height: 46px; place-items: center; border-radius: 12px; background: var(--green-soft); color: var(--green); font-weight: 850; }
.records-summary-grid article > div { min-width: 0; }.records-summary-grid small, .records-summary-grid p { display: block; margin: 0; color: var(--muted); font-size: .7rem; }.records-summary-grid strong { display: block; overflow: hidden; margin: .14rem 0; text-overflow: ellipsis; white-space: nowrap; }
.records-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .85fr); align-items: start; gap: 1rem; }.gradebook-panel { min-width: 0; }.gradebook-table td:first-child { min-width: 180px; }.gradebook-table td:nth-child(2) { color: var(--muted); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (max-width: 1050px) { .records-summary-grid { grid-template-columns: 1fr; }.records-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .attendance-row { grid-template-columns: 1fr; gap: .45rem; }.attendance-row select, .attendance-row input { width: 100%; }.records-page-header .button { width: 100%; } }

@media (max-width: 520px) {
    .auth-brand { min-height: 315px; padding: 2rem; }
    .auth-brand h1 { font-size: 2rem; }
    .brand-mark-large { width: 58px; height: 58px; margin-bottom: 2rem; }
    .auth-panel { padding: .8rem; }
    .form-card { padding: 1.25rem; }
    .metric-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Production operations, installation, and family workspaces */
.button-update { border-color: #e2c470; background: var(--gold-soft); color: #6f5416; }
.status-warning { background: var(--gold-soft); color: #765b1f; }
.field-help, .fieldset-intro { color: var(--muted); font-size: .72rem; font-weight: 500; line-height: 1.45; }
.fieldset-intro { margin: .2rem 0 1rem; }

.install-shell { display: grid; width: min(1180px, calc(100% - 32px)); grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr); align-items: start; gap: 1.2rem; margin: 2rem auto; }
.install-rail { position: sticky; top: 2rem; overflow: hidden; min-height: 690px; border-radius: 22px; background: linear-gradient(155deg, var(--navy-950), #155285); color: #eaf4ff; padding: clamp(1.5rem, 3vw, 2.6rem); box-shadow: var(--shadow); }
.install-rail::after { content: ""; position: absolute; width: 260px; height: 260px; right: -150px; bottom: -130px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 48px rgba(255,255,255,.025), 0 0 0 96px rgba(255,255,255,.018); }
.install-brand { margin-bottom: 3rem; }
.install-rail .eyebrow { color: #f1c477; }.install-rail h1 { max-width: 420px; color: white; font-size: clamp(2rem, 4vw, 3.2rem); }.install-rail > p:not(.eyebrow) { color: #bed2e2; }
.install-steps { display: grid; gap: .2rem; margin: 2rem 0; padding: 0; list-style: none; }
.install-steps li { display: flex; align-items: center; gap: .8rem; border-bottom: 1px solid rgba(255,255,255,.09); padding: .8rem 0; }
.install-steps li > span { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: #f1c477; font-size: .72rem; font-weight: 800; }
.install-steps li > div { display: grid; gap: .12rem; }.install-steps strong { color: white; font-size: .82rem; }.install-steps small { color: #91b0c8; font-size: .7rem; }
.install-lock-note { display: flex; gap: .65rem; margin-top: 1.5rem; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.06); padding: .8rem; }
.install-lock-note > span { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: rgba(91,187,132,.2); color: #9ee0b9; }
.install-lock-note p { display: grid; gap: .15rem; margin: 0; }.install-lock-note strong { font-size: .75rem; }.install-lock-note small { color: #a9c2d5; font-size: .67rem; line-height: 1.4; }
.install-card { width: 100%; margin: 0; border-radius: 22px; padding: clamp(1.4rem, 3vw, 2.4rem); }
.install-requirements { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }.install-requirements span { display: flex; align-items: center; gap: .4rem; border: 1px solid transparent; }
.install-card fieldset { margin-top: .5rem; padding-top: 1.4rem; }.install-card legend { display: flex; align-items: center; gap: .55rem; }.install-card legend span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--navy-800); font-family: var(--sans); font-size: .7rem; }

.system-score { display: grid; min-width: 110px; border: 1px solid #e7d39a; border-radius: 14px; background: var(--gold-soft); padding: .7rem 1rem; text-align: center; }.system-score.is-healthy { border-color: #b8dfc6; background: var(--green-soft); }.system-score strong { font-family: var(--serif); font-size: 1.35rem; }.system-score small { color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.system-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .65fr); gap: 1rem; }.update-panel { min-height: 360px; }.update-ready { border-color: #e6cf8d; }.update-current { border-color: #bddfc8; }
.update-empty { display: flex; align-items: center; gap: .8rem; min-height: 210px; justify-content: center; }.update-empty > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 1.2rem; }.update-empty p { margin: .15rem 0 0; color: var(--muted); font-size: .82rem; }
.migration-list { display: grid; gap: .55rem; margin: 1rem 0; padding: 0; list-style: none; }.migration-list li { display: grid; grid-template-columns: 44px 1fr; gap: .1rem .7rem; border: 1px solid #e2e5e8; border-radius: 10px; background: white; padding: .65rem .75rem; }.migration-list li > span { grid-row: span 2; display: grid; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--navy-800); font-size: .7rem; font-weight: 850; }.migration-list strong { font-size: .82rem; }.migration-list small { color: var(--muted); font-size: .66rem; }
.update-confirm-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: .75rem; }.update-confirm-form .check-field { grid-column: 1 / -1; }.maintenance-panel > p:not(.eyebrow) { color: var(--muted); font-size: .82rem; }.cache-stat { display: grid; margin: 2rem 0; border-block: 1px solid var(--border); padding: 1.2rem 0; text-align: center; }.cache-stat strong { font-family: var(--serif); font-size: 2.2rem; }.cache-stat span, .cache-stat small { color: var(--muted); font-size: .72rem; }
.system-section { margin-top: 1.5rem; }.health-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }.health-card { display: flex; gap: .7rem; border: 1px solid var(--border); border-radius: 13px; background: var(--paper); padding: .85rem; }.health-card > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; font-weight: 800; }.health-card > div { display: grid; min-width: 0; gap: .15rem; }.health-card small { color: var(--muted); font-size: .63rem; font-weight: 800; text-transform: uppercase; }.health-card strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }.health-card p { margin: .15rem 0 0; color: var(--muted); font-size: .68rem; line-height: 1.4; }.health-good > span { background: var(--green-soft); color: var(--green); }.health-warn > span { background: var(--gold-soft); color: var(--gold); }.health-bad > span { background: #fff0ee; color: var(--danger); }
.migration-history { display: grid; padding-block: .4rem; }.migration-history > div { display: flex; align-items: center; gap: .7rem; border-bottom: 1px solid #edf0f2; padding: .7rem 0; }.migration-history > div:last-child { border-bottom: 0; }.migration-history > div > span { color: var(--green); }.migration-history p { display: grid; margin: 0; }.migration-history small { color: var(--muted); font-size: .68rem; }
.audit-filter { display: flex; align-items: end; gap: .7rem; margin-bottom: 1rem; }.audit-filter label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }.audit-filter input { max-width: 430px; }.audit-table-wrap { overflow-x: auto; padding: 0; }.audit-table { width: 100%; border-collapse: collapse; font-size: .78rem; }.audit-table th { background: #f6f8fa; color: var(--muted); padding: .75rem 1rem; text-align: left; text-transform: uppercase; font-size: .63rem; letter-spacing: .06em; }.audit-table td { border-top: 1px solid #edf0f2; padding: .8rem 1rem; }.audit-table td small { display: block; margin-top: .15rem; color: var(--muted); font-size: .65rem; }.empty-table { color: var(--muted); text-align: center; }.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; }.pagination span { color: var(--muted); font-size: .75rem; }

.family-command-header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin: -.3rem 0 1.2rem; border: 1px solid #d7e3eb; border-radius: 20px; background: linear-gradient(112deg, #fffdfa 0%, #f1f8fd 62%, #eef8f1 100%); padding: clamp(1.4rem, 3vw, 2.2rem); }.family-command-header h1 { margin-bottom: .4rem; }.family-command-header p:last-child { margin: 0; color: var(--muted); }
.family-access-alert { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }.family-access-alert > div { display: grid; gap: .2rem; }.family-access-alert span { font-size: .78rem; }
.parent-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }.parent-kpi { display: flex; min-height: 112px; align-items: center; gap: .7rem; border: 1px solid var(--border); border-radius: 14px; background: var(--paper); padding: .9rem; color: var(--ink); text-decoration: none; }.parent-kpi > span { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: var(--blue-soft); color: var(--blue); }.parent-kpi > div { min-width: 0; flex: 1; }.parent-kpi small, .parent-kpi p { display: block; overflow: hidden; margin: 0; color: var(--muted); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }.parent-kpi strong { display: block; overflow: hidden; margin: .1rem 0; font-family: var(--serif); font-size: 1.25rem; text-overflow: ellipsis; white-space: nowrap; }.parent-kpi > i { color: var(--navy-800); font-style: normal; }.kpi-courses > span { background: var(--coral-soft); color: var(--coral); }.kpi-learning > span { background: var(--green-soft); color: var(--green); }.kpi-plan > span { background: var(--gold-soft); color: var(--gold); }
.parent-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(285px, .7fr); gap: 1rem; }.parent-learners-panel, .setup-panel { min-height: 370px; }.parent-learner-list { display: grid; }.parent-learner-list article { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .75rem; border-bottom: 1px solid #edf0f2; padding: .85rem 0; }.parent-learner-list article:last-child { border-bottom: 0; }.parent-learner-list article > div:nth-child(2) { display: grid; gap: .15rem; }.parent-learner-list small { color: var(--muted); font-size: .7rem; }.learner-row-actions { display: flex; gap: .35rem; }.learner-row-actions a { border: 1px solid #c8d8e4; border-radius: 7px; padding: .4rem .55rem; font-size: .67rem; font-weight: 800; text-decoration: none; }
.parent-empty { display: flex; align-items: center; justify-content: center; gap: 1rem; min-height: 250px; }.parent-empty > span { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 14px; background: var(--blue-soft); color: var(--blue); }.parent-empty h3 { margin-bottom: .2rem; }.parent-empty p { margin-bottom: .7rem; color: var(--muted); font-size: .8rem; }
.setup-panel-heading { display: flex; align-items: start; justify-content: space-between; }.setup-panel-heading > span { color: var(--green); font-family: var(--serif); font-size: 1.25rem; font-weight: 800; }.setup-progress { overflow: hidden; height: 7px; margin: .8rem 0 1rem; border-radius: 99px; background: #e8edf0; }.setup-progress i { display: block; height: 100%; border-radius: inherit; background: var(--green); }.setup-list { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }.setup-list li { display: flex; gap: .65rem; border-radius: 9px; padding: .58rem; }.setup-list li:not(.is-done) { background: #faf8f1; }.setup-list li > span { color: var(--gold); }.setup-list li.is-done > span { color: var(--green); }.setup-list a { display: grid; color: inherit; text-decoration: none; }.setup-list strong { font-size: .76rem; }.setup-list small { color: var(--muted); font-size: .66rem; }
.parent-action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }.parent-action-grid > a { display: flex; align-items: center; gap: .7rem; border: 1px solid var(--border); border-radius: 13px; background: var(--paper); padding: 1rem; color: var(--ink); text-decoration: none; }.parent-action-grid > a > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); }.parent-action-grid > a > div { display: grid; flex: 1; }.parent-action-grid small { color: var(--muted); font-size: .68rem; }.parent-action-grid i { color: var(--navy-800); font-style: normal; }

.student-record-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-bottom: 1rem; }.student-record-stats > div { display: grid; border: 1px solid var(--border); border-radius: 13px; background: var(--paper); padding: .85rem 1rem; }.student-record-stats small, .student-record-stats span { color: var(--muted); font-size: .66rem; }.student-record-stats strong { margin: .1rem 0; font-family: var(--serif); font-size: 1.55rem; }
.student-directory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }.student-search-form { display: flex; align-items: center; gap: .45rem; min-width: min(440px, 100%); }.student-search-form > span { margin-right: -2.4rem; z-index: 1; color: var(--muted); }.student-search-form input { padding-left: 2rem; }.student-status-tabs { display: flex; overflow-x: auto; gap: .25rem; }.student-status-tabs a { display: flex; align-items: center; gap: .35rem; border-radius: 8px; padding: .55rem .65rem; color: var(--muted); font-size: .7rem; font-weight: 800; text-decoration: none; white-space: nowrap; }.student-status-tabs a.active { background: var(--navy-900); color: white; }.student-status-tabs span { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 99px; background: rgba(101,115,134,.12); font-size: .62rem; }.student-status-tabs .active span { background: rgba(255,255,255,.16); }
.student-record-card { min-height: 340px; }.student-record-label { margin-bottom: .2rem !important; color: var(--blue) !important; font-size: .63rem !important; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }.student-record-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; margin: 1rem 0; }.student-record-facts span { display: grid; gap: .15rem; border-radius: 8px; background: #f5f7f8; padding: .5rem; color: var(--muted); font-size: .59rem; text-align: center; }.student-record-facts b { color: var(--ink); font-size: .75rem; }.student-card-actions { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-top: auto; }.student-card-actions .button { min-height: 37px; padding: .5rem .7rem; font-size: .7rem; }.student-card-actions .text-link { font-size: .72rem; }
.archived-records { margin-top: 1.5rem; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.55); }.archived-records > summary { display: flex; justify-content: space-between; cursor: pointer; padding: .9rem 1rem; font-weight: 800; }.archived-records > summary small { color: var(--muted); }.archived-records .archived-student-list { padding: 0 .8rem .8rem; }
.record-flow { display: flex; align-items: center; gap: 0; margin: 0 0 1rem; padding: 0; list-style: none; }.record-flow li { display: flex; flex: 1; align-items: center; gap: .5rem; color: var(--muted); font-size: .7rem; font-weight: 800; }.record-flow li::after { content: ""; height: 1px; flex: 1; background: var(--border); }.record-flow li:last-child::after { display: none; }.record-flow span { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: white; }.record-flow .active { color: var(--navy-900); }.record-flow .active span { border-color: var(--navy-900); background: var(--navy-900); color: white; }
.student-create-note { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; border: 1px solid #c9dfd1; border-radius: 11px; background: var(--green-soft); padding: .7rem .85rem; color: #2e704d; }.student-create-note > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #cee9d7; }.student-create-note p { display: grid; margin: 0; }.student-create-note small { font-size: .68rem; }.privacy-note { display: flex; align-items: flex-start; gap: .45rem; margin-top: 1rem; color: var(--muted); }.privacy-note small { line-height: 1.45; }
.builder-grid, .agenda-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }.builder-list, .agenda-list { display: grid; gap: .55rem; margin: 1rem 0; }.builder-list > div, .agenda-list > div { display: flex; align-items: center; gap: .65rem; border: 1px solid #e3e8eb; border-radius: 10px; background: #fff; padding: .65rem; }.builder-list > div > span:first-child { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--navy-800); font-size: .75rem; font-weight: 800; }.builder-list p, .agenda-list p { display: grid; flex: 1; margin: 0; }.builder-list small, .agenda-list small { color: var(--muted); font-size: .68rem; }.builder-form { display: grid; gap: .7rem; border-top: 1px solid var(--border); padding-top: 1rem; }.lesson-builder-form { margin-top: 1rem; }.planner-picker { display: flex; align-items: end; gap: .75rem; margin-bottom: 1rem; }.planner-picker label { min-width: 200px; }.agenda-list > div .status-pill { margin-left: auto; }.agenda-list .subject-swatch { flex: 0 0 auto; }
.student-portal-body{background:linear-gradient(135deg,#f3f8fc,#fffaf3);min-height:100vh}.student-portal{width:min(900px,calc(100% - 32px));margin:auto;padding:1.5rem 0 3rem}.student-portal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:2rem}.student-brand{font-weight:850;text-decoration:none;color:var(--navy-900)}.student-brand span{font-weight:500;color:var(--muted)}.student-portal-header>div{display:flex;align-items:center;gap:.7rem}.student-portal-header button{border:0;background:none;color:var(--navy-800);cursor:pointer}.student-welcome{margin-bottom:1.2rem}.student-welcome h1{font-size:clamp(2.2rem,6vw,3.7rem)}.student-welcome p:last-child{color:var(--muted)}.student-today-list{display:grid;gap:.8rem}.student-work-card{display:flex;align-items:center;gap:1rem;border:1px solid #c9dff0;border-radius:16px;background:#fff;padding:1.1rem}.student-work-card>div:nth-child(2){flex:1}.student-work-card p{margin:0;color:var(--muted);font-size:.72rem}.student-work-card h2{margin:.15rem 0;font-size:1.3rem}.student-work-card small{color:var(--muted)}.student-work-actions{display:grid;gap:.45rem;justify-items:end}.student-no-work{text-align:center;border:1px dashed #b8d3e8;border-radius:16px;padding:3rem;background:#fff}.student-no-work span{color:var(--green);font-size:2rem}.student-teach,.student-activity{border:1px solid var(--border);border-radius:16px;background:#fff;padding:1.25rem;margin:1rem 0}.student-teach{background:var(--blue-soft)}.student-activity form{display:grid;gap:.65rem;margin-top:1rem}.student-choice{display:block;border:1px solid #d8e1e7;border-radius:9px;padding:.65rem;cursor:pointer}.student-choice:has(input:checked){border-color:var(--blue);background:var(--blue-soft)}

@media (max-width: 1100px) {
    .install-shell { grid-template-columns: 1fr; }.install-rail { position: relative; top: 0; min-height: 0; }.install-steps { grid-template-columns: repeat(2, 1fr); }.install-lock-note { max-width: 520px; }
    .system-grid, .parent-dashboard-grid { grid-template-columns: 1fr; }.health-grid { grid-template-columns: repeat(2, 1fr); }.parent-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .student-directory-toolbar { align-items: stretch; flex-direction: column; }
}
@media (max-width: 760px) {
    .install-shell { width: min(100% - 16px, 680px); margin: .5rem auto; }.install-rail { border-radius: 16px; }.install-card { border-radius: 16px; }.install-requirements, .install-steps { grid-template-columns: 1fr; }
    .system-page-header .system-score { justify-self: start; }.health-grid, .parent-kpi-grid, .parent-action-grid, .student-record-stats { grid-template-columns: 1fr; }.update-confirm-form { grid-template-columns: 1fr; }.update-confirm-form .check-field { grid-column: auto; }
    .family-command-header { align-items: stretch; flex-direction: column; }.family-command-header .dashboard-header-actions { display: grid; }.family-access-alert { align-items: stretch; flex-direction: column; }
    .builder-grid, .agenda-grid { grid-template-columns: 1fr; }.planner-picker { align-items: stretch; flex-direction: column; }.planner-picker label { min-width: 0; }
    .parent-learner-list article { grid-template-columns: auto 1fr auto; }.parent-learner-list .learner-row-actions { grid-column: 2 / -1; }.student-search-form { min-width: 0; flex-wrap: wrap; }.student-search-form input { min-width: 190px; flex: 1; }.student-status-tabs { padding-bottom: .3rem; }
    .student-record-facts { grid-template-columns: 1fr; }.student-record-facts span { display: flex; justify-content: space-between; text-align: left; }.record-flow li { font-size: 0; }.record-flow li span { font-size: .7rem; }.audit-filter { align-items: stretch; flex-direction: column; }.audit-filter input { max-width: none; }
}

/* Public marketing site */
.marketing-body { overflow-x: hidden; background: #faf8f3; color: var(--ink); }
.marketing-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.marketing-header {
    position: relative; z-index: 20; border-bottom: 1px solid rgba(20, 45, 73, .09);
    background: rgba(255, 253, 249, .92); backdrop-filter: blur(16px);
}
.marketing-nav { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 1.5rem; }
.marketing-logo { display: inline-flex; align-items: center; gap: .72rem; color: var(--ink); text-decoration: none; }
.marketing-logo > span {
    display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px;
    background: var(--navy-950); color: #f1c477; font-family: var(--serif); font-weight: 700;
}
.marketing-logo strong { font-family: var(--serif); font-size: 1.08rem; letter-spacing: -.02em; }
.marketing-nav nav { display: flex; align-items: center; gap: 1.5rem; }
.marketing-nav nav a, .marketing-signin { color: #46596c; font-size: .83rem; font-weight: 700; text-decoration: none; }
.marketing-nav nav a:hover, .marketing-signin:hover { color: var(--coral); }
.marketing-actions { display: flex; align-items: center; gap: 1rem; }
.marketing-actions .button { min-height: 40px; padding: .58rem .9rem; }

.marketing-hero {
    overflow: hidden; position: relative; padding: clamp(4.5rem, 9vw, 8rem) 0 6rem;
    background:
        radial-gradient(circle at 90% 10%, rgba(62, 142, 219, .14), transparent 30%),
        radial-gradient(circle at 3% 70%, rgba(223, 101, 72, .09), transparent 25%),
        linear-gradient(180deg, #fffdfa, #f8f5ee);
}
.marketing-hero::before {
    content: ""; position: absolute; width: 580px; height: 580px; right: -350px; top: -260px;
    border: 1px solid rgba(20, 82, 133, .09); border-radius: 50%;
    box-shadow: 0 0 0 80px rgba(20, 82, 133, .025), 0 0 0 160px rgba(20, 82, 133, .018);
}
.hero-grid { display: grid; position: relative; grid-template-columns: .82fr 1.18fr; align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { max-width: 650px; font-size: clamp(3rem, 6vw, 5.25rem); line-height: .98; }
.hero-lede { max-width: 620px; margin: 1.4rem 0 1.8rem; color: #596b7d; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.button-large { min-height: 50px; padding: .85rem 1.25rem; }
.button-quiet { border-color: #c7d3dc; background: rgba(255,255,255,.7); color: var(--navy-900); }
.hero-trust { display: flex; flex-wrap: wrap; gap: .7rem 1.1rem; margin: 1.5rem 0 0; padding: 0; color: #5b6d7d; list-style: none; font-size: .75rem; font-weight: 700; }
.hero-trust span { color: var(--green); }
.hero-visual { min-width: 0; position: relative; }
.product-window {
    overflow: hidden; border: 1px solid #cbd5dd; border-radius: 19px; background: white;
    box-shadow: 0 35px 90px rgba(20, 45, 73, .17), 0 8px 25px rgba(20, 45, 73, .08);
    transform: perspective(1400px) rotateY(-3deg) rotateX(1deg);
}
.window-bar { display: flex; height: 34px; align-items: center; gap: 6px; border-bottom: 1px solid #e3e7ea; padding: 0 12px; background: #f8f8f6; }
.window-bar i { width: 8px; height: 8px; border-radius: 50%; background: #e7685e; }
.window-bar i:nth-child(2) { background: #eeb442; }
.window-bar i:nth-child(3) { background: #5abd6b; }
.product-window img { display: block; width: 100%; height: auto; }
.preview-note {
    display: grid; position: absolute; z-index: 3; border: 1px solid rgba(188, 202, 212, .8);
    border-radius: 12px; background: rgba(255,255,255,.94); padding: .75rem .9rem;
    box-shadow: 0 12px 30px rgba(20,45,73,.14); backdrop-filter: blur(10px);
}
.preview-note strong { font-family: var(--serif); font-size: .88rem; }
.preview-note span { color: var(--muted); font-size: .66rem; }
.preview-note-progress { right: -18px; top: 12%; }
.preview-note-family { display: flex; left: -25px; bottom: 10%; align-items: center; gap: .6rem; }
.preview-note-family > span:last-child { display: grid; }
.preview-note-family small { color: var(--muted); font-size: .62rem; }
.mini-family { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green) !important; font-weight: 850; }

.proof-strip { border-block: 1px solid #dde2e5; background: var(--white); }
.proof-strip .marketing-container { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 1.5rem; color: #6c7985; font-size: .72rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.marketing-section { padding: clamp(4.5rem, 8vw, 7.5rem) 0; }
.section-intro { max-width: 710px; margin-bottom: 2.4rem; }
.section-intro h2, .screenshot-copy h2, .security-grid h2, .licensing-copy h2, .marketing-cta h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.04; }
.section-intro > p:last-child, .screenshot-copy > p, .licensing-copy > p { color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.feature-card { min-height: 310px; border: 1px solid var(--border); border-radius: 18px; padding: 1.55rem; box-shadow: 0 10px 30px rgba(20,45,73,.05); }
.feature-card h3 { margin-top: 2.3rem; font-size: 1.45rem; }
.feature-card p { color: #5e6d7a; font-size: .9rem; }
.feature-card small { color: currentColor; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.feature-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 12px; background: rgba(255,255,255,.62); font-size: 1.2rem; }
.feature-blue { background: linear-gradient(145deg, #f8fcff, #e9f4ff); color: var(--blue); }
.feature-green { background: linear-gradient(145deg, #fbfffc, #eaf7ee); color: var(--green); }
.feature-coral { background: linear-gradient(145deg, #fffdfb, #fff0ea); color: var(--coral); }
.feature-card h3, .feature-card p { color: var(--ink); }

.screenshot-section { background: #f1eee7; }
.screenshot-grid { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 1.4rem; }
.screenshot-copy { grid-row: 1 / span 2; padding-right: clamp(1rem, 5vw, 5rem); }
.marketing-check-list { display: grid; gap: .7rem; margin: 1.5rem 0 0; padding: 0; list-style: none; color: #42576b; font-size: .86rem; font-weight: 700; }
.marketing-check-list span { display: inline-grid; width: 24px; height: 24px; place-items: center; margin-right: .45rem; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.screenshot-card { overflow: hidden; margin: 0; border: 8px solid white; border-radius: 17px; background: white; box-shadow: var(--shadow); }
.screenshot-card img { display: block; width: 100%; height: 310px; object-fit: cover; }
.screenshot-card figcaption { padding: .65rem .75rem; color: var(--muted); font-size: .73rem; }
.screenshot-students { grid-column: 2; grid-row: 1; }
.screenshot-students img { height: 360px; object-position: 58% top; }
.screenshot-planner { grid-column: 2; grid-row: 2; }
.screenshot-planner img { object-position: 45% bottom; }

.roles-section { background: #fffdfa; }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 1px solid var(--border); border-radius: 18px; background: white; }
.role-grid article { min-height: 260px; padding: 1.6rem; }
.role-grid article + article { border-left: 1px solid var(--border); }
.role-number { color: var(--coral); font-size: .7rem; font-weight: 900; letter-spacing: .12em; }
.role-grid h3 { margin-top: 2.8rem; font-size: 1.35rem; }
.role-grid p { color: var(--muted); font-size: .86rem; }

.security-section { overflow: hidden; position: relative; background: linear-gradient(145deg, var(--navy-950), #124f7c); color: white; }
.security-section::after { content: ""; position: absolute; width: 450px; height: 450px; right: -250px; top: -250px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 75px rgba(255,255,255,.025), 0 0 0 150px rgba(255,255,255,.02); }
.security-grid { display: grid; position: relative; z-index: 1; grid-template-columns: .8fr 1.2fr; gap: clamp(3rem, 8vw, 8rem); }
.security-grid .eyebrow { color: #f1c477; }
.security-grid > div:first-child > p:not(.eyebrow) { color: #c3d6e6; }
.light-link { color: white; }
.security-points { display: grid; }
.security-points article { display: flex; gap: 1rem; border-bottom: 1px solid rgba(255,255,255,.15); padding: 1.1rem 0; }
.security-points article:first-child { padding-top: 0; }
.security-points > article > span { color: #f1c477; font-size: .7rem; font-weight: 900; }
.security-points h3 { margin-bottom: .25rem; color: white; font-size: 1.15rem; }
.security-points p { margin: 0; color: #bed2e2; font-size: .82rem; }

.licensing-section { background: #f7f4ed; }
.licensing-grid { display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: clamp(2rem, 7vw, 7rem); }
.license-product-card { border: 1px solid #d7d0c1; border-radius: 19px; background: #fffdfa; padding: 1.8rem; box-shadow: 0 18px 45px rgba(20,45,73,.08); }
.license-product-card h3 { font-size: 1.75rem; }
.license-product-card ul { display: grid; gap: .7rem; margin: 1.4rem 0; padding: 1.2rem 0; border-block: 1px solid var(--border); list-style: none; color: #4b5d6d; font-size: .84rem; }
.license-product-card li::before { content: "✓"; margin-right: .55rem; color: var(--green); font-weight: 900; }
.pricing-note { color: var(--muted); font-size: .7rem; }
.license-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1.6rem; }
.license-facts > span { display: grid; gap: .3rem; border-top: 2px solid #dce3e7; padding-top: .8rem; }
.license-facts strong { font-family: var(--serif); font-size: .92rem; }
.license-facts small { color: var(--muted); font-size: .68rem; line-height: 1.45; }

.marketing-cta { padding: 5rem 0; background: #fffdfa; }
.marketing-cta .marketing-container { display: flex; align-items: center; justify-content: space-between; gap: 3rem; border: 1px solid var(--border); border-radius: 20px; background: linear-gradient(135deg, #f8fcff, #fff8f1); padding: clamp(1.5rem, 5vw, 3.5rem); }
.marketing-cta h2 { max-width: 740px; margin-bottom: 0; }
.cta-actions { display: grid; flex: 0 0 auto; gap: .7rem; }
.marketing-footer { border-top: 1px solid #dce1e4; background: var(--navy-950); color: #bad0e1; padding: 2rem 0; }
.marketing-footer .marketing-container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.marketing-logo-footer { color: white; }
.marketing-footer p { margin: 0; font-size: .75rem; }
.marketing-footer > div > div { display: flex; gap: 1.2rem; }
.marketing-footer > div > div a { color: #d5e5f0; font-size: .75rem; text-decoration: none; }

@media (max-width: 980px) {
    .marketing-nav nav { display: none; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-copy { max-width: 740px; }
    .hero-visual { margin-top: 1.5rem; }
    .product-window { transform: none; }
    .proof-strip .marketing-container { flex-wrap: wrap; justify-content: center; padding-block: 1rem; }
    .screenshot-grid { grid-template-columns: 1fr 1fr; }
    .screenshot-copy { grid-column: 1 / -1; grid-row: auto; padding: 0; }
    .screenshot-students { grid-column: 1; grid-row: auto; }
    .screenshot-planner { grid-column: 2; grid-row: auto; }
    .security-grid, .licensing-grid { grid-template-columns: 1fr; }
    .license-product-card { max-width: 520px; }
    .marketing-cta .marketing-container { display: grid; }
    .cta-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 720px) {
    .marketing-container { width: min(100% - 28px, 1180px); }
    .marketing-nav { min-height: 68px; }
    .marketing-logo strong, .marketing-actions .marketing-signin { display: none; }
    .marketing-actions .button { min-height: 38px; font-size: .78rem; }
    .marketing-hero { padding-top: 4rem; }
    .hero-copy h1 { font-size: clamp(2.75rem, 14vw, 4rem); }
    .hero-lede { font-size: 1rem; }
    .hero-actions { display: grid; }
    .hero-actions .button { width: 100%; }
    .preview-note { display: none; }
    .feature-grid, .role-grid, .screenshot-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: 250px; }
    .role-grid article + article { border-top: 1px solid var(--border); border-left: 0; }
    .role-grid article { min-height: 220px; }
    .screenshot-copy, .screenshot-students, .screenshot-planner { grid-column: 1; grid-row: auto; }
    .screenshot-students img, .screenshot-card img { height: 320px; }
    .security-grid { gap: 2.5rem; }
    .license-facts { grid-template-columns: 1fr; }
    .marketing-cta { padding: 2rem 0; }
    .cta-actions { grid-template-columns: 1fr; }
    .marketing-footer .marketing-container { display: grid; text-align: center; justify-items: center; }
}

/* Parent dashboard and student directory */
button, input, select, textarea { font: inherit; }
input, select, textarea {
    width: 100%; min-height: 44px; border: 1px solid #cbd4dc; border-radius: 9px;
    background: var(--white); color: var(--ink); padding: .68rem .78rem;
}
textarea { min-height: 132px; resize: vertical; line-height: 1.5; }
.button-danger { border-color: #e7bbb8; background: #fff0ee; color: var(--danger); }

.family-dashboard-hero { position: relative; overflow: hidden; margin: clamp(-.4rem, -1vw, -.15rem) 0 1.4rem; border: 1px solid #d8e4ec; border-radius: 20px; background: linear-gradient(112deg, #fffdf9 0%, #f5fbff 58%, #edf7f0 100%); padding: clamp(1.4rem, 3vw, 2.25rem); }
.family-dashboard-hero::after { content: ""; position: absolute; width: 250px; height: 250px; right: -120px; top: -120px; border: 1px solid rgba(62,142,219,.15); border-radius: 50%; box-shadow: 0 0 0 42px rgba(62,142,219,.06), 0 0 0 84px rgba(69,155,109,.04); }
.family-dashboard-hero > * { position: relative; z-index: 1; }
.dashboard-header-actions { display: flex; align-items: center; gap: 1rem; }
.dashboard-header-actions .text-link { white-space: nowrap; }
.license-banner .license-banner-seat { width: auto; height: auto; margin-left: auto; border: 1px solid #b8dcc5; background: rgba(255,255,255,.6); padding: .35rem .6rem; color: #2e704d; font-size: .72rem; font-weight: 800; }
.dashboard-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.overview-card { display: flex; min-height: 118px; align-items: center; gap: .8rem; border: 1px solid var(--border); border-radius: 15px; background: var(--paper); padding: 1rem 1.1rem; box-shadow: 0 6px 20px rgba(20,45,73,.04); }
.overview-card > span:first-child { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: 1.15rem; }
.overview-card > div { min-width: 0; flex: 1; }
.overview-card small, .overview-card p { display: block; margin: 0; color: var(--muted); font-size: .72rem; }
.overview-card strong { display: block; margin: .1rem 0; color: var(--ink); font-family: var(--serif); font-size: 1.45rem; }
.overview-card > a { color: var(--navy-800); font-size: 1.3rem; text-decoration: none; }
.overview-card-students { border-color: #c8def1; background: linear-gradient(135deg, #fcfeff, #edf7ff); }
.overview-card-next > span:first-child { background: var(--coral-soft); color: var(--coral); }
.coming-soon-label { color: var(--muted); font-size: .64rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
.dashboard-section-heading .eyebrow { margin-bottom: .35rem; }
.dashboard-section-heading h2 { margin: 0; font-size: 1.65rem; }

.student-grid { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 1rem; }
.student-card { display: flex; min-height: 158px; align-items: center; gap: 1rem; border: 1px solid #c9dff0; border-radius: var(--radius); background: linear-gradient(145deg, #fbfdff, var(--blue-soft)); padding: 1.3rem; }
.student-card > div, .student-card-content { flex: 1; }
.student-card-link { color: inherit; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.student-card-link:hover { border-color: #8ebfe5; box-shadow: var(--shadow); transform: translateY(-3px); }
.student-card-content { display: grid; gap: .18rem; min-width: 0; }
.student-card-content small { color: var(--blue); font-size: .67rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.student-card-content strong { overflow: hidden; font-family: var(--serif); font-size: 1.28rem; text-overflow: ellipsis; white-space: nowrap; }
.student-card-content > span { color: var(--muted); font-size: .8rem; }
.student-card-side { display: grid; align-self: stretch; align-items: end; justify-items: end; gap: .6rem; color: var(--blue); font-size: 1.1rem; }
.student-empty { display: grid; min-height: 245px; grid-column: 1 / -1; place-content: center; border-style: dashed; text-align: center; }
.student-empty .button { justify-self: center; margin-top: .4rem; }
.roadmap-widget { display: flex; min-height: 154px; align-items: flex-start; gap: .8rem; background: linear-gradient(135deg, #fffdfa, #fbfbf8); }
.roadmap-widget > span { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--coral-soft); color: var(--coral); }
.roadmap-widget:nth-child(2) > span { background: var(--green-soft); color: var(--green); }
.roadmap-widget:nth-child(3) > span { background: var(--blue-soft); color: var(--blue); }
.roadmap-widget .eyebrow { margin: .15rem 0 .25rem; font-size: .6rem; }
.roadmap-widget h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.roadmap-widget p:last-child { margin: 0; color: var(--muted); font-size: .83rem; }

.student-page-header { margin-bottom: 1.35rem; }
.student-page-header .text-link { margin-top: .7rem; }
.student-directory-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.5rem; border: 1px solid #d6e6dc; border-radius: 14px; background: linear-gradient(110deg, #f9fefa, #eef8f1); padding: .9rem 1.1rem; }
.student-directory-summary > div { display: flex; align-items: center; gap: .7rem; }
.student-directory-summary > div > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #d7efe0; color: var(--green); }
.student-directory-summary small, .student-directory-summary strong { display: block; }
.student-directory-summary small { color: #49715b; font-size: .67rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.student-directory-summary strong { color: #26573e; font-family: var(--serif); font-size: 1.1rem; }
.student-directory-summary p { max-width: 430px; margin: 0; color: #49715b; font-size: .78rem; text-align: right; }
.student-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(230px, 1fr)); gap: 1rem; }
.student-directory-card { display: grid; min-height: 285px; align-content: start; border: 1px solid var(--border); border-radius: 16px; background: var(--paper); padding: 1.2rem; box-shadow: 0 6px 20px rgba(20,45,73,.04); }
.student-directory-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.student-directory-card h2 { margin: 0 0 .2rem; font-size: 1.4rem; }
.student-directory-card > p { margin: 0; color: var(--muted); font-size: .82rem; }
.student-directory-card-meta { display: grid; gap: .35rem; margin: 1rem 0; color: var(--muted); font-size: .72rem; }
.student-directory-card-meta span::before { content: "•"; margin-right: .36rem; color: var(--blue); }
.student-directory-card .text-link { margin-top: auto; }
.directory-empty { grid-column: 1 / -1; }
.archived-students { margin-top: 2.6rem; }
.archived-student-list { display: grid; gap: .65rem; }
.archived-student-list article { display: flex; align-items: center; gap: .75rem; border: 1px solid #e1e4e7; border-radius: 12px; background: rgba(255,255,255,.65); padding: .75rem; }
.archived-student-list article > div { display: grid; flex: 1; gap: .12rem; }
.archived-student-list small { color: var(--muted); font-size: .73rem; }
.archived-student-list .button { min-height: 38px; padding: .55rem .8rem; }
.student-form-card { overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.student-form { display: grid; }
.student-form-section { display: grid; grid-template-columns: minmax(190px, .52fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); padding: clamp(1.3rem, 3vw, 2.2rem); }
.student-form-section + .student-form-section { border-top: 1px solid var(--border); background: #fcfdfc; }
.student-form-section h2 { font-size: 1.42rem; }
.student-form-section > div:first-child > p:last-child { max-width: 255px; margin-bottom: 0; color: var(--muted); font-size: .82rem; }
.student-form-section .field-grid { align-content: start; }
.student-form-section .field-grid label:last-child { grid-column: 1 / -1; max-width: calc(50% - .45rem); }
.student-notes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.field-error { display: block; color: var(--danger); font-size: .72rem; line-height: 1.35; }
.student-form-actions { display: flex; justify-content: flex-end; gap: .75rem; border-top: 1px solid var(--border); background: #f8f9f8; padding: 1rem clamp(1.3rem, 3vw, 2.2rem); }
.student-record-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; border: 1px solid #efd2d0; border-radius: 14px; background: #fff8f7; padding: 1.15rem 1.25rem; }
.student-record-actions .eyebrow { color: var(--danger); }
.student-record-actions h2 { margin-bottom: .2rem; font-size: 1.15rem; }
.student-record-actions p:last-child { margin: 0; color: #7d5a57; font-size: .8rem; }

@media (max-width: 1050px) {
    .student-directory-grid, .dashboard-overview { grid-template-columns: 1fr; }
    .student-form-section { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .dashboard-header-actions { display: grid; width: 100%; }
    .dashboard-header-actions .text-link { order: 2; text-align: center; }
    .license-banner { align-items: flex-start; flex-wrap: wrap; }
    .license-banner .license-banner-seat { margin-left: 0; }
    .student-directory-summary { align-items: flex-start; flex-direction: column; }
    .student-directory-summary p { text-align: left; }
    .student-notes-grid { grid-template-columns: 1fr; }
    .student-form-section .field-grid label:last-child { grid-column: auto; max-width: none; }
    .student-form-actions, .student-record-actions { align-items: stretch; flex-direction: column; }
    .student-record-actions .button { width: 100%; }
}

/* Curriculum foundation */
.curriculum-page-header { margin-bottom: 1.35rem; }
.curriculum-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.curriculum-summary-grid article { display: flex; min-height: 118px; align-items: center; gap: .8rem; border: 1px solid var(--border); border-radius: 15px; background: var(--paper); padding: 1rem 1.1rem; box-shadow: 0 6px 20px rgba(20,45,73,.04); }
.curriculum-summary-grid article > span { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: 1.1rem; }
.curriculum-summary-grid article:nth-child(2) > span { background: var(--green-soft); color: var(--green); }
.curriculum-summary-grid article:nth-child(3) > span { background: var(--coral-soft); color: var(--coral); }
.curriculum-summary-grid article > div { min-width: 0; flex: 1; }
.curriculum-summary-grid small, .curriculum-summary-grid p { display: block; margin: 0; color: var(--muted); font-size: .72rem; }
.curriculum-summary-grid strong { display: block; overflow: hidden; margin: .1rem 0; color: var(--ink); font-family: var(--serif); font-size: 1.25rem; text-overflow: ellipsis; white-space: nowrap; }
.curriculum-summary-grid a { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #d5e0e8; border-radius: 50%; color: var(--navy-800); font-size: 1.1rem; text-decoration: none; }
.curriculum-section { margin-top: 2.6rem; }
.curriculum-year-list { display: grid; gap: .7rem; }
.curriculum-year-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--paper); padding: 1rem 1.1rem; }
.curriculum-year-card > div:first-child { display: grid; min-width: 0; gap: .3rem; }
.curriculum-year-card h3 { margin: 0; font-size: 1.2rem; }
.curriculum-year-card p { margin: 0; color: var(--muted); font-size: .8rem; }
.curriculum-year-card .status-pill { width: max-content; }
.record-card-actions { display: flex; align-items: center; gap: .8rem; }
.record-card-actions form { margin: 0; }
.record-card-actions .button { min-height: 38px; padding: .55rem .78rem; }
.curriculum-empty { display: flex; min-height: 132px; align-items: center; gap: 1rem; }
.curriculum-empty > span { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }
.curriculum-empty > div { flex: 1; }
.curriculum-empty h3 { margin: 0 0 .2rem; font-size: 1.1rem; }
.curriculum-empty p { margin: 0; color: var(--muted); font-size: .82rem; }
.curriculum-empty .button { flex: 0 0 auto; }
.subject-directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.subject-directory-grid .curriculum-empty { grid-column: 1 / -1; }
.subject-directory-card { display: flex; min-height: 104px; align-items: center; gap: .75rem; border: 1px solid var(--border); border-radius: 14px; background: var(--paper); padding: 1rem; box-shadow: 0 5px 17px rgba(20,45,73,.035); }
.subject-directory-card > div { min-width: 0; flex: 1; }
.subject-directory-card h3 { overflow: hidden; margin: 0 0 .18rem; font-size: 1.12rem; text-overflow: ellipsis; white-space: nowrap; }
.subject-directory-card p { margin: 0; color: var(--muted); font-size: .74rem; }
.subject-directory-card .text-link { font-size: .76rem; white-space: nowrap; }
.subject-swatch { display: block; width: 14px; height: 42px; flex: 0 0 auto; border-radius: 999px; }
.subject-blue { background: var(--blue); } .subject-green { background: var(--green); } .subject-coral { background: var(--coral); } .subject-gold { background: var(--gold); } .subject-purple { background: #8b6bb5; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.course-grid .curriculum-empty { grid-column: 1 / -1; }
.course-card { display: grid; min-height: 245px; align-content: start; border: 1px solid var(--border); border-radius: 16px; background: var(--paper); padding: 1.15rem; box-shadow: 0 6px 20px rgba(20,45,73,.04); }
.course-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.course-card-top .subject-swatch { height: 30px; width: 10px; }
.course-subject { overflow: hidden; margin: 1rem 0 .35rem; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.course-card h3 { margin: 0 0 .35rem; font-size: 1.35rem; }
.course-students { overflow: hidden; margin: 0; color: #526577; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.course-card small { margin: .8rem 0; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .05em; }
.course-card .text-link { margin-top: auto; }
.archived-curriculum { margin-top: 2.6rem; border-top: 1px solid var(--border); padding-top: 1.2rem; }
.archived-curriculum summary { cursor: pointer; color: var(--muted); font-size: .8rem; font-weight: 750; }
.archived-curriculum > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem 1rem; margin-top: .8rem; color: var(--muted); font-size: .78rem; }
.archived-curriculum p { margin: 0; }
.curriculum-form-card { max-width: 1080px; }
.course-enrollment-fields { display: grid; gap: 1rem; }
.course-student-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 0; padding: 1rem 0 0; }
.course-student-picker legend { grid-column: 1 / -1; }
.course-student-picker .check-field { margin: 0; border: 1px solid #d8e1e7; border-radius: 10px; background: #fff; padding: .65rem .7rem; }
.course-student-picker .check-field span { display: grid; gap: .08rem; }
.course-student-picker .check-field small { color: var(--muted); font-size: .7rem; font-weight: 500; }

@media (max-width: 1050px) {
    .curriculum-summary-grid, .subject-directory-grid, .course-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .curriculum-year-card, .curriculum-empty { align-items: stretch; flex-direction: column; }
    .curriculum-empty .button { width: 100%; }
    .record-card-actions { justify-content: space-between; }
    .record-card-actions form { flex: 1; }
    .record-card-actions .button { width: 100%; }
    .archived-curriculum > div, .course-student-picker { grid-template-columns: 1fr; }
}

/* Parent command center refresh */
.family-theme { background: #f3f6f8; }
.family-theme .family-main { max-width: 1480px; margin-inline: auto; padding-top: clamp(1.35rem, 3vw, 2.6rem); }
.family-command-header {
    overflow: hidden; position: relative; min-height: 230px; margin: 0 0 1rem; border: 0;
    border-radius: 24px; background:
        radial-gradient(circle at 88% 15%, rgba(110, 187, 228, .24), transparent 28%),
        radial-gradient(circle at 72% 110%, rgba(80, 161, 115, .2), transparent 30%),
        linear-gradient(125deg, var(--navy-950), var(--navy-800));
    color: white; padding: clamp(1.5rem, 3vw, 2.6rem); box-shadow: 0 18px 42px rgba(8, 47, 85, .17);
}
.family-command-header::after {
    content: ""; position: absolute; width: 260px; height: 260px; right: -105px; top: -145px;
    border: 1px solid rgba(255,255,255,.13); border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 84px rgba(255,255,255,.018);
}
.family-command-copy { position: relative; z-index: 1; max-width: 720px; }
.family-command-header .eyebrow { color: #f2c778; }
.family-command-header h1 { margin-bottom: .75rem; color: white; font-size: clamp(2.15rem, 4vw, 3.35rem); }
.family-command-header .family-command-date { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .8rem; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.08); padding: .35rem .65rem; color: #e5f1f9; font-size: .72rem; }
.family-command-date span { color: #79cf9d; font-size: .55rem; }
.family-command-header .family-command-summary { max-width: 610px; margin: 0; color: #cfe0ec; font-size: .9rem; }
.family-command-header .dashboard-header-actions { position: relative; z-index: 1; align-self: flex-end; }
.family-button-primary, .family-button-secondary { border-color: rgba(255,255,255,.28); }
.family-button-primary { background: white; color: var(--navy-950); }
.family-button-secondary { background: rgba(255,255,255,.09); color: white; }
.family-button-secondary:hover { background: rgba(255,255,255,.16); }

.parent-kpi-grid { gap: .8rem; margin-bottom: 1.2rem; }
.parent-kpi { position: relative; min-height: 122px; overflow: hidden; border-color: #dfe6eb; border-radius: 16px; background: #fff; padding: 1rem; box-shadow: 0 5px 18px rgba(20,45,73,.045); transition: transform .16s, border-color .16s, box-shadow .16s; }
.parent-kpi::before { content: ""; position: absolute; height: 3px; inset: 0 0 auto; background: var(--blue); }
.parent-kpi:hover { transform: translateY(-2px); border-color: #c6d6e1; box-shadow: 0 12px 26px rgba(20,45,73,.09); }
.parent-kpi > span { width: 44px; height: 44px; border-radius: 13px; font-size: 1.05rem; }
.parent-kpi small { color: #718093; font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.parent-kpi strong { font-size: 1.42rem; }
.parent-kpi > i { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #f0f4f7; }
.kpi-courses::before { background: var(--coral); }.kpi-learning::before { background: var(--green); }.kpi-plan::before { background: var(--gold); }

.parent-dashboard-grid { grid-template-columns: minmax(0, 1.65fr) minmax(310px, .72fr); gap: 1.1rem; }
.parent-learners-panel, .setup-panel { min-height: 390px; border-color: #dde5ea; border-radius: 18px; background: #fff; box-shadow: 0 8px 26px rgba(20,45,73,.055); }
.parent-learners-panel .panel-heading, .setup-panel .panel-heading { border-bottom-color: #e8edf0; }
.parent-empty { min-height: 270px; }
.parent-empty > span { width: 60px; height: 60px; border-radius: 18px; font-size: 1.3rem; }
.parent-learner-list article { padding: 1rem .2rem; }
.parent-learner-list article:hover { background: #f9fbfc; }
.setup-panel { background: linear-gradient(160deg, #fff 0%, #f3faf6 100%); }
.setup-panel-heading > span { display: grid; min-width: 58px; height: 42px; place-items: center; border: 1px solid #cce6d5; border-radius: 11px; background: white; font-size: 1.05rem; }
.setup-progress, .lesson-progress progress { display: block; overflow: hidden; width: 100%; height: 8px; border: 0; border-radius: 99px; background: #e4ebe7; appearance: none; }
.setup-progress { margin: .9rem 0 1rem; }
.setup-progress::-webkit-progress-bar, .lesson-progress progress::-webkit-progress-bar { border-radius: 99px; background: #e4ebe7; }
.setup-progress::-webkit-progress-value, .lesson-progress progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, #459b6d, #70bd8d); }
.setup-progress::-moz-progress-bar, .lesson-progress progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, #459b6d, #70bd8d); }
.setup-list { gap: .45rem; }
.setup-list li { align-items: flex-start; border: 1px solid transparent; padding: .65rem; }
.setup-list li:not(.is-done) { border-color: #eee7d2; background: #fffcf3; }
.setup-list li.is-done { background: rgba(255,255,255,.72); }
.setup-list li > span { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #fff6db; font-weight: 800; }
.setup-list li.is-done > span { background: #dff1e5; }
.setup-list strong { font-size: .8rem; }.setup-list small { margin-top: .1rem; font-size: .68rem; }

.dashboard-section-heading { margin: 2rem 0 .9rem; }
.parent-action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.parent-action-grid > a { min-height: 92px; border-color: #dfe6eb; border-radius: 15px; background: #fff; padding: 1rem; box-shadow: 0 4px 15px rgba(20,45,73,.035); transition: transform .16s, border-color .16s, box-shadow .16s; }
.parent-action-grid > a:hover { transform: translateY(-2px); border-color: #c5d6e2; box-shadow: 0 10px 24px rgba(20,45,73,.08); }
.parent-action-grid > a > span { width: 42px; height: 42px; border-radius: 12px; }
.parent-action-grid > a:nth-child(2) > span { background: var(--green-soft); color: var(--green); }
.parent-action-grid > a:nth-child(3) > span { background: var(--gold-soft); color: var(--gold); }
.parent-action-grid > a:nth-child(4) > span { background: var(--coral-soft); color: var(--coral); }
.parent-action-grid strong { font-size: .8rem; }.parent-action-grid small { margin-top: .12rem; line-height: 1.35; }

.lesson-progress progress { flex: 1; }

@media (max-width: 1180px) {
    .parent-dashboard-grid { grid-template-columns: 1fr; }
    .parent-kpi-grid, .parent-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .family-theme .family-main { padding: 1rem 1rem 88px; }
    .family-command-header { min-height: 0; align-items: stretch; border-radius: 18px; padding: 1.35rem; }
    .family-command-header h1 { font-size: 2.15rem; }
    .family-command-header .dashboard-header-actions { align-self: stretch; }
    .family-command-header .dashboard-header-actions .button { width: 100%; }
    .parent-kpi-grid, .parent-action-grid { grid-template-columns: 1fr; }
    .parent-kpi { min-height: 104px; }
    .parent-learners-panel, .setup-panel { min-height: 0; padding: 1rem; }
    .parent-empty { min-height: 220px; align-items: flex-start; flex-direction: column; }
}
