/* Shared presentation for progress, leaderboards, written practice and school analytics. */
.education-body { --education-accent: #6d5dfc; --education-deep: #4338ca; --education-soft: #eef2ff; }
.education-main { background: radial-gradient(circle at 90% 0, rgba(139, 92, 246, .09), transparent 30%), var(--app-bg, #f4f7f9); }
.education-page { width: 100%; max-width: 1240px; margin: 0 auto; }
.education-flashes { margin-bottom: 16px; }
.education-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin: 0 0 24px; padding: clamp(26px, 4vw, 48px); color: #fff; background: linear-gradient(135deg, #312e81 0%, #6d5dfc 58%, #8b5cf6 100%); border-radius: 28px; box-shadow: 0 22px 54px rgba(67, 56, 202, .22); }
.education-hero::before, .education-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.09); }
.education-hero::before { width: 280px; height: 280px; right: -110px; top: -160px; }
.education-hero::after { width: 150px; height: 150px; left: 42%; bottom: -115px; }
.education-hero > * { position: relative; z-index: 1; }
.education-hero h1 { max-width: 760px; margin: 12px 0 8px; color: #fff; font-size: clamp(2rem, 4.5vw, 3.35rem); line-height: 1.06; letter-spacing: -.04em; }
.education-hero p { max-width: 760px; color: rgba(255,255,255,.84); line-height: 1.65; }
.education-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.education-hero-note { min-width: 190px; padding: 16px 18px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 18px; backdrop-filter: blur(10px); }
.education-hero-note strong { display: block; color: #fff; font-size: 1.05rem; }
.education-hero-note span { display: block; margin-top: 4px; color: rgba(255,255,255,.72); font-size: .78rem; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 16px; margin: 0 0 22px; }
.metric-grid article { position: relative; overflow: hidden; min-height: 132px; padding: 22px; background: var(--container-bg, #fff); border: 1px solid var(--border-color, #e5e7eb); border-radius: 20px; box-shadow: 0 14px 38px rgba(15,23,42,.07); }
.metric-grid article::after { content: ""; position: absolute; width: 70px; height: 70px; right: -24px; bottom: -28px; border-radius: 50%; background: rgba(109,93,252,.1); }
.metric-grid span, .metric-grid small { display: block; color: var(--text-secondary, #667085); }
.metric-grid span { margin-bottom: 12px; font-size: .78rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.metric-grid strong { display: block; color: var(--text-heading, #4338ca); font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.05; }
.metric-grid small { margin-top: 9px; font-size: .76rem; line-height: 1.45; }
.education-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0 0 20px; }
.panel { margin: 0 0 20px; padding: clamp(20px, 3vw, 28px); background: var(--container-bg, #fff); border: 1px solid var(--border-color, #e5e7eb); border-radius: 22px; box-shadow: 0 14px 38px rgba(15,23,42,.07); }
.education-grid .panel { margin: 0; }
.panel-heading { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 18px; }
.panel h2 { margin: 0 0 8px; color: var(--text-primary, #1f2937); font-size: 1.25rem; }
.panel p { color: var(--text-secondary, #667085); line-height: 1.65; }
.insight-list { display: grid; gap: 10px; }
.insight-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 14px; background: var(--card-bg, #f8fafc); border-radius: 12px; }
.insight-row strong { color: var(--text-primary, #1f2937); }
.insight-row span { color: var(--text-secondary, #667085); white-space: nowrap; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border-color, #e5e7eb); border-radius: 14px; }
.education-page table { width: 100%; min-width: 600px; border-collapse: collapse; }
.education-page th, .education-page td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--border-color, #e5e7eb); }
.education-page th { color: var(--text-secondary, #667085); background: var(--card-bg, #f8fafc); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.education-page tbody tr:last-child td { border-bottom: 0; }
.education-page tbody tr:hover { background: rgba(109,93,252,.04); }
.education-page a { color: var(--education-deep); }
.highlight { background: rgba(109,93,252,.1) !important; }
.pill { display: inline-flex; align-items: center; padding: 7px 11px; margin: 3px; color: #4338ca; background: #eef2ff; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.button, .education-page button, .education-auth button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 0 18px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #5b5bd6, #7c3aed); box-shadow: 0 9px 22px rgba(91,91,214,.2); text-decoration: none; font: inherit; font-weight: 800; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.button:hover, .education-page button:hover, .education-auth button:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 13px 28px rgba(91,91,214,.28); }
.button.secondary { color: #3730a3; background: #eef0ff; box-shadow: none; }
.education-hero .button.secondary { color: #fff; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1); }
.education-page form { display: grid; gap: 14px; }
.education-page label, .education-auth label { display: grid; gap: 7px; color: var(--text-primary, #1f2937); font-weight: 700; }
.education-page input, .education-page select, .education-page textarea, .education-auth input { box-sizing: border-box; width: 100%; padding: 12px 13px; border: 1px solid var(--input-border, #d1d5db); border-radius: 11px; color: var(--input-text, #111827); background: var(--input-bg, #fff); font: inherit; }
.education-page textarea { min-height: 170px; resize: vertical; line-height: 1.55; }
.education-page input:focus, .education-page textarea:focus, .education-auth input:focus { outline: 3px solid rgba(109,93,252,.15); border-color: #6d5dfc; }
.notice { padding: 14px 16px; border-radius: 12px; margin: 12px 0; line-height: 1.5; }
.notice.success { color: #166534; background: #dcfce7; }
.notice.error { color: #991b1b; background: #fee2e2; }
.notice.warning { color: #92400e; background: #fef3c7; }
.panel.notice { padding: clamp(22px, 4vw, 34px); border-left: 5px solid #f59e0b; }
.muted { color: var(--text-secondary, #667085) !important; }
.empty-state { padding: 34px 20px; color: var(--text-secondary, #667085); text-align: center; }
.empty-state-icon { display: block; margin-bottom: 12px; font-size: 2.5rem; }
.education-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 10%, rgba(255,255,255,.15), transparent 28%), linear-gradient(135deg, #312e81, #6d5dfc 58%, #8b5cf6); color: var(--text-primary); }
.education-auth-card { width: min(470px, 100%); padding: clamp(26px, 5vw, 42px); border: 1px solid rgba(255,255,255,.3); border-radius: 26px; background: var(--container-bg, #fff); box-shadow: 0 28px 70px rgba(30,27,75,.32); }
.education-auth-card.wide { width: min(780px, 100%); }
.education-auth-card h1 { margin: 14px 0 10px; color: var(--text-heading, #4338ca); font-size: clamp(1.8rem, 5vw, 2.5rem); letter-spacing: -.035em; }
.education-auth-card h2 { margin: 24px 0 10px; color: var(--text-primary, #1f2937); font-size: 1.1rem; }
.education-auth-card p, .education-auth-card li { color: var(--text-secondary, #667085); line-height: 1.65; }
.education-auth-card form { display: grid; gap: 15px; margin: 22px 0; }
.education-auth-card > a:not(.button) { display: inline-block; margin-top: 18px; color: #4f46e5; font-weight: 700; text-decoration: none; }
.auth-logo { width: 58px; height: 58px; object-fit: contain; }
.feedback-score { display: inline-flex; align-items: baseline; gap: 8px; margin: 14px 0 8px; color: #4338ca; }
.feedback-score strong { font-size: clamp(3rem, 9vw, 5rem); line-height: 1; }
.feedback-score span { font-weight: 800; }
body.dark-mode .education-main { background: radial-gradient(circle at 90% 0, rgba(139,92,246,.13), transparent 30%), #0f172a; }
body.dark-mode .pill, body.dark-mode .button.secondary { color: #c4b5fd; background: rgba(109,93,252,.18); }
body.dark-mode .education-page tbody tr:hover { background: rgba(167,139,250,.07); }
@media (max-width: 900px) { .education-main { padding-top: 72px; } .education-hero { grid-template-columns: 1fr; } .education-hero-note { width: fit-content; } .education-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .education-main { padding: 68px 14px 28px; } .education-hero { padding: 25px 22px; border-radius: 22px; } .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; } .metric-grid article { min-height: 115px; padding: 17px; } .panel { padding: 18px; border-radius: 18px; } }
@media print { .app-sidebar, .mobile-menu-fab, .actions { display: none !important; } .education-main { padding: 0 !important; background: #fff; } .education-hero { color: #111; background: #fff; box-shadow: none; border: 1px solid #ddd; } .education-hero h1, .education-hero p { color: #111; } .panel, .metric-grid article { box-shadow: none; } }

/* Public/auth routes are server-rendered dark to prevent first-paint flashes. */
html:has(body.auth-dark) { background: #0f1623; color-scheme: dark; }
body.auth-dark.education-auth { --text-primary:#e2e8f0; --text-heading:#f8fafc; --text-secondary:#aebbd0; --container-bg:#1a1f35; --input-bg:#242a45; --input-border:rgba(255,255,255,.16); --input-text:#fff; background:radial-gradient(circle at 15% 10%,rgba(102,126,234,.16),transparent 28%),linear-gradient(135deg,#0f1623,#171b31 58%,#21183b); color:#e2e8f0; }
body.auth-dark .education-auth-card { background:#1a1f35; border-color:rgba(255,255,255,.12); box-shadow:0 28px 70px rgba(0,0,0,.48); }
body.auth-dark .education-auth-card h1, body.auth-dark .education-auth-card h2, body.auth-dark .education-auth-card label { color:#f8fafc; }
body.auth-dark .education-auth-card p, body.auth-dark .education-auth-card li { color:#aebbd0; }
body.auth-dark .education-auth-card input { background:#242a45; border-color:rgba(255,255,255,.16); color:#fff; }
body.auth-dark .education-auth-card input::placeholder { color:#8190a8; }
body.auth-dark .education-auth-card > a:not(.button) { color:#c4b5fd; }
body.auth-dark .notice.success { background:rgba(52,211,153,.12); border-color:rgba(52,211,153,.35); color:#a7f3d0; }
body.auth-dark .notice.error { background:rgba(248,113,113,.12); border-color:rgba(248,113,113,.35); color:#fecaca; }
