/* The landing page's visual system, adapted to a working dashboard.
   Opaque surfaces and short color transitions keep scrolling inexpensive. */
:root {
    --accent: #ff5f57;
    --accent-hover: #ff7b72;
    --accent-grad: linear-gradient(135deg, #ff7b72 0%, #ff5148 56%, #c91f1a 100%);
    --accent-muted: rgba(255,95,87,.15);
    --accent-border: rgba(255,95,87,.22);
    --exchange-bg: #050506;
    --exchange-panel: #0d0e10;
    --exchange-panel-2: #121317;
    --bg-card: #101113;
    --bg-recessed: #090b0d;
    --bg-darker: #020203;
    --text-primary: #e6e6e6;
    --text-secondary: #9a9a9c;
    --text-tertiary: #a0a0a6;
    --text-caption: #9999a0;
    --border: rgba(255,255,255,.06);
    --border-strong: rgba(255,255,255,.1);
    --surface: rgba(255,255,255,.03);
    --surface-hover: rgba(255,255,255,.05);
    --surface-active: rgba(255,255,255,.08);
    --radius-md: 20px;
    --radius-lg: 24px;
    --radius-xl: 24px;
    --radius-pill: 9999px;
    --ios-radius: 24px;
    --glass-bg: rgba(17, 18, 22, 0.92);
    --glass-bg-strong: rgba(20, 21, 26, 0.96);
    --glass-line: rgba(255,255,255,.095);
    --glass-shadow: 0 10px 26px rgba(0,0,0,.24);
    --ease-ios: cubic-bezier(0.2, 0, 0, 1);
    --panel-shadow: 0 10px 26px rgba(0,0,0,.24);
    --success: #30d158;
    --info: #5eb5ff;
    --warning: #ff9500;
    --purple: #bf7fff;
    --purple-grad: linear-gradient(135deg, #bf7fff 0%, #7d8aff 100%);
    --purple-muted: rgba(191, 127, 255, 0.12);
}
/* Larger base sizes for 16" displays */
@media (min-width: 1200px) {
    :root {
        --font-base: 16px;
        --font-lg: 17px;
        --font-xl: 19px;
        --font-2xl: 21px;
        --font-3xl: 24px;
        --font-4xl: 26px;
        --font-5xl: 28px;
        --font-6xl: 34px;
        --font-7xl: 38px;
        --font-8xl: 42px;
        --font-9xl: 50px;
    }
}
body[data-theme="light"] {
    --accent: #ff5f57;
    --accent-hover: #ff7b72;
    --accent-grad: linear-gradient(135deg, #ff7b72 0%, #ff5148 56%, #c91f1a 100%);
    --accent-muted: rgba(255,95,87,.15);
    --accent-border: rgba(255,95,87,.22);
    --glass-bg: rgba(255,255,255,.94);
    --glass-bg-strong: rgba(255,255,255,.98);
    --glass-line: rgba(20,24,31,.10);
    --glass-shadow: 0 10px 26px rgba(26,36,54,.10);
    --exchange-bg: #f7f8fb;
    --exchange-panel: #fff;
    --exchange-panel-2: #fbfcfe;
    --bg-card: #fff;
    --bg-recessed: #f4f6f8;
    --bg-darker: #eef1f5;
    --text-primary: #17191d;
    --text-secondary: #525861;
    --text-tertiary: #767d87;
    --text-caption: #8b929b;
    --border: rgba(18,24,32,.10);
    --border-strong: rgba(18,24,32,.16);
    --surface: rgba(18,24,32,.045);
    --surface-hover: rgba(18,24,32,.07);
    --surface-active: rgba(255,107,95,.12);
    --panel-shadow: 0 10px 26px rgba(26,36,54,.10);
    --success: #30d158;
    --info: #5eb5ff;
    --warning: #ff9500;
    --purple: #bf7fff;
    --purple-grad: linear-gradient(135deg, #bf7fff 0%, #7d8aff 100%);
    --purple-muted: rgba(191, 127, 255, 0.12);
    background: var(--exchange-bg);
    color-scheme: light;
}
body:not([data-theme="light"]) { color-scheme: dark; }
body[data-theme="light"]::before { display: none; }
html { scroll-behavior: auto; }
body {
    background: #040506;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.7;
    position: relative;
}
/* A restrained coral glow on the landing page's neutral base. */
body { background: #050506; isolation: isolate; }
body::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse 85% 65% at 65% -15%, rgba(255,95,87,.115), transparent 75%),
        linear-gradient(180deg, rgba(255,255,255,.018), transparent 65%);
}
body::after { content: none; }
body[data-theme="light"] { background: #f7f8fb; }
body[data-theme="light"]::before {
    display: block;
    background: radial-gradient(ellipse 85% 60% at 65% -15%, rgba(255,95,87,.075), transparent 75%),
        linear-gradient(180deg, #fafafb, #f7f8fb 65%);
}


button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.dashboard-skip { position: fixed; z-index: 20000; top: 12px; left: 12px; padding: 12px 20px; border-radius: var(--ios-radius); background: var(--bg-card); transform: translateY(-150%); }
.dashboard-skip:focus { transform: none; }

/* Theme transition overlay — matches landing page logic */
.theme-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.8s var(--ease-out);
    will-change: opacity;
}
.sidebar {
    width: 260px;
    /* Градиент для глубины */
    background: var(--exchange-panel);
    padding: 32px 0 16px;
    border-color: var(--glass-line);
    /* Лёгкое свечение справа */
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
}
.sidebar-logo { font-size: 20px; padding: 0 28px 28px; }
.sidebar-user { padding: 24px 28px; margin: 0 0 16px; }
.sidebar-user-name { font-size: 18px; font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
.sidebar-user-role {
    font: 500 12px/1.5 'JetBrains Mono', monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    overflow-wrap: anywhere;
}
.sidebar-nav { padding: 0 14px; }
.sidebar-nav a { font-size: var(--font-xl); padding: 13px 18px; min-height: 48px; border-radius: var(--ios-radius); margin: 3px 0; border: 1px solid transparent; color: var(--text-secondary); }
.sidebar-nav a.active { color: var(--accent); background: var(--accent-muted); border-color: var(--accent-border); }
.sidebar-footer a { font-size: 15px; min-height: 46px; border-radius: var(--ios-radius); }
.sidebar-footer button:hover,
.sidebar-footer a:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.main-content { margin-left: 260px; min-width: 0; padding: clamp(80px, 10vw, 120px) 0 40px; position: relative; }
.main-content .container { max-width: 1280px; padding: 0 clamp(24px, 3vw, 48px); }
.page-header {
    position: relative;
    margin-bottom: 32px;
    padding: clamp(24px, 3vw, 42px);
    background: rgba(255,255,255,.03) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--panel-shadow) !important;
}
.dashboard-eyebrow {
    display: block;
    margin-bottom: 14px;
    font: 500 12px/1.5 'JetBrains Mono', monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
}
.page-title { font-size: clamp(28px, 3.3vw, 44px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
.page-title::after, .section-title::before { content: none; }
.page-subtitle {
    font: 500 12px/1.5 'JetBrains Mono', monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 12px;
    max-width: 65ch;
}
.section-title { font-size: clamp(18px, 2vw, 24px); letter-spacing: -.025em; padding-bottom: 14px; }
.section { overflow-x: visible; }
.card, .hw-section-card, .hw-start-card, .faq-item, .faq-quick-action,
.faq-info-block, .contact-method, .ep-category-card, .ep-task-item,
.ep-student-card, .achievement-card, .cat-progress-item, .diff-q-item,
.stats-hero-card, .stats-secondary-card, .test-history-card, .note-viewer-panel {
    background: var(--glass-bg-strong) !important;
    border-color: var(--glass-line) !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow) !important;
    transition: border-color var(--anim-hover) ease, background-color var(--anim-hover) ease;
}
.card { padding: 24px; }
.hw-section-card, .hw-start-card, .faq-item, .faq-quick-action,
.faq-info-block, .contact-method, .ep-category-card, .ep-task-item,
.ep-student-card, .achievement-card, .cat-progress-item, .diff-q-item,
.stats-hero-card, .stats-secondary-card, .test-history-card {
    padding: 24px;
}
.card:hover, .hw-section-card:hover, .hw-start-card:hover,
.hw-task-card:hover, .ep-student-card:hover, .achievement-card:hover,
.ep-task-item:hover, .ep-category-card:hover, .faq-item:hover,
.stats-hero-card:hover, .stats-secondary-card:hover, .test-history-card:hover,
.diff-q-item:hover, .quick-action-card:hover, .cat-progress-item:hover,
.topic-progress-item:hover, .event-card:hover, .event-card-clickable:hover,
.upcoming-event-item:hover, .faq-download-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: var(--glass-shadow) !important;
}
.card [id$="CardAccent"] { display: none; }
.ep-nav-tab, .faq-download-btn, .hw-back-btn, .back-btn, .ep-class-btn {
    min-height: 48px;
    padding: 12px 20px;
    border-radius: var(--ios-radius);
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: none;
    transition: background-color var(--anim-hover) ease, border-color var(--anim-hover) ease;
}
.ep-nav-tab.active, .ep-class-btn.active, .ep-class-btn.selected { color: var(--accent); background: var(--accent-muted); border-color: var(--accent-border); }
.ep-generate-btn, .hw-submit-btn, .popup-copy-btn { background: var(--accent); color: #040506; border: none; border-radius: var(--radius-md); min-height: 48px; box-shadow: none; }
button:disabled { cursor: default; opacity: .65; }
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), textarea, select {
    background: var(--bg-recessed); color: var(--text-primary); border: 1px solid var(--border-strong); border-radius: var(--ios-radius); min-height: 48px; font-size: 17px; max-width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--text-tertiary); opacity: 1; }
input[type="range"] { accent-color: var(--accent); }
.note-main-title { color: var(--text-primary); }
.note-viewer-overlay, .mobile-menu-overlay, #resetPasswordModal { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.note-viewer-overlay, #resetPasswordModal { background: rgba(0,0,0,.65) !important; }
.note-viewer-panel { max-height: calc(100dvh - 32px); }
dialog { background: var(--exchange-panel) !important; color: var(--text-primary); border: 1px solid var(--glass-line) !important; border-radius: var(--ios-radius) !important; box-shadow: var(--glass-shadow); }
dialog::backdrop { background: rgba(0,0,0,.65); }
dialog button, dialog a { border-radius: var(--ios-radius) !important; }
.note-viewer-content { line-height: 1.8; }
.note-code-block, pre { max-width: 100%; overflow-x: auto; }
img { max-width: 100%; }
.ep-nav-tabs { flex-wrap: wrap; }
#student-detail { overflow-wrap: anywhere; }
/* Unified animation system: single easing curve, performant properties only */
:root {
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --anim-hover: 0.16s;
    --anim-fast: 0.24s;
    --anim-normal: 0.32s;
    --anim-slow: 0.48s;
}

/* Never stagger long lists or animate an entire section on navigation. */
.section, .section [style*="animation: dashFade"], .section [style*="animation: noteFade"],
.section [style*="animation: flame"], .animate-fade-in, .animate-scale-in,
.note-viewer-content > *, .note-main-title { animation: none !important; }
/* Don't force opacity on .card — showSection uses inline opacity for animation */
/* Fast transitions for interactive elements. */
.faq-answer-wrapper, .ep-category-body, .ep-task-body { transition-duration: var(--anim-fast); }

/* Global transition defaults for smooth, consistent interactions. */
.sidebar-nav a, .sidebar-footer a, .mobile-menu-overlay a,
.ep-nav-tab, .ep-class-btn, .faq-item, .faq-quick-action,
.ep-category-card, .ep-task-item, .ep-student-card, .achievement-card,
.cat-progress-item, .diff-q-item, .stats-hero-card, .stats-secondary-card,
.test-history-card, .note-viewer-panel, .hw-section-card, .hw-start-card,
.hw-task-card, .card, .quick-action-card, .info-card, .contact-card,
.help-card, .note-viewer-backdrop, .note-viewer-popup {
    transition: background-color var(--anim-hover) var(--ease-out),
                border-color var(--anim-hover) var(--ease-out),
                color var(--anim-hover) var(--ease-out),
                transform var(--anim-hover) var(--ease-out),
                box-shadow var(--anim-hover) var(--ease-out);
}

/* Section transitions (fade + slide). */
.animate-section-enter {
    animation: unifiedFadeIn var(--anim-slow) var(--ease-out) forwards;
}
.animate-section-exit {
    animation: unifiedFadeOut var(--anim-normal) var(--ease-out) forwards;
}
.animate-card-enter {
    animation: unifiedScaleIn var(--anim-slow) var(--ease-out) forwards;
}
.animate-nav-enter {
    animation: unifiedNavIn var(--anim-normal) var(--ease-out) forwards;
}

/* Toast notifications. */
.toast { animation: unifiedSlideIn var(--anim-normal) var(--ease-out); }
.toast-remove { animation: unifiedSlideOut var(--anim-normal) var(--ease-out) forwards; }

/* Keyframes — all use the same easing curve. */
@keyframes unifiedFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes unifiedFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-6px); }
}
@keyframes unifiedScaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes unifiedNavIn {
    from { opacity: 0; transform: translateX(-4px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes unifiedSlideIn {
    from { opacity: 0; transform: translateX(80px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes unifiedSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(80px); }
}

/* Reduced motion: disable all animations. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
@media (max-width: 900px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding-top: clamp(48px, 6vw, 72px); }
    .main-content .container { padding-inline: 20px; }
    .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; top: max(16px,env(safe-area-inset-top)); left: 20px; border-radius: var(--ios-radius); background: var(--exchange-panel); }

    .mobile-menu-overlay { background: var(--exchange-bg); padding: 84px 20px max(20px,env(safe-area-inset-bottom)); }
    .mobile-menu-overlay a { border-radius: var(--ios-radius); min-height: 48px; }
    .mobile-menu-overlay a.active { color: var(--accent); background: var(--accent-muted); border-color: var(--accent-border); }
}
@media (max-width: 520px) {
    .main-content .container { padding-inline: 16px; }
    .page-header { padding-bottom: 20px; margin-bottom: 20px; }
    .page-title { font-size: 30px; }
    .page-subtitle { font-size: 14px; }
    .card { padding: 20px; }
    .hw-section-card { gap: 12px !important; padding: 20px !important; }
    .ep-category-header, .ep-task-header { flex-wrap: wrap; padding: 20px; }
    .ep-category-content { padding: 0 16px 20px; }
    .note-viewer-panel { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
body.dashboard-menu-open { overflow: hidden; }
:root { --on-accent: #080506; }
body[data-theme="light"] { --on-accent: #fff; }
.note-viewer-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(0,0,0,.65); }
.note-viewer-popup, .chart-tooltip { background: var(--exchange-panel); color: var(--text-primary); box-shadow: var(--panel-shadow); }
.chart-tooltip { backdrop-filter: none; -webkit-backdrop-filter: none; }
.note-main-title, .note-section-header, .note-info-block, .note-steps-card,
.note-bullet-list, .note-formula-block, .note-code-block, .note-highlight-card,
.note-warning-card, .note-tip-card { opacity: 1; animation: none; }
.sidebar-nav a, .sidebar-footer a { transition: color var(--anim-hover) ease, background-color var(--anim-hover) ease, border-color var(--anim-hover) ease; }
body[data-theme="light"] :is(svg [stroke="#5eb5ff"],svg [stroke="#5eacfc"]) { stroke: var(--info); }
body[data-theme="light"] svg [stroke="#30d158"] { stroke: var(--success); }
body[data-theme="light"] svg [stroke="#ff5f57"] { stroke: var(--accent); }
body[data-theme="light"] svg [stroke="#ff9500"] { stroke: var(--warning); }
body[data-theme="light"] svg [stroke="#bf7fff"] { stroke: var(--purple); }

/* Benefit card hover — same as landing page */
.benefit-card {
    transition: background 0.5s, border-color 0.5s, box-shadow 0.5s;
    position: relative;
    overflow: hidden;
}
.benefit-card:hover {
    background: var(--surface-hover);
    border-color: rgba(255,95,87,0.35);
    box-shadow: 0 16px 56px rgba(255,95,87,0.16), 0 0 0 1px rgba(255,95,87,0.1);
}

/* Contact and info cards hover */
.contact-card:hover, .info-card:hover {
    border-color: rgba(255,95,87,0.35);
    box-shadow: 0 16px 56px rgba(255,95,87,0.16), 0 0 0 1px rgba(255,95,87,0.1);
}
@media (max-width: 900px) { .mobile-menu-toggle { right: auto; } }
@media (max-width: 768px) {
    .page-title { font-size: 30px !important; }
    .section-title { font-size: 20px !important; }
    .card { padding: 20px !important; }
}



/* Landing's rounded navigation and layered surfaces, at cabinet density. */
.sidebar-logo { display: block; font-variant-ligatures: none; letter-spacing: .01em; }
.sidebar-nav a { border-radius: var(--ios-radius); font-size: var(--font-xl); }
.sidebar-nav a:is(:hover, :focus-visible),
.mobile-menu-overlay a:is(:hover, :focus-visible) {
    background: var(--surface-active);
    color: var(--text-primary);
    border-color: var(--accent-border);
}
.sidebar-nav a.active, .mobile-menu-overlay a.active {
    background: var(--accent-muted);
    color: var(--accent);
    border-color: var(--accent-border);
}

.main-content { padding-top: 32px; }
.hw-task-card, .hw-task-card-v2, .quick-action-card, .info-card, .contact-card,
.help-card, .event-card, .upcoming-event-item {
    background: linear-gradient(180deg, var(--exchange-panel-2), var(--exchange-panel));
    border: 1px solid var(--border);
    border-radius: var(--ios-radius);
    box-shadow: var(--panel-shadow);
}
.hw-task-card-submit, #calTodayBtn {
    background: var(--accent);
    color: #040506;
    border: none;
    border-radius: var(--radius-md);
    min-height: 44px;
}
#calPrevMonth, #calNextMonth { min-width: 44px; min-height: 44px; border-radius: var(--ios-radius) !important; }
#calMonthLabel { font-variant-numeric: tabular-nums; }
.note-viewer-popup { border: 1px solid var(--glass-line); border-radius: var(--ios-radius); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); }
@media (max-width: 900px) {
    .main-content { padding-top: 84px; }
    #dashboardTheme {
        position: fixed; top: max(16px, env(safe-area-inset-top)); right: 20px;
        z-index: 10002; width: 44px !important; height: 44px; min-height: 44px;
        padding: 10px !important; border-radius: var(--ios-radius) !important;
        background: var(--exchange-panel) !important;
    }
    .mobile-menu-toggle { z-index: 10002; }
    .mobile-menu-overlay { padding-top: 84px; }
}
@media (max-width: 520px) {
    .page-header { padding: 24px 20px; }
    .dashboard-eyebrow { font-size: 11px; }
}


/* Long names and translated labels must shrink/wrap inside grid and flex tracks. */
.sidebar-user-name, .page-title, .ep-task-title, .ep-student-card-name { overflow-wrap: anywhere; }
.ep-task-title, .ep-category-name, .ep-student-card, .contact-card { min-width: 0; }
.ep-generate-btn { max-width: 100%; white-space: normal; }

/* First-screen hierarchy: restrained surfaces, coral accents and capsule actions. */
body[data-theme="light"] {
    --accent: #b32c26;
    --accent-hover: #96231e;
    --text-secondary: #535b66;
    --text-tertiary: #59616c;
    --text-caption: #59616c;
    --success: #126d32;
    --info: #1769a6;
    --warning: #995900;
    --purple: #7845b5;
}
.page-header::before {
    content: ''; position: absolute; inset: 0 24px auto; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
}
.page-title {
    background: linear-gradient(135deg, #fff, #ffd0cc 38%, #ff5f57);
    background-clip: text; -webkit-background-clip: text; color: transparent;
    width: fit-content;
}
body[data-theme="light"] .page-header { background: #fff !important; }
body[data-theme="light"] .page-title {
    background-image: linear-gradient(135deg, #17191d, #c91f1a 76%);
}
#dashboardTheme {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px; flex-shrink: 0;
    cursor: pointer;
}
.sidebar-nav a, .mobile-menu-overlay a,
.ep-nav-tab, .ep-class-btn, .hw-back-btn, .back-btn,
.ep-generate-btn, .hw-submit-btn, .popup-copy-btn, .hw-task-card-submit,
#calTodayBtn { border-radius: 999px; }
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), textarea, select { border-radius: 14px; }
.card:hover { transform: none !important; }

@media (max-width: 900px) { .mobile-menu-toggle { z-index: 10004; } }

/* Calendar and lesson details share one accessible, scrollable dialog. */
body.lesson-dialog-open { overflow: hidden; }

/* Dialog overlay */
.lesson-dialog::backdrop { background: rgba(0,0,0,.72); }

/* Dialog container — centered card */
.lesson-dialog {
    position: fixed; inset: 0; margin: auto;
    width: min(540px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    overflow: hidden;
    background: var(--exchange-panel) !important;
    border: 1px solid var(--border-strong) !important;
    border-radius: 24px !important;
    color: var(--text-primary);
    display: flex !important;
    flex-direction: column !important;
}

/* Dialog header — sticky top bar */
.lesson-dialog-header {
    flex-shrink: 0;
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--exchange-panel) !important;
}
.lesson-dialog-header > div {
    flex: 1;
    min-width: 0;
}
.lesson-dialog-label {
    display: block;
    font: 500 11px/1.6 'JetBrains Mono', monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 6px;
}
.lesson-dialog-header .lesson-dialog-label { margin-bottom: 10px; }
.lesson-dialog-label[hidden] { display: none; }
.lesson-dialog h2 {
    margin: 0;
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}
.lesson-dialog-close {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--ios-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
    margin-top: -2px;
}
.lesson-dialog-close:hover {
    background: var(--surface-hover);
    border-color: var(--accent-border);
    color: var(--text-primary);
}

/* Dialog body — scrollable content */
.lesson-dialog-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--exchange-panel) !important;
}

/* Time block */
.lesson-time {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lesson-time .lesson-dialog-label {
    margin-bottom: 4px;
}
.lesson-time strong {
    font: 600 clamp(22px, 5vw, 30px)/1.4 'JetBrains Mono', monospace;
    color: var(--text-primary);
}
.lesson-duration {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Description */
.lesson-description {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0;
}

/* Connection block */
.lesson-connection {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.lesson-connection .lesson-dialog-label {
    margin-bottom: 4px;
}
.lesson-connection code {
    display: block;
    font: 600 clamp(17px, 4vw, 24px)/1.6 'JetBrains Mono', monospace;
    overflow-wrap: anywhere;
    user-select: all;
    color: var(--text-primary);
}
.lesson-actions {
    display: flex;
    gap: 10px;
}
.lesson-actions a, .lesson-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border-radius: var(--ios-radius);
    text-decoration: none;
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.lesson-join {
    background: var(--accent);
    color: #040506;
    border: none;
}
.lesson-join:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(255,95,87,.25);
    transform: translateY(-1px);
}
.lesson-copy {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
}
.lesson-copy:hover {
    background: var(--surface-hover);
    border-color: var(--accent-border);
}
.lesson-feedback {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    overflow-wrap: anywhere;
}
.lesson-feedback:not(:empty) {
    margin-top: 12px;
}

/* Day event list (calendar) */
.lesson-day-list {
    display: grid;
    gap: 12px;
}
.lesson-day-event {
    display: grid;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 18px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px !important;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}
.lesson-day-event:hover {
    background: var(--surface-hover);
    border-color: var(--accent-border);
}
.lesson-day-time {
    font: 500 14px/1.5 'JetBrains Mono', monospace;
    color: var(--accent);
}
.lesson-day-title {
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.lesson-day-action {
    display: block;
    font: 500 11px/1.6 'JetBrains Mono', monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
}

/* Mobile */
@media (max-width: 520px) {
    .lesson-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 16px !important;
    }
    .lesson-dialog-header {
        padding: 20px 20px 16px;
    }
    .lesson-dialog-body {
        padding: 20px;
    }
    .lesson-connection {
        padding: 16px;
    }
    .lesson-actions {
        flex-direction: column;
    }
}

/* Tomorrow's time is secondary to today's lesson. */
#tomorrowEvents .hw-section-card-num {
    color: var(--text-secondary) !important;
    background: var(--surface) !important;
    border-color: var(--border) !important;
}

.universal-notif {
    min-width: 0; width: min(480px, calc(100vw - 32px));
    top: 16px; right: 16px;
    background: var(--exchange-panel); color: var(--text-primary);
}
.universal-notif-text { overflow-wrap: anywhere; min-width: 0; }

/* Primary action buttons — coral accent (submit, generate, join, today) */
.hw-task-card-submit,
.hw-submit-btn,
.popup-copy-btn,
.ep-generate-btn,
.lesson-join,
#calTodayBtn {
    background: var(--accent) !important;
    color: #040506 !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    min-height: 44px !important;
    padding: 16px 24px !important;
    box-shadow: none !important;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.hw-task-card-submit:not(:disabled):hover,
.hw-submit-btn:not(:disabled):hover,
.popup-copy-btn:not(:disabled):hover,
.ep-generate-btn:not(:disabled):hover,
.lesson-join:not(:disabled):hover,
#calTodayBtn:not(:disabled):hover {
    background: var(--accent-hover) !important;
    box-shadow: 0 4px 16px rgba(255,99,99,.25) !important;
    transform: translateY(-1px);
}
.hw-task-card-submit:disabled,
.hw-submit-btn:disabled,
.popup-copy-btn:disabled,
.ep-generate-btn:disabled,
.lesson-join:disabled,
#calTodayBtn:disabled {
    opacity: .5; cursor: not-allowed; transform: none !important;
}

/* Secondary/neutral buttons — surface background with border */
.hw-back-btn,
.hw-back-btn-v2,
.back-btn,
.ep-nav-tab,
.ep-class-btn,
.hw-carousel-btn,
.hw-carousel-dot,
.lesson-copy,
.lesson-dialog-close,
.lesson-day-event,
#calPrevMonth,
#calNextMonth,
#restoreStreakBtn,
.faq-download-btn {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--ios-radius) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    min-height: 44px !important;
    padding: 10px 18px !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.hw-back-btn:not(:disabled):hover,
.hw-back-btn-v2:not(:disabled):hover,
.back-btn:not(:disabled):hover,
.ep-nav-tab:not(:disabled):hover,
.ep-class-btn:not(:disabled):hover,
.hw-carousel-btn:not(:disabled):hover,
.lesson-copy:not(:disabled):hover,
.lesson-dialog-close:not(:disabled):hover,
.lesson-day-event:not(:disabled):hover,
#calPrevMonth:not(:disabled):hover,
#calNextMonth:not(:disabled):hover,
#restoreStreakBtn:not(:disabled):hover,
.faq-download-btn:not(:disabled):hover {
    background: var(--surface-hover) !important;
    border-color: var(--accent-border) !important;
    color: var(--text-primary) !important;
}
.ep-nav-tab.active,
.ep-class-btn.active,
.ep-class-btn.selected {
    background: var(--accent-muted) !important;
    color: var(--accent) !important;
    border-color: var(--accent-border) !important;
}
.hw-carousel-dot {
    min-width: 10px !important;
    min-height: 10px !important;
    padding: 0 !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 999px !important;
}
.hw-carousel-dot.active {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}

/* Theme toggle — neutral icon button (desktop in sidebar-footer only) */
.sidebar-footer #dashboardTheme {
    background: var(--surface) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 10px !important;
    margin-bottom: 8px !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.sidebar-footer #dashboardTheme:hover {
    background: var(--surface-hover) !important;
    border-color: var(--accent-border) !important;
    color: var(--text-primary) !important;
}

/* Mobile theme toggle — fixed position, separate from sidebar */
@media (max-width: 900px) {
    #dashboardTheme:not(.sidebar-footer #dashboardTheme) {
        background: var(--exchange-panel) !important;
    }
}

/* Dialog close button */
dialog button {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--ios-radius) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}
dialog button:hover {
    background: var(--surface-hover) !important;
    border-color: var(--accent-border) !important;
}

/* Calendar day events — inherit text colors */
body .lesson-day-event :is(.lesson-day-time, .lesson-day-title, .lesson-day-action) { color: inherit; }

/* SVG icons inside buttons — inherit parent color */
body button svg { color: inherit !important; }
body button svg[stroke] { stroke: currentColor !important; }


/* Calendar controls keep their own hierarchy instead of generic action sizing. */
body .calendar-eyebrow { color: var(--accent) !important; }
body #calTodayBtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    align-self: center; white-space: nowrap;
    min-height: 44px !important; padding: 10px 18px !important;
    border-radius: 999px !important; border: 1px solid var(--accent-border) !important;
    background: var(--accent-muted) !important; color: var(--accent) !important;
}
body #calTodayBtn:hover { background: var(--surface-hover) !important; box-shadow: none !important; transform: none; }
body .lesson-dialog { box-shadow: 0 24px 80px rgba(0,0,0,.3); }
body .lesson-dialog-close {
    flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px !important;
    padding: 0 !important; border-radius: 50% !important; font-size: 26px !important;
    color: var(--text-secondary) !important;
}
#lessonDialogTitle:focus { outline: none; }
body .lesson-day-event { padding: 20px !important; border-radius: 16px !important; gap: 8px; }
body .lesson-day-event .lesson-day-time { color: var(--accent); }
body .lesson-day-event .lesson-day-action { color: var(--text-secondary); font: 500 13px/1.5 'Inter', sans-serif; letter-spacing: 0; text-transform: none; }
body .lesson-join { color: var(--on-accent) !important; padding: 12px 18px !important; }
body .lesson-copy { padding: 12px 18px !important; }
.lesson-actions > * { flex: 1; }
.lesson-time { padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.lesson-time strong { font-size: clamp(20px, 4vw, 26px); }
.achievements-status { min-height: 24px; margin: 0 0 16px; color: var(--text-secondary); font-size: 14px; }
.achievements-status button { margin-left: 8px; padding: 10px 16px; min-height: 44px; color: var(--accent); background: var(--accent-muted); border: 1px solid var(--accent-border); border-radius: 999px; cursor: pointer; }
#achievementsGrid { min-height: 240px; }
.achievements-placeholder { min-height: 220px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 24px; color: var(--text-secondary); background: var(--surface); }
#achievements .achievement-card { animation: none; }

/* Help: calm surfaces, clear hierarchy and one consistent disclosure control. */
#help .faq-grid { gap: 12px; }
#help .faq-item { padding: 0; overflow: hidden; }
#help .faq-item-accent { display: none; }
#help .faq-item-header { padding: 24px; align-items: center; gap: 16px; }
#help .faq-item-icon { width: 48px; height: 48px; border-radius: 16px; flex-shrink: 0; }
#help .faq-item-question { font-size: clamp(16px, 1.5vw, 20px); line-height: 1.4; }
#help .faq-item-toggle {
    width: 36px; height: 36px; margin: 0; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--border);
    transition: transform 600ms cubic-bezier(.4,0,.2,1), color 200ms ease;
}
#help .faq-item.expanded { border-color: var(--accent) !important; }
#help .faq-item.expanded .faq-item-toggle { transform: rotate(180deg); }
#help .faq-item-answer-wrapper {
    display: grid; grid-template-rows: 0fr; max-height: none;
    opacity: 0; transform: translateY(20px);
    transition: grid-template-rows 600ms cubic-bezier(.4,0,.2,1),
        opacity 600ms cubic-bezier(.4,0,.2,1), transform 600ms cubic-bezier(.4,0,.2,1);
}
#help .faq-item-answer { min-height: 0; overflow: hidden; padding: 0 !important; margin: 0; }
#help .faq-item-answer > :first-child { margin-top: 0; }
#help .faq-item-answer > :last-child { margin-bottom: 24px; }
#help .faq-item-answer > * { margin-left: 24px; margin-right: 24px; }
#help .faq-item.expanded .faq-item-answer-wrapper { grid-template-rows: 1fr; opacity: 1; transform: none; }
#help .contact-grid, #help .info-grid { gap: 16px; }
#help .contact-card, #help .info-card {
    padding: 24px; background: var(--glass-bg-strong); border: 1px solid var(--glass-line);
    border-radius: var(--radius-lg); box-shadow: var(--glass-shadow);
}
#help .contact-card-method, #help .info-card-header { gap: 14px; align-items: center; }
#help .contact-method-icon, #help .info-card-icon {
    width: 48px; height: 48px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); flex-shrink: 0;
}
#help .contact-card-info, #help .info-card-body { color: var(--text-secondary); line-height: 1.65; }
#help .info-card-link { overflow-wrap: anywhere; }
#help .faq-item-header:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: var(--radius-lg); }
@media (max-width: 600px) {
    #help .faq-item-header { padding: 18px; gap: 12px; }
    #help .faq-item-icon { width: 40px; height: 40px; border-radius: 12px; }
    #help .faq-item-answer > * { margin-left: 18px; margin-right: 18px; }
    #help .contact-card, #help .info-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    #help .faq-item-answer-wrapper, #help .faq-item-toggle { transition: none; transform: none; }
}

/* Use the page navigation's rhythm for controls and existing disclosure panels. */
:root { --cabinet-motion-duration: 600ms; --cabinet-motion-ease: cubic-bezier(.4,0,.2,1); }
body :is(button, a, input, select, textarea, [role="button"], .card, .hw-section-card,
    .ep-nav-tab, .ep-class-btn, .ep-category-body, .ep-task-body,
    .cat-progress-item-answer-wrapper, .topic-progress-item-answer-wrapper,
    .note-viewer-panel, .note-viewer-popup) {
    transition-duration: var(--cabinet-motion-duration);
    transition-timing-function: var(--cabinet-motion-ease);
}
@media (prefers-reduced-motion: reduce) {
    body :is(button, a, input, select, textarea, [role="button"]) { transition-duration: .01ms !important; }
}

/* Categories retain a small identifying icon, rather than colouring the panel. */
.study-category-panel {
    --category-ink: #ddaaa5;
    position: relative; overflow: hidden;
    background: var(--glass-bg-strong) !important;
    border: 1px solid var(--glass-line) !important;
    box-shadow: var(--glass-shadow) !important;
}
.study-category-panel[data-category="Текстовые задачи"] { --category-ink: #c7b99e; }
.study-category-panel[data-category="Программирование"] { --category-ink: #a9b9ce; }
.study-category-panel[data-category="Электронные таблицы"] { --category-ink: #afc2b8; }
.study-category-panel::before { content: none; }
.study-category-panel > div:first-child > div:first-child,
.study-category-panel.hw-category-card > div:first-child {
    background: var(--surface) !important;
    border-color: var(--glass-line) !important;
    border-radius: 18px !important;
}
.study-category-panel svg { stroke: var(--category-ink); }
body[data-theme="light"] .study-category-panel { --category-ink: #985650; }
body[data-theme="light"] .study-category-panel[data-category="Текстовые задачи"] { --category-ink: #806b48; }
body[data-theme="light"] .study-category-panel[data-category="Программирование"] { --category-ink: #536e8a; }
body[data-theme="light"] .study-category-panel[data-category="Электронные таблицы"] { --category-ink: #536f60; }

/* The note dialog owns its motion; it must not also receive a WAAPI entrance. */
#noteViewerBackdrop {
    transition: opacity 600ms cubic-bezier(.4,0,.2,1);
}
#noteViewerBackdrop.active { visibility: visible; transition-delay: 0s; }
#noteViewerBackdrop.closing { opacity: 0; }
#noteViewerPopup {
    transform: translate(-50%, calc(-50% + 20px));
    transition: opacity 600ms cubic-bezier(.4,0,.2,1), transform 600ms cubic-bezier(.4,0,.2,1);
}
#noteViewerPopup.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%); transition-delay: 0s; }
#noteViewerPopup.closing { opacity: 0; transform: translate(-50%, calc(-50% + 20px)); }
@media (prefers-reduced-motion: reduce) {
    #noteViewerPopup, #noteViewerBackdrop { transition: none !important; }
}

/* Inherited legacy toolbar text must remain legible on the new light surfaces. */
#calMonthLabel { color: var(--text-primary); }
#currentEventCode button { color: var(--on-accent) !important; }

/* Default cards follow the homepage; colour is reserved for actions and status. */
.card, .hw-section-card, .hw-start-card, .hw-stat-card, .hw-task-card, .hw-task-card-v2,
.stat-card, .stats-hero-card, .stats-secondary-card, .test-history-card, .test-history-item,
.achievement-hero-card, .achievement-card, .ep-category-card, .ep-task-item, .ep-student-card,
.cat-progress-item, .category-progress-item, .topic-progress-item, .diff-q-item,
.contact-card, .info-card, .help-card, .event-card, .upcoming-event-item,
.quick-action-card, .external-card, .giveaway-card, .faq-item, .faq-info-block {
    background: var(--glass-bg-strong) !important;
    border: 1px solid var(--glass-line) !important;
    box-shadow: var(--glass-shadow) !important;
}
#help .faq-item-header { background: transparent; }
#help :is(.faq-item-icon, .contact-method-icon, .info-card-icon) {
    background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary);
}
#help :is(.faq-item-icon, .contact-method-icon, .info-card-icon) svg { stroke: currentColor; }
.hw-section-card::before, .diff-q-item-accent, .help-card-accent { display: none; }

/* Audit: readable controls and content in both themes, with no extra colour surfaces. */
body[data-theme="light"] :is(.hw-task-card-submit, .hw-submit-btn, .popup-copy-btn, .ep-generate-btn, .lesson-join, #calTodayBtn) {
    color: var(--on-accent) !important;
}
body[data-theme="light"] :is(.ep-category-name, .ep-category-pct) { color: var(--text-primary) !important; }
.calendar-cell[data-past="true"] { color: var(--text-secondary) !important; }
.note-viewer-content, .lesson-dialog-body, .mobile-menu-overlay { overscroll-behavior: contain; }
.note-viewer-content { min-height: 0; }
:where(button, a, [role="button"], input, select, textarea):focus-visible {
    outline: 2px solid var(--accent); outline-offset: 3px;
}
:where([role="button"]) { cursor: pointer; }
@media (pointer: fine) {
    :where(button, a, [role="button"]):active { filter: brightness(.94); }
}
body[data-theme="light"] #calTodayBtn { color: var(--accent) !important; }
html { scrollbar-gutter: auto; }
@media (min-width: 901px) { html { scrollbar-gutter: stable; } }
.note-viewer-popup { display: flex; flex-direction: column; max-height: min(80vh, calc(100dvh - 32px)); }
.note-viewer-header { flex-shrink: 0; }
.note-viewer-content { flex: 1 1 auto; max-height: none; }
.note-viewer-close { min-width: 44px; min-height: 44px; }
@media (max-height: 500px) {
    .note-viewer-popup { max-height: calc(100dvh - 16px); }
    .note-viewer-header { padding: 16px 20px; }
    .note-viewer-content { padding: 20px; }
}
.note-viewer-category { color: var(--text-secondary) !important; opacity: 1; }

/* Card formatting: common spacing, with distinct layouts for rows, metrics and content. */
:root {
    --panel-padding: 24px;
    --panel-gap: 16px;
    --panel-icon: 56px;
}
.card:not(.calendar-panel), .hw-section-card, .hw-start-card, .hw-stat-card,
.hw-task-card, .hw-task-card-v2, .ep-student-card, .achievement-card,
.stats-hero-card, .stats-secondary-card, .test-history-card,
.contact-card, .info-card, .help-card, .study-category-panel {
    min-width: 0;
    padding: var(--panel-padding) !important;
}
.calendar-panel { padding: 0 !important; }
.grid, .contact-grid, .info-grid { gap: var(--panel-gap); align-items: stretch; }
:is(.card, .hw-section-card, .ep-student-card, .study-category-panel) > * { min-width: 0; }
.hw-section-card, .hw-category-card { align-items: center; gap: var(--panel-gap) !important; }
.study-category-icon {
    width: var(--panel-icon) !important; height: var(--panel-icon) !important;
    flex: 0 0 var(--panel-icon) !important;
}
.study-category-info { flex: 1; min-width: 0; }
.study-category-title {
    font-size: clamp(17px, 1.5vw, 21px) !important;
    line-height: 1.35; font-weight: 600 !important; overflow-wrap: anywhere;
}
.study-category-caption { margin-top: 6px !important; font-size: 14px !important; line-height: 1.5; }
.hw-section-card-info { min-width: 0; }
.hw-section-card-title {
    font-size: clamp(15px, 1.2vw, 17px) !important;
    line-height: 1.45 !important; margin-bottom: 6px !important; overflow-wrap: anywhere;
}
:is(.ep-category-name, .ep-task-title, .ep-student-card-name, .contact-method-value,
    .info-card-title, .faq-item-question) { line-height: 1.4; overflow-wrap: anywhere; }
:is(.contact-card-info, .info-card-body, .faq-answer-text) { line-height: 1.65; overflow-wrap: anywhere; }
.contact-card, .info-card { display: flex; flex-direction: column; }
.contact-card-method, .info-card-header { gap: 12px; }
.contact-card-info, .info-card-body { margin-top: 16px; }
.info-card-link { margin-top: auto; padding-top: 16px; align-self: flex-start; }
.ep-category-header, .ep-task-header { gap: var(--panel-gap); padding: var(--panel-padding); }
#help .faq-item { padding: 0 !important; }
#help .faq-item-header { padding: var(--panel-padding); gap: var(--panel-gap); }
#help .faq-item-answer > * { margin-left: var(--panel-padding); margin-right: var(--panel-padding); }
#help .faq-item-answer > :last-child { margin-bottom: var(--panel-padding); }
@media (max-width: 600px) {
    :root { --panel-padding: 18px; --panel-gap: 12px; --panel-icon: 48px; }
    #notes .hw-section-card-num {
        min-width: 44px !important; width: 44px !important; height: 44px !important;
        padding: 0 6px !important; font-size: 16px !important; flex: 0 0 44px;
    }
    #notes .hw-section-card-info + div { width: 24px !important; }
    #notes .hw-section-card-info + div svg { width: 20px; height: 20px; }
    .study-category-title { font-size: 17px !important; }
    .ep-student-card-header { gap: 12px; }
}
/* Disclosure shells delegate spacing to their headers and bodies. */
.ep-category-card, .ep-task-item, .cat-progress-item, .topic-progress-item, .diff-q-item { padding: 0 !important; }
.cat-progress-item-header, .topic-progress-item-header, .diff-q-item-header {
    padding: var(--panel-padding); gap: var(--panel-gap);
}
.ep-category-content { padding: 0 var(--panel-padding) var(--panel-padding); }
@media (max-width: 600px) {
    .ep-task-header { flex-wrap: wrap; }
    .ep-task-title { flex: 1 1 140px; }
}
.ep-generate-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; line-height: 1.4; }
.ep-generate-btn > svg { width: 20px; height: 20px; flex: 0 0 20px; }

/* Only category headers and two priority cards receive a coral tint. */
.study-category-panel, #help .faq-item {
    background: linear-gradient(var(--category-gradient-angle, 115deg), color-mix(in srgb, var(--accent) 18%, var(--exchange-panel)), var(--exchange-panel) 95%) !important;
    border-color: color-mix(in srgb, var(--accent) 38%, var(--glass-line)) !important;
}
body[data-theme="light"] .study-category-panel, body[data-theme="light"] #help .faq-item {
    background: linear-gradient(var(--category-gradient-angle, 115deg), color-mix(in srgb, var(--accent) 10%, white), #fff 95%) !important;
    border-color: color-mix(in srgb, var(--accent) 25%, var(--glass-line)) !important;
}
.progress-summary-card, #help .contact-card-primary {
    background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 8%, var(--glass-bg-strong)), var(--glass-bg-strong)) !important;
    border-color: var(--accent-border) !important;
}

/* Colour sits at the outer edges of each pair; the middle stays graphite/white. */
#homework .hw-category-card:is([data-category="Программирование"], [data-category="HARD – LEVEL"]) {
    --category-gradient-angle: 245deg;
}
#hwViewNumbers .hw-section-card-num {
    min-width: 52px; width: 52px; height: auto; padding: 0;
    flex: 0 0 52px; border: 0; border-radius: 0; background: none;
    color: var(--text-primary); font-size: clamp(26px, 3vw, 34px); line-height: 1.2;
}
/* Content loading never changes the dialog's centering anchor. */
#noteViewerPopup { height: min(80vh, calc(100dvh - 32px)); }
@media (max-height: 500px) { #noteViewerPopup { height: calc(100dvh - 16px); } }

/* Shared icon scale and stroke; brand marks and data visualisations keep their geometry. */
svg[viewBox="0 0 24 24"] { stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.site-icon { display: inline-block; width: 24px; height: 24px; flex: 0 0 auto; vertical-align: middle; }
.site-icon.nav-icon { width: 22px; height: 22px; }
:is(.study-category-icon, .ep-category-icon, .cat-progress-item-icon, .faq-item-icon) > svg { width: 28px !important; height: 28px !important; }
:is(button, a) > .site-icon { width: 20px; height: 20px; }
[data-category] { --category-ink: #c18d88; }
[data-category="Текстовые задачи"] { --category-ink: #b8a17a; }
[data-category="Программирование"] { --category-ink: #92adc8; }
[data-category="Электронные таблицы"] { --category-ink: #95b4a1; }
body[data-theme="light"] [data-category] { --category-ink: #985650; }
body[data-theme="light"] [data-category="Текстовые задачи"] { --category-ink: #806b48; }
body[data-theme="light"] [data-category="Программирование"] { --category-ink: #536e8a; }
body[data-theme="light"] [data-category="Электронные таблицы"] { --category-ink: #536f60; }
:is(.study-category-icon, .ep-category-icon) { color: var(--category-ink, var(--text-secondary)); }
.study-disclosure-header { display: flex; align-items: center; gap: var(--panel-gap); cursor: pointer; }
.study-disclosure .study-category-icon { display: flex; align-items: center; justify-content: center; border-radius: var(--radius-lg); background: var(--glass-bg-strong); border: 1px solid var(--glass-line); }
.study-disclosure-progress { flex: 0 1 120px; min-width: 64px; color: var(--text-secondary); font: 500 14px/1.5 'JetBrains Mono', monospace; }
.study-disclosure-progress .hw-section-card-bar { margin-top: 6px; }
.study-disclosure-progress .hw-section-card-bar-fill { background: var(--accent); }
.study-disclosure .cat-progress-item-toggle, #help .faq-item-toggle { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid var(--glass-line); border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.study-disclosure .cat-progress-item-toggle svg { width: 20px; height: 20px; }
.study-disclosure.expanded .cat-progress-item-toggle { transform: rotate(180deg); }
.study-disclosure-header:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: var(--radius-lg); }
#help .faq-item-icon { width: var(--panel-icon); height: var(--panel-icon); flex: 0 0 var(--panel-icon); border-radius: var(--radius-lg); }
@media (max-width: 600px) {
    .study-disclosure-header { flex-wrap: wrap; }
    .study-disclosure-progress { order: 4; flex-basis: 100%; }
    #hwViewNumbers .hw-section-card-num { min-width: 44px; width: 44px; flex-basis: 44px; }
}

#help .faq-item-question { font-size: clamp(17px, 1.5vw, 21px); font-weight: 600; line-height: 1.35; }
#help .faq-item-icon { background: var(--glass-bg-strong); border-color: var(--glass-line); }

:is(#hwNumbersHeader, #hwTasksHeader) .site-icon { width: 28px; height: 28px; color: var(--category-ink); }

:is(#reports, #educational-plans) .ep-nav-tabs { flex-wrap: wrap; }

/* Follow-up: preserve the accepted notes/statistics surfaces; refine their neighbours. */
.sidebar-logo, .sidebar-user { border-bottom: 0; }
.sidebar > .sidebar-nav-divider { flex: 0 0 1px; margin: 12px 28px; }
.sidebar-logo { padding-bottom: 12px; }
.sidebar-user { padding-block: 16px; margin-bottom: 0; }

/* Same row geometry as notes, including a stable width for 19–21. */
#hwNumberList { display: flex; flex-direction: column; gap: 10px; }
#hwNumberList .hw-section-card { margin: 0; }
#hwViewNumbers .hw-section-card-num {
    min-width: 56px; width: auto; height: 56px; padding: 0 16px; flex: 0 0 auto;
    border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
    color: var(--text-tertiary); font-size: var(--font-2xl); line-height: normal;
}
.hw-number-meta { font: 500 14px/1.5 'JetBrains Mono',monospace; color: var(--text-secondary); }
.hw-number-arrow { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex: 0 0 32px; color: var(--text-tertiary); }
#hwNumbersHeader { margin-bottom: 16px !important; }
.hw-number-category-content { display: flex; align-items: center; gap: 16px; }
.hw-number-category .study-category-icon { display: flex; align-items: center; justify-content: center; border: 1px solid var(--glass-line); border-radius: var(--radius-lg); background: var(--glass-bg-strong); box-shadow: none; }
@media(max-width:600px){
    #hwViewNumbers .hw-section-card-num { min-width:44px; width:44px; height:44px; padding:0 6px; font-size:16px; flex:0 0 44px; }
    #hwViewNumbers .hw-section-card-num:first-child { width: auto; min-width:44px; flex-basis:auto; }
    .hw-number-arrow { width:24px; flex-basis:24px; }.hw-number-arrow svg { width:20px; height:20px; }
}

/* Calendar and event-list dialogs now use the note viewer's reversible fade/slide. */
.lesson-dialog {
    opacity: 0; transform: translateY(20px);
    transition: opacity 600ms cubic-bezier(.4,0,.2,1), transform 600ms cubic-bezier(.4,0,.2,1);
}
.lesson-dialog.active { opacity: 1; transform: translateY(0); }
.lesson-dialog.closing { opacity: 0; transform: translateY(20px); }
.lesson-dialog::backdrop { opacity: 0; transition: opacity 600ms cubic-bezier(.4,0,.2,1); }
.lesson-dialog.active::backdrop { opacity: 1; }.lesson-dialog.closing::backdrop { opacity: 0; }

/* Practice page: one typographic system and real results. */
.practice-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:32px; }
.practice-metric { display:flex; flex-direction:column; gap:16px; }
.practice-metric > span { font-size:13px; color:var(--text-secondary); }
.practice-metric > strong { font:600 32px/1.2 'JetBrains Mono',monospace; color:var(--text-primary); }
.practice-history { display:flex; flex-direction:column; gap:12px; }
.card.practice-test { padding:0 !important; overflow:hidden; }
.practice-test summary { display:flex; align-items:center; gap:20px; padding:24px; cursor:pointer; list-style:none; }
.practice-test summary::-webkit-details-marker { display:none; }
.practice-test-score { font:600 28px/1.2 'JetBrains Mono',monospace; min-width:76px; color:var(--text-primary); }
.practice-test-score small { font-size:16px; color:var(--text-secondary); }
.practice-test-heading { min-width:0; flex:1; }.practice-test-heading h3 { font-size:17px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
.practice-test-heading p { font-size:13px; color:var(--text-secondary); margin-top:6px; }
.practice-test-toggle { width:36px; height:36px; flex:0 0 36px; display:flex; align-items:center; justify-content:center; border:1px solid var(--glass-line); border-radius:50%; background:var(--surface); }
.practice-test-toggle svg { width:20px; height:20px; }.practice-test.expanded .practice-test-toggle { transform:rotate(180deg); }
.practice-test-body { padding:0 24px 24px; }.practice-test-body dl { border-top:1px solid var(--glass-line); padding-top:20px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.practice-test-body dt { font-size:12px; color:var(--text-secondary); line-height:1.6; }.practice-test-body dd { margin-top:6px; font:500 17px/1.5 'JetBrains Mono',monospace; }
.practice-empty { text-align:center; padding:40px 24px !important; }.practice-empty-icon { color:var(--accent); margin-bottom:16px; }.practice-empty-icon svg { width:36px; height:36px; }
.practice-empty h3 { font-size:22px; line-height:1.4; }.practice-empty p { color:var(--text-secondary); font-size:14px; line-height:1.8; max-width:55ch; margin:16px auto 24px; }
.practice-resources { margin-top:40px; }.practice-resource-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }.practice-resource-heading { display:flex; justify-content:space-between; gap:16px; align-items:center; }.practice-resource-heading h3 { font-size:19px; }.practice-resource-heading span { font-size:12px; color:var(--text-secondary); }.practice-resource p { margin-top:14px; font-size:14px; line-height:1.8; color:var(--text-secondary); }.practice-error { font-size:14px; line-height:1.8; color:var(--text-secondary); }
@media(max-width:600px){.practice-metrics { gap:10px; }.practice-metric { padding:16px 12px !important; gap:12px; }.practice-metric > strong { font-size:24px; }.practice-metric > span { font-size:11px; line-height:1.5; }.practice-test summary { padding:18px; gap:12px; flex-wrap:wrap; }.practice-test-score { min-width:60px; font-size:24px; }.practice-test-heading { flex-basis:calc(100% - 80px); }.practice-test-toggle { margin-left:auto; }.practice-test-body { padding:0 18px 18px; }.practice-test-body dl { grid-template-columns:repeat(2,minmax(0,1fr)); }.practice-resource-grid { grid-template-columns:1fr; }}

/* Achievement rewards retain their meaning without a second colour system. */
#achievements [style*="gradient"] { background-image:none !important; }
#achievements [style*="background-clip: text"] { background:none !important; color:var(--text-primary) !important; -webkit-text-fill-color:var(--text-primary) !important; }
#achievements .card svg { color:var(--accent) !important; stroke:var(--accent) !important; }
#achievementsGrid > div > div { border-color:var(--glass-line) !important; background:var(--glass-bg-strong) !important; border-radius:24px !important; }
#achievementsGrid svg { width:28px !important; height:28px !important; }
#achievementsGrid [style*="width: 64px"][style*="height: 64px"] { width:56px !important; height:56px !important; background:var(--surface) !important; border-color:var(--glass-line) !important; }

/* Help: quiet questions, purposeful accents on contacts and useful actions. */
#help .faq-item, body[data-theme="light"] #help .faq-item { background:var(--glass-bg-strong) !important; border-color:var(--glass-line) !important; }
#help .contact-card, #help .info-card { position:relative; overflow:hidden; }
#help .contact-card-primary { background:linear-gradient(120deg,color-mix(in srgb,var(--accent) 9%,var(--glass-bg-strong)),var(--glass-bg-strong)) !important; border-color:var(--accent-border) !important; }
#help .contact-card-primary .contact-method-icon { color:var(--accent); border-color:var(--accent-border); background:var(--accent-muted); }
#help .contact-card-primary svg { stroke:var(--accent) !important; }
#help .info-card:first-child { background:linear-gradient(140deg,color-mix(in srgb,var(--accent) 7%,var(--glass-bg-strong)),var(--glass-bg-strong) 85%) !important; }
#help .info-card-icon { background:var(--accent-muted); border-color:var(--accent-border); color:var(--accent); }
#help .info-card-icon svg { stroke:var(--accent); }
#help .info-card-link { color:var(--accent); font-weight:500; }
.telegram-link-card { display:flex; align-items:center; gap:20px; margin:20px 0 0; padding:24px; border:1px solid var(--glass-line); border-radius:24px; background:var(--glass-bg-strong); }
.telegram-link-icon { width:48px; height:48px; flex:0 0 48px; display:flex; align-items:center; justify-content:center; border:1px solid var(--accent-border); background:var(--accent-muted); border-radius:16px; color:var(--accent); }.telegram-link-icon svg { width:26px; height:26px; }
.telegram-link-content { min-width:0; flex:1; }.telegram-link-content h3 { font-size:17px; line-height:1.4; }.telegram-link-content p { font-size:13px; color:var(--text-secondary); line-height:1.8; margin-top:6px; }.telegram-link-button { font-size:13px; flex-shrink:0; }.telegram-link-card.is-linked .telegram-link-icon { color:var(--text-secondary); background:var(--surface); border-color:var(--glass-line); }
@media(max-width:700px){.telegram-link-card { flex-wrap:wrap; padding:18px; gap:14px; }.telegram-link-content { flex-basis:calc(100% - 70px); }.telegram-link-button { margin-left:62px; white-space:normal; }}

@media(prefers-reduced-motion:reduce){.lesson-dialog,.lesson-dialog::backdrop{transition:none !important;}}
#help .contact-grid .contact-card:not(.contact-card-primary) { background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 4%,var(--glass-bg-strong)),var(--glass-bg-strong) 85%) !important; }
#help .contact-grid .contact-card:not(.contact-card-primary) .contact-method-icon { background:var(--surface); border-color:var(--glass-line); }
#help .contact-grid .contact-card:not(.contact-card-primary) .contact-method-icon svg { stroke:var(--category-ink,var(--text-secondary)) !important; }
#help .info-card:last-child { background:linear-gradient(230deg,color-mix(in srgb,var(--accent) 5%,var(--glass-bg-strong)),var(--glass-bg-strong) 85%) !important; }
@media(max-width:600px){
    #hwViewNumbers .hw-section-card-num { min-width:44px !important; width:44px !important; height:44px !important; padding:0 6px !important; font-size:16px !important; flex:0 0 44px !important; }
    #hwViewNumbers .hw-section-card-num[data-number="19-21"] { min-width:60px !important; width:auto !important; flex-basis:auto !important; }
}
.hw-number-category { border-radius:var(--radius-lg); }
.achievement-overview { display:grid; grid-template-columns:1fr 1fr 1.4fr; gap:16px; margin-bottom:32px; }
.achievement-overview-card { display:flex; flex-direction:column; align-items:flex-start; gap:16px; }
.achievement-overview h2 { font-size:14px; font-weight:500; line-height:1.5; color:var(--text-secondary); }
.achievement-overview-card > strong { font:600 32px/1.2 'JetBrains Mono',monospace; color:var(--text-primary); }
.achievement-overview-card > span { font-size:13px; color:var(--text-secondary); line-height:1.5; }
.achievement-rewards p { font-size:13px; color:var(--text-secondary); line-height:1.7; margin:12px 0 16px; }
@media(max-width:700px){.achievement-overview { grid-template-columns:1fr 1fr; gap:12px; }.achievement-overview-card { gap:12px; }.achievement-overview-card > strong { font-size:26px; }.achievement-rewards { grid-column:1/-1; }}
/* Leave room for the 20px entrance even when a day contains many lessons. */
.lesson-dialog { max-height:calc(100dvh - 48px); }
/* Transformed modal hosts fixed descendants: size the shared toast to that host. */
.lesson-dialog .universal-notif { width:min(480px,calc(100% - 32px)); max-width:calc(100% - 32px); }

/* Calendar date/time is a typographic column, never a nested tile. */
:is(#todayEvents,#tomorrowEvents,#upcomingEvents) .hw-section-card-num {
    background:none !important; border:0 !important; border-radius:0 !important; box-shadow:none !important;
    width:72px !important; min-width:72px !important; height:auto !important; padding:0 !important;
    flex:0 0 72px; font-size:18px !important; font-weight:600; line-height:1.4;
}
:is(#todayEvents,#tomorrowEvents,#upcomingEvents) .hw-section-card-num > * { font-size:inherit !important; }
@media(max-width:600px){:is(#todayEvents,#tomorrowEvents,#upcomingEvents) .hw-section-card-num{width:60px !important;min-width:60px !important;flex-basis:60px;font-size:16px !important;}}
.hw-task-heading .hw-number-category-content { align-items:center; }
.hw-task-heading-progress { flex:0 1 160px; min-width:100px; color:var(--text-secondary); }
.hw-heading-count { display:block; font:500 13px/1.5 'JetBrains Mono',monospace; margin-bottom:8px; }
.hw-task-heading-progress .hw-section-card-bar-fill { background:var(--accent) !important; }
@media(max-width:600px){.hw-task-heading .hw-number-category-content{flex-wrap:wrap;}.hw-task-heading .study-category-info{flex-basis:calc(100% - 70px);}.hw-task-heading-progress{flex:1 1 100%;margin-left:60px;}}

/* Controls stay put while the content changes. */
.sidebar .sidebar-nav a, .sidebar .sidebar-nav .nav-icon { transform:none !important; animation:none !important; transition-property:background-color,border-color,color !important;transition-duration:180ms !important;transition-timing-function:ease !important; }
:is(.student-profile-tabs,.ep-nav-tabs,.students-toolbar) :is(button,input,select){transition-property:background-color,border-color,color !important;transition-duration:180ms !important;transition-timing-function:ease !important;}

.practice-summary-layout { margin-bottom:32px; }
.practice-summary-layout .practice-metrics { margin-bottom:16px; }
.practice-summary-layout .practice-metric { position:relative; overflow:hidden; }
.practice-summary-layout .practice-metric:first-child { background:linear-gradient(120deg,color-mix(in srgb,var(--accent) 10%,var(--glass-bg-strong)),var(--glass-bg-strong)) !important;border-color:var(--accent-border); }
.practice-trend-heading { display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:16px; }
.practice-trend-heading h2 { font-size:17px;font-weight:600; }.practice-trend-heading > span{font-size:12px;color:var(--text-secondary);}
.practice-trend-chart { display:flex;align-items:flex-end;gap:24px;min-height:150px; }
.practice-trend-chart button { display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:10px;min-width:44px;flex:0 1 72px;padding:0;border:0;background:transparent;color:var(--text-secondary);cursor:pointer; }
.practice-trend-chart strong{font:500 14px/1.5 'JetBrains Mono',monospace;color:var(--text-primary);}.practice-trend-chart small{font-size:11px;line-height:1.5;}
.practice-trend-bar{display:block;width:32px;max-width:100%;border-radius:7px 7px 2px 2px;background:var(--accent);opacity:.65;transition:opacity 180ms ease;}.practice-trend-chart button:hover .practice-trend-bar{opacity:1;}
.practice-resource-grid{grid-template-columns:repeat(3,minmax(0,1fr));}.practice-resource{display:flex;flex-direction:column;}.practice-resource-link{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:20px;margin-top:auto;color:var(--accent);font-size:14px;}
@media(max-width:700px){.practice-resource-grid{grid-template-columns:1fr;}.practice-trend-chart{gap:12px;}.practice-trend-chart button{min-width:0;flex:1;}.practice-trend-bar{width:24px;}.practice-trend-chart small{font-size:10px;}}

.achievement-summary-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;}.achievement-summary-heading svg{width:26px;height:26px;flex:0 0 26px;color:var(--accent);}
.achievement-overview-card > strong{font-size:38px;letter-spacing:-.04em;}.achievement-overview-card{gap:20px;}.achievement-earned-track{height:5px;width:100%;border-radius:999px;background:var(--surface-hover);margin-top:auto;overflow:hidden;}.achievement-earned-track > span{display:block;height:100%;background:var(--accent);border-radius:inherit;transition:width 600ms cubic-bezier(.4,0,.2,1);}
#achievements .achievement-rewards{background:linear-gradient(130deg,color-mix(in srgb,var(--accent) 10%,var(--glass-bg-strong)),var(--glass-bg-strong)) !important;border-color:var(--accent-border);}
@media(max-width:600px){.achievement-overview-card > strong{font-size:30px;}.achievement-summary-heading{gap:8px;}.achievement-summary-heading svg{width:20px;height:20px;flex-basis:20px;}}

@media(prefers-reduced-motion:reduce){.practice-trend-bar,.achievement-earned-track >span{transition:none;}}

#upcomingEvents .hw-section-card-num{flex-direction:column;gap:2px;}
#upcomingEvents .hw-section-card-num > strong{font-size:22px !important;line-height:1.3;}
#upcomingEvents .hw-section-card-num > span{font-size:11px !important;font-weight:400;line-height:1.5;}


/* Larger calendar typography without putting dates back into badges. */
:is(#todayEvents,#tomorrowEvents) .hw-section-card-num{font-size:24px !important;width:88px !important;min-width:88px !important;flex-basis:88px;}
#upcomingEvents .hw-section-card-num >strong{font-size:30px !important;}
#upcomingEvents .hw-section-card-num >span{font-size:13px !important;}
.lesson-dialog-header{padding-bottom:24px;}
@media(max-width:600px){:is(#todayEvents,#tomorrowEvents) .hw-section-card-num{font-size:22px !important;width:76px !important;min-width:76px !important;flex-basis:76px;}#upcomingEvents .hw-section-card-num >strong{font-size:28px !important;}#upcomingEvents .hw-section-card-num >span{font-size:12px !important;}}
@media(max-width:520px){.lesson-dialog-header{padding-bottom:20px;}}

/* The overview has a stronger hierarchy; the original coral stays the only accent. */
.achievement-overview .achievement-summary-heading h2{font:650 clamp(18px,1.5vw,21px)/1.35 Inter,sans-serif;letter-spacing:-.025em;color:var(--text-primary);}
.achievement-overview #achNextTitle,.achievement-overview .achievement-rewards >p{font:500 11px/1.8 'JetBrains Mono',monospace;letter-spacing:.1em;text-transform:uppercase;color:var(--accent);}
.achievement-overview .achievement-rewards >p{margin:20px 0;}
.practice-summary-layout .practice-metric:first-child{background:linear-gradient(125deg,color-mix(in srgb,var(--accent) 19%,var(--glass-bg-strong)),var(--glass-bg-strong) 95%) !important;}
.practice-summary-layout .practice-metric:last-child{background:linear-gradient(235deg,color-mix(in srgb,var(--accent) 10%,var(--glass-bg-strong)),var(--glass-bg-strong) 85%) !important;}
.practice-metric strong{font-size:42px;letter-spacing:-.055em;}.practice-metric:first-child strong,.practice-test-score{color:var(--accent);}
.practice-trend{border-color:var(--accent-border);}.practice-trend-chart .practice-trend-bar{background:linear-gradient(to top,color-mix(in srgb,var(--accent) 55%,var(--surface)),var(--accent));opacity:1;}
.practice-trend-heading h2{font-size:21px;letter-spacing:-.025em;}.practice-trend-chart strong{font-size:16px;}
@media(max-width:700px){.practice-metric strong{font-size:30px;}.practice-trend-heading{align-items:flex-start;}.practice-trend-heading h2{font-size:19px;}}

/* Pointer-return focus is not a new selected state; keyboard focus stays visible. */
.lesson-pointer-return:focus,.lesson-pointer-return:focus-visible{outline:none !important;box-shadow:none !important;}
.achievement-overview-card .achievement-summary-heading{min-height:58px;align-items:flex-start;}
.achievement-overview-card .achievement-summary-heading h2{margin:0;}
.achievement-overview-card .achievement-summary-heading svg{margin-top:2px;}
@media(max-width:700px){.achievement-overview-card .achievement-summary-heading{min-height:48px;}.achievement-overview-card .achievement-summary-heading h2{font-size:17px;line-height:1.4;}}
