/* ==========================================================================
   EduMate Ghana — design system (2026)
   One stylesheet for the public site, sign-in pages and the signed-in app.
   Loaded after the older stylesheets so existing pages pick up the new look.
   ========================================================================== */

:root {
  --g: #006B3F;          /* Ghana green */
  --g-d: #004D2D;
  --g-dd: #00361F;
  --g-50: #E8F4EE;
  --g-100: #CFE8DA;
  --gold: #FCD116;
  --gold-d: #D9A400;
  --gold-50: #FFF8D6;
  --red: #CE1126;
  --red-50: #FDECEE;
  --blue: #2563EB;
  --blue-50: #E9F0FE;
  --amber: #C27A00;
  --amber-50: #FFF4DE;
  --ink: #14201A;
  --ink-2: #33423A;
  --muted: #66756D;
  --line: #E3E9E6;
  --line-2: #EEF2F0;
  --bg: #F4F7F5;
  --card: #FFFFFF;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --sh-1: 0 1px 2px rgba(16, 40, 28, .06), 0 1px 1px rgba(16, 40, 28, .04);
  --sh-2: 0 6px 24px rgba(16, 40, 28, .08);
  --sh-3: 0 18px 50px rgba(16, 40, 28, .16);
  --font: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --side-w: 256px;
  --top-h: 64px;
  --font-scale: 1;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: calc(16px * var(--font-scale)); -webkit-text-size-adjust: 100%; }
body.edm {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.edm a { color: var(--g); text-decoration: none; }
body.edm a:hover { text-decoration: underline; }
body.edm img { max-width: 100%; }
body.edm h1, body.edm h2, body.edm h3, body.edm h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em; }
body.edm h1 { font-size: clamp(1.9rem, 3.2vw, 3rem); font-weight: 900; }
body.edm h2 { font-size: clamp(1.45rem, 2.2vw, 2.1rem); font-weight: 900; }
body.edm h3 { font-size: 1.15rem; font-weight: 800; }
body.edm p { margin: 0 0 1em; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 28px; height: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(0, 107, 63, .35); outline-offset: 2px; border-radius: 6px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn, body.edm .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 12px; border: 1.5px solid transparent;
  font: 800 .95rem/1 var(--font); cursor: pointer; text-decoration: none !important;
  transition: background .15s, border-color .15s, color .15s, transform .05s, box-shadow .15s;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; }
.btn-primary, body.edm .btn-primary { background: var(--g); color: #fff !important; }
.btn-primary:hover { background: var(--g-d); }
.btn-gold { background: var(--gold); color: var(--ink) !important; }
.btn-gold:hover { background: #F2C400; }
.btn-outline, body.edm .btn-outline, .btn-secondary { background: #fff; color: var(--g) !important; border-color: var(--g-100); }
.btn-outline:hover, .btn-secondary:hover { border-color: var(--g); background: var(--g-50); }
.btn-ghost { background: transparent; color: var(--ink-2) !important; }
.btn-ghost:hover { background: var(--line-2); }
.btn-light { background: #fff; color: var(--g) !important; }
.btn-light:hover { background: var(--g-50); }
.btn-on-dark { background: rgba(255,255,255,.12); color: #fff !important; border-color: rgba(255,255,255,.35); }
.btn-on-dark:hover { background: rgba(255,255,255,.2); }
.btn-danger, body.edm .btn-danger { background: var(--red); color: #fff !important; }
.btn-danger:hover { background: #A80D1F; }
.btn-success { background: #1E8E4E; color: #fff !important; }
.btn-warning { background: var(--amber); color: #fff !important; }
.btn-sm, body.edm .btn-sm { min-height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn-lg, body.edm .btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.05rem; border-radius: 14px; }
.btn-block, .btn-full { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.link { color: var(--g); font-weight: 800; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.field, .form-group { margin-bottom: 16px; }
.label, .form-label, body.edm .form-group > label { display: block; font-weight: 800; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
.input, .select, .textarea, body.edm .form-control, body.edm input[type=text].form-control {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; font: 600 1rem var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.textarea, body.edm textarea.form-control { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus, body.edm .form-control:focus {
  outline: none; border-color: var(--g); box-shadow: 0 0 0 4px rgba(0, 107, 63, .12);
}
.input::placeholder, .textarea::placeholder, .form-control::placeholder { color: #9AA8A0; font-weight: 500; }
.hint, .form-text { font-size: .82rem; color: var(--muted); margin-top: 5px; }
.field-error { font-size: .82rem; color: var(--red); margin-top: 5px; font-weight: 700; }
.row-2, .form-row, .form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--g); margin-top: 3px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #CBD5D0; border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--sh-1); }
.switch input:checked + span { background: var(--g); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ── Cards & surfaces ──────────────────────────────────────────────────── */
.card, body.edm .panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1);
}
.card-b, body.edm .panel-body { padding: 20px; }
.card-h, body.edm .panel-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
}
.card-h h3, .card-h h2, body.edm .panel-header h3, body.edm .panel-header h2 { margin: 0; font-size: 1.05rem; }
.card-f { padding: 14px 20px; border-top: 1px solid var(--line-2); }
.card.pad, body.edm .panel:not(:has(.panel-header)) { padding: 20px; }
.card-link { display: block; color: inherit !important; text-decoration: none !important; transition: box-shadow .15s, transform .15s, border-color .15s; }
.card-link:hover { box-shadow: var(--sh-2); border-color: var(--g-100); transform: translateY(-1px); }
.hero-card {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 26px;
  background: radial-gradient(120% 140% at 100% 0%, #0A8A53 0%, var(--g) 45%, var(--g-dd) 100%); color: #fff;
}
.hero-card::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(252, 209, 22, .35), transparent 65%);
}
body.edm .hero-card h1, body.edm .hero-card h2, body.edm .hero-card h3 { color: #fff; }
.hero-card .muted { color: rgba(255,255,255,.78) !important; }

/* ── Grid & spacing ────────────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted, body.edm .text-muted { color: var(--muted) !important; }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.bold { font-weight: 800; }
.center, body.edm .text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 6px !important; } .mt-2 { margin-top: 12px !important; } .mt-3 { margin-top: 18px !important; } .mt-4 { margin-top: 24px !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 6px !important; } .mb-2 { margin-bottom: 12px !important; } .mb-3 { margin-bottom: 18px !important; } .mb-4 { margin-bottom: 24px !important; }
.hide { display: none !important; }

/* ── Chips, tags, badges ───────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px;
  border-radius: 99px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2);
  font: 700 .88rem var(--font); cursor: pointer; transition: .15s;
}
.chip:hover { border-color: var(--g); color: var(--g); background: var(--g-50); }
.chip.on { background: var(--g); border-color: var(--g); color: #fff; }
.tag, body.edm .badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px;
  font: 800 .74rem/1.4 var(--font); letter-spacing: .01em; background: var(--g-50); color: var(--g-d);
}
.tag-gold, body.edm .badge-warning { background: var(--gold-50); color: #8A6A00; }
.tag-red, body.edm .badge-danger { background: var(--red-50); color: #A80D1F; }
.tag-blue, body.edm .badge-info, body.edm .badge-primary { background: var(--blue-50); color: #1D4ED8; }
.tag-grey, body.edm .badge-secondary { background: var(--line-2); color: var(--muted); }
body.edm .badge-success { background: #E3F5EA; color: #13703C; }

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stat, body.edm .stat-card, body.edm .stat-card-admin {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh-1);
  display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden;
}
.stat .ico, body.edm .stat-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--g-50); color: var(--g); font-size: 1.3rem; margin-bottom: 8px;
}
.stat .val, body.edm .stat-number, body.edm .stat-value { font-size: 1.7rem; font-weight: 900; line-height: 1.1; color: var(--ink); }
.stat .lbl, body.edm .stat-label { font-size: .85rem; color: var(--muted); font-weight: 700; }
body.edm .stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.ico-gold { background: var(--gold-50) !important; color: #9A7300 !important; }
.ico-red { background: var(--red-50) !important; color: var(--red) !important; }
.ico-blue { background: var(--blue-50) !important; color: var(--blue) !important; }
.ico-amber { background: var(--amber-50) !important; color: var(--amber) !important; }

/* ── Progress ──────────────────────────────────────────────────────────── */
.bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--g); transition: width .4s; }
.bar.gold > span { background: var(--gold-d); } .bar.red > span { background: var(--red); } .bar.blue > span { background: var(--blue); }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrap, body.edm .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table, body.edm .data-table, body.edm .info-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, body.edm .data-table th {
  text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  font-weight: 800; padding: 12px 16px; background: #FAFCFB; border-bottom: 1px solid var(--line);
}
.table td, body.edm .data-table td, body.edm .info-table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td, body.edm .data-table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover, body.edm .data-table tbody tr:hover { background: #FAFCFB; }

/* ── Alerts & empty states ─────────────────────────────────────────────── */
.alert, body.edm .alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--g-100); background: var(--g-50); color: var(--g-d); font-weight: 700; margin-bottom: 16px;
}
.alert-error, .alert-danger, body.edm .alert-error, body.edm .alert-danger { background: var(--red-50); border-color: #F7C9CF; color: #A80D1F; }
.alert-warning, body.edm .alert-warning { background: var(--amber-50); border-color: #F5D9A6; color: #8A5600; }
.alert-info, body.edm .alert-info { background: var(--blue-50); border-color: #C9D8FB; color: #1D4ED8; }
.empty, body.edm .empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ico { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; background: var(--g-50); color: var(--g); }
.empty h3 { color: var(--ink); }

/* ── Tabs & segmented ──────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 12px 14px; font-weight: 800; color: var(--muted); border: 0; background: none; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; font-family: inherit; font-size: .95rem; }
.tab.on { color: var(--g); border-bottom-color: var(--g); }
.seg { display: inline-flex; background: var(--line-2); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font: 800 .88rem var(--font); color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--g); box-shadow: var(--sh-1); }

/* ── Modal, toast, menu ────────────────────────────────────────────────── */
.modal-bg, body.edm .modal-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(10, 24, 17, .45); display: grid; place-items: center; padding: 16px;
  backdrop-filter: blur(2px); animation: edmFade .15s;
}
.modal, body.edm .modal-box {
  width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--sh-3); animation: edmPop .18s;
}
.modal-h, body.edm .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 8px; }
.modal-h h3, body.edm .modal-header h3 { margin: 0; }
.modal-b { padding: 8px 22px 18px; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 0 22px 20px; }
body.edm .modal-close { border: 0; background: var(--line-2); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 1rem; }
@keyframes edmFade { from { opacity: 0; } }
@keyframes edmPop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.toasts { position: fixed; z-index: 1100; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; box-shadow: var(--sh-3); animation: edmPop .2s; max-width: min(92vw, 520px); pointer-events: auto; }
.toast.ok { background: var(--g-d); } .toast.err { background: #A80D1F; }
.menu { position: absolute; z-index: 60; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-3); padding: 6px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--ink-2) !important; background: none; border: 0; font: 700 .92rem var(--font); cursor: pointer; text-decoration: none !important; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--line-2); }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 0; }

/* ── Loading ───────────────────────────────────────────────────────────── */
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--g-100); border-top-color: var(--g); animation: edmSpin .8s linear infinite; display: inline-block; }
.spin-sm { width: 16px; height: 16px; border-width: 2px; }
.spin-light { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes edmSpin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--line-2) 25%, #F8FAF9 50%, var(--line-2) 75%); background-size: 200% 100%; animation: edmSkel 1.2s infinite; border-radius: 10px; }
@keyframes edmSkel { to { background-position: -200% 0; } }
.loading-box { display: grid; place-items: center; padding: 60px 0; }

/* ── Avatars ───────────────────────────────────────────────────────────── */
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--g); color: #fff; font-weight: 900; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.gold { background: var(--gold); color: var(--ink); }
.avatar.lg { width: 56px; height: 56px; font-size: 1.3rem; }

/* ==========================================================================
   Signed-in app shell
   ========================================================================== */
.edm-app { min-height: 100vh; }

/* Top navigation bar (desktop) */
.edm-main { min-height: 100vh; display: flex; flex-direction: column; }
.edm-top {
  position: sticky; top: 0; z-index: 40; height: var(--top-h); display: flex; align-items: center; gap: 14px;
  padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line);
}
.edm-top.scrolled { box-shadow: 0 4px 18px rgba(16, 40, 28, .06); }
.edm-top-logo { display: flex; align-items: center; flex: none; margin-right: 6px; }
.edm-top-logo img { height: 38px; width: auto; display: block; }
.edm-topnav { display: flex; align-items: center; gap: 2px; min-width: 0; }
.edm-topnav > a, .edm-topnav .more-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border-radius: 10px; border: 0; background: none;
  color: var(--ink-2) !important; font: 800 .92rem var(--font); text-decoration: none !important; white-space: nowrap; cursor: pointer; position: relative;
}
.edm-topnav > a .i, .edm-topnav .more-btn .i { width: 18px; height: 18px; }
.edm-topnav > a:hover, .edm-topnav .more-btn:hover { background: var(--line-2); }
.edm-topnav > a.on, .edm-topnav .more-btn.on { background: var(--g-50); color: var(--g) !important; }
.edm-topnav > a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -14px; height: 3px; border-radius: 3px 3px 0 0; background: var(--g); }
.edm-topnav .new { font-size: .6rem; font-weight: 900; background: var(--gold); color: var(--ink); border-radius: 6px; padding: 1px 5px; }
.mega { left: 0; top: 50px; min-width: 520px; padding: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 4px 10px; }
.mega .mega-h { grid-column: auto; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: #93A29A; padding: 8px 12px 4px; }
.mega .col a.on { background: var(--g-50); color: var(--g) !important; }
.edm-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; color: var(--ink-2); cursor: pointer; flex: none;
}
.icon-btn:hover { border-color: var(--g-100); color: var(--g); }
.icon-btn .dot { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; line-height: 1; border-radius: 99px; background: var(--red); color: #fff; font-size: .62rem; font-weight: 900; display: grid; place-items: center; border: 2px solid #fff; }
.icon-btn.edm-burger { display: none; }
.pill-tokens {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 99px;
  background: var(--g); color: #fff !important; font-weight: 900; text-decoration: none !important; flex: none;
}
.pill-tokens:hover { background: var(--g-d); }
.pill-tokens .i { stroke: var(--gold); }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: 800 .9rem var(--font); color: var(--ink); }
.user-btn .avatar { width: 32px; height: 32px; font-size: .85rem; }
.edm-content { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px 24px 40px; }
.edm-content.wide { max-width: none; }
.edm-content.flush { padding: 0; max-width: none; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 18px 0 20px; }
.page-h h1 { font-size: 1.7rem; margin: 0; }
.page-h p { margin: 4px 0 0; color: var(--muted); }
.notif-pop { right: 0; top: 48px; width: min(360px, 92vw); }
.notif-pop .n-item { padding: 10px 12px; border-radius: 10px; }
.notif-pop .n-item + .n-item { border-top: 1px solid var(--line-2); }

/* Slide-in menu (tablets and phones) */
.edm-side {
  position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--sh-3);
}
body.side-open .edm-side { transform: none; }
.edm-scrim { display: none; }
body.side-open .edm-scrim { display: block; position: fixed; inset: 0; background: rgba(10,24,17,.4); z-index: 59; }
.edm-side-logo { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: var(--top-h); padding: 0 12px 0 18px; border-bottom: 1px solid var(--line-2); }
.edm-side-logo img { height: 36px; width: auto; }
.edm-nav { flex: 1; overflow-y: auto; padding: 12px 10px 16px; }
.edm-nav-h { font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: #93A29A; padding: 14px 12px 6px; }
.edm-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2) !important;
  font-weight: 700; font-size: .95rem; text-decoration: none !important; margin-bottom: 2px; position: relative;
}
.edm-nav a:hover { background: var(--line-2); }
.edm-nav a.on { background: var(--g-50); color: var(--g) !important; }
.edm-nav a .new { margin-left: auto; font-size: .65rem; font-weight: 900; background: var(--gold); color: var(--ink); border-radius: 6px; padding: 1px 6px; }
.edm-side-foot { padding: 12px; border-top: 1px solid var(--line-2); }
.edm-side-promo { display: block; border-radius: 14px; padding: 14px; background: linear-gradient(135deg, var(--gold-50), #fff); border: 1px solid #F4E3A0; font-size: .85rem; color: var(--ink-2) !important; }
.edm-side-promo strong { display: block; margin-bottom: 4px; }

/* Mobile bottom navigation (students) */
.edm-bottom {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: 64px; background: #fff;
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.edm-bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .7rem; font-weight: 800; color: var(--muted) !important; text-decoration: none !important; }
.edm-bottom a.on { color: var(--g) !important; }
.edm-bottom a.on .i { background: var(--g-50); border-radius: 12px; width: 44px; padding: 3px 11px; box-sizing: content-box; height: 20px; }

/* A11y popover */
.a11y-pop { right: 0; top: 48px; width: 260px; padding: 12px; }
.a11y-pop .row { justify-content: space-between; padding: 6px 4px; }

@media (max-width: 1360px) {
  .edm-topnav > a .i, .edm-topnav .more-btn .i.lead { display: none; }
  .user-btn span.nm { display: none; }
  .user-btn { padding: 4px; }
}
@media (max-width: 1100px) {
  .edm-topnav { display: none; }
  .icon-btn.edm-burger { display: grid; }
  .edm-top { padding: 0 14px; gap: 10px; }
  .edm-top-logo img { height: 32px; }
  .edm-content { padding: 6px 16px 32px; }
}
@media (max-width: 720px) {
  body.has-bottom .edm-bottom { display: flex; }
  body.has-bottom .edm-content { padding-bottom: 90px; }
  .user-btn span.nm, .hide-sm { display: none !important; }
  .edm-top-actions { gap: 6px; }
  .g-2, .g-3, .g-4, .row-2, .form-row, .form-row-2 { grid-template-columns: 1fr; }
  .page-h h1 { font-size: 1.4rem; }
  .card-b, body.edm .panel-body { padding: 16px; }
  .hero-card { padding: 20px; }
}
@media (max-width: 380px) { .edm-top-logo img { height: 28px; } .pill-tokens { padding: 0 10px; } }
@media (min-width: 721px) and (max-width: 1024px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ==========================================================================
   Public website
   ========================================================================== */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line-2); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.site-head .logo img { height: 42px; width: auto; display: block; }
.site-nav { display: flex; gap: 4px; margin-left: 12px; }
.site-nav a { padding: 8px 12px; border-radius: 10px; font-weight: 800; color: var(--ink-2) !important; text-decoration: none !important; }
.site-nav a:hover, .site-nav a.on { background: var(--g-50); color: var(--g) !important; }
.site-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.site-burger { display: none; margin-left: auto; }
.wrap { width: min(1200px, 100% - 40px); margin: 0 auto; }
.wrap-sm { width: min(820px, 100% - 40px); margin: 0 auto; }
.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.section.alt { background: #fff; }
.section.dark { background: var(--g-dd); color: #fff; }
body.edm .section.dark h2, body.edm .section.dark h3 { color: #fff; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--g); margin-bottom: 12px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 640px; }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.sec-head .lead { margin: 0 auto; }

.hero { position: relative; overflow: hidden; background: radial-gradient(110% 90% at 85% 10%, #0C8C55 0%, var(--g) 40%, var(--g-dd) 100%); color: #fff; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, #000, transparent 85%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 84px 0 96px; }
body.edm .hero h1 { color: #fff; font-size: clamp(2.2rem, 4.6vw, 3.8rem); }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { color: rgba(255,255,255,.86); }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); font-weight: 800; font-size: .85rem; margin-bottom: 18px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.hero-trust { display: flex; gap: 18px; flex-wrap: wrap; color: rgba(255,255,255,.8); font-weight: 700; font-size: .9rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust .i { stroke: var(--gold); }
.phone-mock { position: relative; justify-self: center; width: min(360px, 100%); border-radius: 36px; background: #0B1510; padding: 12px; box-shadow: 0 40px 80px rgba(0,0,0,.35); }
.phone-mock .scr { border-radius: 26px; background: #F4F7F5; overflow: hidden; }
.pm-top { background: var(--g); color: #fff; padding: 16px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.pm-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 360px; }
.pm-msg { max-width: 85%; padding: 10px 12px; border-radius: 16px; font-size: .86rem; line-height: 1.45; color: var(--ink); }
.pm-msg.me { align-self: flex-end; background: var(--g); color: #fff; border-bottom-right-radius: 4px; }
.pm-msg.ai { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.pm-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-chips span { font-size: .72rem; font-weight: 800; padding: 5px 9px; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--g); }
.float-card { position: absolute; background: #fff; color: var(--ink); border-radius: 16px; padding: 12px 14px; box-shadow: var(--sh-3); font-weight: 800; font-size: .85rem; display: flex; gap: 10px; align-items: center; }
.float-card small { display: block; color: var(--muted); font-weight: 700; }

.logos { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; align-items: center; color: var(--muted); font-weight: 900; }
.feature { padding: 26px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); height: 100%; }
.feature .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--g-50); color: var(--g); margin-bottom: 16px; }
.feature p { color: var(--muted); margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-weight: 700; }
.ticks li::before { content: ''; flex: none; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px; background: var(--g-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23006B3F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17 19 7'/%3E%3C/svg%3E") center/14px no-repeat; }
.stage-card { padding: 22px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); text-align: left; }
.stage-card .who { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.stage-card p { color: var(--muted); font-size: .92rem; margin: 0; }
.price-card { position: relative; padding: 28px; border-radius: var(--r-lg); background: #fff; border: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 10px; height: 100%; }
.price-card.pop { border-color: var(--g); box-shadow: var(--sh-2); }
.price-card .ribbon { position: absolute; top: -12px; left: 24px; background: var(--gold); color: var(--ink); font-weight: 900; font-size: .75rem; padding: 4px 10px; border-radius: 99px; }
.price-card .amt { font-size: 2.3rem; font-weight: 900; line-height: 1; }
.price-card .amt small { font-size: .95rem; color: var(--muted); font-weight: 700; }
.price-card .ticks { flex: 1; margin-top: 6px; }
.quote { padding: 26px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.quote p { font-size: 1.02rem; color: var(--ink-2); }
.cta-band { border-radius: 28px; padding: 48px; background: radial-gradient(120% 140% at 0% 0%, #0C8C55, var(--g-dd)); color: #fff; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
body.edm .cta-band h2 { color: #fff; margin: 0; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-size: 1.3rem; color: var(--g); line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--muted); }
.prose { font-size: 1.02rem; color: var(--ink-2); }
.prose h2 { margin-top: 1.8em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.page-hero { background: linear-gradient(180deg, var(--g-50), var(--bg)); padding: 64px 0 40px; }

.site-foot { background: #0B1510; color: #B7C4BD; padding: 64px 0 28px; margin-top: 0; }
.site-foot a { color: #DDE6E1 !important; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
body.edm .site-foot h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 8px 0; }
.site-foot .flag { height: 4px; display: flex; margin-bottom: 40px; border-radius: 4px; overflow: hidden; }
.site-foot .flag i { flex: 1; } .site-foot .flag i:nth-child(1) { background: var(--red); } .site-foot .flag i:nth-child(2) { background: var(--gold); } .site-foot .flag i:nth-child(3) { background: var(--g); }
.site-foot .bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid #1E2B24; margin-top: 40px; padding-top: 20px; font-size: .88rem; }
.soc { display: flex; gap: 8px; margin-top: 14px; }
.soc a { width: 38px; height: 38px; border-radius: 10px; background: #16221B; display: grid; place-items: center; }

@media (max-width: 960px) {
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 40px; }
  .hero .wrap { padding: 56px 0 64px; }
  .site-nav, .site-cta { display: none; }
  .site-burger { display: grid; }
  body.nav-open .site-nav, body.nav-open .site-cta { display: flex; }
  body.nav-open .site-head .wrap { flex-wrap: wrap; height: auto; padding: 14px 0; }
  body.nav-open .site-nav { order: 3; width: 100%; flex-direction: column; margin: 0; }
  body.nav-open .site-cta { order: 4; width: 100%; margin: 0 0 8px; }
  body.nav-open .site-cta .btn { flex: 1; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
  .section { padding: 60px 0; }
  .float-card { display: none; }
  .cta-band { padding: 30px; }
}
@media (max-width: 560px) { .site-foot .cols { grid-template-columns: 1fr; } }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.auth-side { position: relative; overflow: hidden; background: radial-gradient(120% 120% at 0% 0%, #0C8C55, var(--g-dd)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; }
.auth-side > * { position: relative; }
body.edm .auth-side h2 { color: #fff; font-size: 2rem; }
.auth-side p { color: rgba(255,255,255,.82); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: min(460px, 100%); }
.auth-box .logo img { height: 44px; margin-bottom: 24px; }
body.edm .auth-title { font-size: 1.8rem; font-weight: 900; margin-bottom: 6px; }
body.edm .auth-subtitle { color: var(--muted); margin-bottom: 24px; }
body.edm .auth-links { margin-top: 18px; text-align: center; color: var(--muted); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ==========================================================================
   Feature pages (tutor, games, plans)
   ========================================================================== */
/* Rich answers (Markdown + maths) */
.md { font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .7em; }
.md ul, .md ol { margin: 0 0 .7em; padding-left: 1.3em; }
.md li { margin: .2em 0; }
.md h1, .md h2, .md h3, .md h4 { font-size: 1.05rem; margin: .8em 0 .4em; }
.md code { background: var(--line-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.md pre { background: #0F1A14; color: #E6EDE9; padding: 12px 14px; border-radius: 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; color: inherit; }
.md table { border-collapse: collapse; margin: .6em 0; font-size: .92rem; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; }
.md blockquote { margin: .6em 0; padding: 6px 12px; border-left: 4px solid var(--gold); background: var(--gold-50); border-radius: 0 10px 10px 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.md .katex-display { overflow-x: auto; overflow-y: hidden; padding: 4px 0; }

/* Tutor */
.tutor { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - var(--top-h)); background: #fff; border-top: 1px solid var(--line); }
.tutor-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #FBFCFB; }
.tutor-list .head { padding: 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line-2); }
.conv-scroll { flex: 1; overflow-y: auto; padding: 8px; }
.conv { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; }
.conv:hover { background: var(--line-2); }
.conv.on { background: var(--g-50); }
.conv .ci { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--g); flex: none; }
.conv .ct { font-weight: 800; font-size: .9rem; }
.conv .cs { font-size: .78rem; color: var(--muted); }
.conv .cm { opacity: 0; border: 0; background: none; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 8px; }
.conv:hover .cm { opacity: 1; }
.tutor-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tutor-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); min-height: 58px; }
.session-banner { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-weight: 800; font-size: .9rem; background: var(--g-50); color: var(--g-d); }
.session-banner.practice { background: var(--blue-50); color: #1D4ED8; }
.msgs { flex: 1; overflow-y: auto; padding: 20px 16px; background: var(--bg); }
.msgs-in { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg.me { flex-direction: row-reverse; }
.bubble { max-width: min(680px, 88%); padding: 12px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-1); }
.msg.me .bubble { background: var(--g); color: #fff; border-color: var(--g); border-bottom-right-radius: 6px; }
.msg.ai .bubble { border-bottom-left-radius: 6px; }
.msg.me .md code { background: rgba(255,255,255,.18); }
.msg .tools { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.msg .tools button { border: 0; background: none; color: var(--g); font: 800 .82rem var(--font); display: inline-flex; gap: 5px; align-items: center; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.msg .tools button:hover { background: var(--g-50); }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--g); animation: edmDot 1s infinite; opacity: .4; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes edmDot { 50% { opacity: 1; transform: translateY(-3px); } }
.followups { max-width: 820px; margin: 4px auto 0; width: 100%; }
.followups .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.explore { margin-top: 10px; display: grid; gap: 6px; }
.explore button { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; font: 700 .92rem var(--font); color: var(--ink-2); cursor: pointer; display: flex; gap: 8px; align-items: center; }
.explore button:hover { border-color: var(--g); color: var(--g); }
.composer { border-top: 1px solid var(--line-2); padding: 12px 16px; background: #fff; }
.composer-in { max-width: 820px; margin: 0 auto; }
.composer .box { display: flex; align-items: flex-end; gap: 6px; border: 1.5px solid var(--line); border-radius: 16px; padding: 6px; background: #fff; }
.composer .box:focus-within { border-color: var(--g); box-shadow: 0 0 0 4px rgba(0,107,63,.1); }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; font: 600 1rem var(--font); padding: 8px 6px; max-height: 180px; min-height: 40px; line-height: 1.45; background: transparent; }
.composer .tb { width: 38px; height: 38px; border-radius: 10px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.composer .tb:hover, .composer .tb.on { background: var(--g-50); color: var(--g); }
.composer .tb.rec { background: var(--red-50); color: var(--red); animation: edmPulse 1.2s infinite; }
@keyframes edmPulse { 50% { box-shadow: 0 0 0 6px rgba(206,17,38,.12); } }
.composer .send { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--g); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.composer .send:disabled { opacity: .5; }
.preview { margin-bottom: 8px; padding: 8px 12px; border-radius: 12px; background: var(--g-50); font-size: .95rem; }
.attach { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .88rem; font-weight: 700; }
.mathpad { margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: #FBFCFB; }
.mathpad .keys { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.mathpad .keys button { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: .95rem; overflow: hidden; }
.mathpad .keys button:hover { border-color: var(--g); background: var(--g-50); }
.status-line { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); font-weight: 700; padding: 0 4px 8px; }
.tutor-empty { max-width: 640px; margin: 6vh auto 0; text-align: center; }
.mode-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; text-align: left; }
.mode-card { padding: 16px; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; font-family: inherit; text-align: left; }
.mode-card:hover { border-color: var(--g); box-shadow: var(--sh-2); }
.mode-card .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.mode-card b { display: block; font-size: 1rem; margin-bottom: 2px; color: var(--ink); }
.mode-card span { font-size: .85rem; color: var(--muted); }
.call { position: fixed; inset: 0; z-index: 900; background: radial-gradient(120% 90% at 50% 0%, #0C8C55, var(--g-dd)); color: #fff; display: flex; flex-direction: column; align-items: center; padding: 24px; }
.call .orb { width: 200px; height: 200px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 4px solid rgba(255,255,255,.25); margin: 8vh 0 24px; cursor: pointer; transition: transform .2s; }
.call .orb.listening { border-color: #FF6B7D; animation: edmBreath 1.4s infinite; }
.call .orb.speaking { border-color: var(--gold); animation: edmBreath 1s infinite; }
@keyframes edmBreath { 50% { transform: scale(1.05); } }
.call .orb .core { width: 140px; height: 140px; border-radius: 50%; background: #fff; color: var(--g); display: grid; place-items: center; }
.call .transcript { width: min(640px, 100%); max-height: 34vh; overflow-y: auto; background: rgba(255,255,255,.08); border-radius: 16px; padding: 14px 16px; margin-top: auto; }
.call .transcript .who { color: var(--gold); font-weight: 900; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.call .ctrls { display: flex; gap: 28px; margin: 24px 0 8px; }
.call .ctrls button { width: 64px; height: 64px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(255,255,255,.18); }
.call .ctrls .end { background: var(--red); }
@media (max-width: 900px) {
  .tutor { grid-template-columns: 1fr; height: calc(100vh - var(--top-h)); }
  .tutor-list { display: none; }
  .tutor.list-open .tutor-list { display: flex; position: fixed; inset: var(--top-h) 0 0 0; z-index: 30; }
  .mathpad .keys { grid-template-columns: repeat(6, 1fr); }
  .mode-cards { grid-template-columns: 1fr; }
  body.has-bottom .tutor { height: calc(100vh - var(--top-h) - 64px); }
}

/* Games */
.game-card { position: relative; border-radius: var(--r-lg); padding: 20px; background: #fff; border: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 160px; transition: .15s; font-family: inherit; text-align: left; }
.game-card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: var(--g-100); }
.game-card .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: auto; }
.game-card b { font-size: 1.1rem; }
.game-card .badge-n { position: absolute; top: 14px; right: 14px; background: var(--red); color: #fff; font-weight: 900; font-size: .75rem; border-radius: 99px; padding: 2px 8px; }
.play { max-width: 760px; margin: 0 auto; }
.play-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.play-q { font-size: 1.25rem; font-weight: 800; margin: 18px 0 20px; line-height: 1.45; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; margin-bottom: 10px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font: 700 1rem var(--font); cursor: pointer; text-align: left; color: var(--ink); }
.opt:hover:not(:disabled) { border-color: var(--g); background: var(--g-50); }
.opt .l { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--g-50); color: var(--g); font-weight: 900; flex: none; }
.opt.right { border-color: #1E8E4E; background: #E7F6EE; }
.opt.wrong { border-color: var(--red); background: var(--red-50); }
.opt.dim { opacity: .5; }
.opt:disabled { cursor: default; }
.timer-big { font-weight: 900; font-size: 1.1rem; }
.timer-big.low { color: var(--red); }
.result-hero { text-align: center; padding: 30px 20px; border-radius: var(--r-lg); color: #fff; background: radial-gradient(120% 140% at 50% 0%, #0C8C55, var(--g-dd)); }
.result-hero .score { font-size: 4rem; font-weight: 900; line-height: 1; }
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mcard { min-height: 70px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; text-align: center; font-weight: 700; cursor: pointer; margin-bottom: 10px; transition: .15s; font-family: inherit; font-size: .95rem; width: 100%; }
.mcard.sel { border-color: var(--blue); background: var(--blue-50); }
.mcard.done { border-color: #1E8E4E; background: #E7F6EE; opacity: .45; cursor: default; }
.mcard.bad { border-color: var(--red); background: var(--red-50); animation: edmShake .3s; }
@keyframes edmShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.flash { perspective: 1000px; height: 300px; cursor: pointer; }
.flash-in { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.flash.flipped .flash-in { transform: rotateY(180deg); }
.flash-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 24px; display: grid; place-items: center; padding: 24px; text-align: center; font-size: 1.5rem; font-weight: 800; border: 2px solid var(--g); background: #fff; }
.flash-face.back { transform: rotateY(180deg); background: var(--g); color: #fff; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; }
.rank-row + .rank-row { border-top: 1px solid var(--line-2); }
.rank-row.me { background: var(--g-50); }
.rank-row .rk { width: 34px; text-align: center; font-weight: 900; font-size: 1.1rem; }

/* Study plans */
.day { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 14px 16px; }
.day.today { border: 2px solid var(--g); }
.day h4 { margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.slot { padding: 10px 0; border-top: 1px dashed var(--line); }
.slot:first-of-type { border-top: 0; }
.slot .sub { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; }
.topic { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-weight: 600; }
.topic input { accent-color: var(--g); width: 18px; height: 18px; }
.topic.done span { text-decoration: line-through; color: var(--muted); }
.draft-card { border: 2px solid var(--amber); background: var(--amber-50); border-radius: var(--r); padding: 16px; }
.draft-card.changes { border-color: var(--red); background: var(--red-50); }
.editor-entry { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }

/* Legacy pages inside the new shell */
body.edm .admin-page, body.edm .page-container { max-width: none; padding: 0; }
body.edm .page-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin: 14px 0 20px; }
body.edm .page-header h1, body.edm .page-header h2 { margin: 0; font-size: 1.6rem; }
body.edm .admin-panels { display: grid; gap: 20px; }
body.edm .quick-action { border-radius: var(--r); }
body.edm .section-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 12px; }

/* Accessibility preferences */
html.high-contrast body.edm { --muted: #2D3A33; --line: #8A9A91; }
html.high-contrast body.edm a { text-decoration: underline; }
html.dyslexic-font body.edm { font-family: 'Comic Sans MS', 'OpenDyslexic', var(--font); letter-spacing: .02em; word-spacing: .08em; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .edm-side, .edm-top, .edm-bottom, .composer, .site-head, .site-foot { display: none !important; } .edm-main { margin: 0; } }

/* ==========================================================================
   Live rooms: calls, whiteboard, quiz battles, study groups, live classes
   ========================================================================== */
.stage { background: #0E1712; border-radius: var(--r-lg); padding: 10px; color: #fff; position: relative; }
.stage-top { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; font-weight: 800; font-size: .9rem; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(206,17,38,.25); animation: edmPulse 1.6s infinite; display: inline-block; }
.vgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.vgrid[data-n="1"] { grid-template-columns: minmax(0, 720px); justify-content: center; }
.vgrid[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vgrid.has-spot { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vgrid.has-spot .tile.spot { grid-column: 1 / -1; aspect-ratio: 16 / 9; max-height: 62vh; }
.tile { position: relative; aspect-ratio: 16 / 10; background: #1D2A23; border-radius: 14px; overflow: hidden; outline: 3px solid transparent; transition: outline-color .15s; }
.tile.speaking { outline-color: var(--gold); }
.tile.quiet { display: none; }
.tile video { width: 100%; height: 100%; object-fit: cover; display: none; background: #000; }
.tile.screen video, .tile.spot video { object-fit: contain; }
.tile.has-video video { display: block; }
.tile.me video { transform: scaleX(-1); }
.tile.screen.me video { transform: none; }
.tile .av { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: var(--g); display: grid; place-items: center; font-weight: 900; font-size: 1.4rem; }
.tile.has-video .av { display: none; }
.tile .nm { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 8px; font-size: .8rem; font-weight: 800; max-width: calc(100% - 16px); }
.tile .nm .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.muted .mic { color: #FF8A99; }
.cbar { display: flex; justify-content: center; gap: 10px; padding: 12px 4px 4px; flex-wrap: wrap; }
.cbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; padding: 10px 8px; border-radius: 14px; border: 0; background: rgba(255,255,255,.12); color: #fff; font: 800 .72rem var(--font); cursor: pointer; }
.cbtn:hover { background: rgba(255,255,255,.2); }
.cbtn.off { background: rgba(255,255,255,.06); color: #FF8A99; }
.cbtn.on-hand { background: var(--gold); color: var(--ink); }
.cbtn.end { background: var(--red); }
.cbtn:disabled { opacity: .35; cursor: not-allowed; }
.audio-tap { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.6); border-radius: var(--r-lg); z-index: 3; }

.board { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.board-tools { display: flex; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.board-tools .tb { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.board-tools .tb:hover, .board-tools .tb.on { background: var(--g-50); color: var(--g); }
.board-tools .sw { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.board-tools .sw.on { box-shadow: 0 0 0 2px var(--g); }
.board-tools .sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.board-tools .wsel { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font: 700 .85rem var(--font); }
.board-canvas { position: relative; }
.board-canvas canvas { width: 100%; display: block; cursor: crosshair; background: #fff; }
.board-ro { position: absolute; top: 8px; right: 8px; font-size: .75rem; font-weight: 800; color: var(--muted); background: var(--line-2); padding: 3px 8px; border-radius: 8px; }

.quiz-sheet { position: fixed; z-index: 70; right: 20px; bottom: 20px; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow: auto; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-3); border: 2px solid var(--gold); }
.qz { padding: 14px 16px 16px; }
.qz-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.qz-count { text-align: center; padding: 20px 0; }
.qz-count .n { font-size: 4rem; font-weight: 900; color: var(--g); line-height: 1.1; }
.qz-q { font-size: 1.1rem; font-weight: 800; margin: 12px 0; }
.qz-opts .opt { padding: 10px 12px; margin-bottom: 8px; font-size: .95rem; }
.opt.picked { border-color: var(--blue); background: var(--blue-50); }
.qz-rank { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; font-size: .9rem; }
.qz-rank.me { background: var(--g-50); }
.qz-rank .rk { width: 26px; text-align: center; font-weight: 900; }
.qz-final h3 { font-size: 1.4rem; }

/* Group room & class room */
.room-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0; }
.room-head .gi { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-weight: 900; font-size: 1.3rem; background: var(--g); color: #fff; flex: none; }
.room { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.room-side { position: sticky; top: calc(var(--top-h) + 12px); }
.gchat { display: flex; flex-direction: column; height: min(68vh, 720px); }
.gchat .list { flex: 1; overflow-y: auto; padding: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.gmsg { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; }
.gmsg.mine { align-self: flex-end; flex-direction: row-reverse; }
.gmsg .b { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 12px; border-bottom-left-radius: 6px; min-width: 0; }
.gmsg.mine .b { background: var(--g); color: #fff; border-color: var(--g); border-bottom-left-radius: 16px; border-bottom-right-radius: 6px; }
.gmsg .who { font-size: .75rem; font-weight: 900; color: var(--g); margin-bottom: 2px; }
.gmsg.mine .who { display: none; }
.gmsg .t { font-size: .7rem; opacity: .6; margin-top: 2px; text-align: right; }
.gmsg.ai { max-width: 94%; }
.gmsg.ai .b { background: linear-gradient(180deg, #F3FAF6, #fff); border-color: var(--g-100); }
.gmsg.ai .who { color: var(--g-d); }
.gmsg.ask .b { border-color: var(--gold); }
.gmsg.hidden .b { font-style: italic; opacity: .6; }
.gmsg .rep { border: 0; background: none; color: inherit; opacity: 0; cursor: pointer; padding: 2px; }
.gmsg:hover .rep { opacity: .5; }
.gsys { align-self: center; font-size: .78rem; font-weight: 700; color: var(--muted); background: #fff; border: 1px solid var(--line-2); border-radius: 99px; padding: 4px 12px; text-align: center; max-width: 90%; }
.gsys.t-call, .gsys.t-quiz { color: var(--ink-2); border-color: var(--gold); background: var(--gold-50); display: flex; gap: 8px; align-items: center; }
.gcomp { display: flex; gap: 6px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line-2); background: #fff; }
.gcomp textarea { flex: 1; border: 1.5px solid var(--line); border-radius: 14px; padding: 9px 12px; font: 600 .98rem var(--font); resize: none; max-height: 140px; min-height: 42px; outline: none; }
.gcomp textarea:focus { border-color: var(--g); }
.gcomp .ask-on { background: var(--gold); color: var(--ink) !important; border-color: var(--gold); }
.member { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.member .avatar { width: 32px; height: 32px; font-size: .8rem; }
.member .online { width: 9px; height: 9px; border-radius: 50%; background: #22C55E; }
.gcard .gi { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; background: var(--g); color: #fff; flex: none; }
.gcard .livepill { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 900; color: var(--red); }
.unread { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 900; display: inline-grid; place-items: center; }
.feed-item { padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.feed-item.explain { border-color: var(--g-100); background: #F6FBF8; }
.feed-item.question { border-color: var(--blue-50); background: #F7FAFF; }
.feed-item.answer { border-left: 4px solid var(--g); }
.feed-item.system { background: transparent; border: 0; text-align: center; color: var(--muted); font-size: .8rem; font-weight: 700; padding: 2px; }
.hand-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.hand-row .hand { color: #9A7300; }
@media (max-width: 1100px) {
  .room { grid-template-columns: minmax(0, 1fr); }
  .room-side { position: static; }
}
@media (max-width: 720px) {
  .gchat { height: calc(100vh - var(--top-h) - 260px); min-height: 380px; }
  .vgrid, .vgrid.has-spot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vgrid[data-n="1"] { grid-template-columns: 1fr; }
  .quiz-sheet { right: 8px; left: 8px; bottom: 76px; width: auto; }
  .cbtn { min-width: 54px; }
}

/* ══ Refinements (Sep 2026): calmer, more professional look ═════════════════
   Flat brand colours instead of glows and dot patterns, lighter headings,
   breathing room under the top bar, and one account-settings layout. */
body.edm h1 { font-weight: 800; letter-spacing: -.015em; }
body.edm h2 { font-weight: 800; }
body.edm .edm-content > h1:first-child, body.edm .edm-content .page-title { font-size: clamp(1.45rem, 2.2vw, 1.9rem); }
body.edm .admin-page > h1:first-child { font-size: clamp(1.45rem, 2.2vw, 1.9rem); }
.edm-content { padding-top: 24px; }
@media (max-width: 760px) { .edm-content { padding-top: 16px; } }

.hero-card { background: var(--g-d); background-image: linear-gradient(160deg, var(--g) 0%, var(--g-dd) 100%); }
.hero-card::after { display: none; }
.hero::before, .auth-side::before { display: none; }

/* Sign-in pages */
.auth-side { background: var(--g-dd); padding: 44px 48px 0; }
.auth-side .stripe { display: flex; height: 6px; margin: 0 -48px; }
.auth-side .stripe i { flex: 1; } .auth-side .stripe i:nth-child(1) { background: var(--red); } .auth-side .stripe i:nth-child(2) { background: var(--gold); } .auth-side .stripe i:nth-child(3) { background: #0C8C55; }
body.edm .auth-side h2 { font-size: 1.85rem; font-weight: 800; line-height: 1.25; max-width: 460px; }
.auth-side .kicker { color: var(--gold); font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.auth-demo { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 16px; max-width: 440px; margin-top: 28px; font-size: .95rem; }
.auth-demo .q, .auth-demo .a { padding: 10px 14px; border-radius: 12px; line-height: 1.5; }
.auth-demo .q { background: #fff; color: var(--ink); margin-left: 48px; font-weight: 700; }
.auth-demo .a { background: rgba(255,255,255,.1); color: #fff; margin-top: 10px; margin-right: 24px; }
.auth-demo .a b { color: var(--gold); }
.auth-demo .who { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-bottom: 4px; }
.auth-side .foot { color: rgba(255,255,255,.72); font-weight: 600; font-size: .9rem; padding: 18px 0; display: flex; gap: 10px; align-items: center; }
body.edm .auth-title { font-size: 1.65rem; font-weight: 800; }
.auth-box .logo-m { display: none; }
@media (max-width: 900px) { .auth-box .logo-m { display: block; } }
.auth-new { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: .95rem; }
.auth-new a { font-weight: 800; }

/* Account settings (students, teachers, parents) */
.acct { max-width: 1040px; margin: 0 auto; }
.acct-head { margin-bottom: 20px; }
body.edm .acct-head h1 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); margin: 0 0 4px; }
.acct-head p { color: var(--muted); margin: 0; }
.acct-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .acct-grid { grid-template-columns: minmax(0, 1fr); } }
.acct-id { text-align: center; padding: 28px 22px; position: sticky; top: 84px; }
@media (max-width: 900px) { .acct-id { position: static; } }
.acct-photo { width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 14px; overflow: hidden; background: var(--g-50); color: var(--g); display: grid; place-items: center; font-weight: 800; font-size: 2.4rem; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line); }
.acct-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-name { font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.acct-role { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.acct-meta { text-align: left; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line-2); display: grid; gap: 10px; font-size: .9rem; }
.acct-meta div { display: flex; gap: 10px; align-items: center; color: var(--ink-2); min-width: 0; }
.acct-meta svg { flex: none; color: var(--muted); }
.acct-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-sec { margin-bottom: 20px; }
.acct-sec .card-h h3 { font-size: 1.05rem; margin: 0; }
.acct-sec .card-h p { color: var(--muted); font-size: .88rem; margin: 2px 0 0; }
.acct-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.acct-fields .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .acct-fields { grid-template-columns: minmax(0, 1fr); } }
.acct-fields .hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.acct-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.acct-toggle { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.acct-toggle:last-of-type { border-bottom: 0; }
.acct-toggle b { display: block; color: var(--ink); }
.acct-toggle span.d { color: var(--muted); font-size: .88rem; }
body.edm .input:disabled, body.edm .form-control:disabled { background: var(--line-2); color: var(--muted); cursor: not-allowed; }

/* ── Plain icons instead of emoji; photo hero (Sep 2026) ─────────────────── */
.i-em { width: 1em; height: 1em; stroke-width: 1.8; }
body.edm .stat-icon .i-em { width: 22px; height: 22px; stroke-width: 2; }
body.edm .stat-icon { color: var(--g); }
body.edm .empty-icon { color: var(--g); font-size: 2.6rem; }
body.edm .achievement-icon { color: #9A7300; }
body.edm .achievement-card.locked .achievement-icon { color: var(--muted); }
body.edm .ep-stat-icon .i-em { width: 24px; height: 24px; }
body.edm .ep-badge-icon { color: #9A7300; }
body.edm .result-icon { color: var(--g); font-size: 3rem; line-height: 1; }
body.edm .ai-shortcut .sc-icon { color: var(--g); font-size: 28px; width: 48px; height: 48px; border-radius: 14px; background: var(--g-50); display: grid; place-items: center; }
body.edm .t-stat .icon { font-size: 26px; }

.edm-topnav .new, .edm-nav a .new { background: transparent; color: var(--g); border: 1px solid var(--g-100); font-size: .62rem; font-weight: 800; letter-spacing: .02em; padding: 0 5px; border-radius: 5px; text-transform: none; }
.medal { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .8rem; font-weight: 900; color: #fff; background: #B7950B; }
.medal.m2 { background: #8A949C; } .medal.m3 { background: #A0613A; }

.hero { background: var(--g-dd); background-image: linear-gradient(135deg, var(--g) 0%, var(--g-dd) 70%); }
.hero-media { position: relative; justify-self: center; width: 100%; max-width: 480px; }
.hero-media.no-photo { display: flex; justify-content: center; }
.hero-photo { margin: 0; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 5; background: rgba(255,255,255,.08); box-shadow: 0 30px 60px rgba(0,0,0,.28); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media .hero-photo + .phone-mock { position: absolute; left: -48px; bottom: -36px; width: 230px; border-radius: 28px; padding: 8px; font-size: .78rem; }
.hero-media .hero-photo + .phone-mock .scr { border-radius: 21px; }
.hero-media .hero-photo + .phone-mock .pm-chips, .hero-media .hero-photo + .phone-mock .pm-msg:last-child { display: none; }
@media (max-width: 1100px) { .hero-media .hero-photo + .phone-mock { left: -16px; } }
@media (max-width: 900px) {
  .hero-photo { aspect-ratio: 4 / 3; }
  .hero-media .hero-photo + .phone-mock { display: none; }
}
.hero-media .hero-photo + .phone-mock .pm-body { min-height: 0; padding: 10px; gap: 8px; }
.hero-media .hero-photo + .phone-mock .pm-top { padding: 10px 12px; font-size: .8rem; }
.hero-media .hero-photo + .phone-mock .pm-msg { font-size: .74rem; padding: 8px 10px; }
.hero-media .hero-photo + .phone-mock .pm-top .tag { display: none; }
body.edm .hero h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); letter-spacing: -.01em; }
body.edm .achievement-date { font-size: .78rem; margin-top: 6px; }

/* Calmer page banners on older feature pages (Sep 2026) */
body.edm .mp-hero, body.edm .career-hero, body.edm .radio-hero { background: var(--g-dd); }
body.edm .mp-hero-title, body.edm .career-hero-title, body.edm .radio-hero-title { font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 800; letter-spacing: -.01em; }
body.edm .mp-hero-icon, body.edm .career-hero-icon, body.edm .ai-hero-icon, body.edm .risk-hero-icon, body.edm .radio-icon-big { display: none; }
body.edm .ai-hero, body.edm .risk-hero { background: none; color: var(--ink); padding: 0; border-radius: 0; margin-bottom: 20px; }
body.edm .ai-hero h1, body.edm .risk-hero h1 { color: var(--ink); font-size: clamp(1.45rem, 2.2vw, 1.9rem); font-weight: 800; }
body.edm .ai-hero p, body.edm .risk-hero p { color: var(--muted); opacity: 1; }
body.edm .mp-hero .btn, body.edm .mp-hero button { box-shadow: none; }
body.edm .mp-hero-title, body.edm .career-hero-title, body.edm .radio-hero-title { color: #fff; }

/* ── Signed-in page titles: calm size everywhere ──────────────────────────── */
body.edm .edm-content h1 { font-size: clamp(1.45rem, 2.2vw, 1.9rem); line-height: 1.2; }

/* ── Teacher pages (students, reports, student report) ───────────────────── */
.tp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tp-head h1 { margin: 0 0 4px; }
.cls-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.cls-chips .chip { text-decoration: none; }
.cls-chips .chip.on { background: var(--g); border-color: var(--g); color: #fff; }
.cls-chips .n { font-size: .72rem; opacity: .7; margin-left: 2px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.kpi .k { font-size: .8rem; font-weight: 800; color: var(--muted); }
.kpi .v { font-size: 1.6rem; font-weight: 900; line-height: 1.2; margin-top: 4px; color: var(--ink); }
.kpi .v small { font-size: .9rem; color: var(--muted); font-weight: 700; }
.kpi .s { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.tp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.sbar + .sbar { margin-top: 12px; }
.sbar .bar { margin-top: 6px; }
.pct { font-weight: 800; }
.pct.good { color: #0A7A45; } .pct.mid { color: #9A6B00; } .pct.low { color: #B42318; }
.weak-list { list-style: none; margin: 0 0 10px; padding: 0; }
.weak-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.weak-list li:first-child { border-top: 0; padding-top: 0; }
.sg { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sg-h { font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.sg-h.low { color: #B42318; } .sg-h.good { color: #0A7A45; }
.sg-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: .9rem; }
.sg-row small { display: block; color: var(--muted); font-size: .76rem; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-stats div { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.mini-stats b { display: block; font-size: 1.2rem; }
.mini-stats span { font-size: .76rem; color: var(--muted); }
.plain-list { margin: 0; padding-left: 18px; font-size: .9rem; }
.plain-list li { margin: 3px 0; }
.note { border-top: 1px solid var(--line-2); padding: 10px 0; }
.note-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.note-h form { margin-left: auto; }
.note-b { font-size: .92rem; margin-top: 4px; white-space: normal; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--red); font: 700 .8rem var(--font); cursor: pointer; }
body.edm .data-table th.num, body.edm .data-table td.num { text-align: right; }
body.edm .data-table td.right { text-align: right; }
.print-only { display: none; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tp-grid2 { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .sg { grid-template-columns: 1fr; } .kpi .v { font-size: 1.35rem; } }
@media print {
  .edm-top, .edm-side, .edm-bottom, .edm-topnav, .edm-scrim, .no-print, .toast-wrap { display: none !important; }
  .print-only { display: block !important; }
  body.edm, .edm-main, .edm-content { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  .card, .kpi { box-shadow: none !important; break-inside: avoid; }
  .tp-grid2 { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
}

/* ── School admin portal (Sep 2026) ───────────────────────────────────────── */
dialog.dlg { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.25); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(10,20,15,.45); }
.dlg-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.dlg-h h3 { margin: 0; font-size: 1.05rem; }
.dlg-b { padding: 18px 20px; max-height: 70vh; overflow: auto; }
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--bg); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.fgrid .full { grid-column: 1 / -1; }
.fgrid .hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; font-weight: 700; }
.check input { width: 18px; height: 18px; accent-color: var(--g); }
.rows { border-top: 1px solid var(--line-2); }
.rows > .r { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.rows > .r:first-child { border-top: 0; }
.rows > .r small { display: block; color: var(--muted); font-size: .8rem; }
.alert-list { display: grid; gap: 8px; margin-bottom: 16px; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.alert-row .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.alert-row.red { border-color: #F7C9CF; background: #FFF6F7; } .alert-row.red .ico { background: var(--red-50); color: var(--red); }
.alert-row.gold .ico { background: var(--gold-50); color: #9A7300; }
.alert-row .grow { font-weight: 700; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.steps li:first-child { border-top: 0; }
.steps .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.steps li.done .dot { background: var(--g); border-color: var(--g); color: #fff; }
.steps li.done a { color: var(--muted); text-decoration: line-through; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 10px; }
.spark > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.spark .b { width: 100%; max-width: 26px; background: var(--g-100); border-radius: 6px 6px 2px 2px; min-height: 2px; position: relative; }
.spark .b:hover { background: var(--g); }
.spark .l { font-size: .62rem; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.plan-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-weight: 900; font-size: .82rem; background: var(--g-50); color: var(--g); }
.plan-pill.free { background: var(--line-2); color: var(--ink-2); }
.plan-pill.warn { background: var(--gold-50); color: #8A6A00; }
.bulkbar { position: sticky; bottom: 12px; z-index: 5; display: none; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: var(--g-dd); color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.bulkbar.on { display: flex; }
.bulkbar select, .bulkbar input { padding: 7px 10px; border-radius: 10px; border: 0; font: 700 .88rem var(--font); }
.data-table tr.off td { color: var(--muted); }
.data-table td .sub { display: block; font-size: .76rem; color: var(--muted); font-weight: 600; }
.person { display: flex; align-items: center; gap: 10px; }
.person .avatar { width: 34px; height: 34px; font-size: .8rem; flex: none; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan-card { border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: #fff; display: flex; flex-direction: column; }
.plan-card.on { border: 2px solid var(--g); }
.plan-card h3 { margin: 0; }
.plan-card .price { font-size: 1.7rem; font-weight: 900; margin: 6px 0 2px; }
.plan-card ul { list-style: none; padding: 0; margin: 12px 0 16px; flex: 1; }
.plan-card li { padding: 5px 0 5px 22px; position: relative; font-size: .9rem; }
.plan-card li::before { content: ''; position: absolute; left: 4px; top: 11px; width: 8px; height: 4px; border-left: 2px solid var(--g); border-bottom: 2px solid var(--g); transform: rotate(-45deg); }
.flag-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.flag-card.welfare { border-color: #F2A7B1; box-shadow: inset 4px 0 0 var(--red); }
.flag-h { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line-2); align-items: center; }
.flag-ctx { padding: 12px 16px; background: var(--bg); display: grid; gap: 6px; }
.flag-ctx .m { font-size: .88rem; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line-2); max-width: 85%; }
.flag-ctx .m.user { justify-self: end; background: var(--g-50); border-color: var(--g-100); }
.flag-ctx .m.hit { border: 2px solid var(--red); background: #FFF6F7; }
.flag-ctx .m small { display: block; color: var(--muted); font-size: .72rem; }
.flag-a { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.logo-box { width: 96px; height: 96px; border-radius: 18px; border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden; background: var(--bg); flex: none; }
.logo-box img { max-width: 100%; max-height: 100%; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .fgrid { grid-template-columns: 1fr; } .rows > .r { flex-direction: column; align-items: stretch; } }
.person .sub { display: block; font-size: .76rem; color: var(--muted); font-weight: 600; }
.tp-grid2.tp-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
@media (max-width: 900px) { .tp-grid2.tp-wide { grid-template-columns: 1fr; } }
.fgrid > * { min-width: 0; }
.fgrid input[type=file] { max-width: 100%; }
@media (max-width: 900px) { .tp-grid2, .tp-grid2.tp-wide { grid-template-columns: minmax(0, 1fr); } }
.fgrid .row > div { min-width: 0; }
.fgrid input[type=file] { width: 100%; }
