:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #64748b;
  --line: #dfe5ef;
  --paper: #ffffff;
  --surface: #f3f6fb;
  --navy: #111a33;
  --indigo: #4f46e5;
  --cyan: #67e8f9;
  --green: #0f9f6e;
  --amber: #d97706;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
.catalog-trail{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 26px;color:var(--muted);font-size:14px;line-height:1.8}
.catalog-trail a{color:var(--indigo)}
.catalog-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.catalog-grid.grades{grid-template-columns:repeat(3,minmax(0,1fr))}
.catalog-card{display:block;position:relative;padding:28px;transition:transform .15s,box-shadow .15s}
.catalog-card:hover{transform:translateY(-3px);box-shadow:0 15px 35px #1e293b18}
.catalog-card h2{font-size:24px;margin:20px 0 12px}.catalog-card p{color:var(--muted);line-height:1.7}
.catalog-icon{display:grid;place-items:center;width:54px;height:54px;background:#eef2ff;border-radius:17px;font-size:25px;color:#4338ca}
.subject-1 .catalog-icon{background:#ecfdf5;color:#047857}.subject-2 .catalog-icon{background:#fff7ed;color:#c2410c}.subject-3 .catalog-icon{background:#f0f9ff;color:#0369a1}
.catalog-arrow{position:absolute;right:24px;top:35px;font-size:24px;color:var(--muted)}
.term-tabs{display:flex;gap:8px;margin:0 0 24px}.term-tabs a{padding:12px 28px;border-radius:12px;background:white}.term-tabs [aria-current]{background:var(--indigo);color:white}
.chapter-list{display:grid;gap:20px}.chapter-number{color:var(--indigo);margin-right:16px}
.node-list{display:grid}.node-row{display:flex;align-items:center;gap:15px;padding:18px 0;border-top:1px solid var(--line);min-height:76px}.node-row>div{flex:1}.node-row small{display:block;color:var(--muted);margin-top:7px;line-height:1.5}.node-row:hover strong{color:var(--indigo)}
.catalog-detail{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:22px;align-items:start}.objective-list{padding-left:22px;line-height:2}.concept-tags{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:26px}.catalog-link{display:inline-flex;align-items:center;justify-content:center;min-height:48px}.catalog-book{margin:24px 0 0;font-size:13px;line-height:1.8}
@media(max-width:1000px){.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.catalog-grid.grades,.catalog-detail{grid-template-columns:1fr}.catalog-card{padding:20px}.catalog-card h2{font-size:21px}.node-row{flex-wrap:wrap}.node-row>div{flex:1 1 65%}.catalog-grid{gap:12px}}
@media(prefers-reduced-motion:reduce){.catalog-card{transition:none}.catalog-card:hover{transform:none}}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; min-height: 76px; padding: 12px clamp(18px, 4vw, 56px); background: rgba(255,255,255,.92); border-bottom: 1px solid rgba(203,213,225,.72); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 210px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: white; background: linear-gradient(145deg, #312e81, #2563eb); font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.role-nav { display: flex; gap: 6px; margin: 0 auto; padding: 5px; border-radius: 14px; background: #eef2f7; }
.role-nav a { padding: 9px 17px; border-radius: 10px; color: #475569; font-size: 14px; font-weight: 650; }
.role-nav a.active { color: #312e81; background: white; box-shadow: 0 1px 4px rgba(15,23,42,.08); }
.profile { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #312e81; background: #e0e7ff; font-weight: 750; }
[hidden] { display: none !important; }
.nav-button { padding:9px 17px; border:0; border-radius:10px; color:#475569; background:transparent; cursor:pointer; font-size:14px; font-weight:650; }

main { width: min(1440px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 90px; }
.eyebrow { color: var(--indigo); font-size: 14px; font-weight: 750; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(28px, 3.2vw, 45px); line-height: 1.12; letter-spacing: -.035em; }
h2 { font-size: 19px; }
.muted { color: var(--muted); }
.header-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.pill { display: inline-flex; align-items: center; min-height: 29px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: #475569; background: rgba(255,255,255,.7); font-size: 12px; font-weight: 650; }
.pill.good { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.card { background: var(--paper); border: 1px solid rgba(203,213,225,.72); border-radius: 22px; box-shadow: 0 10px 35px rgba(15,23,42,.055); }
.card-pad { padding: 24px; }

.student-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.72fr); gap: 20px; }
.hero { position: relative; overflow: hidden; min-height: 385px; padding: clamp(26px,4vw,48px); color: white; background: linear-gradient(135deg, #111a33 10%, #1e2a52 58%, #243b70); border-radius: 28px; box-shadow: 0 28px 70px rgba(30,41,89,.22); }
.hero::after { content:""; position:absolute; right:-80px; bottom:-110px; width:310px; height:310px; border:1px solid rgba(103,232,249,.22); border-radius:50%; box-shadow: 0 0 0 60px rgba(103,232,249,.05), 0 0 0 120px rgba(103,232,249,.03); }
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { color: var(--cyan); }
.hero h1 { max-width: 680px; margin-top: 20px; }
.hero p { max-width: 650px; color: #cbd5e1; line-height: 1.8; }
.task-meta { display: flex; flex-wrap: wrap; gap: 9px; margin: 26px 0; }
.task-meta span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(255,255,255,.07); font-size: 13px; }
.primary-button, .secondary-button { min-height: 48px; padding: 0 20px; border: 0; border-radius: 14px; cursor: pointer; font-weight: 750; }
.primary-button { color: #111827; background: var(--cyan); box-shadow: 0 10px 25px rgba(103,232,249,.2); }
.primary-button:hover { background: #a5f3fc; }
.secondary-button { color: #312e81; background: #eef2ff; }
.side-stack { display: grid; gap: 20px; }
.side-stack .card { padding: 22px; }
.goal-list { display: grid; gap: 13px; margin-top: 18px; }
.goal { display: flex; gap: 11px; color: #334155; font-size: 14px; line-height: 1.55; }
.goal b { display: grid; flex: 0 0 24px; place-items: center; height: 24px; border-radius: 8px; color: #4338ca; background: #eef2ff; }
.progress-track { overflow: hidden; height: 8px; margin: 15px 0 9px; border-radius: 10px; background: #e9eef6; }
.progress-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#4f46e5,#22d3ee); }

.practice { max-width: 850px; margin: 0 auto; }
.video-lesson { max-width: 980px; margin: 0 auto; }
.video-card { padding: clamp(22px,4vw,38px); }
.video-card h1 { margin-top: 14px; font-size: clamp(27px,4vw,40px); }
.video-card video { display:block; width:100%; margin:22px 0 14px; border-radius:20px; background:#0f1734; box-shadow:0 18px 45px rgba(15,23,52,.2); }
.video-status { padding:14px 16px; border-radius:14px; color:#475569; background:#f8fafc; line-height:1.6; }
.video-status.done { color:#047857; background:#ecfdf5; }
.primary-button:disabled, .secondary-button:disabled { cursor:not-allowed; opacity:.48; box-shadow:none; }
.practice-top { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.question { padding: clamp(24px,5vw,44px); }
.question h1 { margin-top: 18px; font-size: clamp(25px,4vw,37px); }
.options { display:grid; gap:12px; margin:26px 0; }
.option { min-height: 55px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 15px; background: white; text-align:left; cursor:pointer; }
.option.selected { border-color:#6366f1; background:#eef2ff; box-shadow:0 0 0 2px rgba(99,102,241,.12); }
.option.correct { border-color:#34d399; background:#ecfdf5; }
.option.wrong { border-color:#fbbf24; background:#fffbeb; }
.feedback { margin: 18px 0 0; padding: 15px; border-radius: 15px; color:#334155; background:#f8fafc; line-height:1.65; }
.repair-text { line-height:1.9; font-size:20px; }
.evidence-item p { margin:10px 0 0; color:var(--muted); line-height:1.6; }
button:focus-visible,a:focus-visible { outline:3px solid #4f46e5; outline-offset:3px; }
@media(max-width:520px){.evidence-item strong{flex-direction:column;gap:5px}.question-actions button{flex:1 1 140px}.question h1{line-height:1.4}}
.question-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; }

.metric-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:22px 0; }
.metric { padding:22px; color:white; background:var(--navy); border-radius:20px; }
.metric small { color:#cbd5e1; }
.metric strong { display:block; margin:8px 0 3px; font-size:30px; }
.metric span { color:var(--cyan); font-size:13px; }
.report-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,.7fr); gap:20px; }
.report-grid .card { padding:24px; }
.evidence { display:grid; gap:16px; }
.evidence-item { padding:16px; border-radius:16px; background:#f8fafc; }
.reading-step { margin-top:12px; }
.reading-step summary { cursor:pointer; font-weight:700; line-height:1.5; }
.reading-step[open] summary { color:#3730a3; }
.reading-step .repair-text { margin-bottom:0; }
.evidence-item strong { display:flex; justify-content:space-between; gap:16px; }

.admin-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:15px; margin:22px 0; }
.admin-metric { padding:20px; }
.admin-metric small { color:var(--muted); }
.admin-metric strong { display:block; margin-top:7px; font-size:28px; }
.table-card { overflow:hidden; }
.table-scroll { overflow-x:auto; }
table { width:100%; min-width:820px; border-collapse:collapse; font-size:14px; }
th, td { padding:15px 18px; border-bottom:1px solid #edf0f5; text-align:left; }
th { color:var(--muted); background:#f8fafc; font-weight:650; }
.framework-note { display:flex; gap:13px; margin-top:20px; padding:17px; border-radius:17px; color:#e2e8f0; background:var(--navy); line-height:1.7; }

.loading-card, .error-card { display:grid; place-items:center; min-height:320px; text-align:center; }
.spinner { width:34px; height:34px; border:3px solid #dbeafe; border-top-color:#4f46e5; border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.mobile-nav { display:none; }

.auth-layout { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(340px,.72fr); gap:clamp(28px,7vw,90px); align-items:center; min-height:calc(100vh - 200px); max-width:1120px; margin:0 auto; }
.auth-intro h1 { max-width:680px; margin:18px 0; }
.auth-intro p,.auth-intro li { color:#475569; font-size:17px; line-height:1.8; }
.auth-card { padding:clamp(25px,4vw,38px); }
.auth-card h2 { margin:10px 0 8px; font-size:29px; }
.auth-form { display:grid; gap:17px; margin-top:24px; }
.auth-form label { display:grid; gap:8px; color:#334155; font-size:14px; font-weight:700; }
.auth-form input,.auth-form select { width:100%; min-height:48px; padding:10px 13px; border:1px solid #cbd5e1; border-radius:12px; color:var(--ink); background:white; }
.auth-form input:focus,.auth-form select:focus { outline:3px solid #c7d2fe; border-color:#6366f1; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.text-button { margin-top:18px; padding:8px 0; border:0; color:#4338ca; background:transparent; cursor:pointer; font-weight:700; }
.auth-notice { margin-top:16px; padding:12px 14px; border-radius:12px; color:#9f1239; background:#fff1f2; }
.auth-notice:empty { display:none; }
.account-result { display:grid; gap:10px; margin:20px 0; }
.account-result>div { display:grid; grid-template-columns:80px 1fr auto; gap:12px; align-items:center; padding:13px; border-radius:13px; background:#f8fafc; }
.account-result code,.child-card code { color:#312e81; font-size:17px; font-weight:800; }
.warning-note { padding:13px; border-radius:12px; color:#92400e; background:#fffbeb; line-height:1.6; }
.children-grid { display:grid; gap:18px; }
.child-card { display:grid; grid-template-columns:minmax(230px,1fr) auto; gap:20px; padding:24px; }
.child-card h2 { margin:13px 0 8px; font-size:24px; }
.child-actions { display:flex; flex-wrap:wrap; align-content:start; justify-content:flex-end; gap:9px; }
.child-report { grid-column:1/-1; }
.report-summary { display:flex; flex-wrap:wrap; gap:12px; padding:16px; border-radius:14px; background:#f1f5f9; }
.report-summary span,.report-summary strong { padding-right:15px; border-right:1px solid #cbd5e1; }

@media (max-width: 900px) {
  .role-nav { display:none; }
  .topbar { min-height:66px; padding:10px 18px; }
  .brand { min-width:0; flex:1; }
  main { width:min(100% - 24px, 720px); padding-top:22px; padding-bottom:100px; }
  .student-grid, .report-grid { grid-template-columns:1fr; }
  .metric-grid { grid-template-columns:1fr; }
  .admin-metrics { grid-template-columns:repeat(2,1fr); }
  .hero { min-height:auto; padding:27px 22px; border-radius:23px; }
  .side-stack { grid-template-columns:1fr; }
  .header-row { align-items:flex-start; }
  .mobile-nav { position:fixed; z-index:30; right:10px; bottom:max(10px,env(safe-area-inset-bottom)); left:10px; display:grid; grid-template-columns:repeat(3,1fr); padding:7px; border:1px solid rgba(203,213,225,.8); border-radius:19px; background:rgba(255,255,255,.94); box-shadow:0 12px 35px rgba(15,23,42,.16); backdrop-filter:blur(16px); }
  .mobile-nav a { display:grid; place-items:center; gap:2px; min-height:50px; border-radius:13px; color:#64748b; font-size:11px; font-weight:650; }
  .mobile-nav a span { font-size:20px; line-height:1; }
  .mobile-nav a.active { color:#3730a3; background:#eef2ff; }
  .mobile-nav .nav-button { display:grid; place-items:center; gap:2px; min-height:50px; padding:0; font-size:11px; }
  .mobile-nav .nav-button span { font-size:20px; line-height:1; }
  .auth-layout { grid-template-columns:1fr; min-height:auto; gap:22px; }
  .auth-intro { padding:12px 4px 0; }
  .auth-intro ul { display:none; }
  .child-card { grid-template-columns:1fr; }
  .child-actions { justify-content:flex-start; }
}

@media (max-width: 520px) {
  .brand small { display:none; }
  .admin-metrics { grid-template-columns:1fr 1fr; gap:10px; }
  .admin-metric { padding:16px; }
  .header-row { display:block; }
  .header-row .pill { margin-top:8px; }
  .practice-top { align-items:center; }
  .form-row,.account-result>div { grid-template-columns:1fr; }
}
.lesson-chapters{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.lesson-chapters button{font-size:13px;text-align:left;white-space:normal;min-height:44px;max-width:100%}
.tier-overview{margin:18px 0}.tier-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}.tier-cards .evidence-item{min-width:0}.tier-cards small{display:block;margin-top:10px;color:var(--muted)}.tier-cards details{margin-top:14px}.tier-cards summary{cursor:pointer;color:#3730a3}.tier-path{margin:20px 0;padding:17px;border-radius:16px;background:#eef5fb}.tier-path p{margin-bottom:0}
.written-response{display:block;width:100%;min-height:190px;box-sizing:border-box;margin-top:12px;padding:16px;border:1px solid #cbd5e1;border-radius:14px;background:#fff;color:#1e293b;font:inherit;line-height:1.7;resize:vertical}
.learning-stimulus{margin:22px 0;padding:20px;border:1px solid #dbe5f1;border-radius:18px;background:#f8fbff}.learning-stimulus>p{margin:14px 0 0;white-space:pre-line;font-size:18px;line-height:1.9}.audio-stimulus{border-color:#c7d2fe;background:#f5f7ff}.audio-stimulus .question-actions{margin-top:15px}.audio-stimulus .muted{margin:12px 0 0;font-size:14px}.transcript-support{margin-top:16px;padding-top:14px;border-top:1px solid #dbe5f1}.transcript-support summary{cursor:pointer;color:#4338ca;font-weight:700}.transcript-support p{white-space:pre-line;line-height:1.9}
.repair-text{white-space:pre-line}
@media(max-width:760px){.tier-cards{grid-template-columns:1fr}}
