
/* Foundations */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  background-image: var(--bg-dot-pattern);
  background-size: var(--bg-dot-size);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] { display: none !important; }
button,input,select,textarea { font: inherit; font-family: var(--font-body); }
a { color: inherit; text-decoration: none; }
button,select { cursor: pointer; }
button,a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.table-wrap:focus-visible { outline: 3px solid rgba(59, 130, 246, 0.45); outline-offset: 2px; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3,.brand { font-family: var(--font-display); letter-spacing: -0.025em; color: var(--text-primary); }
h1 { font-size: 26px; font-weight: 800; line-height: 1.28; }
h2 { font-size: 16px; font-weight: 700; line-height: 1.45; }
h3 { font-size: 14px; font-weight: 700; line-height: 1.5; }
p { line-height: 1.65; color: var(--text-secondary); }
small,.small { font-size: 12px; line-height: 1.55; }
.muted { color: var(--text-muted); }
.spaced { margin-top: var(--space-5); }
.eyebrow { font-family: var(--font-display); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; min-height: 40px; border: 1px solid var(--border-hairline); border-radius: var(--radius-sm); background: var(--surface-primary); color: var(--text-primary); font-size: 13px; font-weight: 600; line-height: 1.4; box-shadow: var(--shadow-xs), var(--inner-glow); transition: transform var(--motion) var(--ease), box-shadow var(--motion) var(--ease), background-color var(--motion) var(--ease), border-color var(--motion) var(--ease), color var(--motion) var(--ease); }
.btn:hover:not(:disabled) { background: var(--surface-subtle); border-color: var(--border-strong); transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.1), var(--inner-glow); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn-primary { background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%); border-color: #1D4ED8; color: var(--text-inverse); box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%); border-color: #1E40AF; color: var(--text-inverse); box-shadow: 0 12px 24px -6px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.32); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 12px; border-radius: 10px; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--brand-blue); box-shadow: none; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-blue); border-color: transparent; box-shadow: none; }
.full-width { width: 100%; }
.icon-button { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; padding: 7px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); transition: transform var(--motion) var(--ease), background-color var(--motion) var(--ease), color var(--motion) var(--ease); }
.icon-button:hover { background: var(--surface-blue); color: var(--brand-blue); transform: translateY(-1px); }
.icon-button:active { transform: scale(0.96); }

/* Shared application shell */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 0 14px 18px; background: var(--brand-navy); color: var(--text-inverse); z-index: 40; overflow-y: auto; scrollbar-width: thin; }
.brand-header { margin: 0 -14px 21px; padding: 17px 22px 15px; background: var(--brand-navy); border-bottom: 1px solid var(--brand-navy-hover); }
.brand-logo { display: block; width: 100%; height: 51px; object-fit: contain; }
.brand-header .brand { margin-top: 7px; display: block; text-align: center; color: var(--text-inverse); font-weight: 750; font-size: 18px; letter-spacing: -.5px; }
.profile-name.name-ocean { color: var(--nav-text); }
.workspace { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; padding: 10px 8px; }
.workspace-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--brand-navy-hover); border-radius: var(--radius-sm); color: var(--nav-text); }
.workspace strong { font-size: 13px; }
.workspace-picker { width: 100%; min-width: 0; font-size: 11px; color: var(--nav-text); }
.workspace-picker select { width: 100%; min-width: 0; margin-top: 7px; padding: 9px 7px; color: var(--ink); background: var(--surface-primary); font-size: 12px; }
.workspace .muted { margin-top: 3px; font-size: 11px; color: var(--nav-muted); }
.nav-label { margin: 0 10px 12px; color: var(--nav-muted); font-size: 10px; letter-spacing: 1.2px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 45px; padding: 11px 12px; margin: 4px 0; border-radius: var(--radius-sm); color: var(--nav-text); font-weight: 550; font-size: 13px; }
.nav-item:hover { background: var(--brand-navy-hover); color: var(--text-inverse); }
.nav-item.active { background: var(--brand-blue); color: var(--text-inverse); }
.nav-count { margin-left: auto; font-size: 10px; padding: 2px 6px; border: 1px solid currentColor; border-radius: 4px; }
.sidebar a:focus-visible,.sidebar button:focus-visible { outline-color: var(--nav-text); }
.sidebar-bottom { margin-top: auto; padding-top: 30px; }
.profile { display: flex; gap: 9px; align-items: center; padding-top: 17px; border-top: 1px solid var(--brand-navy-hover); }
.profile>div { flex: 1; min-width: 0; }
.profile-name { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 650; }
.profile .muted { color: var(--nav-muted); font-size: 11px; margin-top: 3px; }
.profile .icon-button,.sidebar-close { color: var(--nav-text); }
.profile .icon-button:hover,.sidebar-close:hover { background: var(--brand-navy-hover); color: var(--text-inverse); }
.profile-link { display: inline-flex; border-radius: 50%; }
.avatar { width: 37px; height: 37px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; background: var(--warning-bg); color: var(--status-warning); font-weight: 700; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-large { width: 84px; height: 84px; font-size: 34px; }
.frame-sunrise { outline: 3px solid var(--brand-orange); outline-offset: 3px; }
.frame-ocean { outline: 3px solid var(--brand-blue); outline-offset: 3px; }
.frame-garden { outline: 3px dashed var(--brand-green); outline-offset: 3px; }
.name-sunset { color: var(--brand-orange); font-weight: 750; }
.name-ocean { color: var(--brand-blue); font-family: Georgia,serif; font-weight: 700; }
.mobile-toggle,.sidebar-close,.nav-backdrop { display: none; }
.main { margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--surface-primary); }
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb span { color: var(--ink); margin-left: 12px; font-weight: 600; }
.top-tools { display: flex; align-items: center; gap: 18px; }
.today { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.connection { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: 11px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-green); }
.content { max-width: var(--content-width); margin: auto; padding: 26px 28px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-heading p { color: var(--muted); margin-top: 7px; font-size: 13px; }
.heading-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.welcome-banner { min-height: 120px; padding: 24px; margin-bottom: 18px; display: flex; gap: 22px; align-items: center; justify-content: space-between; background: linear-gradient(110deg,var(--surface-blue),var(--info-bg) 70%,var(--success-bg)); border: 1px solid var(--line); border-radius: var(--radius); position: relative; overflow: hidden; }
.welcome-banner h1 { font-size: 27px; }
.welcome-banner p { font-size: 13px; color: var(--muted); margin-top: 7px; max-width: 500px; }
.study-scene { width: 210px; height: 95px; flex-shrink: 0; color: var(--brand-blue); }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.stat { padding: 15px 17px; background: var(--surface-primary); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.stat-icon { display: grid; place-items: center; width: 30px; height: 30px; background: var(--info-bg); color: var(--brand-blue); border-radius: var(--radius-sm); }
.stat-value { font-size: 27px; line-height: 1.25; font-weight: 700; letter-spacing: -.5px; margin: 7px 0 5px; }
.stat-value small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.stat-note { color: var(--muted); font-size: 11px; line-height: 1.6; }
.summary-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 13px 17px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-primary); }
.subject-summary { display: flex; align-items: center; gap: 11px; padding-right: 20px; border-right: 1px solid var(--line); }
.subject-summary strong { display: block; font-size: 14px; }
.subject-summary small { color: var(--muted); }
.summary-value { color: var(--muted); font-size: 12px; }
.summary-value strong { color: var(--ink); font-size: 17px; margin-right: 4px; }
.summary-strip>a { margin-left: auto; color: var(--brand-blue); font-size: 12px; font-weight: 600; }
.panel { background: var(--surface-primary); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.panel-header { padding: 17px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-header h2 .icon { margin-right: 5px; color: var(--brand-blue); }
.panel-header p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.panel-body { padding: 0 18px 18px; }
.section-link { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-blue); font-weight: 600; font-size: 12px; white-space: nowrap; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(300px,1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.student-workspace { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
.student-bottom { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,2.05fr); gap: 16px; margin-top: 18px; align-items: start; }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); padding: 0 18px; }
.tab { border: 0; border-bottom: 2px solid transparent; background: transparent; min-height: 41px; padding: 0 0 10px; font-size: 12px; color: var(--muted); }
.tab.active { color: var(--brand-blue); border-color: var(--brand-blue); font-weight: 650; }
.task { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.subject-icon { display: grid; place-items: center; width: 36px; height: 36px; background: var(--chemistry-bg); color: var(--chemistry); border-radius: var(--radius-sm); flex-shrink: 0; }
.task-info { min-width: 0; flex: 1; }
.task h3 { overflow-wrap: anywhere; font-size: 13px; margin-bottom: 5px; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: var(--muted); }
.task-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.lesson-list .task { flex-wrap: wrap; align-items: flex-start; }
.lesson-list .task-info { flex-basis: calc(100% - 50px); }
.lesson-list .task-right { width: calc(100% - 47px); margin-left: 47px; justify-content: space-between; flex-wrap: wrap; }
.task-right .btn { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.score-chip { font-size: 17px; font-weight: 700; }
.pill { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 5px; background: var(--bg); color: var(--muted); font-size: 11px; line-height: 1.5; font-weight: 600; white-space: nowrap; }
.pill.blue { background: var(--info-bg); color: var(--status-info); }
.pill.green { background: var(--success-bg); color: var(--status-success); }
.pill.orange { background: var(--warning-bg); color: var(--status-warning); }
.pill.red { background: var(--danger-bg); color: var(--status-danger); }
.next-learning { border-top: 3px solid var(--brand-blue); }
.next-learning h3 { font-size: 18px; line-height: 1.45; margin: 12px 0 9px; }
.next-learning p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.next-learning .btn-primary { width: 100%; }
.next-learning .form-actions { margin-top: 14px; }
.next-learning .form-field { margin-bottom: 13px; }
.next-learning .form-field>span { font-size: 12px; }
.next-learning textarea { min-height: 78px; }
.next-learning .source-note { margin-bottom: 12px; font-size: 11px; }
.insight { padding: 15px; border-radius: var(--radius-sm); background: var(--surface-blue); }
.insight .eyebrow { color: var(--status-info); margin-bottom: 11px; font-size: 9px; }
.insight p { line-height: 1.8; font-size: 13px; margin: 0; }
.insight-foot { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 15px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.recommendation { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.recommendation h3 { font-size: 13px; margin-bottom: 6px; }
.recommendation p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.recommendation .btn { margin-top: 12px; }
.progress-preview { padding: 0 18px 18px; }
.progress-preview .recent-score { font-size: 30px; font-weight: 700; color: var(--brand-blue); }
.progress-preview p { color: var(--muted); font-size: 12px; }
.chart { height: 160px; display: flex; align-items: flex-end; gap: 15px; padding: 15px 7px 25px; border-bottom: 1px dashed var(--line); }
.bar-col { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; flex: 1; min-width: 0; }
.bar { background: var(--brand-blue); width: min(38px,80%); min-height: 2px; border-radius: 4px 4px 0 0; }
.bar-value,.bar-label { font-size: 11px; }
.bar-label { color: var(--muted); }
.chart-empty { padding: 10px 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.daily-panel { background: var(--surface-primary); padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.daily-title { display: flex; align-items: center; gap: 12px; }
.daily-title>div { min-width: 0; flex: 1; }
.daily-title h2 { font-size: 15px; }
.daily-title p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.daily-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--success-bg); color: var(--brand-green); flex-shrink: 0; }
.streak { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 650; color: var(--status-warning); white-space: nowrap; }
.milestone-row { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.milestone { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.milestone .icon { width: 15px; height: 15px; }
.milestone.unlocked { color: var(--status-success); }
.milestone small { font-size: 10px; }
.xp-total { display: flex; align-items: center; gap: 13px; margin: 2px 0 18px; }
.xp-total strong { font-size: 29px; font-weight: 700; }
.xp-total small { font-size: 14px; }
.xp-medal { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--warning-bg); color: var(--brand-orange); }
.progress { height: 6px; background: var(--surface-blue); border-radius: 6px; overflow: hidden; }
.progress>span { display: block; height: 100%; border-radius: inherit; background: var(--brand-orange); }
.progress-caption { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; font-size: 11px; color: var(--muted); }
.reward-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.reward-item:last-child { border-bottom: 0; }
.reward-item>span { flex: 1; color: var(--muted); }
.reward-item>.icon { color: var(--brand-green); }
.reward-item>strong { color: var(--brand-orange); font-size: 12px; }

/* Teacher workspace and common data components */
.table-wrap { overflow-x: auto; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { font-size: 11px; font-weight: 650; background: var(--bg); color: var(--muted); padding: 11px 14px; white-space: nowrap; }
td { border-bottom: 1px solid var(--line); padding: 13px 14px; font-size: 12px; line-height: 1.65; }
tr:last-child td { border-bottom: 0; }
td .btn { white-space: nowrap; }
.student-cell { display: flex; align-items: center; gap: 10px; }
.student-cell .avatar { width: 30px; height: 30px; font-size: 10px; }
.student-cell strong { font-size: 12px; }
.student-cell .muted { font-size: 11px; }
.filters { display: grid; grid-template-columns: minmax(180px,1.3fr) minmax(150px,1fr) minmax(150px,1fr); gap: 12px; padding: 0 18px 17px; }
.filters label { font-size: 11px; color: var(--muted); }
.filters input,.filters select { margin-top: 6px; min-height: 38px; font-size: 12px; }
.filter-input { max-width: 240px; }
.table-caption { padding: 0 18px 14px; font-size: 12px; color: var(--muted); }
.empty { padding: 28px 20px; text-align: center; }
.empty>.icon { width: 29px; height: 29px; color: var(--border-strong); margin-bottom: 10px; }
.empty h3 { margin-bottom: 6px; }
.empty p { font-size: 12px; color: var(--muted); max-width: 420px; margin: auto; }
.empty .btn { margin-top: 16px; }
.notice { border: 1px solid var(--line); border-left: 3px solid var(--brand-orange); background: var(--warning-bg); color: var(--status-warning); font-size: 12px; line-height: 1.8; padding: 12px 15px; border-radius: var(--radius-sm); margin-bottom: 18px; }
.notice.neutral { border-left-color: var(--brand-blue); background: var(--info-bg); color: var(--status-info); }
.inline-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.question-card { border-top: 1px solid var(--line); padding: 20px; }
.question-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.question-card h3 { margin-bottom: 14px; }
.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.answer-option { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; }
.answer-option.correct { background: var(--success-bg); border-color: var(--brand-green); color: var(--status-success); }
.explanation { color: var(--muted); font-size: 13px; line-height: 1.8; margin-top: 13px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.setup-step { display: flex; gap: 13px; margin-bottom: 24px; }
.setup-step:last-child { margin-bottom: 0; }
.step-number { display: grid; place-items: center; border-radius: 50%; width: 29px; height: 29px; flex-shrink: 0; background: var(--surface-blue); color: var(--brand-blue); font-size: 12px; font-weight: 700; }
.setup-step strong { font-size: 13px; }
.setup-step p { font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.pair-code { text-align: center; font-family: monospace; font-size: 30px; letter-spacing: 5px; padding: 18px; border-radius: var(--radius); background: var(--info-bg); color: var(--brand-blue); margin-bottom: 16px; }
.timeline-item { display: flex; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.timeline-dot { margin-top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-blue); flex-shrink: 0; }
.timeline-item p { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.timeline-item time { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.footer { display: flex; justify-content: space-between; gap: 18px; font-size: 10px; color: var(--muted); margin-top: 26px; line-height: 1.8; }
.footer .icon { width: 13px; height: 13px; margin-right: 4px; }

/* Forms, dialogs and practice */
.form-field { display: block; margin-bottom: 17px; }
.form-field>span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.form-field small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
input,select,textarea { width: 100%; min-height: 41px; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-primary); color: var(--ink); font-size: 13px; }
input:focus,select:focus,textarea:focus { border-color: var(--brand-blue); }
input[readonly] { background: var(--bg); color: var(--muted); }
textarea { resize: vertical; min-height: 100px; line-height: 1.7; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.form-error { padding: 10px 12px; margin-bottom: 15px; background: var(--danger-bg); color: var(--status-danger); border-radius: var(--radius-sm); font-size: 12px; line-height: 1.7; }
.form-error:empty { display: none; }
.completion-choice { display: flex; align-items: center; gap: 10px; line-height: 1.6; font-size: 13px; margin-top: 15px; }
.completion-choice input { width: 17px; min-height: 17px; }
dialog { padding: 0; width: min(690px,calc(100vw - 30px)); max-height: calc(100dvh - 40px); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--ink); background: var(--surface-primary); box-shadow: var(--dialog-shadow); }
dialog::backdrop { background: var(--backdrop); }
.modal-head { position: sticky; top: 0; z-index: 2; background: var(--surface-primary); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 19px; }
.modal-content { padding: 20px 22px 24px; }
.modal-content>p { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.source-box { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); margin-bottom: 18px; font-size: 13px; line-height: 1.8; }
.source-box blockquote { margin: 10px 0; padding-left: 12px; border-left: 3px solid var(--brand-orange); white-space: pre-wrap; overflow-wrap: anywhere; }
.evidence { border-left: 3px solid var(--brand-blue); padding: 10px 13px; margin: 12px 0; background: var(--info-bg); font-size: 12px; line-height: 1.7; }
.practice-q { padding: 16px; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.practice-q legend { padding: 0 5px; font-size: 14px; font-weight: 650; line-height: 1.65; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 9px; font-size: 13px; line-height: 1.6; cursor: pointer; }
.choice input { width: 17px; min-height: 17px; margin-top: 3px; flex-shrink: 0; accent-color: var(--brand-blue); }
.choice:has(input:checked) { border-color: var(--brand-blue); background: var(--info-bg); }
.choice.right,.choice.right:has(input:checked) { border-color: var(--brand-green); background: var(--success-bg); }
.choice.wrong,.choice.wrong:has(input:checked) { border-color: var(--status-danger); background: var(--danger-bg); }
.result-score { color: var(--brand-blue); text-align: center; font-size: 48px; font-weight: 700; }
.result-caption { text-align: center; margin: 8px 0 20px; font-size: 13px; color: var(--muted); }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%,15px); max-width: min(560px,calc(100vw - 32px)); padding: 12px 18px; background: var(--brand-navy); color: var(--text-inverse); border-radius: var(--radius); font-size: 13px; line-height: 1.7; z-index: 100; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--motion),transform var(--motion); }
#toast.visible { opacity: 1; visibility: visible; transform: translate(-50%,0); }

/* Profile, attachments and optional rewards */
.profile-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 22px; align-items: start; }
.profile-cover { height: 95px; background: linear-gradient(120deg,var(--surface-blue),var(--success-bg)); }
.profile-card-body { padding: 0 22px 24px; text-align: center; }
.profile-card-body>.avatar { margin-top: -40px; border: 4px solid var(--surface-primary); }
.profile-card-body h2 { margin: 20px 0 9px; font-size: 20px; }
.profile-card-body>p { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; margin-bottom: 14px; }
.profile-numbers { display: flex; justify-content: center; gap: 40px; margin: 20px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.profile-numbers strong { display: block; font-size: 23px; }
.profile-numbers span { color: var(--muted); font-size: 12px; }
.photo-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-bottom: 12px; }
.photo-editor .avatar { width: 52px; height: 52px; }
.upload-label { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; background: var(--surface-primary); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; cursor: pointer; overflow: hidden; }
.upload-label input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-label:focus-within { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.attachment-area { background: var(--bg); border: 1px dashed var(--border-strong); padding: 15px; border-radius: var(--radius); margin-bottom: 18px; }
.attachment-area p { font-size: 11px; color: var(--muted); margin-top: 9px; }
.attachment-preview,.feedback-gallery { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.attachment-thumb { position: relative; }
.attachment-thumb img,.feedback-gallery img { width: 105px; height: 80px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.attachment-thumb button { position: absolute; top: -5px; right: -5px; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-primary); }
.attachment-thumb button .icon { width: 14px; height: 14px; }
.full-image { width: 100%; height: auto; }
.wallet { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--warning-bg); color: var(--status-warning); font-weight: 650; font-size: 13px; }
.shop-banner { display: flex; justify-content: space-between; align-items: center; padding: 25px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(110deg,var(--surface-blue),var(--warning-bg)); margin-bottom: 22px; }
.shop-banner h2 { font-size: 25px; line-height: 1.5; margin: 10px 0; }
.shop-banner p { color: var(--muted); font-size: 13px; }
.shop-mascots { font-size: 60px; white-space: nowrap; }
.shop-mascots span { color: var(--brand-orange); font-size: 26px; }
.shop-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.item-preview { height: 150px; display: flex; justify-content: center; align-items: center; background: var(--surface-blue); font-size: 25px; }
.shop-card-body { padding: 20px; }
.shop-card h3 { font-size: 16px; margin: 10px 0 7px; }
.shop-card p { font-size: 12px; color: var(--muted); min-height: 44px; }
.shop-card-body .eyebrow { font-size: 9px; color: var(--muted); }
.shop-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; font-size: 13px; }

/* Authentication: blue editorial panel, focused form, one shared palette. */
.login-shell { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(410px,.92fr); gap: 12px; min-height: 100svh; padding: 18px; background: var(--surface-primary); }
.login-story { display: flex; flex-direction: column; justify-content: space-between; position: sticky; top: 18px; height: calc(100svh - 36px); min-height: 660px; overflow: hidden; padding: 31px 44px 25px; border-radius: 24px; background: radial-gradient(ellipse at 95% 8%,var(--surface-primary),transparent 55%),linear-gradient(150deg,var(--auth-sky),var(--auth-sky-deep)); color: var(--ink); }
.login-brand-row { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.login-brand-row img { display: block; width: 128px; height: 43px; object-fit: contain; }
.login-brand-row .brand { border-left: 1px solid var(--border-strong); padding-left: 18px; font-size: 17px; font-weight: 750; letter-spacing: -.45px; color: var(--brand-navy); }
.login-story-copy { margin: auto 0; padding: 30px 0 5px; position: relative; }
.login-story .eyebrow { color: var(--auth-cobalt); font-size: 10px; margin-bottom: 17px; letter-spacing: 1.5px; }
.login-story h1 { font-size: clamp(36px,3.3vw,50px); font-weight: 700; line-height: 1.16; letter-spacing: -1.7px; color: var(--brand-navy); }
.login-story h1 span { color: var(--auth-cobalt); }
.login-story p { color: var(--text-secondary); font-size: 14px; max-width: 400px; line-height: 1.85; margin: 19px 0 0; }
.login-illustration { position: relative; width: min(100%,540px); margin: 6px auto 0; }
.login-illustration svg { display: block; width: 100%; height: auto; overflow: visible; }
.illustration-caption { display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--auth-cobalt); font-size: 12px; margin-top: -5px; }
.caption-mark { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--surface-primary); color: var(--brand-green); }
.caption-mark .icon { width: 13px; height: 13px; }
.login-story-footer { display: flex; align-items: center; gap: 9px; margin-top: 24px; color: var(--auth-cobalt); font-size: 10px; letter-spacing: .35px; flex-shrink: 0; }
.login-story-footer .icon { width: 15px; height: 15px; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 28px 40px; }
.login-story,.login-side,.login-form { min-width: 0; }
.login-form { width: 388px; max-width: 100%; }
.auth-intro-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: var(--surface-blue); color: var(--brand-blue); margin-bottom: 20px; }
.auth-intro-icon .icon { width: 22px; height: 22px; }
.login-form h2 { font-size: 28px; line-height: 1.3; letter-spacing: -.8px; font-weight: 700; }
.login-form>p { color: var(--muted); font-size: 13px; margin: 11px 0 15px; }
.auth-domain { display: inline-flex; gap: 6px; align-items: center; font-size: 10px; color: var(--auth-cobalt); background: var(--auth-haze); border: 1px solid var(--line); border-radius: 5px; padding: 5px 8px; margin-bottom: 22px; }
.auth-tabs { display: flex; gap: 25px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.auth-tabs button { min-height: 39px; padding: 0 2px 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; font-weight: 550; }
.auth-tabs button.active { color: var(--brand-blue); border-bottom-color: var(--brand-blue); font-weight: 700; }
.google-button { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-primary); color: var(--ink); font-weight: 600; font-size: 13px; transition: background var(--motion),border-color var(--motion); }
.google-button:hover { background: var(--auth-haze); border-color: var(--border-strong); }
.google-mark { width: 18px; height: 18px; }
.auth-divider { display: flex; gap: 12px; align-items: center; font-size: 11px; color: var(--muted); margin: 20px 0; }
.auth-divider:before,.auth-divider:after { content: ''; height: 1px; background: var(--line); flex: 1; }
.login-form .form-field { margin-bottom: 18px; }
.login-form .form-field>span { font-size: 12px; margin-bottom: 8px; }
.login-form input { min-height: 46px; border-color: var(--line); border-radius: 9px; background: var(--auth-haze); font-size: 13px; padding: 11px 13px; }
.login-form input:focus { border-color: var(--brand-blue); background: var(--surface-primary); }
.login-form .btn-primary { min-height: 46px; border-radius: 9px; font-size: 13px; box-shadow: 0 4px 10px var(--auth-illustration-shadow); }
.auth-link { border: 0; padding: 0; background: transparent; color: var(--brand-blue); font: inherit; font-weight: 600; }
.login-form .auth-foot { text-align: center; margin: 18px 0 0; font-size: 12px; }
.demo-box { margin-top: 24px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-primary); }
.demo-box summary { display: flex; align-items: center; gap: 9px; padding: 13px 14px; cursor: pointer; color: var(--text-secondary); font-size: 11px; font-weight: 600; list-style: none; border-radius: 9px; }
.demo-box summary::-webkit-details-marker { display: none; }
.demo-box summary:after { content: '+'; margin-left: auto; font-size: 16px; font-weight: 400; color: var(--brand-blue); }
.demo-box[open] summary:after { content: '−'; }
.demo-box summary .icon { width: 16px; height: 16px; color: var(--brand-blue); }
.demo-box summary:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.demo-box>div { padding: 0 14px 13px; }
.demo-options { display: flex; gap: 8px; margin: 0 0 10px; }
.demo-options .btn { flex: 1; min-height: 36px; font-size: 11px; }
.demo-box p { font-size: 10px; color: var(--muted); line-height: 1.8; }
.login-bottom { color: var(--muted); font-size: 10px; line-height: 1.8; text-align: center; margin-top: 20px; }
.login-bottom .icon { width: 13px; height: 13px; }
.language-control { display: flex; align-items: center; justify-content: flex-end; gap: 7px; color: var(--muted); font-size: 10px; margin-bottom: 21px; }
.language-control select { min-height: 29px; width: auto; font-size: 10px; padding: 4px 8px; border-color: var(--line); border-radius: 6px; }
.initial-loading { padding: 70px 25px; text-align: center; color: var(--muted); }
.report-text { white-space: pre-wrap; }


/* Responsive behavior: 1350px compact desktop, 1100px laptop, 900px stacked tasks, 760px drawer. */
@media (max-width:1350px) {
  .student-workspace { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); }
  .feedback-column { grid-column: 1 / -1; }
  .student-bottom { grid-template-columns: 1fr 1fr; }
  .shop-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width:1100px) {
  :root { --sidebar-width: 205px; }
  .content { padding: 24px; } .topbar { padding: 0 24px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 240px minmax(0,1fr); }
  .filters { grid-template-columns: 1fr 1fr; } .filters label:first-child { grid-column: 1 / -1; }
  .study-scene { width: 140px; }
}
@media (max-width:900px) {
  .student-workspace { display: flex; flex-direction: column; }
  .student-workspace>* { width: 100%; } .action-column { order: -1; }
  .student-bottom { grid-template-columns: 1fr; }
  .welcome-banner { padding: 20px; } .welcome-banner h1 { font-size: 24px; }
  .study-scene { display: none; } .summary-strip { gap: 12px; }
  .subject-summary { flex-basis: 100%; border: 0; }
  .profile-layout,.settings-grid { grid-template-columns: 1fr; }
  .shop-banner h2 { font-size: 21px; } .shop-mascots { font-size: 43px; }
  .top-tools .today { display: none; }
}
@media (max-width:760px) {
  .sidebar { width: 260px; transform: translateX(-100%); transition: transform var(--motion); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: grid; position: absolute; top: 130px; right: 8px; }
  .main { margin-left: 0; } .mobile-toggle { display: grid; }
  .nav-backdrop { position: fixed; inset: 0; z-index: 30; background: var(--backdrop); border: 0; width: 100%; }
  .nav-backdrop.open { display: block; }
  .topbar { height: 58px; padding: 0 17px; } .breadcrumb { font-size: 11px; margin-right: auto; }
  .breadcrumb span { display: none; } .top-tools { gap: 9px; } .top-tools .connection { display: none; }
  .content { padding: 20px 16px; } h1 { font-size: 23px; }
  .page-heading { flex-direction: column; align-items: flex-start; gap: 14px; }
  .heading-actions { flex-wrap: wrap; width: 100%; }
  .welcome-banner { padding: 20px; } .welcome-banner h1 { font-size: 23px; }
  .summary-strip { padding: 13px 15px; gap: 8px 17px; } .summary-strip>a { margin-left: 0; }
  .subject-summary { padding-right: 0; margin-bottom: 3px; }
  .student-workspace { gap: 16px; } .student-bottom { margin-top: 16px; }
  .panel-header { flex-wrap: wrap; padding: 16px; gap: 9px; } .panel-body { padding: 0 16px 17px; }
  .task { padding: 16px; flex-wrap: wrap; align-items: flex-start; }
  .task-info { flex-basis: calc(100% - 50px); }
  .task-right { width: calc(100% - 47px); margin-left: 47px; flex-wrap: wrap; justify-content: space-between; }
  .stats { gap: 10px; } .stat { padding: 13px; } .stat-value { font-size: 25px; }
  .stat-top { font-size: 11px; } .stat-icon { width: 26px; height: 26px; } .stat-note { font-size: 10px; }
  .btn-sm,.icon-button { min-height: 40px; } .tabs { gap: 16px; padding: 0 16px; } .tab { min-height: 44px; }
  .daily-title { flex-wrap: wrap; } .daily-title>div { flex-basis: calc(100% - 50px); } .daily-title .streak { margin-left: 46px; }
  .filters { grid-template-columns: 1fr; padding: 0 16px 15px; } .filters label:first-child { grid-column: auto; }
  th,td { padding-left: 12px; padding-right: 12px; } .table-wrap table { min-width: 580px; }
  .question-head { flex-direction: column; } .answer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; } .next-learning .form-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .shop-grid { grid-template-columns: 1fr; } .shop-banner { padding: 22px; } .shop-mascots { display: none; }
  .shop-card p { min-height: 0; } .footer span:last-child { display: none; }
  .modal-head { padding: 16px; } .modal-head h2 { font-size: 17px; } .modal-content { padding: 17px; }
}

/* Student overview: a clear next step, with supporting information alongside. */
.student-overview { --radius: 18px; --radius-sm: 9px; }
.student-overview .welcome-banner { padding: 29px 34px; min-height: 205px; border: 0; border-radius: 23px; background: radial-gradient(ellipse at 85% 10%,var(--surface-primary),transparent 65%),linear-gradient(120deg,var(--auth-sky),var(--auth-sky-deep)); margin-bottom: 0; }
.student-overview .welcome-copy { position: relative; z-index: 1; max-width: 62%; }
.student-overview .welcome-banner .eyebrow { color: var(--auth-cobalt); font-size: 10px; letter-spacing: 1.6px; margin-bottom: 13px; }
.student-overview .welcome-banner h1 { font-size: 30px; letter-spacing: -.9px; color: var(--brand-navy); }
.welcome-wave { display: inline-block; font-size: 25px; margin-left: 3px; }
.student-overview .welcome-banner p { font-size: 14px; line-height: 1.8; margin-top: 10px; }
.welcome-class { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--auth-cobalt); font-size: 11px; margin-top: 20px; }
.welcome-class .icon { width: 15px; height: 15px; }
.student-overview .login-illustration { width: 310px; position: absolute; right: 8px; bottom: -6px; margin: 0; }
.student-overview .illustration-caption { display: none; }
.student-overview .summary-strip { background: transparent; border: 0; padding: 18px 5px 22px; gap: 20px; margin: 0; }
.student-overview .subject-icon { width: 38px; height: 38px; border-radius: 12px; }
.student-overview .subject-summary { border: 0; padding-right: 7px; }
.student-overview .summary-value { font-size: 11px; }
.student-overview .summary-value strong { font-size: 16px; }
.overview-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(300px,1fr); gap: 24px; align-items: start; }
.overview-primary,.overview-support { min-width: 0; }
.overview-support { display: flex; flex-direction: column; gap: 20px; }
.section-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; min-height: 27px; }
.section-number { display: grid; place-items: center; width: 27px; height: 27px; font-size: 10px; font-weight: 700; color: var(--auth-cobalt); background: var(--auth-sky); border-radius: 9px; }
.section-kicker h2 { font-size: 17px; letter-spacing: -.3px; }
.section-kicker>.section-link { margin-left: auto; font-size: 11px; }
.section-kicker>.section-link .icon { width: 14px; }
.lesson-kicker { margin-top: 27px; }
.student-overview .panel { border-color: var(--border-default); box-shadow: 0 4px 20px var(--auth-illustration-shadow); }
.student-overview .panel-header { padding: 20px 22px 16px; }
.student-overview .panel-header h2 { font-size: 15px; }
.student-overview .panel-body { padding: 0 22px 22px; }
.student-overview .next-learning { border: 1px solid var(--border-default); border-top: 0; background: linear-gradient(130deg,var(--auth-haze),var(--surface-primary) 70%); }
.student-overview .next-learning .panel-header { padding-top: 22px; }
.student-overview .next-learning .panel-header h2 { display: flex; align-items: center; gap: 9px; font-size: 18px; }
.student-overview .next-learning .panel-header h2>.icon { width: 35px; height: 35px; padding: 8px; background: var(--auth-sky); border-radius: 11px; margin: 0; }
.student-overview .next-learning p { line-height: 1.8; max-width: 510px; }
.student-overview #quick-checkin-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0 16px; }
.student-overview #quick-checkin-form>.form-field:first-child,.student-overview #quick-checkin-form>.form-field:has(textarea),.student-overview #quick-checkin-form>.source-note,.student-overview #quick-checkin-form>.form-error,.student-overview #quick-checkin-form>button { grid-column: 1 / -1; }
.student-overview #quick-checkin-form>.form-row { grid-column: 1 / -1; }
.student-overview .next-learning .form-field { margin-bottom: 16px; min-width: 0; }
.student-overview .next-learning input,.student-overview .next-learning select,.student-overview .next-learning textarea { background: var(--surface-primary); border-radius: 10px; min-width: 0; }
.student-overview .next-learning textarea { min-height: 66px; }
.student-overview .next-learning .btn-primary { min-height: 46px; }
.student-overview .next-learning .btn-ghost { margin-top: 10px; font-size: 12px; }
.student-overview .lesson-list .panel-header { display: none; }
.student-overview .lesson-list .tabs { padding: 5px 22px 0; gap: 23px; }
.student-overview .lesson-list .task { padding: 19px 22px; gap: 12px; align-items: center; flex-wrap: nowrap; }
.student-overview .lesson-list .task-info { flex-basis: auto; }
.student-overview .lesson-list .task h3 { font-size: 14px; }
.student-overview .lesson-list .task-right { width: auto; margin: 0; justify-content: flex-end; gap: 10px; }
.student-overview .lesson-list .score-chip { font-size: 19px; }
.student-overview .lesson-list .score-chip small { font-size: 10px; color: var(--muted); font-weight: 400; }
.student-overview .lesson-list .task-right .pill { display: none; }
.task-status { display: none; }
.student-overview .task-status { display: block; margin-top: 8px; }
.student-overview .insight { background: var(--auth-haze); border-radius: 12px; }
.student-overview .insight-foot { font-size: 10px; }
.student-overview .recommendation .btn { width: 100%; font-size: 12px; }
.student-overview .daily-panel { padding: 20px; border-radius: 18px; background: var(--auth-sky); border: 0; }
.student-overview .daily-title { flex-wrap: wrap; align-items: flex-start; }
.student-overview .daily-title h2 { font-size: 14px; }
.student-overview .daily-title p { font-size: 11px; line-height: 1.8; }
.student-overview .daily-title .streak { margin-left: 46px; font-size: 11px; }
.student-overview .daily-icon { background: var(--surface-primary); color: var(--auth-cobalt); }
.student-overview .milestone-row { gap: 10px; border-color: var(--border-strong); }
.student-overview .milestone { width: 100%; font-size: 11px; }
.student-overview .milestone small { margin-left: auto; }
@media (max-width:1200px) {
  .overview-layout { grid-template-columns: minmax(0,1.5fr) minmax(280px,1fr); gap: 18px; }
  .student-overview .lesson-list .task { flex-wrap: wrap; }
  .student-overview .lesson-list .task-info { flex-basis: calc(100% - 52px); }
  .student-overview .lesson-list .task-right { width: calc(100% - 50px); margin-left: 50px; justify-content: space-between; }
  .student-overview .welcome-banner h1 { font-size: 27px; }
  .student-overview .login-illustration { width: 260px; right: -12px; }
}
@media (max-width:1000px) {
  .overview-layout { grid-template-columns: minmax(0,1fr); }
  .overview-support { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; }
  .student-overview .daily-panel { grid-column: 1 / -1; }
  .student-overview .welcome-copy { max-width: 68%; }
  .student-overview .welcome-banner { padding: 25px; }
  .student-overview .login-illustration { display: block; width: 235px; right: -24px; }
}
@media (max-width:600px) {
  .student-overview .welcome-banner { padding: 23px; min-height: 225px; border-radius: 19px; align-items: flex-start; }
  .student-overview .welcome-copy { max-width: 100%; }
  .student-overview .welcome-banner h1 { font-size: 25px; }
  .student-overview .welcome-banner p { font-size: 12px; padding-right: 65px; min-height: 54px; }
  .student-overview .welcome-class { max-width: 175px; font-size: 10px; gap: 5px; margin-top: 14px; }
  .student-overview .login-illustration { width: 150px; right: -18px; bottom: 0; }
  .student-overview .summary-strip { padding: 18px 2px; gap: 10px 14px; }
  .student-overview .subject-summary { flex-basis: auto; width: 100%; }
  .student-overview .summary-strip>a { margin-left: auto; font-size: 11px; }
  .overview-support { display: flex; }
  .section-kicker h2 { font-size: 16px; }
  .section-kicker>.section-link { font-size: 10px; }
  .student-overview .panel-header { padding: 18px 17px 14px; }
  .student-overview .panel-body { padding: 0 17px 19px; }
  .student-overview .lesson-list .tabs { padding-left: 17px; padding-right: 17px; gap: 18px; }
  .student-overview .lesson-list .task { padding: 17px; }
  .student-overview .lesson-list .task h3 { font-size: 13px; }
  .student-overview .next-learning .form-row { gap: 12px; }
  .student-overview .next-learning .form-field>span { font-size: 11px; }
}

/* Seven subject cards and the three-column reference layout. */
.subject-math,.subject-general { --subject-color:var(--subject-math);--subject-bg:var(--subject-math-bg);--subject-border:var(--subject-math-border); }
.subject-literature { --subject-color:var(--subject-literature);--subject-bg:var(--subject-literature-bg);--subject-border:var(--subject-literature-border); }
.subject-english { --subject-color:var(--subject-english);--subject-bg:var(--subject-english-bg);--subject-border:var(--subject-english-border); }
.subject-physics { --subject-color:var(--subject-physics);--subject-bg:var(--subject-physics-bg);--subject-border:var(--subject-physics-border); }
.subject-chemistry { --subject-color:var(--chemistry);--subject-bg:var(--chemistry-bg);--subject-border:var(--subject-chemistry-border); }
.subject-biology { --subject-color:var(--subject-biology);--subject-bg:var(--subject-biology-bg);--subject-border:var(--subject-biology-border); }
.subject-informatics { --subject-color:var(--subject-informatics);--subject-bg:var(--subject-informatics-bg);--subject-border:var(--subject-informatics-border); }
.subject-icon[class*=" subject-"] { color:var(--subject-color);background:var(--subject-bg);border:1px solid var(--subject-border,transparent); }
.subject-navigation { margin: 0 0 22px; min-width:0; }
.subject-navigation-head { display:flex;align-items:center;gap:12px;margin-bottom:14px; }
.subject-navigation-head label { font-family:var(--font-display);font-weight:750;font-size:14px;color:var(--text-primary); }
.subject-navigation-head select { width:180px;min-height:38px;padding:7px 10px;background:var(--surface-primary);font-size:12px; }
.subject-navigation-head>span { margin-left:auto;color:var(--text-muted);font-size:11px; }
.subject-cards { display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px; }
.subject-card { display:flex;align-items:center;gap:10px;padding:14px 12px;min-width:0;text-align:left;border:1px solid var(--subject-border,rgba(226,232,240,0.85));border-radius:18px;background:var(--subject-bg);color:var(--subject-color);box-shadow:0 4px 14px -6px rgba(15,23,42,0.04),inset 0 1px 0 rgba(255,255,255,0.88);transition:transform var(--motion) var(--ease),box-shadow var(--motion) var(--ease),border-color var(--motion) var(--ease); }
.subject-card:hover { transform:translateY(-2px);border-color:var(--subject-color);box-shadow:0 12px 24px -10px color-mix(in srgb,var(--subject-color) 32%,transparent),inset 0 1px 0 rgba(255,255,255,0.95); }
.subject-card:active { transform:scale(0.98); }
.subject-card.selected { border-color:var(--subject-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--subject-color) 14%,transparent),0 10px 22px -10px color-mix(in srgb,var(--subject-color) 35%,transparent),inset 0 1px 0 #fff; }
.subject-card-icon { display:grid;place-items:center;width:36px;height:40px;flex-shrink:0;border-radius:11px;background:var(--subject-color);color:var(--surface-primary);box-shadow:0 6px 12px -4px color-mix(in srgb,var(--subject-color) 45%,transparent),inset 0 1px 0 rgba(255,255,255,0.28); }
.subject-card-icon .icon { width:20px;height:20px; }
.subject-card-copy { flex:1;min-width:0; }
.subject-card-copy strong { display:block;font-family:var(--font-display);font-size:13px;font-weight:750;line-height:1.45;color:var(--text-primary); }
.subject-card-copy small { display:block;white-space:normal;font-size:10px;line-height:1.5;color:var(--text-secondary); }
.subject-card-progress { display:block;height:4px;margin-top:8px;background:color-mix(in srgb,var(--subject-color) 16%,rgba(255,255,255,0.85));border-radius:99px;overflow:hidden; }
.subject-card-progress>span { display:block;height:100%;background:var(--subject-color);border-radius:inherit;transition:width 0.45s var(--ease); }
.reference-overview .welcome-banner { min-height:148px;padding:24px 28px;margin-bottom:22px;border-radius:24px;background:radial-gradient(ellipse at 80% 15%,var(--surface-primary),transparent 60%),linear-gradient(115deg,var(--auth-sky-deep),var(--auth-sky)); }
.reference-overview .welcome-banner h1 { font-size:28px; }
.reference-overview .welcome-banner p { font-size:13px;margin-top:6px;min-height:0;padding:0; }
.reference-overview .welcome-class { margin-top:12px;max-width:none; }
.reference-overview .login-illustration { width:240px;right:15px;bottom:-22px; }
.reference-workspace { display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:stretch; }
.reference-workspace>div { min-width:0;display:flex;flex-direction:column; }
.reference-workspace>div>.panel,.reference-workspace .overview-feedback,.reference-workspace .overview-feedback>.panel { flex:1;height:100%;display:flex;flex-direction:column;border-radius:22px; }
.reference-overview .panel-header { padding:20px 22px 15px; }
.reference-overview .panel-body { padding:0 22px 22px;flex:1;display:flex;flex-direction:column; }
.reference-overview .lesson-list .panel-header { display:flex; }
.reference-overview .lesson-list .tabs { padding:4px;gap:4px; }
.reference-overview .lesson-list .task { padding:15px;flex-wrap:wrap;align-items:flex-start; }
.reference-overview .lesson-list .task-info { flex-basis:calc(100% - 52px); }
.reference-overview .lesson-list .task-right { width:calc(100% - 50px);margin-left:50px;justify-content:space-between; }
.reference-overview .task-status { margin-top:5px; }
.reference-overview .next-learning { background:var(--surface-glass); }
.reference-overview .next-learning .panel-header h2 { font-size:15px; }
.reference-overview .next-learning .panel-header h2>.icon { background:var(--surface-blue);color:var(--brand-blue); }
.reference-overview #quick-checkin-form { display:block; }
.reference-overview .next-learning .form-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px; }
.reference-overview .next-learning .form-field>span { font-size:12px; }
.reference-overview .next-learning p { font-size:13px; }
.reference-overview .next-learning input,.reference-overview .next-learning select { font-size:13px; }
.reference-overview .reference-feedback .panel-body>h3 { color:var(--text-primary);background:transparent;padding:0;border-radius:0;font-size:15px; }
.reference-overview .insight { background:var(--surface-blue); }
.reference-overview .insight.spaced { margin-top:14px; }
.reference-overview .insight p { font-size:12.5px; }
.reference-bottom { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:20px;margin-top:20px;align-items:stretch; }
.reference-overview .daily-panel { background:var(--mint-gradient);border:1px solid var(--mint-border); }
.stat:nth-child(2) .stat-icon { background:var(--success-bg);color:var(--brand-green); }
.stat:nth-child(3) .stat-icon { background:var(--danger-bg);color:var(--status-danger); }
.stat:nth-child(4) .stat-icon { background:var(--warning-bg);color:var(--status-warning); }
.teacher-visuals { display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:20px; }
.result-distribution { display:grid;grid-template-columns:145px minmax(0,1fr);align-items:center;gap:18px; }
.result-distribution svg { width:145px;max-width:100%; }
.result-band-1 { stroke:#24b47e;fill:#24b47e; }.result-band-2 { stroke:#3494ed;fill:#3494ed; }.result-band-3 { stroke:#ffc447;fill:#ffc447; }.result-band-4 { stroke:#fb6680;fill:#fb6680; }
.result-distribution circle { fill:none; }
.donut-number { fill:var(--ink);font-size:22px;font-weight:700; }.donut-caption { fill:var(--muted);font-size:9px; }
.distribution-key { display:flex;align-items:center;gap:7px;font-size:11px;margin:12px 0; }.distribution-key>strong { margin-left:auto; }
.result-dot { width:9px;height:9px;border-radius:3px;flex-shrink:0; }.result-dot.result-band-1 { background:#24b47e; }.result-dot.result-band-2 { background:#3494ed; }.result-dot.result-band-3 { background:#ffc447; }.result-dot.result-band-4 { background:#fb6680; }
.average-line { width:100%;max-height:170px;overflow:visible; }.average-line text { fill:var(--muted);font-size:11px; }.chart-grid { stroke:var(--line);stroke-width:1;stroke-dasharray:3 3; }.chart-line { stroke:var(--brand-blue);stroke-width:3; }.chart-point { fill:var(--brand-blue); }
.line-chart-labels { display:flex;justify-content:space-between;gap:8px;font-size:10px;color:var(--muted); }
.homeroom-subject { margin:17px 0 22px; }.homeroom-subject>div:first-child { display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;margin-bottom:9px; }.homeroom-subject small { color:var(--muted);font-size:10px; }
.homeroom-subject-bar { display:flex;height:16px;border-radius:6px;overflow:hidden;background:var(--surface-blue); }.homeroom-subject-bar>span { display:block;height:100%; }
.bar-complete { background:#24b47e; }.bar-recorded { background:#ffc447; }.bar-missing { background:#fb6680; }
.bar-legend { display:flex;flex-wrap:wrap;gap:9px 14px;font-size:10px;color:var(--muted); }.bar-legend>span { display:inline-flex;align-items:center;gap:5px; }.bar-legend i { display:inline-block;width:9px;height:9px;border-radius:2px; }
.lesson-library { display:grid;grid-template-columns:240px minmax(0,1fr);gap:20px;align-items:start; }
.lesson-choice { display:flex;align-items:flex-start;gap:10px;text-align:left;width:100%;border:0;border-top:1px solid var(--line);background:var(--surface-primary);padding:16px;color:var(--ink); }
.lesson-choice.active { background:var(--surface-blue);color:var(--brand-blue); }.lesson-choice span { min-width:0; }.lesson-choice strong { display:block;font-size:13px;overflow-wrap:anywhere; }.lesson-choice small { display:block;color:var(--muted);margin-top:5px;font-size:11px; }
.worksheet-level { margin-top:24px; }.worksheet-level>h3 { color:var(--brand-blue);margin-bottom:12px; }.worksheet-slots { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px; }
.worksheet-slot { border:1px solid var(--line);border-radius:12px;padding:16px;min-width:0; }.worksheet-version { padding-top:14px;margin-top:14px;border-top:1px solid var(--line); }.worksheet-version>strong { display:block;font-size:13px;overflow-wrap:anywhere;margin-bottom:8px; }.worksheet-version>.pill { white-space:normal;margin-bottom:8px; }.worksheet-version p { overflow-wrap:anywhere; }.worksheet-version .inline-controls { margin-top:12px; }.worksheet-version .btn { font-size:11px;min-height:36px;padding:7px 10px; }
@media(max-width:1100px) { .lesson-library { grid-template-columns:minmax(0,1fr); }.worksheet-slots { grid-template-columns:minmax(0,1fr); } }
#feature-period-form { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:14px;padding:15px 18px; }
#feature-period-form .form-row { display:contents; }#feature-period-form .form-field { margin:0; }#feature-period-form .form-error:empty { display:none; }#feature-period-form .form-error:not(:empty) { grid-column:1/-1; }
@media(max-width:600px) { #feature-period-form { grid-template-columns:minmax(0,1fr); } }
@media(max-width:1100px) { .teacher-visuals { grid-template-columns:1fr; } }
@media(max-width:440px) { .result-distribution { grid-template-columns:110px minmax(0,1fr);gap:12px; }.distribution-key { font-size:10px; } }
@media(max-width:1300px) {
 .subject-cards { gap:7px; }.subject-card { flex-direction:column;align-items:flex-start;padding:11px;gap:8px; }.subject-card-copy { width:100%; }
 .reference-workspace { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); }.reference-feedback { grid-column:1/-1; }
}
@media(max-width:1000px) { .subject-cards { grid-template-columns:repeat(4,minmax(0,1fr)); }.subject-card { flex-direction:row;align-items:center; }.reference-bottom { grid-template-columns:minmax(0,1fr); } }
@media(max-width:760px) {
 .subject-navigation-head { flex-wrap:wrap;gap:8px; }.subject-navigation-head>span { width:100%;margin:0; }
 .subject-cards { display:flex;overflow-x:auto;gap:9px;padding:3px 2px 10px;scroll-snap-type:x proximity; }.subject-card { min-width:145px;scroll-snap-align:start; }
 .reference-workspace { display:flex;flex-direction:column;gap:15px; }.reference-checkin { order:-1; }.reference-workspace>div>.panel { height:auto; }
 .reference-overview .welcome-banner { min-height:140px;padding:20px; }.reference-overview .welcome-banner h1 { font-size:23px; }
 .reference-overview .welcome-copy { max-width:100%; }.reference-overview .welcome-banner p { padding-right:65px; }
 .reference-overview .login-illustration { width:145px;right:-24px;bottom:-10px; }.reference-overview .welcome-class { max-width:210px; }
}

/* Authentication scales independently of the application sidebar. */
@media (max-width:1100px) {
  .login-shell { grid-template-columns: minmax(0,1fr) minmax(375px,1fr); }
  .login-story { padding: 28px 30px 24px; }
  .login-brand-row { gap: 12px; }
  .login-brand-row img { width: 107px; height: 36px; }
  .login-brand-row .brand { padding-left: 12px; font-size: 15px; }
  .login-story h1 { font-size: 36px; letter-spacing: -1px; }
  .login-story p { font-size: 13px; }
  .login-side { padding: 25px; }
}
@media (max-width:820px) {
  .login-shell { grid-template-columns: 1fr; padding: 14px; gap: 5px; }
  .login-story { position: relative; top: 0; height: auto; min-height: 0; padding: 23px 28px 28px; border-radius: 18px; }
  .login-story-copy { margin: 0; padding: 27px 0 0; }
  .login-brand-row img { width: 110px; height: 36px; }
  .login-brand-row .brand { font-size: 16px; }
  .login-story .eyebrow,.login-story-footer { display: none; }
  .login-story h1 { font-size: 33px; }
  .login-story p { max-width: 510px; font-size: 13px; margin-top: 13px; }
  .login-illustration { display: none; }
  .login-side { padding: 27px 20px 30px; }
  .login-form { width: 420px; }
  .language-control { margin-bottom: 17px; }
  .auth-intro-icon { display: none; }
}
@media (max-width:440px) {
  .login-shell { padding: 9px; }
  .login-story { padding: 20px 22px 24px; border-radius: 16px; }
  .login-brand-row img { width: 99px; height: 33px; }
  .login-brand-row .brand { font-size: 15px; }
  .login-story h1 { font-size: 30px; }
  .login-story p { font-size: 12px; line-height: 1.8; }
  .login-side { padding: 23px 19px 28px; }
  .login-form h2 { font-size: 26px; }
}

@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.reduce-motion *,.reduce-motion *::before,.reduce-motion *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
.workspace-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 24px;padding:6px;background:#eaf0fa;border:1px solid #d9e4f5;border-radius:12px}
.workspace-tabs a{padding:10px 14px;color:#425776;text-decoration:none;border-radius:8px;font-weight:600;font-size:13px}
.workspace-tabs a[aria-current="page"]{background:white;color:#2457c5;box-shadow:0 1px 4px #17355b12}
.workspace-tabs a:focus-visible{outline:2px solid #285ed3;outline-offset:2px}
.secondary-details>summary{cursor:pointer;padding:18px 20px;font-weight:600;color:#334d70}
.secondary-details[open]>summary{border-bottom:1px solid #e4eaf4}
@media(max-width:600px){.workspace-tabs{gap:3px}.workspace-tabs a{padding:10px;font-size:12px}}
.compact-subject-filter{display:flex;align-items:center;gap:12px;margin-bottom:22px}
.compact-subject-filter label{font-weight:600;font-size:13px;color:#334d70}
.compact-subject-filter select{width:auto;min-width:170px}
@media(max-width:600px){
 #result-rows .table-wrap{overflow:visible}
 #result-rows table{display:block;min-width:0;width:100%}
 #result-rows thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #result-rows tbody{display:block}
 #result-rows tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;padding:18px;border-top:1px solid var(--line)}
 #result-rows td{display:block;border:0;padding:0;overflow-wrap:anywhere}
 #result-rows td:first-child{grid-column:1/-1;font-weight:600;padding-bottom:4px}
 #result-rows td:not(:first-child)::before{content:attr(data-label);display:block;color:#536984;font-size:11px;margin-bottom:4px;font-weight:400}
 #result-rows td:last-child{align-self:end;text-align:right}
 #result-rows td:last-child::before{display:none}
 #result-rows td .btn{white-space:normal;max-width:100%}
}
.workspace{display:block}
.workspace-context{width:100%;min-width:0}
.workspace-caption{display:block;font-size:9px;letter-spacing:1.2px;font-weight:650;color:#91a7c6;margin:0 2px 9px}
.context-picker{position:relative;display:flex;align-items:center;gap:11px;border:1px solid #324b70;border-radius:12px;background:linear-gradient(135deg,#1d3556,#172c49);padding:12px;min-height:66px;box-shadow:inset 0 1px 0 #ffffff07}
.context-picker.switchable:hover{border-color:#6d91c6;background:#223d61}
.context-icon{display:grid;place-items:center;width:32px;height:36px;border-radius:9px;background:#37567e52;color:#b9d6ff;flex-shrink:0}
.context-copy{min-width:0;display:grid;gap:3px}
.context-copy strong{font-size:14px;line-height:1.4;color:#f3f7ff;font-weight:650}
.context-copy small{font-size:11px;line-height:1.4;color:#b2c4dc;overflow-wrap:anywhere}
.context-chevron{margin-left:auto;color:#abc2e0;font-size:17px}
.context-picker select{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.context-picker select:disabled{cursor:default}
.context-picker:focus-within{outline:2px solid #8db9ff;outline-offset:3px}
.context-hint{display:block;font-size:10px;color:#92a9c8;margin:7px 2px 0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.sync-button{display:flex;align-items:center;gap:6px;border:0;background:transparent;color:#526985;font-size:11px;padding:8px;cursor:pointer}
.sync-button>span:first-child{font-size:18px}
.action-guidance{background:#eff5ff;border:1px solid #dce8fb;border-radius:12px;padding:16px}
.action-guidance h3{font-size:15px;line-height:1.5}.action-guidance p{margin:8px 0 14px;line-height:1.7}
.action-guidance .btn{width:100%}
.overview-feedback>summary,.overview-extra>summary{display:none}
.preparation-steps{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-bottom:24px;padding:15px 18px;border:1px solid #dce6f4;border-radius:12px;background:#f7faff;font-size:12px;color:#63758d}
.preparation-steps span{display:flex;gap:8px;align-items:center}.preparation-steps b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#e5ecf7;color:#63758d;font-size:11px}
.preparation-steps .current{color:#2458c9;font-weight:600}.preparation-steps .current b{background:#2b5bd3;color:white}.preparation-steps .done b{background:#d7f3e7;color:#08764f}
.lesson-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:18px}
.level-folder{border:1px solid #dce6f4;border-radius:12px;overflow:hidden;margin:12px 0}
.level-folder>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px;cursor:pointer;font-size:14px;font-weight:650;list-style:none;background:#f5f8fd;color:#243e60}
.level-folder>summary:before{content:'›';font-size:20px;color:#6c83a2}.level-folder[open]>summary:before{transform:rotate(90deg)}.level-folder>summary>span:first-of-type{flex:1}
.level-folder summary small{margin-left:10px;font-weight:400;color:#6a7c95;font-size:12px}
.compact-slot{border:0;border-radius:0;border-top:1px solid #e4eaf4;padding:16px;margin:0}
.slot-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.worksheet-version-title{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap}
.version-history{margin-top:12px}.version-history>summary{font-size:12px;color:#617691;cursor:pointer}
#modal:has(.exercise-preview){width:min(1200px,96vw);max-width:1200px}
.exercise-workspace{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:24px;align-items:start;margin-top:20px}
.exercise-document{position:sticky;top:0;min-width:0}.exercise-answer{min-width:0}
.exercise-preview{border:1px solid #dce5f2;border-radius:12px;overflow:hidden;background:#f7f9fc}
.preview-label{padding:12px 14px;font-weight:600;font-size:12px;border-bottom:1px solid #dce5f2;color:#375071}
.exercise-preview iframe{display:block;width:100%;height:58vh;min-height:360px;border:0;background:white}
.exercise-preview>p{padding:12px 14px;font-size:12px;line-height:1.6}
.word-preview{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;font-size:14px;line-height:1.8;max-height:58vh;overflow:auto;padding:18px;background:white;color:#263a56;margin:0}
.support-panel{padding:18px;border:1px solid #dce6f4;background:#f7faff;border-radius:12px}
.support-panel h3{margin-bottom:14px}.support-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.support-message{padding:15px;margin:14px 0;border:1px solid #e0e8f3;border-radius:10px;background:white}
.support-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:8px;line-height:1.7}.teacher-message{background:#edf5ff;border-color:#cdddF5}
.support-list-item{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 0;border-bottom:1px solid #e4eaf4}.support-list-item h3{font-size:14px;margin:10px 0;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:760px){
 .sync-button{padding:6px}.sync-button #sync-status{display:none}
 .overview-feedback,.overview-extra{background:white;border:1px solid #dce5f2;border-radius:14px;overflow:hidden}
 .overview-feedback>summary,.overview-extra>summary{display:block;cursor:pointer;padding:18px;font-size:14px;font-weight:600;color:#2a456b}
 .overview-feedback[open]>summary,.overview-extra[open]>summary{border-bottom:1px solid #e4eaf4}
 .overview-feedback .panel{box-shadow:none;border:0}.overview-extra .reference-bottom{padding:12px;margin:0}
 .exercise-workspace{grid-template-columns:1fr;gap:18px}.exercise-document{position:static}.exercise-preview iframe{height:46vh;min-height:280px}
 .preparation-steps{gap:10px;font-size:11px;padding:12px}.preparation-steps span{flex:1 1 40%}
 .slot-heading{align-items:flex-start;flex-wrap:wrap}.support-list-item{align-items:flex-start;flex-direction:column}
}

/* Keep the worksheet and help visible together without replacing answer inputs. */
#modal:has(.contextual-support-layout){width:min(1440px,97vw);max-width:1440px}
.contextual-support-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(310px,1fr);gap:24px;align-items:start}
.support-study-context{min-width:0;max-height:72vh;overflow:auto;padding-right:8px}
.contextual-support-layout>.support-panel{min-width:0;max-height:72vh;overflow:auto;margin:0}
.contextual-support-layout .exercise-workspace{gap:16px;margin-top:12px}
.contextual-support-layout .exercise-preview iframe{height:48vh;min-height:280px}
.selected-help-question{white-space:pre-wrap;max-height:180px;overflow:auto;font-size:13px;line-height:1.6;margin:12px 0}
.support-panel [data-work-preview]{white-space:pre-wrap;overflow-wrap:anywhere;margin-bottom:14px}
@media(max-width:1100px){.contextual-support-layout .exercise-workspace{grid-template-columns:1fr}.contextual-support-layout .exercise-document{position:static}}
@media(max-width:760px){.contextual-support-layout{grid-template-columns:1fr}.support-study-context,.contextual-support-layout>.support-panel{max-height:none;overflow:visible;padding-right:0}}
.question-image{display:block;max-width:100%;max-height:440px;object-fit:contain;margin:12px 0;border-radius:8px;background:white}
.selected-help-images .question-image{max-height:240px}

/* Official FPT mascot artwork supplied by the school, original transparent PNG. */
.login-illustration svg.mascot-viewport{overflow:hidden;display:block;height:auto}
.login-story .mascot-login{width:100%;margin:16px auto 0}
.login-story .mascot-login .mascot-viewport{width:auto;height:245px;max-width:100%;margin:0 auto}
.login-story .mascot-login .illustration-caption{margin-top:12px}
.reference-overview .mascot-welcome{width:104px;height:134px;right:25px;bottom:0}
.reference-overview .mascot-welcome .mascot-viewport{width:100%;height:100%}
.reference-overview .welcome-banner h1,.reference-overview .welcome-banner>p,.reference-overview .welcome-class{max-width:calc(100% - 135px)}
@media(max-width:760px){.reference-overview .mascot-welcome{width:66px;height:86px;right:10px;bottom:8px}.reference-overview .welcome-banner h1,.reference-overview .welcome-banner>p,.reference-overview .welcome-class{max-width:calc(100% - 78px)}}

/* Keep the approved compact banner; reserve space at the copy container. */
.reference-overview .welcome-copy{flex:1;min-width:0;max-width:calc(100% - 175px)}
.reference-overview .welcome-banner h1,.reference-overview .welcome-banner p,.reference-overview .welcome-class{max-width:100%}
.reference-overview .mascot-welcome{width:160px;height:124px;right:22px;bottom:0;display:flex;align-items:flex-end;justify-content:center}
.reference-overview .mascot-welcome:before{content:'';position:absolute;width:150px;height:100px;bottom:-14px;border-radius:50%;background:rgba(104,158,231,.12)}
.reference-overview .mascot-welcome .mascot-viewport{position:relative;width:96px;height:124px}
.login-story .mascot-login .mascot-viewport{height:285px}
@media(max-width:760px){.reference-overview .welcome-copy{max-width:calc(100% - 72px)}.reference-overview .mascot-welcome{width:70px;height:88px;right:8px;bottom:6px}.reference-overview .mascot-welcome .mascot-viewport{width:68px;height:88px}.reference-overview .mascot-welcome:before{width:80px;height:58px;bottom:-6px}.reference-overview .welcome-banner p{padding-right:0}}
.login-story .mascot-login{position:relative;max-width:450px;padding-top:4px}
.login-story .mascot-login:before{content:'';position:absolute;left:50%;top:30px;transform:translateX(-50%);width:245px;height:245px;border-radius:50%;background:rgba(255,255,255,.34)}
.login-story .mascot-login:after{content:'';position:absolute;left:50%;bottom:40px;transform:translateX(-50%);width:210px;height:15px;border-radius:50%;background:rgba(39,88,151,.1)}
.login-story .mascot-login .mascot-viewport,.login-story .mascot-login .illustration-caption{position:relative;z-index:1}

.worksheet-import-panel{border:1px solid #cbdcf4;border-radius:14px;padding:14px;margin-bottom:18px;background:#f4f8ff}.worksheet-import-panel>summary{cursor:pointer;font-weight:700;color:#225fba}.worksheet-import-body{display:grid;gap:12px;padding-top:12px}.worksheet-import-body>label{display:block}.worksheet-import-body input[type=file],.worksheet-import-body select{display:block;width:100%;margin-top:6px}.worksheet-import-body [hidden]{display:none!important}.worksheet-import-body [role=status]{max-height:180px;overflow:auto;font-size:13px}.worksheet-import-body p{margin:4px 0}

.worksheet-import-body>label:has(input[type=checkbox]){display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.5}.worksheet-import-body input[type=checkbox]{width:16px!important;height:16px!important;min-height:0!important;flex:0 0 16px;padding:0;margin:1px 0 0;box-shadow:none}.worksheet-import-body>[data-import-run]{justify-self:start;padding:9px 16px;min-height:36px}.worksheet-import-body{gap:10px}.worksheet-import-body>p{font-size:12px;color:#526a88}
.recommendation-card{margin:16px 0;padding:16px;background:#f0f7ff;border:1px solid #d4e5ff;border-radius:14px}.recommendation-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.recommendation-list{padding-left:20px}.recommendation-list li{padding:8px 0}.recommendation-list p{margin:4px 0}
/* Distinct entry points for school responsibilities. */
body [data-action="space-admin"]{background:#f3efff!important;border:1px solid #c7b5ed!important;color:#6035a0!important;font-weight:750;box-shadow:0 2px 7px #60409a12}
body [data-action="space-admin"]:hover{background:#e9defd!important;border-color:#9572ca!important}
body [data-action="space-teaching"]{background:#eaf8f4!important;border:1px solid #9fd7c7!important;color:#17664f!important;font-weight:750}
body .special-homeroom,body .homeroom-space-group .classroom-choice{background:#edf9f5!important;border:1px solid #a3d9c9!important;color:#205f4d!important}
body .homeroom-space-group h3{color:#17664f;display:flex;align-items:center;gap:8px}
body .homeroom-space-group h3:before{content:'★';font-size:14px}
body .homeroom-space-group .classroom-choice.is-current{border:2px solid #268366!important;box-shadow:0 0 0 3px #26836612}
body .special-homeroom .context-copy small{color:#286e59!important}
body [data-action="space-admin"]:focus-visible,body .homeroom-space-group .classroom-choice:focus-visible{outline:3px solid #367bdf;outline-offset:3px}
.admin-row-actions [data-action=admin-delete],.admin-request [data-action=admin-delete]{color:#b42335;border-color:#f0c7ce;background:#fff}
#modal:has(.admin-delete-form){width:min(540px,calc(100vw - 32px));max-width:540px;border-radius:18px}
#modal:has(.admin-delete-form) .modal-head{padding:20px 24px}
#modal:has(.admin-delete-form) h2{font-size:20px}
#modal:has(.admin-delete-form) .modal-content{padding:20px 24px 24px}
.admin-delete-person{display:grid;gap:4px;padding:12px 14px;border:1px solid #e1e8f1;border-radius:10px;background:#f8fafc;font-size:14px;overflow-wrap:anywhere}
.admin-delete-person span,.admin-delete-person small{color:#687e96;font-size:12px}
.admin-delete-form>p{font-size:13px;line-height:1.7;margin:16px 0;color:#566d88}
.admin-delete-form .admin-delete-history{padding:12px 14px;background:#fff6ed;border:1px solid #f5dec7;border-radius:10px;color:#885420}
.admin-delete-form .admin-field input{height:42px;min-height:42px;font-size:14px}
.admin-delete-form .form-actions{margin-top:20px;gap:10px}
.admin-delete-form .form-actions .btn{font-size:13px;min-height:40px;padding:9px 16px}
.admin-delete-form .admin-delete-confirm{background:#b42335;color:#fff;border-color:#b42335;box-shadow:none}
body .homeroom-space-entry{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-top:10px;padding:9px 12px;min-height:38px;background:#eaf8f4!important;border:1px solid #9fd7c7!important;color:#17664f!important;font-size:12px;font-weight:750}
body .homeroom-space-entry svg{width:17px;height:17px}
/* Published worksheets show formatted content instead of disabled source code. */
#lesson-online-form .worksheet-source-hidden{display:none!important}
.worksheet-readonly-content{padding:14px 16px;border:1px solid #dce6f1;border-radius:12px;background:#fff;color:#20334e;line-height:1.8;overflow-wrap:anywhere;min-height:48px}
.worksheet-readonly-content math{font-size:1.1em}
.worksheet-readonly-content math[display=block]{overflow-x:auto;padding:6px 0}
/* Result actions remain readable and available at every viewport. */
body.learning-ui #modal .focused-quiz .native-question-nav>.btn.btn-primary{background:#086bef;color:#fff;border-color:#086bef}
@media(max-width:760px){
 body.learning-ui #modal .focused-quiz .native-question-nav>[data-action="work-analysis"],
 body.learning-ui #modal .focused-quiz .native-question-nav>[data-action="worksheet-choices"],
 body.learning-ui #modal .focused-quiz .native-question-nav>[data-action="support-open"]{display:flex!important;align-items:center;justify-content:center;grid-column:1/-1;order:6;min-height:40px;font-size:12px}
}
/* Administration: bounded lists, one administrative class with nested subjects. */
.admin-class-filters{display:grid;grid-template-columns:minmax(200px,1fr) minmax(180px,240px) minmax(160px,210px);gap:12px;padding:16px 24px;border-bottom:1px solid #dce7f2}
.admin-class-groups{padding:18px 24px;display:grid;gap:12px;max-height:680px;overflow:auto;scrollbar-gutter:stable}
.admin-class-group{border:1px solid #dce7f2;border-radius:16px;background:#fff}
.admin-class-group>summary{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:18px;cursor:pointer;list-style:none}
.admin-class-group>summary small,.admin-subject-row small{display:block;color:#66809b;font-size:13px;margin-top:6px}
.admin-class-group-body{padding:0 18px 18px}.admin-class-group-toolbar{display:flex;gap:10px;flex-wrap:wrap;padding:8px 0 16px}
.admin-subject-row{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:14px 0;border-top:1px solid #e8eef6}
.admin-assignment-row{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:380px;margin:6px 0;padding:5px 0}
.admin-assignment-row>.btn{flex-shrink:0}.admin-handoff-history{margin-top:16px;font-size:13px}.admin-handoff-history p{margin:10px 0;line-height:1.6}
.admin-checkbox{display:flex!important;gap:10px;align-items:center}.admin-checkbox input{width:18px!important;height:18px!important;flex:0 0 18px}
.space-picker-tools{margin:12px 0 16px}.space-picker-tools input{width:100%}
#modal .space-picker-scroll{max-height:min(52dvh,480px);overflow:auto;scrollbar-gutter:stable;padding-right:8px}
#modal .space-picker-scroll .classroom-choice{min-height:70px;padding:12px 16px;gap:12px}
#modal .space-picker-scroll .classroom-choice-icon{width:38px;height:38px;flex:0 0 38px}
#modal .space-picker-scroll .classroom-choice strong{font-size:16px;overflow-wrap:anywhere}
#modal .space-picker-scroll .classroom-choice small{font-size:12px}
.explanation,.paper-explain-text,.native-options .choice>span,.answer-option{white-space:pre-wrap;line-height:1.85;overflow-wrap:anywhere}
.explanation .community-math,.paper-explain-text .community-math{white-space:normal}
.admin-class-group[hidden],.classroom-choice[hidden]{display:none!important}
@media(max-width:760px){.admin-class-filters{grid-template-columns:1fr;padding:14px}.admin-class-groups{padding:14px}.admin-subject-row{align-items:flex-start;flex-direction:column}.admin-class-group>summary{padding:14px}.admin-assignment-row{flex-wrap:wrap}}
#modal .space-picker-scroll{margin-bottom:16px;border-bottom:1px solid #e5edf6}
.admin-class-empty{padding:16px;color:#66809b}

/* Support and issue reporting: compact, readable, separate from academic feedback. */
.login-help-options{display:grid;gap:14px}.login-help-options section{padding:18px;border:1px solid #dce6f2;border-radius:14px;background:#f8fbff}.login-help-options h3{margin:0 0 8px}.login-help-options p{margin:0 0 12px}
.bug-create>label,.bug-detail form>label{display:grid;gap:8px;margin:16px 0;font-weight:600}.bug-create input[type=file]{font-size:14px}.bug-report-list{display:grid;gap:12px;max-height:60dvh;overflow:auto}.bug-report-list article{padding:16px;border:1px solid #dce6f2;border-radius:14px}.bug-report-list article>div{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.bug-report-list small{color:#64748b}.bug-report-list h3{margin:12px 0}.bug-description,.bug-report-list p{white-space:pre-wrap;overflow-wrap:anywhere}.bug-images{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.bug-images img{width:140px;height:100px;object-fit:contain;border:1px solid #dce6f2;border-radius:10px;background:#f8fafc}.bug-credit{color:#206a57;font-size:14px;line-height:1.6;background:#edf9f4;padding:12px;border-radius:10px}

.bug-images button{border:0;padding:0;background:none;cursor:zoom-in}.bug-full-image{display:block;width:100%;height:auto;max-height:65dvh;object-fit:contain;margin-bottom:16px}
