/* ==========================================================================
   Everest Test Platform — design system
   ========================================================================== */
:root {
  /* Colour psychology for learning:
     blue   → focus, trust, concentration   (primary actions, reading)
     teal   → calm, balance, growth         (secondary accent, writing, success paths)
     amber  → optimism, motivation          (highlights & achievements — used sparingly)
     violet → creativity, imagination       (speaking)
     soft off-white background and deep-navy text reduce glare and eye strain. */
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f0f4f9;
  --surface-3: #e5ecf5;
  --border: #e1e8f1;
  --border-strong: #cad5e3;
  --text: #13213f;
  --text-2: #3a4a6b;
  --muted: #687792;
  --primary: #2558e6;
  --primary-600: #1c45c4;
  --primary-50: #edf3ff;
  --primary-100: #d9e5ff;
  --accent: #14b8a6;
  --accent-600: #0f9488;
  --warm: #f5a524;
  --warm-600: #dc8a06;
  --success: #0f9f6e;
  --success-50: #e9fbf3;
  --warning: #d97706;
  --warning-50: #fff8eb;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --violet: #7356e8;
  --violet-50: #f3f0ff;
  --teal: #0f9488;
  --teal-50: #e8faf7;
  --amber-50: #fff7e6;

  --c-speaking: #7356e8;
  --c-writing: #0f9488;
  --c-reading: #2558e6;
  --c-listening: #e05a84;
  --c-grammar: #e08a00;

  --grad-primary: linear-gradient(135deg, #2f6bff 0%, #2558e6 45%, #4b46d8 100%);
  --grad-focus: linear-gradient(100deg, #2558e6, #14b8a6);
  --grad-night: linear-gradient(150deg, #0c1636 0%, #142a66 55%, #1f4fd6 100%);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(19, 33, 63, .05), 0 1px 1px rgba(19, 33, 63, .03);
  --shadow: 0 2px 4px rgba(19, 33, 63, .04), 0 8px 24px rgba(37, 88, 230, .08);
  --shadow-lg: 0 18px 50px rgba(19, 33, 63, .16), 0 4px 12px rgba(37, 88, 230, .08);
  --font-display: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --container: 1200px;
  --topbar-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
svg[aria-hidden] { width: 18px; height: 18px; flex: none; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.015em; color: var(--text); }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 650; }
h4 { font-size: .95rem; font-weight: 650; }
p { margin: 0 0 1em; }
small { font-size: .82rem; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.shell { flex: 1; width: 100%; }
.main { outline: none; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.page { padding: 28px 0 64px; animation: fadeIn .25s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { color: var(--muted); margin: 0; max-width: 680px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.section { margin-top: 40px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title h2 { margin: 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .container { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .7rem; letter-spacing: .02em; margin-top: -2px; }
.nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.nav a, .nav button.nav-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 8px;
  color: var(--text-2); font-weight: 550; font-size: .89rem; white-space: nowrap; background: none; border: 0; cursor: pointer;
  transition: background .15s, color .15s;
}
.nav a:hover, .nav button.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { color: var(--primary); background: var(--primary-50); }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn.menu-btn { display: none; }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s var(--ease); z-index: 50;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 8px; color: var(--text); white-space: normal; }
.dropdown-menu a:hover { background: var(--surface-2); text-decoration: none; }
.dropdown-menu a span { display: block; font-size: .78rem; color: var(--muted); font-weight: 450; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.user-chip .name { font-size: .85rem; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mobile-nav { display: none; }

/* ---------- Admin layout ---------- */
.admin-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 28px; padding-top: 28px; }
.sidebar { position: sticky; top: calc(var(--topbar-h) + 20px); align-self: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; }
.sidebar .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 8px 10px 6px; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text-2); font-weight: 550; font-size: .9rem; }
.sidebar a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.sidebar a.active { background: var(--primary-50); color: var(--primary); }
.sidebar a svg { width: 18px; height: 18px; }
.admin-layout .page { padding-top: 0; }
.admin-content { min-width: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: .9rem; cursor: pointer;
  transition: transform .12s var(--ease), background .15s, box-shadow .15s, border-color .15s, color .15s; white-space: nowrap; text-decoration: none !important;
}
.btn svg { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(29, 78, 216, .3), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover:not(:disabled) { background: var(--primary-600); box-shadow: 0 6px 18px rgba(29, 78, 216, .28); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-soft { background: var(--primary-50); color: var(--primary); }
.btn-soft:hover:not(:disabled) { background: var(--primary-100); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-sm { height: 32px; padding: 0 11px; font-size: .82rem; border-radius: 8px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 1rem; border-radius: 12px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 9px; }
.btn-icon.btn-sm { width: 30px; height: 30px; }
.btn-block { width: 100%; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; }
.card-body { padding: 22px; }
.card-link { display: block; color: inherit; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); text-decoration: none; }
.card-link h3 { color: var(--text); }

.icon-tile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.icon-tile svg { width: 22px; height: 22px; }
.tone-speaking { --tone: var(--c-speaking); --tone-bg: var(--violet-50); }
.tone-writing { --tone: var(--c-writing); --tone-bg: var(--teal-50); }
.tone-reading { --tone: var(--c-reading); --tone-bg: var(--primary-50); }
.tone-listening { --tone: var(--c-listening); --tone-bg: #fdf0f6; }
.tone-grammar { --tone: var(--c-grammar); --tone-bg: var(--amber-50); }
.tone-neutral { --tone: var(--text-2); --tone-bg: var(--surface-2); }
.icon-tile[class*="tone-"] { color: var(--tone); background: var(--tone-bg); }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 650; background: var(--surface-2); color: var(--text-2); white-space: nowrap; line-height: 1.6; }
.badge-blue { background: var(--primary-50); color: var(--primary); }
.badge-green { background: var(--success-50); color: var(--success); }
.badge-amber { background: var(--warning-50); color: var(--warning); }
.badge-red { background: var(--danger-50); color: var(--danger); }
.badge-violet { background: var(--violet-50); color: var(--violet); }
.badge-teal { background: var(--teal-50); color: var(--teal); }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); }
.level-Beginner { background: var(--success-50); color: var(--success); }
.level-Intermediate { background: var(--warning-50); color: var(--warning); }
.level-Advanced { background: var(--danger-50); color: var(--danger); }
.cefr { font-weight: 800; letter-spacing: .02em; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 550; font-size: .85rem; cursor: pointer; transition: .15s; color: var(--text-2); }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label-text { font-size: .84rem; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: .78rem; color: var(--muted); }
.field .err { font-size: .78rem; color: var(--danger); display: none; }
.field.invalid .err { display: block; }
.field.invalid .input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .1); }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface);
  transition: border-color .15s, box-shadow .15s; font-size: .92rem;
}
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select.input { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7690' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:hover { border-color: #b7c2d8; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .14); }
.input-sm { height: 34px; font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.search { position: relative; flex: 1; min-width: 200px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search .input { padding-left: 38px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar select.input { width: auto; min-width: 150px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .9rem; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 14px; border: 0; background: none; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: .9rem; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab .count { font-size: .72rem; background: var(--surface-2); color: var(--muted); padding: 0 7px; border-radius: 99px; }
.seg { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: .84rem; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs svg { width: 14px; height: 14px; }
.breadcrumbs span:last-child { color: var(--text-2); font-weight: 550; }

/* ---------- Progress ---------- */
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--tone, var(--primary)); width: 0; transition: width .8s var(--ease); }
.progress.thin { height: 5px; }
.ring { --p: 0; --size: 120px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--tone, var(--primary)) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 10px; background: var(--surface); border-radius: 50%; }
.ring > div { position: relative; text-align: center; }
.ring strong { font-size: 1.7rem; font-weight: 800; display: block; line-height: 1; }
.ring span { font-size: .75rem; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.table th { text-align: left; font-weight: 650; font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--text); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fafbfe; }
.table tr:last-child td { border-bottom: 0; }
.table .cell-user { display: flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.table .cell-user small { display: block; font-weight: 450; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.pct-bar { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.pct-bar .progress { flex: 1; height: 6px; }

/* ---------- Stats ---------- */
.stat { padding: 18px 20px; }
.stat .label { font-size: .8rem; color: var(--muted); font-weight: 550; display: flex; align-items: center; gap: 8px; }
.stat .value { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .delta { font-size: .78rem; font-weight: 600; color: var(--success); }
.stat .icon-tile { width: 36px; height: 36px; border-radius: 10px; }
.stat .icon-tile svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; background: radial-gradient(1200px 500px at 85% -10%, #dfe8ff 0, transparent 60%), radial-gradient(800px 400px at -10% 110%, #e2f5ff 0, transparent 60%), var(--surface); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 650; color: var(--primary); background: var(--primary-50); border: 1px solid var(--primary-100); padding: 5px 12px 5px 6px; border-radius: 999px; margin-bottom: 18px; }
.eyebrow b { background: var(--primary); color: #fff; padding: 1px 8px; border-radius: 99px; font-size: .7rem; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.06; letter-spacing: -.035em; margin-bottom: 18px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.15rem; color: var(--text-2); max-width: 540px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 22px; margin-top: 32px; flex-wrap: wrap; color: var(--muted); font-size: .86rem; }
.hero-trust strong { color: var(--text); font-size: 1.25rem; display: block; font-weight: 800; }
.hero-visual { position: relative; }
.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 22px; }
.hero-float { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; display: flex; gap: 10px; align-items: center; font-size: .84rem; animation: float 5s ease-in-out infinite; }
.hero-float.f1 { left: -28px; bottom: -26px; }
.hero-float.f2 { right: -18px; top: -44px; animation-delay: -2.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.band-bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; margin: 18px 0 10px; }
.band-bars div { flex: 1; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--tone), color-mix(in srgb, var(--tone) 55%, white)); position: relative; }
.band-bars div span { position: absolute; top: -20px; left: 0; right: 0; text-align: center; font-size: .75rem; font-weight: 700; color: var(--text-2); }

.feature { padding: 24px; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
.feature .icon-tile { margin-bottom: 16px; }
.feature ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .86rem; color: var(--text-2); }
.feature ul li { display: flex; gap: 8px; align-items: center; }
.feature ul li svg { width: 15px; height: 15px; color: var(--tone, var(--primary)); flex: none; }
.feature .more { margin-top: 18px; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: .88rem; color: var(--tone, var(--primary)); }
.feature .more svg { width: 16px; height: 16px; transition: transform .2s; }
.card-link:hover .more svg { transform: translateX(3px); }

.cta-band { background: linear-gradient(120deg, #0f1b3d, #1e3a8a 60%, #1d4ed8); color: #fff; border-radius: 24px; padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; font-size: 1.6rem; }
.cta-band p { color: #c7d4f5; margin: 0; }
.cta-band .btn-secondary { border-color: transparent; }

.steps { counter-reset: step; }
.step { padding: 22px; position: relative; }
.step::before { counter-increment: step; content: counter(step); width: 32px; height: 32px; border-radius: 50%; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; margin-bottom: 14px; }
.step p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Material lists ---------- */
.filters-panel { display: flex; flex-direction: column; gap: 14px; }
.item-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; height: 100%; }
.item-card h3 { margin: 0; }
.item-card p { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.item-card .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.item-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: .82rem; color: var(--muted); }
.item-card .foot .go { color: var(--primary); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.item-card .foot .go svg { width: 15px; height: 15px; }
.skill-hero { padding: 26px; display: flex; gap: 20px; align-items: center; margin-bottom: 24px; background: linear-gradient(120deg, var(--tone-bg), var(--surface) 70%); border-color: color-mix(in srgb, var(--tone) 18%, var(--border)); }
.skill-hero .icon-tile { width: 56px; height: 56px; border-radius: 16px; }
.skill-hero .icon-tile svg { width: 28px; height: 28px; }
.skill-hero p { margin: 0; color: var(--text-2); }
.skill-hero .stats { display: flex; gap: 22px; margin-left: auto; }
.skill-hero .stats div { text-align: right; }
.skill-hero .stats strong { display: block; font-size: 1.35rem; font-weight: 800; }
.skill-hero .stats span { font-size: .78rem; color: var(--muted); }

.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.vocab-list { display: grid; gap: 0; }
.vocab-item { padding: 12px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 200px 1fr; gap: 14px; font-size: .9rem; }
.vocab-item:last-child { border-bottom: 0; }
.vocab-item b { color: var(--text); }
.vocab-item i { color: var(--muted); display: block; font-size: .84rem; margin-top: 2px; }
.qlist { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.qlist li { padding-left: 4px; }
.cue-card { border: 2px dashed color-mix(in srgb, var(--c-speaking) 40%, white); background: var(--violet-50); border-radius: var(--radius); padding: 20px 22px; }
.cue-card h4 { color: var(--c-speaking); }
.cue-card ul { margin: 6px 0 0; padding-left: 20px; }
.prose { font-family: var(--font-serif); font-size: 1.04rem; line-height: 1.75; color: #1d2747; }
.prose p { margin-bottom: 1em; }
.answer-box { background: var(--surface-2); border-radius: var(--radius); padding: 18px 20px; border-left: 3px solid var(--tone, var(--primary)); }
.answer-box .prose { font-size: 1rem; }
mark.hl { background: #fff3c4; padding: 0 2px; border-radius: 3px; }
.kbd-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kbd-list span { background: var(--surface-2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 8px; font-size: .84rem; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--primary-50); color: var(--text-2); font-size: .9rem; }
.callout svg { width: 20px; height: 20px; flex: none; color: var(--primary); margin-top: 1px; }
.callout.warn { background: var(--warning-50); } .callout.warn svg { color: var(--warning); }
.callout.danger { background: var(--danger-50); } .callout.danger svg { color: var(--danger); }
.callout.success { background: var(--success-50); } .callout.success svg { color: var(--success); }
.mistake { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: .88rem; }
.mistake .bad { color: var(--danger); text-decoration: line-through; text-decoration-color: rgba(220, 38, 38, .4); }
.mistake .good { color: var(--success); font-weight: 550; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.detail-aside { position: sticky; top: calc(var(--topbar-h) + 20px); display: flex; flex-direction: column; gap: 16px; }

/* ---------- Test runner ---------- */
.test-bar { position: sticky; top: var(--topbar-h); z-index: 30; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.test-bar .container { display: flex; align-items: center; gap: 16px; height: 60px; }
.test-bar h3 { margin: 0; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 7px 12px; border-radius: 10px; background: var(--surface-2); font-size: .95rem; }
.timer svg { width: 17px; height: 17px; }
.timer.warn { background: var(--warning-50); color: var(--warning); }
.timer.danger { background: var(--danger-50); color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; height: calc(100vh - var(--topbar-h) - 60px); }
.split > div { overflow-y: auto; padding: 28px; }
.split .passage { background: var(--surface); border-right: 1px solid var(--border); }
.split .listen-side { background: var(--bg); }
@media (max-width: 1000px) { .split > div { padding: 20px 18px; } }
/* Phones only: passage/audio on top (its own scroll), questions below. Tablets keep the side-by-side layout. */
@media (max-width: 700px) {
  .split { grid-template-columns: 1fr; height: auto; }
  .split > div { overflow: visible; }
  .split .passage { border-right: 0; border-bottom: 1px solid var(--border); max-height: 50vh; overflow-y: auto; }
}
.passage h2 { font-family: var(--font-serif); font-size: 1.5rem; }
.passage .para { position: relative; }
.passage .para-label { font-family: var(--font); font-weight: 800; color: var(--primary); margin-right: 6px; }
.q-group { margin-bottom: 28px; }
.q-group-head { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; }
.q-group-head h4 { margin: 0 0 4px; }
.q-group-head p { margin: 0; font-size: .87rem; color: var(--text-2); }
.q-options-box { margin-top: 10px; font-size: .85rem; display: grid; gap: 3px; }
.q { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; transition: border-color .15s; }
.q:focus-within { border-color: var(--primary-100); }
.q-num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--text); color: #fff; font-size: .78rem; font-weight: 700; margin-right: 10px; flex: none; }
.q-prompt { display: flex; align-items: flex-start; font-weight: 550; line-height: 1.7; }
.q-prompt .gap-input { display: inline-block; width: 150px; height: 30px; margin: 0 4px; vertical-align: middle; padding: 0 8px; border: 0; border-bottom: 2px solid var(--border-strong); border-radius: 6px 6px 0 0; background: var(--surface-2); font-weight: 600; color: var(--primary); }
.q-prompt .gap-input:focus { outline: none; border-bottom-color: var(--primary); background: var(--primary-50); }
.opts { display: grid; gap: 6px; margin-top: 10px; padding-left: 36px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: .12s; font-size: .9rem; }
.opt:hover { border-color: var(--primary); background: #fafcff; }
.opt input { accent-color: var(--primary); width: 16px; height: 16px; flex: none; }
.opt:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.opt .letter { font-weight: 700; color: var(--muted); width: 18px; }
.opts.inline { grid-template-columns: repeat(3, auto); justify-content: start; }
.q select.input { width: auto; min-width: 200px; margin-left: 36px; margin-top: 8px; height: 36px; }
.q.correct { border-color: #a7e3c9; background: #f6fdf9; }
.q.incorrect { border-color: #f5b7b7; background: #fffafa; }
.q .feedback { margin-top: 10px; padding-left: 36px; font-size: .85rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.q .feedback .exp { color: var(--text-2); width: 100%; }
.opt.is-answer { border-color: var(--success); background: var(--success-50); }
.opt.is-wrong { border-color: var(--danger); background: var(--danger-50); }
.gap-input.ok { color: var(--success) !important; border-bottom-color: var(--success) !important; background: var(--success-50) !important; }
.gap-input.bad { color: var(--danger) !important; border-bottom-color: var(--danger) !important; background: var(--danger-50) !important; }
.q-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.q-nav button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 650; font-size: .8rem; cursor: pointer; transition: .12s; }
.q-nav button:hover { border-color: var(--primary); }
.q-nav button.answered { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary); }
.q-nav button.current { background: var(--text); color: #fff; border-color: var(--text); }
.q-nav button.ok { background: var(--success-50); border-color: #a7e3c9; color: var(--success); }
.q-nav button.bad { background: var(--danger-50); border-color: #f5b7b7; color: var(--danger); }
.test-footer { position: sticky; bottom: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-top: 1px solid var(--border); padding: 10px 0; z-index: 20; }
.test-footer .container { display: flex; align-items: center; gap: 12px; }

.score-hero { display: flex; gap: 28px; align-items: center; padding: 28px; flex-wrap: wrap; }
.score-hero .big { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; flex: 1; min-width: 260px; }
.kpi { background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; }
.kpi span { font-size: .76rem; color: var(--muted); font-weight: 600; display: block; }
.kpi strong { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Audio player */
.player { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--text); color: #fff; border-radius: var(--radius-lg); }
.player .play { width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--text); border: 0; display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .12s; }
.player .play:hover { transform: scale(1.05); }
.player .play svg { width: 20px; height: 20px; }
.player .track { flex: 1; min-width: 0; }
.player .track-title { font-size: .86rem; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.player .track-title span { color: #a9b6d6; font-weight: 500; font-variant-numeric: tabular-nums; }
.player .bar { height: 6px; background: rgba(255, 255, 255, .18); border-radius: 99px; overflow: hidden; cursor: pointer; }
.player .bar span { display: block; height: 100%; background: linear-gradient(90deg, #60a5fa, #f472b6); width: 0; transition: width .3s linear; }
.player select { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px; height: 32px; padding: 0 8px; font-size: .82rem; }
.player select option { color: var(--text); }
.player .btn-ghost { color: #cbd5f0; }
.player .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.player audio { width: 100%; }
.eq { display: flex; gap: 2px; align-items: flex-end; height: 18px; }
.eq i { width: 3px; background: #60a5fa; border-radius: 2px; height: 30%; }
.eq.on i { animation: eq .9s ease-in-out infinite; }
.eq.on i:nth-child(2) { animation-delay: -.3s; } .eq.on i:nth-child(3) { animation-delay: -.6s; } .eq.on i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 50% { height: 100%; } }
.transcript { font-size: .9rem; line-height: 1.7; }
.transcript p { margin: 0 0 6px; }
.transcript b { color: var(--primary); }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: inherit; transition: .15s var(--ease); position: relative; width: 100%; }
.choice-card:hover { border-color: var(--primary); }
.choice-card.selected { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.choice-card b { display: block; font-size: .95rem; }
.choice-card small { color: var(--muted); font-size: .8rem; }
.choice-card .icon-tile { width: 40px; height: 40px; border-radius: 11px; }
.choice-card .tick { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; flex: none; }
.choice-card .tick svg { width: 13px; height: 13px; }
.choice-card.selected .tick { background: var(--primary); border-color: var(--primary); color: #fff; }
.steps-bar.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.group-card { padding: 16px; border: 1.5px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.group-card.full { opacity: .6; }
.group-card.chosen { border-color: var(--success); background: var(--success-50); }
.group-card .meta { display: grid; gap: 4px; font-size: .84rem; color: var(--text-2); }
.group-card .meta span { display: flex; align-items: center; gap: 8px; }
.group-card .meta svg { width: 15px; height: 15px; color: var(--muted); }
.perm-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.perm-row:last-child { border-bottom: 0; }
.perm-row b { font-size: .9rem; display: block; }
.perm-row small { color: var(--muted); font-size: .8rem; }
.status-pending { background: var(--warning-50); color: var(--warning); }
.status-approved { background: var(--success-50); color: var(--success); }
.status-rejected { background: var(--danger-50); color: var(--danger); }
/* Welcome / gate page */
.welcome-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: calc(100vh - var(--topbar-h)); }
.welcome-hero { background: radial-gradient(900px 500px at 0% 0%, rgba(59, 130, 246, .35), transparent 60%), linear-gradient(150deg, #0b1533, #12245a 55%, #1d4ed8); color: #fff; display: flex; align-items: center; padding: 56px 48px; }
.welcome-hero-inner { max-width: 560px; margin-left: auto; }
.welcome-hero h1 { color: #fff; font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 14px; }
.welcome-hero h1 em { font-style: normal; background: linear-gradient(90deg, #93c5fd, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome-hero .lead { color: #c7d4f5; font-size: 1.1rem; margin-bottom: 28px; }
.benefits { display: grid; gap: 14px; }
.benefit { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; }
.benefit .icon-tile { background: rgba(255, 255, 255, .12); color: #bfdbfe; width: 40px; height: 40px; border-radius: 11px; }
.benefit b { color: #fff; }
.benefit p { margin: 2px 0 0; color: #a9b6d6; font-size: .88rem; }
.welcome-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.welcome-card { width: 100%; max-width: 440px; padding: 28px; box-shadow: var(--shadow); }
.seg-full { display: flex; width: 100%; }
.seg-full button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; }
.seg-full button svg { width: 16px; height: 16px; }
.mini-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.mini-steps li { display: flex; gap: 10px; align-items: center; font-size: .88rem; color: var(--text-2); }
.mini-steps span { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: .76rem; flex: none; }
.code-input { height: 56px; font-size: 1.6rem; font-weight: 800; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.code-display { font-size: 2.6rem; font-weight: 800; letter-spacing: .25em; text-align: center; padding: 18px; border-radius: 16px; background: var(--primary-50); color: var(--primary); font-variant-numeric: tabular-nums; border: 2px dashed var(--primary-100); }
.teacher-card { border: 1.5px solid var(--border); border-radius: 16px; padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.teacher-card .head { display: flex; gap: 12px; align-items: center; }
.teacher-card .avatar { width: 46px; height: 46px; font-size: .95rem; }
.teacher-card .slots { display: grid; gap: 8px; }
.slot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .86rem; }
.slot.chosen { background: var(--success-50); outline: 1.5px solid #a7e3c9; }
.slot.full { opacity: .55; }
.chip-radio { position: relative; cursor: pointer; }
.chip-radio input { position: absolute; opacity: 0; }
.chip-radio span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: .85rem; font-weight: 550; color: var(--text-2); transition: .15s; }
.chip-radio input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-radio input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Notifications */
.notif { position: relative; }
.notif [data-bell] { position: relative; }
.notif-badge { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.notif-panel { position: absolute; right: -8px; top: calc(100% + 8px); width: 360px; max-width: calc(100vw - 24px); z-index: 70; box-shadow: var(--shadow-lg); overflow: hidden; }
.notif-list { max-height: 420px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-bottom: 1px solid var(--border); color: inherit; position: relative; }
.notif-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-item.unread { background: #f6f9ff; }
.notif-item .icon-tile { width: 32px; height: 32px; border-radius: 9px; }
.notif-item .icon-tile svg { width: 16px; height: 16px; }
.notif-item .t { font-size: .86rem; font-weight: 600; }
.notif-item .s { font-size: .78rem; color: var(--muted); }
.notif-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: none; margin-top: 6px; }
@media (max-width: 640px) { .notif-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--topbar-h) + 6px); width: auto; } }
/* Attendance & announcements */
.att-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.att-row:last-child { border-bottom: 0; }
.att-btns { display: inline-flex; gap: 4px; }
.att-btns button { height: 34px; min-width: 40px; padding: 0 10px; border-radius: 9px; border: 1.5px solid var(--border-strong); background: var(--surface); font-weight: 700; font-size: .8rem; cursor: pointer; color: var(--text-2); transition: .12s; }
.att-btns button:hover { border-color: var(--text-2); }
.att-btns button.on[data-m="present"] { background: var(--success); border-color: var(--success); color: #fff; }
.att-btns button.on[data-m="late"] { background: var(--warning); border-color: var(--warning); color: #fff; }
.att-btns button.on[data-m="absent"] { background: var(--danger); border-color: var(--danger); color: #fff; }
.att-btns button.on[data-m="excused"] { background: var(--text-2); border-color: var(--text-2); color: #fff; }
.att-cell { width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; font-size: .7rem; font-weight: 800; color: #fff; }
.att-present { background: var(--success); } .att-late { background: var(--warning); } .att-absent { background: var(--danger); } .att-excused { background: #94a3b8; } .att-none { background: var(--surface-3); color: var(--muted); }
.att-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.att-dots .att-cell { width: 18px; height: 18px; border-radius: 5px; font-size: .6rem; }
.ann { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.ann:last-child { border-bottom: 0; }
.ann h4 { margin: 0 0 4px; }
.ann p { margin: 6px 0 0; white-space: pre-wrap; font-size: .9rem; color: var(--text-2); }
.ann .meta { font-size: .78rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ann.pinned { background: var(--amber-50); }
/* Payments */
.receipt { font-size: .9rem; }
.receipt-amount { font-size: 2.2rem; font-weight: 800; text-align: center; padding: 18px 0; margin: 14px 0; border-top: 2px dashed var(--border-strong); border-bottom: 2px dashed var(--border-strong); letter-spacing: -.02em; }
.receipt-table { width: 100%; border-collapse: collapse; }
.receipt-table td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.receipt-table td:first-child { color: var(--muted); width: 40%; }
@media print {
  body.printing-receipt > *:not(#modal-root):not(#shell) { display: none !important; }
  body.printing-receipt #shell .breadcrumbs, body.printing-receipt .no-print { display: none !important; }
  body.printing-receipt .modal-backdrop { position: static; background: none; backdrop-filter: none; padding: 0; display: block; }
  body.printing-receipt .modal { box-shadow: none; max-width: 100%; max-height: none; }
  body.printing-receipt .modal-head, body.printing-receipt .modal-foot { display: none; }
  body.printing-receipt:has(.modal-backdrop) #shell { display: none !important; }
}
/* Homework */
.essay { font-family: var(--font-serif); font-size: 1.04rem; line-height: 1.85; white-space: pre-wrap; color: #1d2747; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.essay.selectable { cursor: text; }
.essay.selectable::selection, .essay.selectable *::selection { background: #fde68a; }
mark.corr { background: none; padding: 0 1px; border-bottom: 2.5px solid; border-radius: 2px; color: inherit; cursor: help; }
mark.corr sup { font-family: var(--font); font-size: .62rem; font-weight: 800; margin-left: 1px; }
.corr-grammar { border-color: #dc2626 !important; background: rgba(220, 38, 38, .07) !important; } .corr-grammar sup { color: #dc2626; }
.corr-vocabulary { border-color: #7c3aed !important; background: rgba(124, 58, 237, .07) !important; } .corr-vocabulary sup { color: #7c3aed; }
.corr-spelling { border-color: #d97706 !important; background: rgba(217, 119, 6, .08) !important; } .corr-spelling sup { color: #d97706; }
.corr-punctuation { border-color: #0d9488 !important; background: rgba(13, 148, 136, .08) !important; } .corr-punctuation sup { color: #0d9488; }
.corr-coherence { border-color: #1d4ed8 !important; background: rgba(29, 78, 216, .07) !important; } .corr-coherence sup { color: #1d4ed8; }
.corr-task { border-color: #db2777 !important; background: rgba(219, 39, 119, .07) !important; } .corr-task sup { color: #db2777; }
.corr-dot { width: 10px; height: 10px; border-radius: 50%; border: 0; flex: none; margin-top: 6px; }
.corr-dot.corr-grammar { background: #dc2626 !important; } .corr-dot.corr-vocabulary { background: #7c3aed !important; } .corr-dot.corr-spelling { background: #d97706 !important; }
.corr-dot.corr-punctuation { background: #0d9488 !important; } .corr-dot.corr-coherence { background: #1d4ed8 !important; } .corr-dot.corr-task { background: #db2777 !important; }
.corr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: c; }
.corr-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); counter-increment: c; }
.corr-list li::before { content: counter(c); font-weight: 800; font-size: .74rem; color: var(--muted); min-width: 14px; margin-top: 2px; }
.corr-list li.flash { outline: 2px solid var(--primary); }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .76rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.score-pill { display: grid; place-items: center; min-width: 110px; padding: 14px 18px; border-radius: 16px; background: linear-gradient(135deg, var(--primary), #3b82f6); color: #fff; text-align: center; }
.score-pill span { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.score-pill strong { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.score-pill small { font-size: 1rem; opacity: .8; }
.steps-check { display: grid; gap: 8px; }
.step-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; font-size: .9rem; cursor: pointer; background: var(--surface); }
.step-item input { width: 18px; height: 18px; accent-color: var(--success); flex: none; }
.step-item.done span { text-decoration: line-through; color: var(--muted); }
.hw-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; color: inherit; }
.hw-card:hover { text-decoration: none; }
.hw-card .meta { font-size: .8rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 3px; }
.hw-grade { text-align: right; min-width: 90px; }
.hw-grade b { display: block; font-size: 1.05rem; }
.sel-pop { position: absolute; z-index: 60; transform: translate(-50%, -110%); }
.grade-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.grade-panel { position: sticky; top: calc(var(--topbar-h) + 16px); }
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.type-grid .choice-card { padding: 12px; }
.type-grid .choice-card small { display: none; }
.q-pick { max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.gradebook td.mark { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.gradebook td.mark a { color: inherit; display: block; border-radius: 8px; padding: 4px 2px; }
.gradebook td.mark a:hover { background: var(--surface-2); text-decoration: none; }
.recorder { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: var(--surface-2); flex-wrap: wrap; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
/* Grammar test */
.gt-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.steps-bar { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.steps-bar li { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.steps-bar li > span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; background: var(--surface-2); color: var(--muted); flex: none; }
.steps-bar li.active { border-color: var(--primary-100); background: var(--primary-50); }
.steps-bar li.active > span { background: var(--primary); color: #fff; }
.steps-bar li.done > span { background: var(--success); color: #fff; }
.steps-bar b { display: block; font-size: .9rem; }
.steps-bar small { color: var(--muted); font-size: .78rem; }
.section-no { width: 28px; height: 28px; border-radius: 8px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; }
.section-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.section-tabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 1; min-width: 96px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; font: inherit; transition: .15s; }
.section-tabs button:hover { border-color: var(--primary); }
.section-tabs button.current { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 3px rgba(29, 78, 216, .1); }
.section-tabs b { font-size: .85rem; }
.section-tabs small { font-size: .72rem; color: var(--muted); }
.section-tabs .progress { width: 100%; height: 4px; }
.level-ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ladder-step { border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; text-align: center; position: relative; background: var(--surface); }
.ladder-step .lv { font-size: 1.25rem; font-weight: 800; }
.ladder-step .nm { font-size: .72rem; color: var(--muted); display: block; margin-bottom: 8px; }
.ladder-step .sc { font-size: .8rem; font-weight: 700; margin-top: 6px; display: block; }
.ladder-step.pass { border-color: #a7e3c9; background: var(--success-50); }
.ladder-step.pass .lv { color: var(--success); }
.ladder-step.fail .lv { color: var(--muted); }
.ladder-step.current { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 3px rgba(29, 78, 216, .15); }
.ladder-step.current .lv { color: var(--primary); }
.ladder-step .tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: .66rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.review-section { margin-bottom: 18px; }
.review-section > h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

.gt-shell { max-width: 820px; margin: 0 auto; }
.gt-question { padding: 32px; }
.gt-question .topic { margin-bottom: 14px; }
.gt-question .stem { font-size: 1.3rem; font-weight: 600; line-height: 1.5; margin-bottom: 22px; }
.gt-question .stem u { text-decoration: none; display: inline-block; min-width: 80px; border-bottom: 2px solid var(--text); }
.gt-opts { display: grid; gap: 10px; }
.gt-opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; transition: .12s; font-weight: 550; background: var(--surface); text-align: left; width: 100%; }
.gt-opt:hover { border-color: var(--primary); background: #fafcff; }
.gt-opt .key { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); font-weight: 750; font-size: .85rem; color: var(--text-2); flex: none; transition: .12s; }
.gt-opt.selected { border-color: var(--primary); background: var(--primary-50); }
.gt-opt.selected .key { background: var(--primary); color: #fff; }
.level-card { padding: 18px; cursor: pointer; border: 1.5px solid var(--border); text-align: left; background: var(--surface); width: 100%; border-radius: var(--radius-lg); transition: .15s var(--ease); }
.level-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.level-card.selected { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.level-card .lv { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.level-card p { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }
.level-card .meta { margin-top: 10px; font-size: .78rem; color: var(--text-2); display: flex; gap: 10px; }

.report-head { display: flex; align-items: center; gap: 18px; padding: 24px; flex-wrap: wrap; }
.level-badge { width: 92px; height: 92px; border-radius: 22px; background: linear-gradient(135deg, var(--primary), #3b82f6); color: #fff; display: grid; place-items: center; text-align: center; flex: none; box-shadow: 0 10px 24px rgba(29, 78, 216, .3); }
.level-badge strong { font-size: 2rem; font-weight: 800; line-height: 1; display: block; }
.level-badge span { font-size: .7rem; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.topic-row { display: grid; grid-template-columns: 170px 1fr 52px; gap: 12px; align-items: center; padding: 7px 0; font-size: .88rem; }
.topic-row .progress { height: 7px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.path { display: grid; gap: 0; }
.path-step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.path-step:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.path-step .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-size: .78rem; font-weight: 800; border: 2px solid var(--primary-100); }
.path-step.done .dot { background: var(--primary); color: #fff; border-color: var(--primary); }
.path-step p { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }

/* Dashboard */
.welcome { padding: 26px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; background: linear-gradient(120deg, #0f1b3d, #1e3a8a); color: #fff; border: 0; }
.welcome h1 { color: #fff; margin: 0; font-size: 1.6rem; }
.welcome p { color: #c7d4f5; margin: 4px 0 0; }
.welcome .kpi { background: rgba(255, 255, 255, .08); }
.welcome .kpi span { color: #a9b6d6; }
.skill-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.skill-card .top { display: flex; align-items: center; justify-content: space-between; }
.skill-card .pct { font-size: 1.5rem; font-weight: 800; }
.skill-card small { color: var(--muted); }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 22px; border-bottom: 1px solid var(--border); color: inherit; transition: background .12s; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); text-decoration: none; }
.list-item .icon-tile { width: 36px; height: 36px; border-radius: 10px; }
.list-item .icon-tile svg { width: 18px; height: 18px; }
.list-item .t { font-weight: 600; font-size: .9rem; }
.list-item .s { font-size: .8rem; color: var(--muted); }
.list-item .grow { flex: 1; min-width: 0; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-top: 20px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.chart .col .b { width: 100%; max-width: 38px; border-radius: 6px 6px 3px 3px; background: var(--primary); position: relative; transition: height .6s var(--ease); min-height: 2px; }
.chart .col .b:hover { filter: brightness(1.1); }
.chart .col .b span { position: absolute; top: -19px; left: 50%; transform: translateX(-50%); font-size: .7rem; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.chart .col small { font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dist-row { display: grid; grid-template-columns: 34px 1fr 30px; gap: 10px; align-items: center; font-size: .85rem; padding: 5px 0; }

/* ---------- States ---------- */
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty .empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.empty .empty-icon svg { width: 28px; height: 28px; }
.empty h3 { color: var(--text); }
.empty p { max-width: 380px; margin: 0 auto 16px; font-size: .9rem; }
.error-state .empty-icon { background: var(--danger-50); color: var(--danger); }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, #f3f6fb 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-line { height: 12px; margin-bottom: 10px; }
.sk-title { height: 28px; width: 40%; margin-bottom: 14px; }
.sk-card { height: 170px; border-radius: var(--radius-lg); }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.dark { border-color: var(--border-strong); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.top-loader { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); z-index: 200; width: 0; transition: width .3s, opacity .3s; }

/* ---------- Modal / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 27, 61, .45); backdrop-filter: blur(3px); z-index: 90; display: grid; place-items: center; padding: 20px; animation: fadeIn2 .15s; }
@keyframes fadeIn2 { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .2s var(--ease); }
.modal.wide { max-width: 860px; }
@keyframes pop { from { transform: scale(.96) translateY(8px); opacity: 0; } }
.modal-head { padding: 20px 24px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-foot { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 20px 20px; }
.toast-root { position: fixed; bottom: 20px; right: 20px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--text); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .88rem; display: flex; gap: 10px; align-items: center; animation: pop .2s var(--ease); max-width: 360px; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.success svg { color: #34d399; } .toast.error svg { color: #f87171; }

.q-builder-row { display: grid; grid-template-columns: 130px 1fr 1fr 130px 36px; gap: 8px; align-items: start; padding: 10px; background: var(--surface-2); border-radius: 10px; margin-bottom: 8px; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 20px; text-align: center; color: var(--muted); font-size: .88rem; cursor: pointer; transition: .15s; display: block; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.dropzone svg { width: 26px; height: 26px; margin: 0 auto 8px; }
.dropzone input { display: none; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 28px 0; font-size: .85rem; color: var(--muted); }
.footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { color: var(--muted); }

.auth-wrap { min-height: calc(100vh - var(--topbar-h) - 90px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(150deg, #0f1b3d, #1e3a8a 70%, #2563eb); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; }
.auth-side h2 { color: #fff; font-size: 1.9rem; letter-spacing: -.03em; }
.auth-side p { color: #c7d4f5; }
.auth-side ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.auth-side li { display: flex; gap: 10px; align-items: center; color: #e3eaff; }
.auth-side li svg { width: 18px; height: 18px; color: #93c5fd; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form .card { width: 100%; max-width: 420px; padding: 32px; }
.demo-accounts { display: grid; gap: 8px; }
.demo-acc { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface); text-align: left; width: 100%; transition: .15s; }
.demo-acc:hover { border-color: var(--primary); background: var(--primary-50); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

@media print {
  .topbar, .footer, .sidebar, .no-print, .toast-root { display: none !important; }
  .admin-layout { display: block; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1400px) {
  .user-chip .name { display: none; }
  .user-chip { padding: 3px; }
}
@media (max-width: 1520px) {
  .nav .hide-lg { display: none; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .grade-layout { grid-template-columns: minmax(0, 1fr); }
  .grade-panel { position: static; }
  .gt-layout { grid-template-columns: minmax(0, 1fr); }
  .gt-layout > aside { position: static !important; }
  .steps-bar.steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-aside { position: static; }
  .admin-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sidebar { position: static; display: flex; gap: 4px; overflow-x: auto; padding: 6px; }
  .sidebar .label { display: none; }
  .sidebar a { white-space: nowrap; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .btn.menu-btn { display: inline-flex; }
  .mobile-nav.open { display: block; position: fixed; inset: var(--topbar-h) 0 0 0; background: var(--surface); z-index: 39; padding: 16px 24px 40px; overflow-y: auto; animation: fadeIn .2s; }
  .mobile-nav a { display: flex; align-items: center; gap: 12px; padding: 13px 10px; border-radius: 10px; color: var(--text); font-weight: 600; border-bottom: 1px solid var(--border); }
  .mobile-nav a svg { width: 20px; height: 20px; color: var(--muted); }
  .mobile-nav a.active { color: var(--primary); }
  .mobile-nav .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin: 18px 10px 4px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-wrap { grid-template-columns: 1fr; }
  .welcome-wrap { grid-template-columns: minmax(0, 1fr); }
  .welcome-hero { padding: 36px 20px; order: 2; }
  .welcome-hero-inner { margin: 0; }
  .welcome-panel { padding: 24px 16px; }
  .auth-side { display: none; }
  .skill-hero { flex-wrap: wrap; }
  .skill-hero .stats { margin-left: 0; }
  .skill-hero .stats div { text-align: left; }
  .user-chip .name { display: none; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .att-row { grid-template-columns: minmax(0, 1fr); }
  .att-btns button { min-width: 0; flex: 1; }
  .att-btns { display: flex; }
  .steps-bar, .steps-bar.steps-4 { grid-template-columns: 1fr; gap: 8px; }
  .choice-grid { grid-template-columns: minmax(0, 1fr); }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hw-card { flex-wrap: wrap; }
  .hw-grade { text-align: left; }
  .steps-bar li { padding: 10px 12px; }
  .level-ladder { grid-template-columns: repeat(5, minmax(56px, 1fr)); gap: 6px; overflow-x: auto; padding-top: 12px; }
  .ladder-step { padding: 10px 4px; }
  .ladder-step .nm { display: none; }
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 40px; }
  .hero-float { display: none; }
  .card-pad, .card-body { padding: 18px; }
  .card-head { padding: 14px 18px; }
  .cta-band { padding: 28px 22px; }
  .vocab-item { grid-template-columns: 1fr; gap: 2px; }
  .mistake { grid-template-columns: 1fr; gap: 2px; }
  .topic-row { grid-template-columns: 110px 1fr 44px; }
  .gt-question { padding: 22px; }
  .gt-question .stem { font-size: 1.1rem; }
  .opts { padding-left: 0; }
  .opts.inline { grid-template-columns: 1fr; }
  .q select.input { margin-left: 0; width: 100%; }
  .q .feedback { padding-left: 0; }
  .split > div { padding: 18px 16px; }
  .q-builder-row { grid-template-columns: 1fr; }
  .test-bar h3 { display: none; }
  .brand small { display: none; }
  .table td, .table th { padding: 11px 12px; }
  .toast-root { left: 16px; right: 16px; }
  .modal-body, .modal-head, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .page-head .actions { width: 100%; }
}
