/* ═══════════════════════════════════════════════════════════════════
   ExamDibo student app — mobile-first, self-contained (no Bootstrap)
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --ed-primary: #DC2626;
    --ed-primary-light: #EF4444;
    --ed-primary-dark: #B91C1C;
    --ed-primary-rgb: 220, 38, 38;
    --ed-primary-bg: rgba(var(--ed-primary-rgb), 0.08);
    --ed-secondary: #F97316;
    --ed-premium: #F59E0B;
    --ed-success: #00A878;
    --ed-success-bg: rgba(0, 168, 120, 0.1);
    --ed-warning: #F5A300;
    --ed-warning-bg: rgba(245, 163, 0, 0.12);
    --ed-danger: #B42318;
    --ed-danger-bg: rgba(180, 35, 24, 0.08);
    --ed-bg: #F6F5F7;
    --ed-card: #FFFFFF;
    --ed-text: #1A1A2E;
    --ed-text-muted: #6B7280;
    --ed-text-light: #9CA3AF;
    --ed-border: #E5E7EB;
    --ed-surface-2: #EEF0F3;
    --ed-prose: #374151;
    --ed-shadow: 0 2px 8px rgba(26, 26, 46, 0.06);
    --ed-shadow-lg: 0 6px 20px rgba(26, 26, 46, 0.12);
    --ed-radius: 16px;
    --ed-radius-sm: 12px;
    --ed-radius-xs: 8px;
    --ed-font: -apple-system-body, ui-sans-serif, -apple-system, system-ui, 'Segoe UI', Helvetica, Arial, 'Noto Sans Bengali', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    --ed-nav-height: 64px;
    --ed-header-height: 56px;
    --ed-app-width: 480px;
}

/* ─── Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--ed-font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ed-text);
    background: #E9E9F2;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
body.ed-drawer-locked { overflow: hidden; }
a { color: var(--ed-primary); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }

.ed-app {
    position: relative;
    max-width: var(--ed-app-width);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    background: var(--ed-bg);
    padding-bottom: calc(var(--ed-nav-height) + env(safe-area-inset-bottom, 0px) + 20px);
    box-shadow: 0 0 40px rgba(26, 26, 46, 0.08);
}
.ed-no-nav .ed-app { padding-bottom: 24px; }
.ed-flush .ed-app { padding-bottom: 0; }
.ed-container { padding: 0 16px; }

/* ─── Top bars ──────────────────────────────────────────────────── */
.ed-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--ed-header-height);
    padding: 8px 12px;
    background: var(--ed-primary);
    color: #fff;
}
.ed-header-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ed-header-brand-wrap { display: flex; flex-direction: column; color: #fff; line-height: 1.15; min-width: 0; }
.ed-header-brand { font-size: 21px; font-weight: 700; letter-spacing: -0.5px; }
.ed-header-tagline { font-size: 11px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-header-actions { display: flex; align-items: center; gap: 6px; }
.ed-header-login {
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
.ed-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    color: inherit;
    font-size: 22px;
}
.ed-icon-btn:active { background: rgba(127, 127, 127, 0.15); }
.ed-header-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--ed-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}
.ed-credit-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
.ed-credit-chip i { color: #FFD666; }

.ed-page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: var(--ed-header-height);
    padding: 8px 8px;
    background: var(--ed-card);
    border-bottom: 1px solid var(--ed-border);
}
.ed-page-header h1 {
    flex: 1;
    min-width: 0;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ed-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--ed-text);
    font-size: 20px;
}
.ed-page-actions { display: flex; align-items: center; gap: 2px; }

/* ─── Drawer (toggle menu) ──────────────────────────────────────── */
.ed-drawer { position: fixed; inset: 0; z-index: 2000; visibility: hidden; }
.ed-drawer.open { visibility: visible; }
.ed-drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 15, 35, 0.5); opacity: 0; transition: opacity 0.25s; }
.ed-drawer.open .ed-drawer-backdrop { opacity: 1; }
.ed-drawer-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: max(0px, calc(50% - var(--ed-app-width) / 2));
    display: flex;
    flex-direction: column;
    width: min(82vw, 320px);
    background: var(--ed-card);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    overflow-y: auto;
}
.ed-drawer.open .ed-drawer-panel { transform: translateX(0); }
.ed-drawer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 12px 16px 16px;
    background: linear-gradient(135deg, var(--ed-primary), var(--ed-primary-light));
    color: #fff;
}
.ed-drawer-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    font-size: 20px;
    font-weight: 700;
}
.ed-drawer-user { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ed-drawer-user strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-drawer-user span { font-size: 12px; opacity: 0.9; }
.ed-drawer-plan { padding: 8px 16px; background: var(--ed-warning-bg); color: #8A5A00; font-size: 12px; font-weight: 600; }
.ed-drawer-nav { display: flex; flex-direction: column; padding: 8px 0 24px; }
.ed-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    color: var(--ed-text);
    font-size: 15px;
    font-weight: 500;
}
.ed-drawer-nav a i { width: 22px; font-size: 19px; color: var(--ed-text-muted); text-align: center; }
.ed-drawer-nav a.active { background: var(--ed-primary-bg); color: var(--ed-primary); font-weight: 600; }
.ed-drawer-nav a.active i { color: var(--ed-primary); }
.ed-drawer-nav a.ed-drawer-logout { margin-top: 8px; border-top: 1px solid var(--ed-border); color: var(--ed-danger); }
.ed-drawer-nav a.ed-drawer-logout i { color: var(--ed-danger); }

/* ─── Footer menu ───────────────────────────────────────────────── */
.ed-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 1000;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    width: 100%;
    max-width: var(--ed-app-width);
    height: calc(var(--ed-nav-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--ed-card);
    border-top: 1px solid var(--ed-border);
    box-shadow: 0 -2px 10px rgba(26, 26, 46, 0.05);
    transform: translateX(-50%);
}
.ed-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    color: var(--ed-text-muted);
    font-size: 11px;
    font-weight: 500;
}
.ed-nav-item i { font-size: 21px; }
.ed-nav-item span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-nav-item.active { color: var(--ed-primary); font-weight: 700; }

/* ─── Flash message ─────────────────────────────────────────────── */
.ed-flash {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 16px 0;
    padding: 12px 14px;
    border-radius: var(--ed-radius-sm);
    font-size: 14px;
    font-weight: 500;
}
.ed-flash i { font-size: 17px; line-height: 1.3; }
.ed-flash-success { background: var(--ed-success-bg); color: #00664A; }
.ed-flash-error { background: var(--ed-danger-bg); color: #B4232A; }

/* ─── Cards & sections ──────────────────────────────────────────── */
.ed-card {
    margin-bottom: 12px;
    padding: 16px;
    border-radius: var(--ed-radius);
    background: var(--ed-card);
    box-shadow: var(--ed-shadow);
}
.ed-card-list { padding: 0; overflow: hidden; }
.ed-section-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 10px; }
.ed-section-header h2 { font-size: 16px; font-weight: 700; }
.ed-section-header a, .ed-section-header span { font-size: 13px; font-weight: 500; color: var(--ed-primary); }
.ed-section-header span { color: var(--ed-text-muted); }
.ed-lead { padding: 14px 0 4px; font-size: 14px; color: var(--ed-text-muted); }

/* ─── Home ──────────────────────────────────────────────────────── */
.ed-greeting { padding: 16px 0 0; }
.ed-greeting h2 { font-size: 20px; font-weight: 700; }
.ed-greeting p { margin-top: 2px; font-size: 13px; color: var(--ed-text-muted); }
.ed-hero-banner {
    position: relative;
    margin: 14px 0;
    padding: 20px;
    border-radius: var(--ed-radius);
    background: linear-gradient(135deg, var(--ed-primary) 0%, var(--ed-primary-light) 100%);
    color: #fff;
    overflow: hidden;
}
.ed-hero-banner::after {
    content: '';
    position: absolute;
    right: -30px;
    bottom: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}
.ed-hero-title { position: relative; z-index: 1; font-size: 20px; font-weight: 700; line-height: 1.35; }
.ed-hero-subtitle { position: relative; z-index: 1; margin-top: 4px; font-size: 13px; opacity: 0.92; }
.ed-hero-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ed-hero-meta span { padding: 3px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.2); font-size: 12px; font-weight: 500; }

.ed-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 4px; }
.ed-stat { padding: 12px 6px; border-radius: var(--ed-radius-sm); background: var(--ed-card); box-shadow: var(--ed-shadow); text-align: center; }
.ed-stat strong { display: block; font-size: 19px; font-weight: 700; color: var(--ed-primary); }
.ed-stat span { font-size: 12px; color: var(--ed-text-muted); }

.ed-tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.ed-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 12px;
    border-radius: var(--ed-radius);
    background: var(--ed-card);
    box-shadow: var(--ed-shadow);
    color: var(--ed-text);
    text-align: center;
}
.ed-tile:active { transform: scale(0.98); }
.ed-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-bottom: 2px;
    border-radius: 15px;
    background: var(--ed-primary-bg);
    color: var(--ed-primary);
    font-size: 24px;
}
.ed-tile-title { font-size: 15px; font-weight: 600; }
.ed-tile-sub { font-size: 12px; color: var(--ed-text-muted); }
.ed-tile-wide { grid-column: 1 / -1; flex-direction: row; gap: 14px; padding: 16px; text-align: left; }
.ed-tile-wide .ed-tile-icon { margin: 0; flex-shrink: 0; border-radius: 50%; }
.ed-tile-wide .ed-tile-body { flex: 1; min-width: 0; }
.ed-tile-wide > .bi-chevron-right { color: var(--ed-text-light); }

/* ─── Rows (lists of exams, subjects, courses, posts…) ──────────── */
.ed-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ed-border);
    color: var(--ed-text);
}
.ed-row:last-child { border-bottom: none; }
.ed-row:active { background: var(--ed-bg); }
.ed-row-body { flex: 1; min-width: 0; }
.ed-row-body h3 { font-size: 15px; font-weight: 600; line-height: 1.35; }
.ed-row-body p { margin-top: 2px; font-size: 12px; color: var(--ed-text-muted); }
.ed-row-trail { flex-shrink: 0; display: flex; align-items: center; gap: 6px; color: var(--ed-text-light); font-size: 15px; }
.ed-subject-icon, .ed-row-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--ed-primary-bg);
    color: var(--ed-primary);
    font-size: 20px;
}
.ed-inst-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border: 2px solid var(--ed-border);
    border-radius: 50%;
    background: var(--ed-bg);
    color: var(--ed-primary);
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
}
.ed-inst-logo img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Badges ────────────────────────────────────────────────────── */
.ed-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 10px;
    background: var(--ed-primary-bg);
    color: var(--ed-primary);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.ed-badge-free { background: var(--ed-success-bg); color: #00805B; }
.ed-badge-premium { background: var(--ed-warning-bg); color: #9A6500; }
.ed-badge-muted { background: var(--ed-surface-2); color: var(--ed-text-muted); }
.ed-badge-danger { background: var(--ed-danger-bg); color: var(--ed-danger); }

/* ─── Tabs, search ──────────────────────────────────────────────── */
.ed-tabs { display: flex; gap: 8px; padding: 12px 0; overflow-x: auto; scrollbar-width: none; }
.ed-tabs::-webkit-scrollbar { display: none; }
.ed-tab {
    flex-shrink: 0;
    padding: 7px 16px;
    border: 1px solid var(--ed-border);
    border-radius: 20px;
    background: var(--ed-card);
    color: var(--ed-text-muted);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}
.ed-tab.active { border-color: var(--ed-primary); background: var(--ed-primary); color: #fff; }
.ed-search { position: relative; margin: 12px 0; }
.ed-search i { position: absolute; top: 50%; left: 14px; color: var(--ed-text-light); transform: translateY(-50%); }
.ed-search input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1px solid var(--ed-border);
    border-radius: var(--ed-radius-sm);
    background: var(--ed-card);
    outline: none;
}
.ed-search input:focus { border-color: var(--ed-primary); }

/* ─── Buttons ───────────────────────────────────────────────────── */
.ed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 22px;
    border: 1.5px solid transparent;
    border-radius: var(--ed-radius-sm);
    background: var(--ed-surface-2);
    color: var(--ed-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}
.ed-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ed-btn-primary { background: var(--ed-primary); color: #fff; }
.ed-btn-primary:active { background: var(--ed-primary-dark); }
.ed-btn-secondary { background: var(--ed-primary-bg); color: var(--ed-primary); }
.ed-btn-success { background: var(--ed-success); color: #fff; }
.ed-btn-gold { background: linear-gradient(135deg, var(--ed-premium), var(--ed-secondary)); color: #fff; }
.ed-btn-outline { border-color: var(--ed-primary); background: transparent; color: var(--ed-primary); }
.ed-btn-sm { padding: 6px 14px; border-radius: 8px; font-size: 12px; }
.ed-btn-lg { padding: 14px 24px; font-size: 16px; }
.ed-btn-block { display: flex; width: 100%; }
.ed-btn-row { display: flex; gap: 10px; }
.ed-btn-row .ed-btn { flex: 1; }

/* ─── Forms ─────────────────────────────────────────────────────── */
.ed-field { margin-bottom: 14px; }
.ed-field label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; }
.ed-input, .ed-field input[type=text], .ed-field input[type=tel], .ed-field input[type=email],
.ed-field input[type=password], .ed-field select, .ed-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--ed-border);
    border-radius: var(--ed-radius-sm);
    background: var(--ed-card);
    outline: none;
}
.ed-input:focus, .ed-field input:focus, .ed-field select:focus, .ed-field textarea:focus { border-color: var(--ed-primary); }
.ed-field textarea { min-height: 110px; resize: vertical; }
.ed-field small { display: block; margin-top: 4px; font-size: 12px; color: var(--ed-text-muted); }

/* ─── Choice options (onboarding, plans, payment method) ────────── */
.ed-choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin-bottom: 10px;
    padding: 14px 16px;
    border: 2px solid var(--ed-border);
    border-radius: var(--ed-radius-sm);
    background: var(--ed-card);
    color: var(--ed-text);
    text-align: left;
}
.ed-choice.selected { border-color: var(--ed-primary); background: var(--ed-primary-bg); }
.ed-choice-body { flex: 1; min-width: 0; }
.ed-choice-body strong { display: block; font-size: 15px; font-weight: 600; }
.ed-choice-body span { font-size: 12px; color: var(--ed-text-muted); }
.ed-choice-price { font-size: 18px; font-weight: 700; white-space: nowrap; }
.ed-choice-price del { display: block; font-size: 12px; font-weight: 400; color: var(--ed-text-light); text-align: right; }
.ed-choice-tag {
    position: absolute;
    top: -10px;
    left: 14px;
    padding: 1px 10px;
    border-radius: 10px;
    background: var(--ed-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
}
.ed-choice input[type=radio] { width: 18px; height: 18px; accent-color: var(--ed-primary); }

.ed-segment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ed-segment-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    border: 2px solid var(--ed-border);
    border-radius: var(--ed-radius);
    background: var(--ed-card);
    color: var(--ed-text);
    text-align: center;
}
.ed-segment-btn i { font-size: 26px; }
.ed-segment-btn strong { font-size: 15px; font-weight: 700; }
.ed-segment-btn span { font-size: 12px; color: var(--ed-text-muted); }
.ed-segment-btn.selected { border-color: var(--ed-primary); background: var(--ed-primary-bg); }
.ed-onboarding { padding: 24px 16px; }
.ed-onboarding > h2 { font-size: 22px; font-weight: 700; text-align: center; }
.ed-onboarding > p { margin: 6px 0 20px; font-size: 14px; color: var(--ed-text-muted); text-align: center; }
.ed-steps { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.ed-steps span { width: 28px; height: 4px; border-radius: 2px; background: var(--ed-border); }
.ed-steps span.done { background: var(--ed-primary); }

/* ─── Premium / subscription ────────────────────────────────────── */
.ed-premium-card {
    margin: 14px 0;
    padding: 22px 20px;
    border-radius: var(--ed-radius);
    background: linear-gradient(135deg, var(--ed-primary) 0%, var(--ed-primary-light) 100%);
    color: #fff;
    text-align: center;
}
.ed-premium-card i.ed-premium-icon { font-size: 38px; color: #FFD666; }
.ed-premium-card h2 { margin: 8px 0 6px; font-size: 20px; font-weight: 700; }
.ed-premium-card p { font-size: 13px; opacity: 0.92; }
.ed-check-list { margin: 0; padding: 0; list-style: none; }
.ed-check-list li { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: 14px; }
.ed-check-list li i { color: var(--ed-success); line-height: 1.5; }
.ed-pay-number {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px dashed var(--ed-primary);
    border-radius: var(--ed-radius-sm);
    background: var(--ed-primary-bg);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ─── Discussions ───────────────────────────────────────────────── */
.ed-post { display: block; padding: 16px; border-bottom: 6px solid var(--ed-bg); background: var(--ed-card); color: var(--ed-text); }
.ed-post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ed-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ed-primary-bg);
    color: var(--ed-primary);
    font-size: 15px;
    font-weight: 700;
}
.ed-avatar-sm { width: 30px; height: 30px; font-size: 13px; }
.ed-post-meta { flex: 1; min-width: 0; }
.ed-post-meta h4 { font-size: 14px; font-weight: 600; }
.ed-post-meta span { font-size: 12px; color: var(--ed-text-muted); }
.ed-post-title { margin-bottom: 4px; font-size: 15px; font-weight: 700; }
.ed-post-body { font-size: 14px; line-height: 1.65; color: var(--ed-prose); overflow-wrap: anywhere; }
.ed-post-actions { display: flex; gap: 20px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ed-border); }
.ed-post-action { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: none; background: none; color: var(--ed-text-muted); font-size: 13px; }
.ed-post-action.liked { color: var(--ed-danger); }
.ed-comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--ed-border); }
.ed-comment:last-child { border-bottom: none; }
.ed-comment-body { flex: 1; min-width: 0; }
.ed-comment-body strong { font-size: 13px; }
.ed-comment-body span { margin-left: 6px; font-size: 11px; color: var(--ed-text-light); }
.ed-comment-body p { margin-top: 2px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.ed-composer {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: var(--ed-app-width);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--ed-border);
    background: var(--ed-card);
    transform: translateX(-50%);
}
.ed-composer input, .ed-composer textarea {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid var(--ed-border);
    border-radius: 22px;
    background: var(--ed-bg);
    outline: none;
    resize: none;
}
.ed-composer input:focus, .ed-composer textarea:focus { border-color: var(--ed-primary); }
.ed-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--ed-primary);
    color: #fff;
    font-size: 18px;
}
.ed-send-btn:disabled { opacity: 0.5; }
.ed-has-composer { padding-bottom: 90px; }
.ed-fab {
    position: fixed;
    right: max(20px, calc(50% - var(--ed-app-width) / 2 + 20px));
    bottom: calc(var(--ed-nav-height) + env(safe-area-inset-bottom, 0px) + 18px);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background: var(--ed-primary);
    color: #fff;
    font-size: 24px;
    box-shadow: var(--ed-shadow-lg);
}

/* ─── Bottom sheet ──────────────────────────────────────────────── */
.ed-sheet { position: fixed; inset: 0; z-index: 2100; display: none; align-items: flex-end; justify-content: center; background: rgba(15, 15, 35, 0.5); }
.ed-sheet.open { display: flex; }
.ed-sheet-panel {
    width: 100%;
    max-width: var(--ed-app-width);
    max-height: 90vh;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px 20px 0 0;
    background: var(--ed-card);
    overflow-y: auto;
}
.ed-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ed-sheet-head h3 { font-size: 17px; font-weight: 700; }

/* ─── Institution / article detail ──────────────────────────────── */
.ed-inst-hero { padding: 22px 16px; background: linear-gradient(135deg, var(--ed-primary), var(--ed-primary-light)); background-size: cover; background-position: center; color: #fff; text-align: center; }
.ed-inst-hero .ed-inst-logo { width: 68px; height: 68px; margin: 0 auto 10px; border-color: var(--ed-card); background: var(--ed-card); font-size: 17px; }
.ed-inst-hero h2 { font-size: 19px; font-weight: 700; }
.ed-inst-hero p { margin-top: 2px; font-size: 13px; opacity: 0.92; }
.ed-prose { font-size: 15px; line-height: 1.8; color: var(--ed-prose); overflow-wrap: anywhere; }
.ed-prose > :first-child { margin-top: 0; }
.ed-prose > :last-child { margin-bottom: 0; }
.ed-prose p, .ed-prose ul, .ed-prose ol, .ed-prose blockquote, .ed-prose table, .ed-prose pre { margin: 0 0 12px; }
.ed-prose h2, .ed-prose h3, .ed-prose h4 { margin: 18px 0 8px; font-weight: 700; line-height: 1.4; color: var(--ed-text); }
.ed-prose h2 { font-size: 19px; }
.ed-prose h3 { font-size: 17px; }
.ed-prose h4 { font-size: 15px; }
.ed-prose ul, .ed-prose ol { padding-left: 22px; }
.ed-prose li { margin-bottom: 4px; }
.ed-prose a { text-decoration: underline; }
.ed-prose img { height: auto; border-radius: var(--ed-radius-xs); }
.ed-prose blockquote { padding: 8px 14px; border-left: 4px solid var(--ed-primary); border-radius: 0 var(--ed-radius-xs) var(--ed-radius-xs) 0; background: var(--ed-primary-bg); }
.ed-prose table { display: block; width: 100%; border-collapse: collapse; overflow-x: auto; font-size: 14px; }
.ed-prose th, .ed-prose td { padding: 7px 10px; border: 1px solid var(--ed-border); text-align: left; }
.ed-prose th { background: var(--ed-bg); font-weight: 600; }
.ed-prose pre { padding: 12px; border-radius: var(--ed-radius-xs); background: #1A1A2E; color: #F5F5FA; font-size: 13px; overflow-x: auto; }
.ed-prose hr { margin: 16px 0; border: none; border-top: 1px solid var(--ed-border); }
.ed-attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--ed-radius-sm);
    background: var(--ed-primary-bg);
    color: var(--ed-primary);
    font-size: 14px;
    font-weight: 600;
}
.ed-attachment i { font-size: 20px; }

/* ─── Exams ─────────────────────────────────────────────────────── */
.ed-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.ed-info-box { padding: 14px 8px; border-radius: var(--ed-radius-sm); background: var(--ed-card); box-shadow: var(--ed-shadow); text-align: center; }
.ed-info-box i { font-size: 22px; color: var(--ed-primary); }
.ed-info-box strong { display: block; margin-top: 2px; font-size: 18px; font-weight: 700; }
.ed-info-box span { font-size: 12px; color: var(--ed-text-muted); }
.ed-rule-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 2; color: var(--ed-prose); }
.ed-lock-card { padding: 18px 16px; border-radius: var(--ed-radius); background: var(--ed-warning-bg); text-align: center; }
.ed-lock-card i { font-size: 30px; color: #C58300; }
.ed-lock-card p { margin: 6px 0 12px; font-size: 14px; color: #6B4700; }

.ed-question { margin: 12px 16px; }
.ed-question-text { margin-bottom: 14px; font-size: 16px; font-weight: 500; line-height: 1.7; overflow-wrap: anywhere; }
.ed-question-image { display: block; margin: 0 auto 12px; border-radius: var(--ed-radius-xs); }
.ed-options { display: flex; flex-direction: column; gap: 10px; }
.ed-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1.5px solid var(--ed-border);
    border-radius: var(--ed-radius-sm);
    background: var(--ed-card);
    cursor: pointer;
}
.ed-option input { position: absolute; opacity: 0; pointer-events: none; }
.ed-option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ed-bg);
    font-size: 14px;
    font-weight: 700;
}
.ed-option-text { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.ed-option.selected { border-color: var(--ed-primary); background: var(--ed-primary-bg); }
.ed-option.selected .ed-option-letter { background: var(--ed-primary); color: #fff; }
.ed-option.correct { border-color: var(--ed-success); background: var(--ed-success-bg); cursor: default; }
.ed-option.correct .ed-option-letter { background: var(--ed-success); color: #fff; }
.ed-option.wrong { border-color: var(--ed-danger); background: var(--ed-danger-bg); cursor: default; }
.ed-option.wrong .ed-option-letter { background: var(--ed-danger); color: #fff; }
.ed-option.readonly { cursor: default; }
.ed-explanation { margin-top: 12px; padding: 10px 12px; border-radius: var(--ed-radius-xs); background: var(--ed-primary-bg); font-size: 14px; line-height: 1.7; }
.ed-explanation strong { display: block; margin-bottom: 2px; font-size: 12px; color: var(--ed-primary); }

.ed-score-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 124px;
    height: 124px;
    margin: 16px auto;
    border: 7px solid var(--ed-success);
    border-radius: 50%;
}
.ed-score-ring.fail { border-color: var(--ed-danger); }
.ed-score-ring strong { font-size: 28px; font-weight: 800; line-height: 1; }
.ed-score-ring span { font-size: 12px; color: var(--ed-text-muted); }
.ed-review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; font-weight: 600; }

/* ─── Courses ───────────────────────────────────────────────────── */
.ed-course-card { display: block; margin-bottom: 14px; border-radius: var(--ed-radius); background: var(--ed-card); box-shadow: var(--ed-shadow); color: var(--ed-text); overflow: hidden; }
.ed-course-thumb { position: relative; display: flex; align-items: center; justify-content: center; height: 150px; background: linear-gradient(135deg, rgba(var(--ed-primary-rgb), 0.14), rgba(var(--ed-primary-rgb), 0.06)); color: var(--ed-primary); font-size: 44px; }
.ed-course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ed-course-thumb .ed-badge { position: absolute; top: 10px; right: 10px; background: var(--ed-card); }
.ed-course-body { padding: 12px 14px 14px; }
.ed-course-body h3 { font-size: 15px; font-weight: 700; line-height: 1.4; }
.ed-course-body p { margin-top: 4px; font-size: 13px; color: var(--ed-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ed-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--ed-text-muted); }
.ed-progress { height: 6px; margin-top: 10px; border-radius: 3px; background: var(--ed-border); overflow: hidden; }
.ed-progress div { height: 100%; border-radius: 3px; background: var(--ed-success); }
.ed-accordion-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 14px 16px; border: none; background: none; text-align: left; }
.ed-accordion-head h3 { font-size: 14px; font-weight: 700; }
.ed-accordion-head span { font-size: 12px; color: var(--ed-text-muted); }
.ed-lesson { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--ed-border); color: var(--ed-text); font-size: 14px; }
.ed-lesson.current { background: var(--ed-primary-bg); font-weight: 600; }
.ed-lesson > i { flex-shrink: 0; font-size: 18px; color: var(--ed-primary); }
.ed-lesson.locked > i { color: var(--ed-text-light); }
.ed-lesson.done > i { color: var(--ed-success); }
.ed-lesson-body { flex: 1; min-width: 0; }
.ed-lesson-body small { display: block; font-size: 12px; font-weight: 400; color: var(--ed-text-muted); }
.ed-video { position: relative; padding-top: 56.25%; background: #000; }
.ed-video iframe, .ed-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ed-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 900;
    width: 100%;
    max-width: var(--ed-app-width);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--ed-border);
    background: var(--ed-card);
    transform: translateX(-50%);
}

/* ─── AI chat ───────────────────────────────────────────────────── */
.ed-chat { display: flex; flex-direction: column; height: calc(100dvh - var(--ed-header-height)); }
.ed-chat-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; font-size: 13px; color: var(--ed-text-muted); }
.ed-chat-messages { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 16px; overflow-y: auto; }
.ed-msg { max-width: 86%; padding: 11px 15px; border-radius: 18px; font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.ed-msg-user { align-self: flex-end; border-bottom-right-radius: 5px; background: var(--ed-primary); color: #fff; }
.ed-msg-assistant { align-self: flex-start; border: 1px solid var(--ed-border); border-bottom-left-radius: 5px; background: var(--ed-card); }
.ed-msg-error { align-self: center; max-width: 100%; border-radius: 12px; background: var(--ed-danger-bg); color: #B4232A; font-size: 13px; text-align: center; }
.ed-chat-welcome { margin: auto 0; padding: 24px 8px; text-align: center; color: var(--ed-text-muted); }
.ed-chat-welcome > i { font-size: 46px; color: var(--ed-primary); }
.ed-chat-welcome h3 { margin: 8px 0 4px; font-size: 17px; font-weight: 700; color: var(--ed-text); }
.ed-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.ed-chips button { padding: 8px 14px; border: 1.5px solid var(--ed-border); border-radius: 20px; background: var(--ed-card); color: var(--ed-primary); font-size: 13px; }
.ed-chat-input { display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--ed-border); background: var(--ed-card); }
.ed-chat-input textarea { flex: 1; max-height: 120px; padding: 11px 16px; border: 1.5px solid var(--ed-border); border-radius: 22px; background: var(--ed-bg); outline: none; resize: none; }
.ed-chat-input textarea:focus { border-color: var(--ed-primary); }
.ed-typing span { display: inline-block; width: 7px; height: 7px; margin-right: 3px; border-radius: 50%; background: var(--ed-text-light); animation: ed-blink 1.2s infinite both; }
.ed-typing span:nth-child(2) { animation-delay: 0.2s; }
.ed-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ed-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* ─── Profile ───────────────────────────────────────────────────── */
.ed-profile-head { padding: 22px 16px; text-align: center; }
.ed-profile-avatar { display: flex; align-items: center; justify-content: center; width: 74px; height: 74px; margin: 0 auto 10px; border-radius: 50%; background: var(--ed-primary); color: #fff; font-size: 30px; font-weight: 700; }
.ed-profile-head h2 { font-size: 18px; font-weight: 700; }
.ed-profile-head p { font-size: 13px; color: var(--ed-text-muted); }

/* ─── Leaderboard ───────────────────────────────────────────────── */
.ed-rank-card { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding: 16px; border-radius: var(--ed-radius); background: linear-gradient(135deg, var(--ed-primary), var(--ed-primary-light)); color: #fff; }
.ed-rank-position { display: flex; flex-direction: column; align-items: center; padding-right: 14px; border-right: 1px solid rgba(255, 255, 255, 0.3); }
.ed-rank-position span { font-size: 11px; opacity: 0.9; white-space: nowrap; }
.ed-rank-position strong { font-size: 28px; font-weight: 700; line-height: 1.2; }
.ed-rank-stats { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.ed-rank-stats strong { display: block; font-size: 17px; font-weight: 700; }
.ed-rank-stats span { font-size: 11px; opacity: 0.9; }
.ed-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: end; margin: 6px 0 14px; }
.ed-podium-slot { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.ed-podium-slot strong { max-width: 100%; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-podium-slot small { font-size: 11px; color: var(--ed-text-muted); }
.ed-podium-slot.me strong { color: var(--ed-primary); }
.ed-podium-avatar { position: relative; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 12px; border: 3px solid #C9CDD4; border-radius: 50%; background: var(--ed-card); color: var(--ed-text); font-size: 20px; font-weight: 700; }
.ed-podium-avatar span { position: absolute; bottom: -9px; left: 50%; min-width: 20px; height: 20px; border-radius: 10px; background: #C9CDD4; color: #fff; font-size: 11px; line-height: 20px; transform: translateX(-50%); }
.ed-podium-bar { display: flex; align-items: flex-start; justify-content: center; width: 100%; height: 44px; margin-top: 8px; padding-top: 8px; border-radius: 10px 10px 0 0; background: #E8EAEE; color: #A3A9B3; font-size: 16px; }
.ed-podium-1 .ed-podium-avatar { width: 64px; height: 64px; border-color: #F5B301; font-size: 24px; }
.ed-podium-1 .ed-podium-avatar span { background: #F5B301; }
.ed-podium-1 .ed-podium-bar { height: 70px; background: #FFF1C2; color: #F5B301; }
.ed-podium-3 .ed-podium-avatar { border-color: #D8915A; }
.ed-podium-3 .ed-podium-avatar span { background: #D8915A; }
.ed-podium-3 .ed-podium-bar { height: 30px; background: #F6E1D2; color: #D8915A; }
.ed-rank-number { flex-shrink: 0; width: 26px; font-size: 14px; font-weight: 700; color: var(--ed-text-muted); text-align: center; }

/* ─── Profile reports ───────────────────────────────────────────── */
.ed-report-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ed-report-head h3 { font-size: 15px; font-weight: 700; }
.ed-report-head span { font-size: 12px; color: var(--ed-text-muted); }
.ed-week-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ed-week-day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ed-week-day span { height: 16px; font-size: 11px; font-weight: 600; color: var(--ed-primary); }
.ed-week-day small { font-size: 11px; color: var(--ed-text-muted); }
.ed-week-day.today small { font-weight: 700; color: var(--ed-primary); }
.ed-week-bar { display: flex; align-items: flex-end; width: 100%; max-width: 26px; height: 70px; border-radius: 6px; background: var(--ed-bg); overflow: hidden; }
.ed-week-bar div { width: 100%; border-radius: 6px; background: var(--ed-primary); }
.ed-bar-row { margin-bottom: 12px; }
.ed-bar-row:last-child { margin-bottom: 0; }
.ed-bar-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.ed-bar-label span { font-size: 14px; font-weight: 600; }
.ed-bar-label small { flex-shrink: 0; font-size: 12px; color: var(--ed-text-muted); }
.ed-bar { height: 8px; border-radius: 4px; background: var(--ed-bg); overflow: hidden; }
.ed-bar div { height: 100%; border-radius: 4px; }
.ed-stack-bar { display: flex; height: 10px; margin-bottom: 4px; border-radius: 5px; background: var(--ed-bg); overflow: hidden; }
.ed-insight { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ed-border); font-size: 13px; }
.ed-insight p + p { margin-top: 4px; }

/* ─── Settings ──────────────────────────────────────────────────── */
.ed-settings-title { margin-bottom: 14px; font-size: 15px; font-weight: 700; }
.ed-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; }
.ed-switch-row > span { flex: 1; min-width: 0; }
.ed-switch-row strong { display: block; font-size: 14px; font-weight: 600; }
.ed-switch-row small { display: block; font-size: 12px; color: var(--ed-text-muted); }
.ed-switch { position: relative; flex-shrink: 0; width: 46px; height: 26px; margin: 0; border-radius: 13px; background: #CBD0D8; appearance: none; -webkit-appearance: none; cursor: pointer; transition: background 0.2s; }
.ed-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ed-card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.ed-switch:checked { background: var(--ed-primary); }
.ed-switch:checked::after { transform: translateX(20px); }

/* ─── Birthday greeting ─────────────────────────────────────────── */
.ed-birthday { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 16px; border-radius: var(--ed-radius); background: linear-gradient(135deg, #FF7EB3, #FF758C 55%, #FFB26B); color: #fff; }
.ed-birthday > span { font-size: 34px; line-height: 1; }
.ed-birthday p { font-size: 14px; font-weight: 500; line-height: 1.55; }

/* ─── Empty state ───────────────────────────────────────────────── */
.ed-empty { padding: 44px 20px; text-align: center; color: var(--ed-text-muted); }
.ed-empty > i { font-size: 46px; opacity: 0.4; }
.ed-empty h3 { margin: 10px 0 4px; font-size: 16px; font-weight: 600; color: var(--ed-text); }
.ed-empty p { font-size: 13px; }

/* ─── Shell extras (language, side menu, admin view) ────────────── */
.ed-narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.ed-impersonation { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; padding: 7px 12px; background: #1A1A2E; color: #fff; font-size: 13px; }
.ed-impersonation a { padding: 2px 14px; border-radius: 12px; background: #FFB800; color: #1A1A2E; font-weight: 700; }
.ed-lang-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border: 1.5px solid var(--ed-border); border-radius: 20px; background: var(--ed-card); color: var(--ed-text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ed-lang-btn-light { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.14); color: #fff; }
.ed-drawer-brand { display: none; }
.ed-drawer-close { flex-shrink: 0; color: #fff; }
.ed-drawer-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ed-border); }
.ed-drawer-foot a.ed-drawer-logout { margin-top: 0; border-top: none; }
.ed-drawer-lang { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 20px; border: none; background: none; color: var(--ed-text); font-size: 15px; font-weight: 500; text-align: left; }
.ed-drawer-lang i { width: 22px; font-size: 19px; color: var(--ed-text-muted); text-align: center; }
@media (max-width: 420px) {
    .ed-header .ed-lang-btn span { display: none; }
    .ed-header .ed-lang-btn { padding: 7px 9px; }
}

/* Shop, blog and CMS pages rendered inside the app shell (Bootstrap content). */
body.ed-store { padding: 0 !important; }
.ed-store-content { padding: 12px 0 24px; overflow-wrap: anywhere; }
.ed-store-content h1, .ed-store-content h2, .ed-store-content h3, .ed-store-content h4 { margin-bottom: 0.5rem; }
.ed-store-content p { margin-bottom: 1rem; }
.ed-store-content img { height: auto; }

.ed-popup { text-align: center; }
.ed-popup-icon { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin: 4px auto 12px; border-radius: 50%; background: var(--ed-primary-bg); color: var(--ed-primary); font-size: 28px; }
.ed-popup h3 { font-size: 18px; font-weight: 700; line-height: 1.4; }
.ed-popup p { margin: 8px 0 0; font-size: 14px; line-height: 1.7; color: var(--ed-text-muted); }
.ed-popup .ed-btn-row { margin-top: 18px; }

/* ─── AI teacher extras ─────────────────────────────────────────── */
.ed-chat-link { display: inline-flex; align-items: center; gap: 6px; margin: 6px 4px 0 0; padding: 5px 12px; border-radius: 16px; background: var(--ed-primary-bg); color: var(--ed-primary); font-size: 13px; font-weight: 600; white-space: normal; }
.ed-msg-image { display: block; max-width: 220px; max-height: 220px; margin-bottom: 6px; border-radius: 12px; }
.ed-msg-file { display: flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; margin-bottom: 6px; padding: 4px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.2); color: inherit; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.ed-msg-assistant .ed-msg-file { background: var(--ed-bg); }
.ed-attach-btn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border: none; border-radius: 50%; background: var(--ed-bg); color: var(--ed-text-muted); font-size: 20px; }
.ed-chat-attached { display: flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--ed-primary-bg); color: var(--ed-primary); font-size: 13px; }
.ed-chat-attached span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-chat-attached button { border: none; background: none; color: inherit; }
.ed-ai-promo { display: flex; align-items: center; gap: 14px; margin: 14px 0; padding: 16px; border-radius: var(--ed-radius); background: linear-gradient(135deg, #1A1A2E, var(--ed-primary-dark)); color: #fff; }
.ed-ai-promo > i:first-child { font-size: 30px; color: #FFD666; }
.ed-ai-promo div { flex: 1; min-width: 0; }
.ed-ai-promo strong { display: block; font-size: 15px; }
.ed-ai-promo span { font-size: 12px; opacity: 0.85; }

/* ─── Landing (visitors) ────────────────────────────────────────── */
.ed-landing .ed-app { max-width: none; padding-bottom: 0; background: var(--ed-card); box-shadow: none; }
.ed-lp { --ed-lp-gutter: 20px; overflow-x: clip; }
.ed-lp-nav { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--ed-lp-gutter); border-bottom: 1px solid var(--ed-border); background: color-mix(in srgb, var(--ed-card) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ed-lp-brand { font-family: var(--ed-font); font-size: 22px; font-weight: 800; letter-spacing: -0.6px; color: var(--ed-primary); }
.ed-lp-links { display: none; gap: 28px; }
.ed-lp-links a { color: var(--ed-text); font-size: 15px; font-weight: 500; }
.ed-lp-links a:hover { color: var(--ed-primary); }
.ed-lp-nav-actions { display: flex; align-items: center; gap: 8px; }
.ed-lp-login { padding: 6px 8px; font-size: 14px; font-weight: 600; }
.ed-lp-signup { display: none; }

.ed-lp-hero { display: grid; gap: 36px; padding: 36px var(--ed-lp-gutter) 28px; background: radial-gradient(900px 420px at 85% 0%, rgba(108, 92, 231, 0.16), transparent 70%), radial-gradient(700px 380px at 0% 30%, rgba(var(--ed-primary-rgb), 0.05), transparent 70%); }
.ed-lp-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; background: var(--ed-primary-bg); color: var(--ed-primary); font-size: 13px; font-weight: 600; }
.ed-lp-hero h1 { margin: 16px 0 12px; font-size: 36px; font-weight: 700; line-height: 1.25; letter-spacing: -0.5px; }
.ed-lp-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--ed-primary), #FF6B35); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ed-lp-hero-text > p { max-width: 560px; font-size: 16px; line-height: 1.75; color: var(--ed-text-muted); }
.ed-lp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 18px; }
.ed-lp-ghost { border-color: var(--ed-border); background: var(--ed-card); color: var(--ed-text); }
.ed-lp-trust { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.ed-lp-trust i { margin-right: 6px; color: var(--ed-success); }

.ed-lp-hero-art { position: relative; display: flex; justify-content: center; padding: 10px 0 20px; }
.ed-lp-phone { width: 250px; border: 8px solid #1A1A2E; border-radius: 36px; background: var(--ed-bg); box-shadow: 0 30px 60px rgba(var(--ed-primary-rgb), 0.28); overflow: hidden; transform: rotate(-3deg); }
.ed-lp-phone-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--ed-primary); color: #fff; font-weight: 700; }
.ed-lp-phone-body { display: grid; gap: 10px; padding: 12px; }
.ed-lp-phone-hello { font-size: 14px; font-weight: 700; }
.ed-lp-phone-banner { padding: 14px; border-radius: 14px; background: linear-gradient(135deg, var(--ed-primary), var(--ed-primary-light)); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.4; }
.ed-lp-phone-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ed-lp-phone-stats div { padding: 8px 2px; border-radius: 10px; background: var(--ed-card); color: var(--ed-text-muted); font-size: 10px; text-align: center; }
.ed-lp-phone-stats b { display: block; font-size: 14px; color: var(--ed-primary); }
.ed-lp-phone-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ed-lp-phone-tiles div { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: 12px; background: var(--ed-card); font-size: 11px; font-weight: 600; }
.ed-lp-phone-tiles i { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; font-size: 16px; }
.ed-lp-float { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 14px; background: var(--ed-card); box-shadow: var(--ed-shadow-lg); font-size: 12px; font-weight: 600; white-space: nowrap; animation: ed-float 4s ease-in-out infinite; }
.ed-lp-float-a { top: 16%; left: 0; color: var(--ed-success); }
.ed-lp-float-b { right: 0; bottom: 14%; color: var(--ed-primary); animation-delay: 1.5s; }
@keyframes ed-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .ed-lp-float { animation: none; } }

.ed-lp-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 8px var(--ed-lp-gutter) 0; }
.ed-lp-stats div { padding: 16px 8px; border-radius: 16px; background: var(--ed-bg); text-align: center; }
.ed-lp-stats strong { display: block; font-size: 24px; font-weight: 700; color: var(--ed-primary); }
.ed-lp-stats span { font-size: 13px; color: var(--ed-text-muted); }

.ed-lp-block { padding: 44px var(--ed-lp-gutter) 0; scroll-margin-top: 64px; }
.ed-lp-head { margin-bottom: 22px; text-align: center; }
.ed-lp-head h2 { font-size: 24px; font-weight: 700; line-height: 1.35; }
.ed-lp-head p { margin-top: 6px; font-size: 15px; color: var(--ed-text-muted); }

.ed-lp-sections { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ed-lp-section { --seg: var(--ed-primary); display: flex; flex-direction: column; gap: 3px; padding: 16px 14px; border: 1.5px solid var(--ed-border); border-radius: 16px; background: var(--ed-card); color: var(--ed-text); transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.ed-lp-section:hover { border-color: var(--seg); box-shadow: var(--ed-shadow-lg); transform: translateY(-2px); }
.ed-lp-section i { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-bottom: 6px; border-radius: 12px; background: var(--ed-bg); color: var(--seg); font-size: 20px; }
.ed-lp-section strong { font-size: 15px; }
.ed-lp-section span { font-size: 12px; color: var(--ed-text-muted); }

.ed-lp-features { display: grid; gap: 12px; }
.ed-lp-feature { padding: 20px; border-radius: 18px; background: var(--ed-bg); }
.ed-lp-feature h3 { margin: 12px 0 4px; font-size: 16px; font-weight: 700; }
.ed-lp-feature p { font-size: 14px; line-height: 1.65; color: var(--ed-text-muted); }

.ed-lp-ai { display: grid; gap: 24px; margin: 44px var(--ed-lp-gutter) 0; padding: 28px 20px; border-radius: 24px; background: linear-gradient(160deg, rgba(var(--ed-primary-rgb), 0.08), #FFF4EC); }
.ed-lp-ai h2 { margin: 14px 0 10px; font-size: 24px; font-weight: 700; line-height: 1.35; }
.ed-lp-ai-text > p { margin-bottom: 18px; line-height: 1.75; color: var(--ed-text-muted); }
.ed-lp-chat { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--ed-card); box-shadow: var(--ed-shadow-lg); }
.ed-lp-chat .ed-msg { font-size: 14px; white-space: normal; }

.ed-lp-steps { display: grid; gap: 12px; }
.ed-lp-step { position: relative; padding: 22px 20px; border: 1.5px solid var(--ed-border); border-radius: 18px; background: var(--ed-card); }
.ed-lp-step-no { position: absolute; top: 10px; right: 18px; font-size: 38px; font-weight: 800; line-height: 1; color: rgba(var(--ed-primary-rgb), 0.12); }
.ed-lp-step > i { font-size: 28px; color: var(--ed-primary); }
.ed-lp-step h3 { margin: 10px 0 4px; font-size: 16px; font-weight: 700; }
.ed-lp-step p { font-size: 14px; line-height: 1.65; color: var(--ed-text-muted); }

.ed-lp-plans { display: grid; gap: 14px; }
.ed-lp-plan { padding: 24px 20px; border: 1.5px solid var(--ed-border); border-radius: 20px; background: var(--ed-card); }
.ed-lp-plan h3 { margin: 12px 0; font-size: 20px; font-weight: 700; }
.ed-lp-plan ul { display: grid; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 14px; }
.ed-lp-plan li i { margin-right: 6px; color: var(--ed-success); }
.ed-lp-plan-premium { border-color: #FFB800; background: linear-gradient(180deg, color-mix(in srgb, var(--ed-premium) 12%, var(--ed-card)), var(--ed-card) 60%); }

.ed-lp-employer { display: flex; flex-direction: column; gap: 14px; padding: 22px 20px; border-radius: 20px; background: #1A1A2E; color: #fff; }
.ed-lp-employer h3 { font-size: 18px; font-weight: 700; }
.ed-lp-employer p { margin-top: 4px; font-size: 14px; opacity: 0.8; }
.ed-lp-employer .ed-btn { align-self: flex-start; background: var(--ed-card); color: #1A1A2E; }

.ed-lp-final { margin: 44px var(--ed-lp-gutter) 0; padding: 40px 20px; border-radius: 28px; background: linear-gradient(135deg, var(--ed-primary), var(--ed-primary-light) 60%, var(--ed-primary-light)); color: #fff; text-align: center; }
.ed-lp-final h2 { font-size: 24px; font-weight: 700; line-height: 1.35; }
.ed-lp-final p { margin: 8px 0 20px; opacity: 0.92; }
.ed-lp-final .ed-btn { background: var(--ed-card); color: var(--ed-primary); }
.ed-lp-footer { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px var(--ed-lp-gutter) calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--ed-text-muted); font-size: 13px; text-align: center; }
.ed-lp-footer div small { display: block; }
.ed-lp-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.ed-lp-footer nav a { color: var(--ed-text); font-weight: 500; }

/* ─── Utilities ─────────────────────────────────────────────────── */
/* Icon tones: declared last so they win over .ed-tile-icon / .ed-row-icon. */
.ed-tone-orange { background: rgba(255, 107, 53, 0.12); color: var(--ed-secondary); }
.ed-tone-gold { background: var(--ed-warning-bg); color: #C58300; }
.ed-tone-green { background: var(--ed-success-bg); color: var(--ed-success); }
.ed-tone-blue { background: rgba(52, 152, 219, 0.12); color: #2980B9; }
.ed-tone-pink { background: rgba(232, 67, 147, 0.12); color: #D6307F; }
.ed-text-center { text-align: center; }
.ed-text-muted { color: var(--ed-text-muted); }
.ed-text-sm { font-size: 13px; }
.ed-text-xs { font-size: 11px; }
.ed-mt { margin-top: 16px; }
.ed-mb-0 { margin-bottom: 0; }
.ed-hidden { display: none !important; }
.spinner-border { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -0.125em; animation: ed-spin 0.7s linear infinite; }
@keyframes ed-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════
   Larger screens. Phones keep everything above; from 600px the landing
   page opens up, and from 1024px the student panel becomes a desktop
   layout: fixed side menu, wide content, no footer menu.
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
    .ed-lp-signup { display: inline-flex; }
    .ed-lp-stats { grid-template-columns: repeat(4, 1fr); }
    .ed-lp-sections { grid-template-columns: repeat(3, 1fr); }
    .ed-lp-features, .ed-lp-steps, .ed-lp-plans { grid-template-columns: repeat(2, 1fr); }
    .ed-lp-steps { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
    .ed-lp { --ed-lp-gutter: max(32px, calc(50% - 580px)); }
    .ed-lp-links { display: flex; }
    .ed-lp-nav { padding-top: 16px; padding-bottom: 16px; }
    .ed-lp-hero { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 48px; padding-top: 76px; padding-bottom: 60px; }
    .ed-lp-hero h1 { font-size: 58px; line-height: 1.18; letter-spacing: -1.5px; }
    .ed-lp-hero-text > p { font-size: 18px; }
    .ed-lp-phone { width: 300px; }
    .ed-lp-phone-body { gap: 12px; padding: 16px; }
    .ed-lp-float { font-size: 14px; }
    .ed-lp-float-a { left: 4%; }
    .ed-lp-float-b { right: 2%; }
    .ed-lp-stats strong { font-size: 32px; }
    .ed-lp-block { padding-top: 88px; }
    .ed-lp-head { margin-bottom: 36px; }
    .ed-lp-head h2 { font-size: 36px; letter-spacing: -0.5px; }
    .ed-lp-head p { font-size: 17px; }
    .ed-lp-sections { grid-template-columns: repeat(5, 1fr); gap: 14px; }
    .ed-lp-features { grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .ed-lp-feature { padding: 28px; }
    .ed-lp-feature h3 { font-size: 18px; }
    .ed-lp-ai { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; margin-top: 88px; padding: 56px; border-radius: 32px; }
    .ed-lp-ai h2 { font-size: 34px; }
    .ed-lp-ai-text > p { font-size: 16px; }
    .ed-lp-steps { gap: 18px; }
    .ed-lp-plans { max-width: 860px; margin: 0 auto; gap: 20px; }
    .ed-lp-plan { padding: 32px 28px; }
    .ed-lp-employer { flex-direction: row; align-items: center; justify-content: space-between; padding: 32px 40px; }
    .ed-lp-employer .ed-btn { align-self: center; flex-shrink: 0; }
    .ed-lp-final { margin-top: 88px; padding: 64px 32px; }
    .ed-lp-final h2 { font-size: 36px; }
    .ed-lp-final p { font-size: 17px; }
    .ed-lp-footer { flex-direction: row; justify-content: space-between; padding-top: 40px; text-align: left; }
}

@media (min-width: 1024px) {
    :root { --ed-side-width: 264px; --ed-content-width: 1080px; }
    body { background: var(--ed-bg); }

    /* Visitors' pages (login, register, onboarding): a centred card. */
    .ed-guest:not(.ed-landing) .ed-app { min-height: calc(100dvh - 64px); margin-top: 32px; margin-bottom: 32px; border-radius: 24px; overflow: clip; }

    /* Side menu: always open. */
    .ed-has-side .ed-drawer { inset: 0 auto 0 0; z-index: 1100; width: var(--ed-side-width); visibility: visible; }
    .ed-has-side .ed-drawer-backdrop, .ed-has-side .ed-drawer-close, .ed-has-side .ed-menu-btn { display: none; }
    .ed-has-side .ed-drawer-panel { position: static; width: 100%; height: 100%; border-right: 1px solid var(--ed-border); transform: none; }
    .ed-has-side .ed-drawer-brand { display: flex; flex-direction: column; padding: 20px 22px 14px; line-height: 1.2; }
    .ed-has-side .ed-drawer-brand span { font-family: var(--ed-font); font-size: 24px; font-weight: 800; letter-spacing: -0.6px; color: var(--ed-primary); }
    .ed-has-side .ed-drawer-brand small { font-size: 11px; color: var(--ed-text-muted); }
    .ed-has-side .ed-drawer-head { margin: 0 12px 6px; padding: 12px; border-radius: 14px; background: var(--ed-primary-bg); color: var(--ed-text); }
    .ed-has-side .ed-drawer-avatar { width: 40px; height: 40px; background: var(--ed-primary); color: #fff; font-size: 17px; }
    .ed-has-side .ed-drawer-user strong { font-size: 15px; }
    .ed-has-side .ed-drawer-user span { color: var(--ed-text-muted); opacity: 1; }
    .ed-has-side .ed-drawer-plan { margin: 0 12px; border-radius: 10px; }
    .ed-has-side .ed-drawer-nav { flex: 1; gap: 2px; padding: 8px 12px 14px; }
    .ed-has-side .ed-drawer-nav a, .ed-has-side .ed-drawer-lang { padding: 10px 12px; border-radius: 10px; font-size: 14.5px; }
    .ed-has-side .ed-drawer-nav a:hover, .ed-has-side .ed-drawer-lang:hover { background: var(--ed-bg); }
    .ed-has-side .ed-drawer-nav a.active:hover { background: var(--ed-primary-bg); }
    .ed-has-side .ed-drawer-foot { margin-top: auto; }

    /* Content area. */
    .ed-has-side .ed-app { max-width: none; margin: 0 0 0 var(--ed-side-width); padding-bottom: 56px; box-shadow: none; }
    .ed-has-side.ed-flush .ed-app { padding-bottom: 0; }
    .ed-has-side .ed-bottom-nav { display: none; }
    .ed-has-side .ed-container { max-width: var(--ed-content-width); margin-left: auto; margin-right: auto; padding: 0 32px; }
    .ed-has-side .ed-container.ed-narrow { max-width: 800px; }
    .ed-has-side .ed-app > .ed-flash { max-width: calc(var(--ed-content-width) - 64px); margin: 16px auto 0; }
    .ed-has-side .ed-header { padding: 10px 32px; border-bottom: 1px solid var(--ed-border); background: var(--ed-card); color: var(--ed-text); }
    .ed-has-side .ed-header-brand-wrap { color: var(--ed-text); }
    .ed-has-side .ed-header-brand { display: none; }
    .ed-has-side .ed-header-tagline { font-size: 18px; font-weight: 700; opacity: 1; }
    .ed-has-side .ed-header .ed-lang-btn-light { border-color: var(--ed-border); background: var(--ed-card); color: var(--ed-text); }
    .ed-has-side .ed-header .ed-credit-chip { background: var(--ed-warning-bg); color: #8A5A00; }
    .ed-has-side .ed-header .ed-credit-chip i { color: #C58300; }
    .ed-has-side .ed-page-header { padding: 10px 24px; }
    .ed-has-side .ed-page-header h1 { font-size: 19px; }

    /* Dashboard: main column + side column. */
    .ed-has-side .ed-dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 32px; align-items: start; }
    .ed-has-side .ed-dash-side { padding-top: 8px; }
    .ed-has-side .ed-greeting h2 { font-size: 26px; }
    .ed-has-side .ed-greeting p { font-size: 15px; }
    .ed-has-side .ed-hero-banner { padding: 32px; }
    .ed-has-side .ed-hero-title { font-size: 28px; }
    .ed-has-side .ed-hero-subtitle { font-size: 15px; }
    .ed-has-side .ed-tile-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .ed-has-side .ed-tile-wide { grid-column: span 2; }
    .ed-has-side .ed-tile, .ed-has-side .ed-course-card, .ed-has-side .ed-choice { transition: transform 0.15s, box-shadow 0.15s; }
    .ed-has-side .ed-tile:hover, .ed-has-side .ed-course-card:hover { box-shadow: var(--ed-shadow-lg); transform: translateY(-2px); }
    .ed-has-side a.ed-row:hover { background: var(--ed-bg); }
    .ed-has-side .ed-stat { padding: 18px 8px; }
    .ed-has-side .ed-stat strong { font-size: 24px; }
    .ed-has-side .ed-section-header h2 { font-size: 18px; }
    .ed-has-side .ed-info-grid { grid-template-columns: repeat(4, 1fr); }
    .ed-has-side .ed-segment-grid { grid-template-columns: repeat(4, 1fr); }
    .ed-has-side .ed-prose { font-size: 16px; }
    .ed-has-side .ed-inst-hero { padding: 40px 32px; }
    .ed-has-side .ed-profile-head { padding: 32px 16px; }

    /* Bars that are pinned to the bottom on phones sit under the content column. */
    .ed-has-side .ed-composer, .ed-has-side .ed-sticky-cta { left: calc(50% + var(--ed-side-width) / 2); max-width: 720px; border: 1px solid var(--ed-border); border-bottom: none; border-radius: 18px 18px 0 0; box-shadow: var(--ed-shadow-lg); }
    .ed-has-side .ed-fab { right: 40px; bottom: 40px; }
    .ed-has-side .ed-sheet, .ed-guest .ed-sheet { align-items: center; }
    .ed-has-side .ed-sheet-panel, .ed-guest .ed-sheet-panel { max-width: 540px; padding: 24px; border-radius: 20px; }

    /* Exam and AI chat use the full height with a readable column. */
    .ed-has-side .ed-chat { height: calc(100dvh - var(--ed-header-height) - 1px); }
    .ed-has-side .ed-chat-bar, .ed-has-side .ed-chat-messages, .ed-has-side .ed-chat-attached, .ed-has-side .ed-chat-input { width: 100%; max-width: 860px; margin-left: auto; margin-right: auto; }
    .ed-has-side .ed-chat-messages { padding: 12px 24px 20px; }
    .ed-has-side .ed-chat-input { margin-bottom: 16px; border: 1px solid var(--ed-border); border-radius: 28px; padding: 8px 10px; box-shadow: var(--ed-shadow); }
    .ed-has-side .ed-chat-input textarea { border-color: transparent; background: none; }
    .ed-has-side .ed-msg { max-width: 78%; font-size: 16px; }

    /* Shop / blog / CMS content. */
    .ed-has-side .ed-store-content { padding: 24px 16px 40px; }
}

@media (min-width: 1440px) {
    :root { --ed-side-width: 280px; --ed-content-width: 1180px; }
}

/* ─── Dark theme ─────────────────────────────────────────────────
   The palette itself comes from app_color_style() (Settings → Colors);
   these rules only fix what a palette swap cannot. */
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="dark"] body { background: var(--ed-bg); }
:root[data-theme="dark"] .ed-app { box-shadow: none; }
:root[data-theme="dark"] img.ed-invert-dark { filter: invert(1) hue-rotate(180deg); }
:root[data-theme="dark"] .ed-lp-employer,
:root[data-theme="dark"] .ed-ai-promo { border: 1px solid var(--ed-border); }
:root[data-theme="dark"] .ed-store-content { color: var(--ed-text); }
.ed-theme-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ed-theme-choice .ed-btn { padding: 10px 6px; font-size: 13px; }
.ed-theme-choice .ed-btn.active { background: var(--ed-primary); color: #fff; }
.ed-theme-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 20px; border: none; background: none; color: var(--ed-text); font-size: 15px; font-weight: 500; text-align: left; }
.ed-theme-btn i { width: 22px; font-size: 19px; color: var(--ed-text-muted); text-align: center; }
@media (min-width: 1024px) {
    .ed-has-side .ed-theme-btn { padding: 10px 12px; border-radius: 10px; font-size: 14.5px; }
    .ed-has-side .ed-theme-btn:hover { background: var(--ed-bg); }
}

/* Logo from Admin → Settings → General (app_brand()). */
.ed-brand-logo { display: block; width: auto; max-width: 170px; height: 30px; object-fit: contain; object-position: left center; }
.ed-drawer-brand .ed-brand-logo, .ed-lp-brand .ed-brand-logo { height: 34px; }
.ed-brand-dark { display: none; }
:root[data-theme="dark"] .ed-brand-light { display: none; }
:root[data-theme="dark"] .ed-brand-dark { display: block; }
