:root {
  --ink: #19302b;
  --muted: #6d7e79;
  --line: #dfe7e3;
  --paper: #ffffff;
  --canvas: #f3f6f4;
  --green-950: #12342c;
  --green-900: #173f35;
  --green-800: #205346;
  --green-700: #286b58;
  --green-600: #32826a;
  --green-500: #45a181;
  --green-100: #dff2e9;
  --green-50: #edf8f3;
  --blue: #3976c6;
  --blue-soft: #e5f0ff;
  --orange: #df7d38;
  --orange-soft: #fff0df;
  --purple: #7954b5;
  --purple-soft: #efe7fb;
  --red: #c5524f;
  --red-soft: #fde9e8;
  --shadow: 0 8px 30px rgba(28, 56, 47, .07);
  --radius: 18px;
  --sidebar: 258px;
  --touch: 48px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 3vw, 40px); line-height: 1.12; letter-spacing: -.035em; }
h2 { margin-bottom: 8px; font-size: 20px; line-height: 1.25; letter-spacing: -.018em; }
h3 { font-size: 16px; }
small { color: var(--muted); }
.muted { color: var(--muted); }
.block { display: block; }
.text-danger { color: var(--red); }
.eyebrow { margin-bottom: 8px; color: var(--green-700); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.tiny-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; }

*:focus-visible { outline: 3px solid rgba(69, 161, 129, .38); outline-offset: 2px; }

.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; font-weight: 750; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--green-800); box-shadow: 0 5px 12px rgba(32, 83, 70, .16); }
.btn-primary:hover { background: var(--green-900); }
.btn-soft { color: var(--green-900); border-color: var(--line); background: #fff; }
.btn-soft:hover { border-color: #bad2c9; background: var(--green-50); }
.btn-danger { color: #9f2e2e; border-color: #efc9c9; background: #fff3f3; }
.btn-small { min-height: 34px; padding: 6px 10px; font-size: 10px; }
.btn-large { width: 100%; min-height: 52px; padding: 13px 20px; font-size: 16px; }
.text-link { color: var(--green-700); font-weight: 750; }
.back-link { display: inline-flex; margin-bottom: 16px; color: var(--green-700); font-size: 13px; font-weight: 750; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; cursor: pointer; font-size: 22px; }

.panel { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-header h2 { margin-bottom: 0; }
.panel-actions, .form-actions, .dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge-neutral { color: #586a65; background: #edf1ef; }
.badge-green { color: #176047; background: var(--green-100); }
.badge-blue { color: #275c9f; background: var(--blue-soft); }
.badge-orange, .badge-warning { color: #9a551f; background: var(--orange-soft); }
.badge-red, .badge-error { color: #9e3c3a; background: var(--red-soft); }

.alert { position: relative; margin-bottom: 16px; padding: 13px 16px; border: 1px solid; border-radius: 13px; font-size: 14px; font-weight: 650; }
.alert-success { color: #185a45; border-color: #b9dfd0; background: #e7f6ef; }
.alert-error { color: #933d3a; border-color: #efc2c0; background: #fff0ef; }
.alert-warning { color: #835020; border-color: #ecd0ac; background: #fff5e8; }

/* App shell */
.app-body { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; padding: 22px 16px 18px; color: #fff; background: linear-gradient(180deg, var(--green-950), #1c493e 75%, #15392f); }
.sidebar-brand { min-height: 58px; display: flex; align-items: center; gap: 12px; margin-bottom: 28px; padding: 0 8px; }
.sidebar-brand span:last-child { min-width: 0; display: flex; flex-direction: column; }
.sidebar-brand strong { font-size: 16px; letter-spacing: -.02em; }
.sidebar-brand small { max-width: 165px; overflow: hidden; color: #afcbc1; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; color: #fff; background: linear-gradient(135deg, #4baa87, #2d755f); box-shadow: 0 6px 16px rgba(0,0,0,.13); font-weight: 900; letter-spacing: -.03em; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-link { min-height: 47px; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: #c2d8d0; font-weight: 680; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.105); }
.nav-link.active { box-shadow: inset 3px 0 0 #7cd0ae; }
.nav-icon { width: 24px; display: inline-grid; place-items: center; font-size: 18px; }
.sidebar-footer { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.12); }
.privacy-chip { margin-bottom: 14px; color: #9fd0bc; font-size: 11px; font-weight: 700; }
.privacy-chip::first-letter { color: #70d5ab; }
.user-mini { display: flex; align-items: center; gap: 10px; }
.user-mini > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.user-mini strong { max-width: 140px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.user-mini small { color: #9fbdb2; font-size: 11px; }
.avatar { width: 40px; height: 40px; flex: 0 0 40px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--green-900); background: var(--green-100); font-weight: 850; }
.sidebar .avatar { color: #fff; background: rgba(255,255,255,.13); }
.avatar.small { width: 34px; height: 34px; flex-basis: 34px; font-size: 12px; }
.avatar-xl { width: 68px; height: 68px; flex-basis: 68px; font-size: 24px; }
.logout-link { display: inline-block; margin: 14px 0 0 50px; color: #a8c2b9; font-size: 11px; }
.app-shell { min-height: 100vh; padding-left: var(--sidebar); }
.topbar { position: sticky; z-index: 20; top: 0; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 30px; border-bottom: 1px solid rgba(217,227,222,.9); background: rgba(255,255,255,.9); backdrop-filter: blur(14px); }
.topbar-title { display: flex; flex-direction: column; }
.topbar-title span { font-weight: 800; }
.topbar-title small { font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.top-avatar { width: 38px; height: 38px; flex-basis: 38px; }
.menu-button { display: none; border: 0; background: transparent; font-size: 24px; }
.main-content { width: min(1480px, 100%); margin: 0 auto; padding: 28px 30px 60px; }
.mobile-nav, .sidebar-scrim { display: none; }

/* Headings and stats */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin: 4px 0 24px; }
.page-heading > div:first-child { max-width: 760px; }
.page-heading p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { min-height: 126px; display: flex; align-items: center; gap: 14px; padding: 19px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.stat-icon { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 13px; color: var(--green-800); background: var(--green-100); font-size: 21px; }
.stat-card > div:last-child { display: flex; flex-direction: column; }
.stat-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-card strong { margin: 1px 0; font-size: 28px; line-height: 1.2; letter-spacing: -.04em; }
.stat-card strong em, .metric-card strong em { color: var(--muted); font-size: 14px; font-style: normal; font-weight: 650; }
.stat-card small { font-size: 11px; }
.accent-blue .stat-icon { color: var(--blue); background: var(--blue-soft); }
.accent-orange .stat-icon { color: var(--orange); background: var(--orange-soft); }
.accent-purple .stat-icon { color: var(--purple); background: var(--purple-soft); }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,.85fr); gap: 18px; }
.current-session-panel { min-width: 0; }
.session-meta { margin: -8px 0 16px; color: var(--muted); font-size: 12px; }
.session-level-strip { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.level-mini { min-height: 74px; padding: 12px; border: 1px solid var(--line); border-left: 4px solid; border-radius: 12px; }
.level-mini b, .level-mini span { display: block; }
.level-mini b { margin-bottom: 3px; font-size: 11px; text-transform: uppercase; }
.level-mini span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.level-a { border-color: #e59a42 !important; }
.level-b { border-color: #448bd1 !important; }
.level-c { border-color: #329b69 !important; }
.level-d { border-color: #895cc2 !important; }
.attention-panel { padding-bottom: 10px; }
.attention-row { display: grid; grid-template-columns: 36px 1fr 18px; align-items: center; gap: 10px; margin: 0 -8px; padding: 12px 8px; border-top: 1px solid #eef2f0; }
.attention-row:first-of-type { border-top: 0; }
.attention-row > span:nth-child(2) { display: flex; flex-direction: column; }
.attention-row b { font-size: 13px; }
.attention-row small { font-size: 11px; }
.attention-row i { color: #9aaba5; font-size: 22px; font-style: normal; }
.attention-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font-weight: 900; }
.attention-icon.warning { color: #a26224; background: var(--orange-soft); }
.attention-icon.danger { color: var(--red); background: var(--red-soft); }
.attention-icon.info { color: var(--blue); background: var(--blue-soft); }
.level-distribution { display: grid; gap: 13px; }
.level-row { display: grid; grid-template-columns: 38px 1fr 28px; align-items: center; gap: 10px; }
.level-row > div b { display: block; margin-bottom: 5px; font-size: 12px; }
.level-dot, .level-pill { display: inline-grid; place-items: center; border-radius: 10px; font-weight: 850; }
.level-dot { width: 34px; height: 34px; }
.level-pill { min-width: 34px; padding: 5px 10px; font-size: 12px; }
.level-dot.level-a, .level-pill.level-a { color: #925513; background: #ffedd3; }
.level-dot.level-b, .level-pill.level-b { color: #275f9f; background: #e2f0ff; }
.level-dot.level-c, .level-pill.level-c { color: #166343; background: #daf3e6; }
.level-dot.level-d, .level-pill.level-d { color: #684095; background: #efe4fb; }
.level-pill.level-reguler { color: #176047; background: var(--green-100); }
.progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: #e8eeeb; }
.progress-track i { height: 100%; display: block; border-radius: inherit; background: var(--green-500); }
.progress-track.large { height: 10px; margin: 8px 0; }
.compact-list { display: grid; }
.compact-list a { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #edf1ef; }
.compact-list a:first-child { border-top: 0; }
.compact-list a > span:nth-child(2) { display: flex; flex-direction: column; }
.compact-list b { font-size: 13px; }
.compact-list small { font-size: 11px; }
.score { min-width: 44px; text-align: right; font-size: 16px; }
.score.good { color: var(--green-700); }
.score.warn { color: var(--orange); }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.form-grid.compact { gap: 10px; }
.span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { color: #40534d; font-size: 12px; font-weight: 750; }
.field label b { color: var(--red); }
.field input, .field select, .field textarea, .filter-row select, .search-field { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #d4ded9; border-radius: 11px; color: var(--ink); background: #fff; outline: none; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-row select:focus, .search-field:focus-within { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(69,161,129,.12); }
.field input[readonly] { color: var(--green-800); background: var(--green-50); font-weight: 800; }
.form-section-title { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 850; }
.form-panel h2 { margin-bottom: 18px; }
.filter-panel { padding: 14px; margin-bottom: 16px; }
.filter-row { display: grid; grid-template-columns: minmax(240px,1fr) 190px 170px auto; gap: 10px; }
.search-field { display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.search-field input { width: 100%; border: 0; outline: 0; }
.inline-inputs { display: flex; align-items: center; gap: 8px; }
.check-line, .radio-card { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check-line { margin-top: 16px; padding: 13px; border-radius: 12px; background: #f6f8f7; font-size: 13px; }
.radio-card { margin-bottom: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.radio-card span { display: flex; flex-direction: column; }
.radio-card small { line-height: 1.35; }
.radio-card:has(input:checked) { border-color: var(--green-500); background: var(--green-50); }
.code-box { width: 100%; min-height: 240px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font: 12px/1.4 ui-monospace, monospace; }

/* Tables and people */
.table-panel { padding: 0; overflow: hidden; }
.table-panel > .panel-header { padding: 20px 22px 0; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 14px; color: #5d6f69; background: #f6f8f7; font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 14px; border-top: 1px solid #edf1ef; vertical-align: middle; font-size: 13px; }
tbody tr:hover { background: #fbfcfb; }
.person-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.person-cell > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.person-cell b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-cell small { font-size: 11px; }

/* Dialog / empty */
.app-dialog { width: min(620px,calc(100% - 24px)); max-height: 90vh; padding: 0; border: 0; border-radius: 20px; box-shadow: 0 30px 80px rgba(15,44,35,.28); }
.app-dialog::backdrop { background: rgba(11,34,27,.55); backdrop-filter: blur(4px); }
.dialog-card { padding: 22px; }
.dialog-header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.dialog-header h2 { margin: 0; font-size: 24px; }
.empty-state { min-height: 220px; display: grid; place-items: center; align-content: center; padding: 32px; text-align: center; }
.empty-state h3 { margin: 7px 0 4px; }
.empty-state p { max-width: 440px; margin-bottom: 15px; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; color: var(--green-700); background: var(--green-100); font-size: 27px; }

/* Student */
.profile-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; background: linear-gradient(135deg,#fff,#f1f8f5); }
.student-identity { display: flex; align-items: center; gap: 16px; }
.student-identity h1 { margin: 3px 0 5px; font-size: 31px; }
.student-identity p { margin-bottom: 0; color: var(--muted); }
.identity-tags { display: flex; gap: 7px; }
.student-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.metric-card { display: flex; flex-direction: column; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.metric-card span { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card strong { font-size: 25px; letter-spacing: -.04em; }
.metric-card small { font-size: 10px; }
.student-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(290px,.65fr); gap: 16px; }
.student-main-column, .student-side-column { display: grid; align-content: start; gap: 16px; }
.quick-panel { display: grid; gap: 4px; }
.quick-panel > a { display: grid; grid-template-columns: 32px 1fr 15px; align-items: center; gap: 8px; margin: 0 -8px; padding: 11px 8px; border-top: 1px solid #edf1ef; font-size: 13px; }
.quick-panel > a span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--green-700); background: var(--green-100); }
.quick-panel > a i { color: #8ea099; font-size: 20px; font-style: normal; }
.timeline { display: grid; gap: 12px; }
.timeline > div { display: grid; grid-template-columns: 14px 1fr; gap: 10px; }
.timeline i { width: 9px; height: 9px; margin-top: 5px; border: 2px solid #fff; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 2px var(--green-100); }
.timeline span { display: flex; flex-direction: column; }
.timeline b { font-size: 12px; }
.timeline small { font-size: 10px; }
.privacy-card { display: flex; gap: 10px; color: #31584b; background: var(--green-50); box-shadow: none; }
.privacy-card > span { color: var(--green-500); }
.privacy-card p { margin: 3px 0 0; font-size: 12px; }
.mini-chart.bars { height: 190px; display: grid; grid-template-columns: repeat(6,1fr); align-items: end; gap: 10px; padding: 18px 10px 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom,#fff,#fff 37px,#eef2f0 38px); }
.mini-chart.bars > div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; }
.mini-chart.bars span { width: min(42px,75%); min-height: 2px; position: relative; display: block; border-radius: 9px 9px 2px 2px; background: linear-gradient(180deg,var(--green-500),var(--green-700)); }
.mini-chart.bars i { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); color: var(--green-800); font-size: 10px; font-style: normal; font-weight: 800; }

/* Assessments */
.assessment-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.65fr); align-items: start; gap: 16px; }
.score-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-bottom: 18px; }
.score-input-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb; }
.score-input-card > div { display: flex; flex-direction: column; }
.score-input-card b { font-size: 12px; }
.score-input-card small { font-size: 10px; }
.score-input-card label { display: flex; align-items: center; gap: 5px; }
.score-input-card input { width: 64px; height: 42px; border: 1px solid #cbd8d2; border-radius: 10px; text-align: center; font-size: 17px; font-weight: 800; }
.score-input-card label span { color: var(--muted); font-size: 11px; }
.assessment-guide { position: sticky; top: 90px; }
.assessment-guide > .btn { margin-top: 18px; }
.placement-list { display: grid; gap: 9px; padding: 0; list-style: none; }
.placement-list li { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 9px; }
.placement-list li > div { display: flex; flex-direction: column; }
.placement-list b { font-size: 12px; }
.placement-list small { font-size: 10px; }
.callout { margin: 16px 0; padding: 13px; border: 1px solid #cce2d9; border-radius: 12px; color: #315e4e; background: var(--green-50); font-size: 12px; }
.rating-table { margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.rating-head, .rating-row { display: grid; grid-template-columns: minmax(220px,1fr) repeat(4,76px); align-items: stretch; }
.rating-head { color: #596b65; background: #f4f7f5; font-size: 10px; font-weight: 800; text-align: center; text-transform: uppercase; }
.rating-head span { padding: 9px; }
.rating-head span:first-child { text-align: left; }
.rating-row { border-top: 1px solid var(--line); }
.rating-row > b { padding: 12px; font-size: 12px; }
.rating-row label { display: grid; place-items: center; border-left: 1px solid var(--line); cursor: pointer; }
.rating-row input { position: absolute; opacity: 0; }
.rating-row label span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #cfdad5; border-radius: 50%; font-size: 12px; font-weight: 800; }
.rating-row label:has(input:checked) { background: var(--green-50); }
.rating-row input:checked + span { color: #fff; border-color: var(--green-700); background: var(--green-700); }
.rating-table.five-scale .rating-head, .rating-table.five-scale .rating-row { grid-template-columns: minmax(270px,1fr) repeat(5,72px); }
.rating-table.five-scale .rating-row > b { display: flex; align-items: flex-start; gap: 8px; line-height: 1.45; }
.rating-table.five-scale .rating-row > b small { min-width: 24px; color: var(--green-700); }
.survey-open { margin-top: 18px; }
.survey-summary { max-width: 620px; }

/* Sessions */
.program-progress { margin-bottom: 18px; }
.program-progress > div:first-child { display: flex; justify-content: space-between; }
.weeks-stack { display: grid; gap: 15px; }
.week-panel { padding: 18px; }
.week-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.week-header > div { display: flex; align-items: center; gap: 12px; }
.week-header h2, .week-header p { margin: 0; }
.week-header p { color: var(--muted); font-size: 11px; }
.week-number { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--green-800); font-weight: 900; }
.session-cards { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.session-card { min-height: 106px; display: flex; flex-direction: column; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.session-card:hover { border-color: #a9cabd; background: var(--green-50); }
.session-card.status-completed { border-color: #cde3da; background: #f2faf6; }
.session-card-top { display: flex; justify-content: space-between; margin-bottom: 12px; }
.session-card-top span { color: var(--green-700); font-size: 11px; font-weight: 850; }
.session-card-top i { color: var(--green-600); font-style: normal; }
.session-card b { font-size: 12px; line-height: 1.3; }
.session-card small { margin-top: auto; font-size: 9px; }
.session-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.session-title-row { display: flex; align-items: center; gap: 14px; }
.session-number-large { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: var(--green-800); font-size: 28px; font-weight: 900; }
.session-title-row h1 { margin: 0; font-size: 28px; }
.session-title-row p:last-child { margin: 2px 0 0; color: var(--muted); }
.session-layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.55fr); gap: 16px; }
.session-main-column, .session-side-column { display: grid; align-content: start; gap: 16px; }
.level-activity-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.level-activity { padding: 15px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 13px; }
.level-activity span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.level-activity h3 { min-height: 42px; margin: 5px 0 8px; line-height: 1.35; }
.level-activity a { color: var(--green-700); font-size: 11px; font-weight: 750; }
.media-callout { display: flex; gap: 12px; margin-top: 13px; padding: 12px; border-radius: 11px; background: #f5f7f6; font-size: 12px; }
.media-callout span { color: var(--muted); }
.attendance-list { display: grid; }
.attendance-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 0; border-top: 1px solid #edf1ef; }
.attendance-row:first-child { border-top: 0; }
.attendance-options { display: flex; gap: 6px; }
.attendance-options label { cursor: pointer; }
.attendance-options input { position: absolute; opacity: 0; }
.attendance-options span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #ced9d4; border-radius: 10px; font-size: 11px; font-weight: 850; }
.attendance-options input:checked + span { color: #fff; border-color: var(--green-700); background: var(--green-700); }
.attendance-options label:last-child input:checked + span { border-color: var(--red); background: var(--red); }
.session-routine > div { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.session-routine > div span { height: 31px; display: grid; place-items: center; border-radius: 8px; color: var(--green-800); background: var(--green-100); font-size: 10px; font-weight: 850; }
.session-routine p { margin: 0; color: var(--muted); font-size: 11px; }
.session-routine p b { display: block; color: var(--ink); font-size: 12px; }
.session-pager { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 750; }

/* Evaluation / progress / journal / reports */
.student-picker { max-width: 600px; }
.clean-list { display: grid; gap: 9px; padding-left: 18px; color: var(--muted); font-size: 12px; }
.progress-profile { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 16px 0; }
.progress-profile h2 { margin: 0; font-size: 24px; }
.progress-kpis { display: flex; gap: 10px; }
.progress-kpis > div { min-width: 95px; padding: 10px 12px; border-radius: 12px; background: #f3f7f5; }
.progress-kpis span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.progress-kpis b { font-size: 18px; }
.progress-layout { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,.55fr); gap: 16px; }
.svg-chart { overflow-x: auto; }
.svg-chart svg { width: 100%; min-width: 560px; height: auto; }
.grid-line { stroke: #e6ece9; stroke-width: 1; }
.target-line { stroke: #df8a47; stroke-width: 2; stroke-dasharray: 6 5; }
.score-line { fill: none; stroke: var(--green-600); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.svg-chart circle { fill: #fff; stroke: var(--green-700); stroke-width: 4; }
.svg-chart text { fill: #74857f; font-size: 11px; }
.svg-chart .point-label { fill: var(--green-800); font-weight: 800; }
.insight-card { display: flex; flex-direction: column; margin: 14px 0; padding: 16px; border-radius: 13px; }
.insight-card.positive { color: #175d45; background: var(--green-100); }
.insight-card.negative { color: #8e3f3b; background: var(--red-soft); }
.insight-card b { font-size: 25px; }
.journal-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(300px,.65fr); align-items: start; gap: 16px; }
.journal-history { position: sticky; top: 90px; }
.journal-timeline p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.report-cover { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.report-cover h2 { margin: 0; font-size: 24px; }
.report-cover p:last-child { margin: 3px 0 0; color: var(--muted); }
.report-stats { grid-template-columns: repeat(5,minmax(0,1fr)); }

/* Parent letters and consent */
.letter-sheet { max-width: 900px; margin: 0 auto 18px; padding: clamp(24px,5vw,52px); color: #17201d; font-family: Georgia, 'Times New Roman', serif; font-size: 14px; line-height: 1.75; }
.letter-head { display: flex; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.letter-head h2 { margin: 0; font-family: inherit; font-size: 24px; text-transform: uppercase; }
.letter-head p { margin: 0; color: #38443f; font-size: 11px; }
.letter-rule { height: 4px; margin: 15px 0 20px; border-block: 2px solid #17201d; }
.letter-meta { display: flex; justify-content: space-between; gap: 20px; font-size: 12px; }
.letter-title { margin: 25px 0; font-family: inherit; text-align: center; text-decoration: underline; text-transform: uppercase; }
.letter-table { margin: 20px 0; border: 1px solid #555; }
.letter-table table { min-width: 0; }
.letter-table th, .letter-table td { border: 1px solid #777; background: #fff; font-family: inherit; font-size: 12px; text-transform: none; white-space: normal; }
.signature-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 70px; margin-top: 36px; text-align: center; }
.signature-grid > div { display: flex; min-height: 125px; flex-direction: column; }
.signature-grid span { flex: 1; }
.signature-grid small { color: #333; }
.signature-grid.compact { gap: 30px; margin-top: 16px; text-align: left; }
.signature-grid.compact > div { min-height: 0; }
.consent-slip { margin-top: 40px; padding-top: 24px; border-top: 2px dashed #777; font-size: 12px; }
.consent-slip h3 { font-family: inherit; text-align: center; text-transform: uppercase; }
.consent-record { max-width: 900px; margin-inline: auto; }
.report-date { margin-left: auto; color: var(--muted); text-align: right; font-size: 11px; }
.report-date b { color: var(--ink); }
.logo-frame { width: 84px; height: 84px; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.logo-frame img { width: 100%; height: 100%; object-fit: contain; }
.small-logo { width: 64px; height: 64px; border-radius: 14px; }
.report-notes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.settings-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(280px,.7fr); align-items: start; gap: 16px; margin-bottom: 16px; }
.security-list { display: grid; gap: 15px; padding: 0; list-style: none; }
.security-list li { display: grid; grid-template-columns: 30px 1fr; gap: 9px; }
.security-list li > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--green-700); background: var(--green-100); font-weight: 900; }
.security-list li div { display: flex; flex-direction: column; }
.profile-card-large { display: grid; justify-items: center; text-align: center; }

/* Classroom / IFP */
.classroom-body { overflow: hidden; background: #eaf0ed; }
.classroom-shell, .classroom-main { width: 100%; height: 100vh; padding: 0; }
.classroom-app { --class-font: 1; height: 100vh; display: grid; grid-template-rows: 72px 72px minmax(0,1fr) 82px; position: relative; background: #eef3f0; }
.classroom-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 22px; color: #fff; background: var(--green-950); }
.classroom-brand { display: flex; align-items: center; gap: 10px; }
.classroom-brand > span:last-child { display: flex; flex-direction: column; }
.classroom-brand small { color: #a9c6bb; font-size: 10px; }
.classroom-header-actions { display: flex; gap: 8px; }
.classroom-icon-button, .classroom-exit { min-width: 44px; min-height: 44px; display: grid; place-items: center; padding: 0 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 11px; color: #fff; background: rgba(255,255,255,.08); cursor: pointer; font-weight: 800; }
.classroom-exit { color: #d7e8e1; }
.classroom-toolbar { display: flex; align-items: center; gap: 14px; padding: 10px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.level-tabs { display: flex; gap: 6px; }
.level-tab { min-width: 78px; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; font-weight: 850; }
.level-tab.active { color: #fff; background: var(--green-800); box-shadow: 0 5px 12px rgba(28,83,65,.15); }
.level-tab.level-a.active { background: #c97b22; }
.level-tab.level-b.active { background: #377bc2; }
.level-tab.level-c.active { background: #25875a; }
.level-tab.level-d.active { background: #7650a8; }
.activity-select-wrap { min-width: 260px; display: flex; align-items: center; gap: 8px; margin-left: auto; }
.activity-select-wrap span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.activity-select-wrap select { min-height: 44px; flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.classroom-stage { min-height: 0; display: grid; grid-template-columns: minmax(250px,26%) 1fr; gap: 16px; padding: 16px 22px; }
.classroom-instructions, .activity-canvas { overflow: auto; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.classroom-instructions { padding: 25px; }
.classroom-instructions h1 { font-size: calc(30px * var(--class-font)); }
.classroom-instructions > p:not(.eyebrow) { color: var(--muted); font-size: calc(15px * var(--class-font)); }
.stage-progress { margin-top: 24px; }
.stage-progress > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.activity-canvas { min-width: 0; display: grid; place-items: center; padding: 24px; }
.flash-card-stage { width: min(70%,700px); aspect-ratio: 1.35; display: grid; place-items: center; border: 4px solid var(--green-100); border-radius: 34px; color: var(--green-950); background: linear-gradient(145deg,#fff,#eef8f3); box-shadow: 0 16px 40px rgba(29,75,60,.12); font-size: calc(170px * var(--class-font)); font-weight: 850; line-height: 1; }
.choice-stage { width: min(900px,100%); }
.choice-prompt { margin-bottom: 24px; text-align: center; font-size: calc(34px * var(--class-font)); font-weight: 850; }
.choice-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.choice-option { min-height: 120px; border: 2px solid var(--line); border-radius: 20px; background: #fff; cursor: pointer; font-size: calc(58px * var(--class-font)); font-weight: 850; }
.choice-option.correct { color: #fff; border-color: var(--green-600); background: var(--green-600); }
.choice-option.incorrect { animation: shake .3s; color: #fff; border-color: var(--red); background: var(--red); }
@keyframes shake { 25%{transform:translateX(-8px)}75%{transform:translateX(8px)} }
.reading-stage { width: min(920px,100%); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.reading-stage h2 { margin-bottom: 20px; text-align: center; font-size: calc(27px * var(--class-font)); }
.reading-text { color: #243a34; font-family: Georgia,serif; font-size: calc(30px * var(--class-font)); line-height: 1.75; text-align: left; }
.reading-meta { margin-top: 18px; color: var(--muted); text-align: right; }
.comprehension-stage { width: min(940px,100%); align-self: stretch; overflow-y: auto; }
.comprehension-stage h2 { font-size: calc(27px * var(--class-font)); }
.comprehension-text { padding: 20px; border-radius: 16px; background: #f5f8f6; font-family: Georgia,serif; font-size: calc(22px * var(--class-font)); line-height: 1.7; }
.question-card { margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; font-size: calc(19px * var(--class-font)); }
.question-answer { display: none; margin-top: 9px; padding-top: 9px; border-top: 1px dashed #bfd0ca; color: var(--green-700); font-weight: 750; }
.question-answer.visible { display: block; }
.word-builder-stage { width: min(900px,100%); text-align: center; }
.letter-bank, .answer-bank { min-height: 90px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 14px; border-radius: 17px; }
.letter-bank { background: #f1f5f3; }
.answer-bank { margin-bottom: 18px; border: 2px dashed #b6cbc2; background: #fff; }
.letter-tile { min-width: 68px; height: 68px; padding: 0 17px; border: 1px solid #c8d6d0; border-radius: 14px; color: var(--green-950); background: #fff; box-shadow: 0 4px 9px rgba(20,60,47,.08); cursor: pointer; font-size: calc(32px * var(--class-font)); font-weight: 900; }
.builder-message { min-height: 35px; margin-top: 14px; font-size: 20px; font-weight: 800; }
.bingo-stage { width: min(840px,100%); display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.bingo-cell { min-height: 76px; padding: 8px; border: 2px solid #cfdbd6; border-radius: 13px; background: #fff; cursor: pointer; font-size: calc(17px * var(--class-font)); font-weight: 850; }
.bingo-cell.marked { color: #fff; border-color: var(--green-700); background: var(--green-700); }
.tracing-stage { width: min(900px,100%); height: 100%; display: grid; grid-template-columns: 170px 1fr; gap: 16px; }
.tracing-letter { display: grid; place-items: center; border-radius: 18px; background: var(--green-50); font-size: calc(120px * var(--class-font)); font-weight: 850; }
.tracing-canvas-wrap { position: relative; overflow: hidden; border: 2px dashed #adc5bb; border-radius: 18px; background: #fff; }
.trace-guide { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(35,91,71,.10); font-size: min(45vh,340px); font-weight: 900; pointer-events: none; }
#trace-canvas { width: 100%; height: 100%; touch-action: none; }
.classroom-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 22px; border-top: 1px solid var(--line); background: #fff; }
.center-controls { display: flex; gap: 8px; }
.control-button { min-height: 52px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font-weight: 850; }
.control-button.primary { color: #fff; border-color: var(--green-800); background: var(--green-800); }
.answer-button { display: none; }
.answer-button.visible { display: inline-flex; }
.teacher-drawer { position: fixed; z-index: 70; top: 0; right: 0; width: min(420px,100%); height: 100vh; overflow-y: auto; padding: 22px; background: #fff; box-shadow: -20px 0 55px rgba(15,43,34,.2); transform: translateX(105%); transition: transform .25s ease; }
.teacher-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; margin-bottom: 20px; }
.drawer-scrim { display: none; position: fixed; z-index: 65; inset: 0; background: rgba(14,38,31,.45); }
.teacher-drawer.open + .drawer-scrim { display: block; }
.timer-card { display: flex; align-items: center; justify-content: space-between; margin: 16px 0; padding: 15px; border-radius: 14px; color: #fff; background: var(--green-900); }
.timer-card > span { font: 800 34px/1 ui-monospace,monospace; }

/* Auth / installer */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; color: #fff; background: radial-gradient(circle at 15% 10%,#2f6c5a 0,transparent 35%),linear-gradient(135deg,#102f28,#1c4d40); }
.login-shell, .install-shell { width: min(1060px,100%); display: grid; grid-template-columns: 1fr minmax(380px,.75fr); align-items: center; gap: clamp(30px,7vw,90px); }
.login-hero h1, .install-intro h1 { margin: 14px 0; font-size: clamp(42px,5.5vw,70px); }
.login-hero > p:last-child, .install-intro > p { max-width: 600px; color: #c5dad2; font-size: 17px; }
.login-hero .logo-frame { width: 80px; height: 80px; border-color: rgba(255,255,255,.2); }
.auth-card { padding: 30px; border-radius: 24px; color: var(--ink); background: #fff; box-shadow: 0 25px 70px rgba(0,0,0,.23); }
.brand-row { display: flex; align-items: center; gap: 11px; margin-bottom: 34px; }
.brand-row > div:last-child { display: flex; flex-direction: column; }
.brand-row small { font-size: 10px; }
.auth-card h2 { margin-bottom: 4px; font-size: 28px; }
.auth-form { display: grid; gap: 15px; margin-top: 22px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.password-wrap .icon-button { position: absolute; top: 3px; right: 3px; border: 0; background: transparent; font-size: 16px; }
.privacy-note { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.privacy-note span { color: var(--green-500); }
.install-shell { width: min(1200px,100%); grid-template-columns: .7fr 1.3fr; }
.install-points { display: flex; flex-wrap: wrap; gap: 8px; }
.install-points span, .step-pill { padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.install-points span { color: #d3e8df; background: rgba(255,255,255,.09); }
.step-pill { display: inline-flex; margin-bottom: 12px; color: #176047; background: var(--green-100); }
.install-card { max-height: calc(100vh - 48px); overflow-y: auto; }

@media (max-width: 1180px) {
  :root { --sidebar: 224px; }
  .main-content { padding-inline: 22px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .session-cards { grid-template-columns: repeat(3,1fr); }
  .classroom-stage { grid-template-columns: 250px 1fr; }
  .activity-select-wrap { min-width: 220px; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-102%); transition: transform .22s; }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 25; inset: 0; background: rgba(10,35,27,.45); }
  body.menu-open .sidebar-scrim { display: block; }
  .app-shell { padding-left: 0; }
  .menu-button { display: block; }
  .topbar { padding-inline: 18px; }
  .main-content { padding: 20px 18px 82px; }
  .page-heading, .profile-hero, .session-hero { align-items: flex-start; flex-direction: column; }
  .dashboard-grid, .student-layout, .assessment-layout, .session-layout, .progress-layout, .journal-layout, .settings-grid { grid-template-columns: 1fr; }
  .assessment-guide, .journal-history { position: static; }
  .student-summary-grid { grid-template-columns: repeat(2,1fr); }
  .progress-profile { align-items: flex-start; flex-direction: column; }
  .progress-kpis { width: 100%; overflow-x: auto; }
  .report-notes { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; z-index: 19; inset: auto 0 0; height: 68px; display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #687a74; font-size: 18px; }
  .mobile-nav small { font-size: 8px; }
  .classroom-body { overflow: auto; }
  .classroom-app { height: auto; min-height: 100vh; grid-template-rows: 66px auto minmax(600px,1fr) auto; }
  .classroom-toolbar { align-items: stretch; flex-wrap: wrap; }
  .level-tabs { width: 100%; overflow-x: auto; }
  .activity-select-wrap { min-width: 0; flex: 1; }
  .classroom-stage { grid-template-columns: 1fr; }
  .classroom-instructions { max-height: 220px; }
  .activity-canvas { min-height: 500px; }
  .classroom-controls { flex-wrap: wrap; }
  .center-controls { order: 3; width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .hide-mobile { display: none !important; }
  .topbar-title small { display: none; }
  .page-heading { margin-bottom: 18px; }
  .heading-actions { width: 100%; justify-content: stretch; }
  .heading-actions .btn, .heading-actions form, .heading-actions form .btn { flex: 1; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 108px; padding: 14px; }
  .stat-icon { display: none; }
  .stat-card strong { font-size: 24px; }
  .dashboard-grid { gap: 12px; }
  .session-level-strip, .level-activity-grid, .score-form-grid, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .filter-row { grid-template-columns: 1fr; }
  .filter-row .btn { width: 100%; }
  .student-summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { padding: 13px; }
  .student-identity { align-items: flex-start; }
  .avatar-xl { width: 54px; height: 54px; flex-basis: 54px; }
  .student-identity h1 { font-size: 24px; }
  .session-cards { grid-template-columns: repeat(2,1fr); }
  .session-title-row { align-items: flex-start; }
  .session-number-large { width: 50px; height: 50px; flex-basis: 50px; border-radius: 14px; font-size: 21px; }
  .attendance-row { align-items: flex-start; flex-direction: column; }
  .attendance-options { width: 100%; }
  .attendance-options label { flex: 1; }
  .attendance-options span { width: 100%; }
  .rating-table { overflow-x: auto; }
  .rating-head, .rating-row { min-width: 590px; }
  .rating-table.five-scale .rating-head, .rating-table.five-scale .rating-row { min-width: 720px; }
  .letter-sheet { padding: 22px 18px; }
  .letter-head { align-items: flex-start; }
  .letter-meta, .signature-grid { gap: 18px; }
  .progress-kpis > div { min-width: 85px; }
  .report-cover { align-items: flex-start; }
  .report-date { display: none; }
  .login-shell, .install-shell { grid-template-columns: 1fr; }
  .login-hero, .install-intro { display: none; }
  .auth-body { padding: 12px; background: var(--green-950); }
  .auth-card { padding: 22px; border-radius: 20px; }
  .install-card { max-height: calc(100vh - 24px); }
  .classroom-header { padding-inline: 12px; }
  .classroom-brand small { display: none; }
  .classroom-header-actions .classroom-icon-button:nth-child(-n+2) { display: none; }
  .classroom-toolbar { padding-inline: 12px; }
  .level-tab { min-width: 70px; }
  .classroom-stage { min-height: 0; padding: 10px 12px; }
  .classroom-instructions { padding: 17px; }
  .activity-canvas { min-height: 430px; padding: 14px; }
  .flash-card-stage { width: 92%; font-size: calc(120px * var(--class-font)); }
  .choice-option { min-height: 95px; }
  .reading-text { font-size: calc(22px * var(--class-font)); }
  .tracing-stage { grid-template-columns: 1fr; grid-template-rows: 100px 1fr; }
  .tracing-letter { font-size: 70px; }
  .classroom-controls { padding: 10px 12px; }
  .control-button { min-height: 48px; padding: 8px 12px; font-size: 12px; }
  .speak-button { display: none; }
}

@media (min-width: 1500px) {
  .classroom-app { grid-template-rows: 84px 84px minmax(0,1fr) 98px; }
  .classroom-header, .classroom-toolbar, .classroom-controls { padding-inline: 34px; }
  .classroom-stage { padding: 22px 34px; gap: 22px; }
  .level-tab { min-width: 108px; height: 54px; font-size: 17px; }
  .activity-select-wrap select { min-height: 52px; font-size: 17px; }
  .classroom-instructions { padding: 34px; }
  .control-button { min-width: 170px; min-height: 62px; font-size: 17px; }
}

@media print {
  body { color: #000; background: #fff; }
  .sidebar, .topbar, .mobile-nav, .heading-actions, .filter-panel, .privacy-card, .btn, .text-link, .no-print { display: none !important; }
  .app-shell { padding: 0; }
  .main-content { width: 100%; padding: 0; }
  .panel, .stat-card { break-inside: avoid; box-shadow: none; }
  .page-heading { margin-top: 0; }
  .responsive-table { overflow: visible; }
  table { font-size: 10px; }
  td, th { padding: 7px; }
  .letter-sheet { max-width: none; margin: 0; padding: 0; border: 0; font-size: 12pt; box-shadow: none; }
  .letter-head h2 { font-size: 18pt; }
  .letter-table th, .letter-table td { font-size: 9pt; }
  .consent-slip { break-before: auto; }
}
