/* Scrollbar */
::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:#a0aec0}
.dark ::-webkit-scrollbar-track{background:#2d3748}.dark ::-webkit-scrollbar-thumb{background:#4a5568}.dark ::-webkit-scrollbar-thumb:hover{background:#718096}
html,body{
    width:100%;
    max-width:100%;
    overflow-x:hidden
}

:root{
    --sp-header-offset:0px;
    --sp-search-pill-bg:#f5f7fa;
    --sp-search-pill-hover-bg:#eef2f6;
    --sp-search-pill-focus-bg:#fff;
    --sp-search-pill-border:#e6eaf2;
    --sp-search-pill-focus-border:#5e7cff;
    --sp-search-pill-focus-glow:rgba(94,124,255,.2);
    --sp-search-pill-text:#0f172a;
    --sp-search-pill-icon:#7b869c;
    --sp-search-pill-placeholder:#9aa6b8;
    --sp-search-pill-height:52px;
    --sp-search-pill-padding-y:.82rem;
    --sp-search-pill-padding-x:1.05rem;
    --sp-search-pill-gap:.6rem;
    --sp-search-pill-shadow:0 14px 30px -26px rgba(15,23,42,.3);
    --sp-search-pill-hover-shadow:0 16px 32px -28px rgba(15,23,42,.34);
    --sp-search-pill-focus-shadow:0 0 0 4px var(--sp-search-pill-focus-glow),0 18px 38px -28px rgba(94,124,255,.38)
}

/* Prevent theme CSS from bleeding into the Study Platform UI */
.study-platform-shell{
    font-family:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
    color:#0f172a;
    background-color:#f9fafb;
    width:100%;
    max-width:100vw;
    overflow-x:hidden
}

.study-platform-shell *{box-sizing:border-box;font-family:inherit}
.study-platform-shell :where(h1,h2,h3,h4,h5,h6){margin:0;font-weight:700;line-height:1.2;color:inherit}
.study-platform-shell :where(p){margin:0}
.study-platform-shell :where(a){color:inherit;text-decoration:none}
.study-platform-shell :where(ul,ol){margin:0;padding:0;list-style:none}
.study-platform-shell :where(button,input,textarea,select){font:inherit;color:inherit;background:none;border:none;outline:none;border-radius:0}
.study-platform-shell :where(button){padding:0;line-height:1}
.study-platform-shell :where(img){max-width:100%;height:auto;display:block}
.study-platform-shell #app{isolation:isolate}

.dark{
    --sp-search-pill-bg:#0f172a;
    --sp-search-pill-hover-bg:#111a2d;
    --sp-search-pill-focus-bg:#0b1221;
    --sp-search-pill-border:#1f2937;
    --sp-search-pill-focus-border:#7c8bff;
    --sp-search-pill-focus-glow:rgba(124,139,255,.22);
    --sp-search-pill-text:#f8fafc;
    --sp-search-pill-icon:#cbd5f5;
    --sp-search-pill-placeholder:#94a3b8
}
#app{min-height:100vh;display:flex;flex-direction:column;overflow-x:hidden}
#lesson-shell{position:relative;width:100%;max-width:100vw;min-width:0;overflow-x:hidden}
.study-platform-shell #app,.study-platform-shell .prelude-shell,.study-platform-shell header,.study-platform-shell main,.study-platform-shell .prelude-shell section{width:100%;max-width:100vw;overflow-x:hidden}
#content{min-width:0;padding-bottom:max(2.5rem,calc(env(safe-area-inset-bottom,0)+1.5rem));transition:margin-left .28s ease}
#lesson-shell.sidebar-open #content{margin-left:0}
@media (min-width:768px){#lesson-shell.sidebar-open #content{margin-left:18rem}#lesson-shell.sidebar-closed #content{margin-left:auto}}
.sidebar-shell{background:linear-gradient(180deg,#f7f9ff,#eef2ff);border-right:1px solid rgba(15,23,42,.06);box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 12px 42px -30px rgba(15,23,42,.38)}
.dark .sidebar-shell{background:linear-gradient(180deg,#0c1427,#0b1221);border-right-color:rgba(148,163,184,.18);box-shadow:inset 0 1px 0 rgba(255,255,255,.03),0 16px 52px -34px rgba(0,0,0,.9)}
.study-platform-shell header{position:relative;z-index:90}
.sp-header-logo{height:42px;max-height:52px;width:auto;display:block}
.sp-seo-index{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.sp-seo-index:focus-within{position:static;width:auto;height:auto;overflow:visible;padding:1rem;background:linear-gradient(135deg,#f8fafc,#e2e8f0);border:1px solid rgba(15,23,42,.06);border-radius:1rem;box-shadow:0 10px 30px -24px rgba(15,23,42,.35)}
.sp-seo-index__wrap{display:flex;flex-direction:column;gap:.75rem;color:#0f172a}
.sp-seo-index__section{display:flex;flex-direction:column;gap:.4rem}
.sp-seo-index__lesson{display:flex;flex-direction:column;gap:.35rem;padding:.35rem 0}
.sp-seo-index__body{font-size:.95rem;line-height:1.5rem;color:#1f2937}
.sp-seo-index__lock{font-size:.9rem;font-weight:600;color:#9333ea}
.header-search{position:relative;z-index:100;display:flex;align-items:center;gap:.65rem;width:100%;max-width:clamp(20rem,55vw,40rem);min-width:0;padding:.35rem 1rem;border-radius:.9rem;background:transparent;border:1px solid rgba(255,255,255,.2);box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 14px 30px -24px rgba(0,0,0,.55);color:#e2e8f0;backdrop-filter:blur(6px);transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .18s ease;min-height:2.45rem;max-height:100%}
.header-search:hover{background:linear-gradient(120deg,rgba(255,255,255,.12),rgba(255,255,255,.08));border-color:rgba(255,255,255,.3)}
.header-search:focus-within{background:#fff;border-color:#5e7cff;box-shadow:0 0 0 4px rgba(94,124,255,.2),0 12px 30px -18px rgba(94,124,255,.35);color:#0f172a;transform:translateY(-1px)}
.header-search__icon{width:1.05rem;height:1.05rem;color:rgba(255,255,255,.75);transition:color .2s ease}
.header-search:focus-within .header-search__icon{color:#2563eb}
.header-search__input{flex:1;min-width:0;background:transparent;border:1px solid transparent!important;color:inherit;outline:none;font-weight:600;font-size:.98rem;padding:.05rem 0;letter-spacing:.01em;font-family:inherit}
.header-search__input::placeholder{color:rgba(255,255,255,.72);font-weight:500}
.header-search:not(:focus-within) .header-search__input{background:transparent}
.header-search:focus-within .header-search__input::placeholder{color:#94a3b8}
.header-search__clear{display:inline-flex;align-items:center;justify-content:center;width:1.9rem;height:1.9rem;border-radius:9999px;color:rgba(255,255,255,.75);opacity:0;transition:opacity .18s ease,transform .18s ease,background .18s ease,color .18s ease}
.dark .header-search__clear{color:#cbd5f5}
.header-search__clear svg{width:1rem;height:1rem}
.user-menu-anchor{position:relative;z-index:12000}
#user-menu-dropdown{z-index:12010}
.user-menu-dropdown--floating{position:fixed;top:var(--user-menu-top,0);left:var(--user-menu-left,0);z-index:12050;min-width:14rem}
.header-search__clear:is(:hover,:focus-visible){opacity:1;color:#0ea5e9;background:rgba(14,165,233,.16);transform:scale(1.05)}
.dark .header-search__clear:is(:hover,:focus-visible){color:#93c5fd;background:rgba(59,130,246,.18)}
.header-search:focus-within .header-search__clear{opacity:1;color:#0ea5e9}
.header-search:focus-within .header-search__clear:hover{color:#0284c7}
.math-inline{font-weight:600;font-style:normal}
.math-inline sub,.math-inline sup{font-size:.85em;line-height:0;vertical-align:baseline}
.math-inline sub{vertical-align:sub}
.math-inline sup{vertical-align:super}
.search-dropdown{position:fixed;top:var(--search-dropdown-top,0);left:var(--search-dropdown-left,50%);transform:translateX(var(--search-dropdown-translate,-50%));z-index:9999;width:var(--search-dropdown-width,min(32rem,calc(100vw - 1.5rem)));max-width:calc(100vw - 1.5rem);max-height:min(70vh,36rem);background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border:1px solid rgba(15,23,42,.08);border-radius:1rem;box-shadow:0 25px 60px -28px rgba(15,23,42,.35);overflow:hidden;overflow-y:auto;overscroll-behavior:contain}
.dark .search-dropdown{background:rgba(15,23,42,.95);border-color:rgba(148,163,184,.18);box-shadow:0 25px 60px -32px rgba(0,0,0,.8)}
.search-dropdown__placeholder{padding:1rem 1.1rem;color:#475569;font-weight:600;letter-spacing:.01em}
.dark .search-dropdown__placeholder{color:#cbd5f5}
.search-result-item{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.85rem;padding:.9rem 1rem;border:none;background:linear-gradient(120deg,rgba(248,250,252,.82),rgba(255,255,255,.85));text-align:left;color:#0f172a;font-weight:700;border-radius:.6rem;transition:transform .15s ease,box-shadow .15s ease,background .15s ease,color .15s ease}
.search-result-item+.search-result-item{border-top:1px solid rgba(15,23,42,.06)}
.search-result-item:hover{transform:translateY(-1px);box-shadow:0 12px 20px -18px rgba(15,23,42,.45);background:linear-gradient(120deg,rgba(14,165,233,.14),rgba(255,255,255,.94))}
.search-result-text{display:flex;flex-direction:column;gap:.15rem;min-width:0}
.search-result-title{font-size:.98rem;line-height:1.25rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-result-snippet{font-size:.9rem;line-height:1.35rem;color:#1f2937;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.search-result-snippet mark{background:rgba(14,165,233,.18);color:#0ea5e9;border-radius:.25rem;padding:0 .15rem}
.search-result-meta{font-size:.82rem;color:#64748b;font-weight:600}
.search-result-item svg{width:1rem;height:1rem;color:#0ea5e9}
.dark .search-result-item{color:#e2e8f0;background:linear-gradient(120deg,rgba(30,41,59,.8),rgba(15,23,42,.9))}
.dark .search-result-item+.search-result-item{border-color:rgba(148,163,184,.12)}
.dark .search-result-item:hover{background:linear-gradient(120deg,rgba(59,130,246,.2),rgba(17,24,39,.95));box-shadow:0 12px 22px -18px rgba(0,0,0,.9)}
.dark .search-result-snippet{color:#e5e7eb}
.dark .search-result-snippet mark{background:rgba(59,130,246,.28);color:#bfdbfe}
.dark .search-result-meta{color:#94a3b8}
.search-result-empty{padding:.9rem 1rem;font-weight:700;color:#475569}
.dark .search-result-empty{color:#cbd5f5}
.sidebar-search{display:flex;flex-direction:column;gap:.6rem;margin-bottom:1.25rem;padding:1rem;border-radius:1rem;background:linear-gradient(150deg,#f7f9ff,#eef3ff);border:1px solid rgba(15,23,42,.06);box-shadow:0 18px 40px -32px rgba(15,23,42,.35)}
.dark .sidebar-search{background:linear-gradient(150deg,#0f172a,#0b1221);border-color:rgba(148,163,184,.16);box-shadow:0 20px 46px -34px rgba(0,0,0,.85)}
.sidebar-search__field{display:flex;align-items:center;gap:.8rem;padding:.85rem 1rem;border-radius:1rem;background:rgba(255,255,255,.92);border:1px solid rgba(15,23,42,.08);box-shadow:inset 0 1px 0 rgba(255,255,255,.65),0 12px 30px -24px rgba(15,23,42,.3);transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease,transform .18s ease}
.sidebar-search__field:hover{background:#fff;border-color:rgba(14,165,233,.28);box-shadow:0 16px 34px -28px rgba(14,165,233,.28)}
.sidebar-search__field:focus-within{border-color:#5e7cff;box-shadow:0 0 0 4px rgba(94,124,255,.16),0 18px 38px -28px rgba(94,124,255,.35);transform:translateY(-1px);background:#fff}
.sidebar-search__field input{flex:1;min-width:0;border:none;background:transparent;font-weight:600;color:#0f172a;outline:none;letter-spacing:.01em;font-size:.95rem;font-family:inherit}
.sidebar-search__field input::placeholder{color:#64748b;font-weight:500}
.dark .sidebar-search__field{background:rgba(17,24,39,.85);border-color:rgba(148,163,184,.18);box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 12px 32px -26px rgba(0,0,0,.75)}
.dark .sidebar-search__field:hover{background:rgba(17,24,39,.95);border-color:rgba(94,234,212,.28);box-shadow:0 16px 36px -28px rgba(94,234,212,.22)}
.dark .sidebar-search__field:focus-within{border-color:#93c5fd;box-shadow:0 0 0 4px rgba(147,197,253,.18),0 18px 40px -28px rgba(0,0,0,.9)}
.dark .sidebar-search__field input{color:#e2e8f0}
.dark .sidebar-search__field input::placeholder{color:#cbd5e1}
.sidebar-search__field svg{width:1rem;height:1rem;color:#0f172a;opacity:.7;transition:color .2s ease,opacity .2s ease}
.sidebar-search__field:focus-within svg{color:#2563eb;opacity:1}
.dark .sidebar-search__field svg{color:#cbd5f5;opacity:.8}
.sidebar-search__clear{opacity:0;border-radius:.75rem;padding:.15rem;transition:opacity .18s ease,color .18s ease,transform .18s ease,background .18s ease}
.sidebar-search__clear:hover{opacity:1;color:#0ea5e9;transform:scale(1.05);background:rgba(14,165,233,.12)}
.sidebar-search__field:focus-within .sidebar-search__clear{opacity:1}
.sidebar-search__empty{font-size:.9rem;color:#718096;font-weight:700;padding:0 .25rem}
.dark .sidebar-search__empty{color:#cbd5e1}
.category-card{display:flex;align-items:center;gap:.9rem;width:100%;text-align:left;padding:1rem 1.1rem;border-radius:1rem;background:linear-gradient(145deg,#f8fbff,#f3f6ff);border:1px solid rgba(15,23,42,.05);box-shadow:0 16px 40px -28px rgba(15,23,42,.3);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;cursor:pointer}
.category-card:hover{transform:translateY(-3px);box-shadow:0 18px 44px -26px rgba(14,165,233,.35);border-color:rgba(14,165,233,.25)}
.category-card__media{width:64px;height:64px;border-radius:1rem;overflow:hidden;background:linear-gradient(135deg,#e0f2fe,#e0e7ff);border:1px solid rgba(59,130,246,.15);display:grid;place-items:center;flex-shrink:0}
.category-card__media img{width:100%;height:100%;object-fit:cover}
.category-card__fallback{width:100%;height:100%;background:linear-gradient(135deg,#bfdbfe,#e0e7ff)}
.category-card__body{display:flex;flex-direction:column;align-items:flex-start;gap:.2rem}
.category-card__eyebrow{font-size:.78rem;font-weight:700;color:#475569;letter-spacing:.03em;text-transform:uppercase}
.category-card__title{font-size:1.1rem;font-weight:800;color:#0f172a;letter-spacing:.01em}
.dark .category-card{background:linear-gradient(145deg,#0f172a,#0b1221);border-color:rgba(148,163,184,.16);box-shadow:0 18px 46px -28px rgba(0,0,0,.9)}
.dark .category-card:hover{border-color:rgba(147,197,253,.4);box-shadow:0 20px 50px -26px rgba(59,130,246,.45)}
.dark .category-card__media{background:linear-gradient(135deg,#1e293b,#0f172a);border-color:rgba(148,163,184,.25)}
.dark .category-card__eyebrow{color:#cbd5e1}
.dark .category-card__title{color:#e2e8f0}
.lesson-card{display:flex;align-items:center;gap:.85rem;width:100%;text-align:left;padding:.85rem 1rem;border-radius:1rem;background:#fff;border:1px solid rgba(15,23,42,.06);box-shadow:0 14px 34px -28px rgba(15,23,42,.35);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;cursor:pointer}
.lesson-card:hover{transform:translateY(-2px);border-color:rgba(14,165,233,.3);box-shadow:0 18px 40px -28px rgba(14,165,233,.28)}
.lesson-card__media{width:52px;height:52px;border-radius:.85rem;overflow:hidden;background:linear-gradient(135deg,#e0f2fe,#e0e7ff);border:1px solid rgba(14,165,233,.18);display:grid;place-items:center;flex-shrink:0}
.lesson-card__media img{width:100%;height:100%;object-fit:cover}
.lesson-card__fallback{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;color:#0f172a;opacity:.8}
.lesson-card__fallback svg{width:1.2rem;height:1.2rem}
.lesson-card__body{display:flex;flex-direction:column;align-items:flex-start;gap:.15rem;min-width:0}
.lesson-card__title{font-weight:800;font-size:1rem;color:#0f172a;letter-spacing:.01em}
.lesson-card__meta{font-size:.9rem;color:#475569;font-weight:600}
.dark .lesson-card{background:linear-gradient(145deg,#111827,#0b1221);border-color:rgba(148,163,184,.16);box-shadow:0 16px 42px -30px rgba(0,0,0,.8)}
.dark .lesson-card:hover{border-color:rgba(147,197,253,.4);box-shadow:0 20px 50px -30px rgba(59,130,246,.45)}
.dark .lesson-card__media{background:linear-gradient(135deg,#1f2937,#0f172a);border-color:rgba(148,163,184,.2)}
.dark .lesson-card__fallback{color:#e2e8f0}
.dark .lesson-card__title{color:#e2e8f0}
.dark .lesson-card__meta{color:#cbd5e1}
.lesson-outline{padding:1.1rem;border-radius:1rem;background:linear-gradient(150deg,#f8fbff,#eef2ff);border:1px solid rgba(15,23,42,.06);box-shadow:0 18px 46px -32px rgba(15,23,42,.32);margin-bottom:1.25rem}
.lesson-outline__header{display:flex;align-items:center;gap:.85rem;margin-bottom:.75rem}
.lesson-outline__icon{width:3rem;height:3rem;border-radius:.9rem;background:linear-gradient(140deg,#dbeafe,#dbeafe);border:1px solid rgba(59,130,246,.24);box-shadow:0 12px 30px -22px rgba(59,130,246,.4);background-size:cover;background-position:center;flex-shrink:0}
.lesson-outline__icon.has-image{background-image:var(--outline-icon-image);background-color:#f8fafc;background-repeat:no-repeat;background-size:contain}
.lesson-outline__eyebrow{font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:#475569;font-weight:800}
.lesson-outline__title{font-size:1.1rem;font-weight:800;color:#0f172a}
.dark .lesson-outline__title,.dark #sidebar-outline-title{color:#fff!important}
.lesson-outline__category{color:#475569;font-weight:600}
.lesson-outline__list{display:flex;flex-direction:column;gap:.35rem;list-style:none;margin:0;padding:0}
.lesson-outline__item{width:100%}
.lesson-outline__link{width:100%;text-align:left;display:grid;grid-template-columns:1fr auto;gap:.2rem;align-items:center;padding:.65rem .75rem;border-radius:.85rem;border:1px solid rgba(15,23,42,.08);background:rgba(255,255,255,.72);backdrop-filter:blur(4px);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.lesson-outline__link:hover{transform:translateY(-1px);border-color:rgba(14,165,233,.38);box-shadow:0 10px 28px -24px rgba(14,165,233,.4)}
.lesson-outline__label{font-weight:500;color:#0f172a}
.lesson-outline__desc{grid-column:1/-1;font-size:.9rem;color:#475569;font-weight:600}
.lesson-outline__lock{display:inline-flex;align-items:center;justify-content:center;width:1.8rem;height:1.8rem;border-radius:9999px;background:rgba(14,165,233,.16);color:#0ea5e9}
.lesson-outline__lock svg{width:1rem;height:1rem}
.lesson-outline__empty{padding:.6rem .75rem;border-radius:.75rem;background:rgba(15,23,42,.04);color:#475569;font-weight:700}
.dark .lesson-outline{background:linear-gradient(150deg,#0f172a,#0b1221);border-color:rgba(148,163,184,.16);box-shadow:0 18px 46px -30px rgba(0,0,0,.88)}
.dark .lesson-outline__icon{background:linear-gradient(140deg,#1f2937,#0f172a);border-color:rgba(148,163,184,.26);box-shadow:0 10px 26px -24px rgba(59,130,246,.55)}
.dark .lesson-outline__icon.has-image{background-color:#0b1220;border-color:rgba(148,163,184,.4);box-shadow:0 10px 26px -18px rgba(59,130,246,.35);background-blend-mode:normal;background-image:var(--outline-icon-image),linear-gradient(140deg,#1f2937,#0f172a);background-repeat:no-repeat,no-repeat;background-size:contain,cover;background-position:center}
.dark .lesson-outline__link{background:rgba(15,23,42,.92);border-color:rgba(148,163,184,.16);color:#e2e8f0}
.dark .lesson-outline__link:hover{border-color:rgba(147,197,253,.45);box-shadow:0 16px 34px -26px rgba(59,130,246,.45)}
.dark .lesson-outline__label{color:#e2e8f0}
.dark .lesson-outline__desc{color:#cbd5e1}
.dark .lesson-outline__lock{background:rgba(59,130,246,.2);color:#bfdbfe}
.dark .lesson-outline__empty{background:rgba(17,24,39,.85);color:#cbd5e1}
#lesson-shell{align-items:stretch}
#sidebar{transition:transform .28s ease,box-shadow .28s ease,opacity .2s ease,width .2s ease,padding .2s ease;position:fixed;left:0;top:var(--sp-header-offset,0);bottom:0;overflow-y:auto;overscroll-behavior:contain;padding-bottom:calc(max(3.5rem,var(--sp-header-offset,0)) + env(safe-area-inset-bottom,0) + 1.5rem);scroll-padding-bottom:5rem;z-index:140}
#lesson-shell.sidebar-open #sidebar{box-shadow:0 20px 50px -26px rgba(15,23,42,.3)}
#lesson-shell.sidebar-closed #sidebar{opacity:0;pointer-events:none;width:0;padding:0;border-width:0;transform:translateX(-110%);position:absolute;left:-10000px}
#lesson-shell.sidebar-open #sidebar{transform:translateX(0)}
#sidebar-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.5);
    z-index:120;
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
}
#lesson-shell.sidebar-open #sidebar-overlay{
    opacity:1;
    pointer-events:auto;
}
@media (min-width:768px){#sidebar{width:18rem}#lesson-shell.sidebar-closed #sidebar{opacity:0;pointer-events:none;width:0;padding:0;border-width:0;transform:translateX(-110%);position:absolute;left:-10000px;box-shadow:none}}
@media (min-width:768px){body.admin-bar #sidebar{top:calc(var(--sp-header-offset,0) + 32px);bottom:0}}
@media (min-width:768px) and (max-width:782px){body.admin-bar #sidebar{top:calc(var(--sp-header-offset,0) + 46px);bottom:0}}
@media (max-width:767px){.header-search{max-width:100%}.search-dropdown{left:0;right:0;margin:0 auto}}
/* Highlight */
.sp-highlight{background:var(--highlight-color,rgba(250,204,21,.45));padding:.05rem .15rem;border-radius:.25rem;box-shadow:inset 0 0 0 1px rgba(15,23,42,.05)}
.sp-highlight:focus-visible{outline:2px solid var(--highlight-color,rgba(59,130,246,.45));outline-offset:2px;box-shadow:0 0 0 4px rgba(59,130,246,.25)}
.dark .sp-highlight{background:color-mix(in srgb,var(--highlight-color,rgba(250,204,21,.65)) 92%,rgba(15,23,42,.9))}

.highlight-palette{display:flex;align-items:center;gap:.35rem;padding:.35rem .5rem;border-radius:.75rem;background:rgba(148,163,184,.12)}
.highlight-palette__label{font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;font-weight:700;color:#475569}
.highlight-palette__swatches{display:flex;align-items:center;gap:.4rem}
.dark .highlight-palette__label{color:#cbd5e1}
.highlight-swatch{width:1.45rem;height:1.45rem;border-radius:999px;border:1px solid rgba(0,0,0,.12);box-shadow:0 2px 6px -3px rgba(15,23,42,.4);position:relative}
.highlight-swatch.is-active{box-shadow:0 0 0 2px #0ea5e9,0 2px 6px -3px rgba(15,23,42,.55)}
.highlight-swatch::after{content:'';position:absolute;inset:50%;width:.45rem;height:.45rem;border-radius:50%;transform:translate(-50%,-50%);background:#fff;opacity:0;transition:opacity .12s ease}
.highlight-swatch.is-active::after{opacity:1}
.dark .highlight-palette{background:rgba(30,41,59,.55);border:1px solid rgba(148,163,184,.18)}
.dark .highlight-swatch{border-color:rgba(255,255,255,.16)}

#highlight-inspector{position:absolute;z-index:70;min-width:260px;max-width:340px;background:#fff;border:1px solid rgba(148,163,184,.35);border-radius:1rem;box-shadow:0 14px 38px -20px rgba(15,23,42,.45);padding:1rem;display:none}
#highlight-inspector[data-open="true"]{display:block}
#highlight-inspector__quote{font-size:.9rem;line-height:1.45rem;color:#0f172a;margin-bottom:.65rem}
#highlight-inspector__meta{display:flex;align-items:center;gap:.5rem;font-size:.8rem;color:#475569;margin-bottom:.75rem}
#highlight-inspector__actions{display:flex;align-items:center;justify-content:space-between;gap:.75rem}
#highlight-inspector__delete{color:#b91c1c;font-weight:700;padding:.45rem .75rem;border-radius:.7rem;transition:background-color .2s ease,color .2s ease;border:1px solid rgba(185,28,28,.14)}
#highlight-inspector__delete:hover{background:rgba(248,113,113,.12)}
.dark #highlight-inspector{background:#0f172a;border-color:rgba(148,163,184,.2);box-shadow:0 16px 36px -20px rgba(0,0,0,.7)}
.dark #highlight-inspector__quote{color:#e2e8f0}
.dark #highlight-inspector__meta{color:#cbd5e1}
.dark #highlight-inspector__delete{border-color:rgba(248,113,113,.25);color:#fecdd3}
.dark #highlight-inspector__delete:hover{background:rgba(248,113,113,.2)}
/* Reduce focus-jump on open/close */
[inert]{pointer-events:none;user-select:none}
button{border:none;background:transparent;transition:color .2s ease,background-color .2s ease,box-shadow .2s ease}
button:focus{outline:none}
button:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(96,165,250,.45);filter:none}
button:focus:not(:focus-visible){box-shadow:none;filter:none}
.lesson-actions{display:flex;flex-direction:column;gap:.5rem;padding:.65rem .85rem;border-radius:.9rem;background:rgba(255,255,255,.86);border:1px solid rgba(15,23,42,.05);box-shadow:0 10px 28px -24px rgba(15,23,42,.24);backdrop-filter:blur(6px)}
.dark .lesson-actions{background:rgba(15,23,42,.82);border-color:rgba(148,163,184,.16);box-shadow:0 12px 32px -26px rgba(0,0,0,.7)}
.lesson-toolbar{display:grid;grid-template-columns:1fr;gap:.35rem}
@media (min-width:1024px){.lesson-toolbar{grid-template-columns:auto 1fr;align-items:center}}
.lesson-toolbar__bar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"controls extras" "metrics metrics";gap:.35rem .45rem;align-items:center}
@media (min-width:640px){.lesson-toolbar__bar{gap:.5rem .6rem}}
@media (min-width:1024px){.lesson-toolbar__bar{grid-template-columns:auto 1fr auto;grid-template-areas:"controls metrics extras";align-items:center}}
.lesson-toolbar__controls{grid-area:controls;display:flex;align-items:center;gap:.35rem;flex-wrap:wrap}
@media (min-width:1024px){.lesson-toolbar__controls{flex-wrap:nowrap}}
.lesson-toolbar__button{display:inline-flex;align-items:center;gap:.35rem;height:2.25rem;padding:0 .65rem;border-radius:.75rem;border:1px solid rgba(15,23,42,.08);background:rgba(59,130,246,.08);color:#0f172a;font-weight:700;font-size:.92rem;line-height:1;white-space:nowrap;box-shadow:none}
.lesson-toolbar__button:hover{background:rgba(59,130,246,.14)}
.lesson-toolbar__inline-group{display:inline-flex;align-items:center;gap:.35rem;padding:.18rem .35rem;border-radius:.75rem;border:1px solid rgba(148,163,184,.22);background:rgba(148,163,184,.1)}
.dark .lesson-toolbar__inline-group{background:rgba(148,163,184,.14);border-color:rgba(148,163,184,.28)}
.lesson-toolbar__button--ghost{background:rgba(148,163,184,.12);border-color:rgba(148,163,184,.32)}
.lesson-toolbar__button--ghost:hover{background:rgba(148,163,184,.18)}
.lesson-toolbar__button--alert{background:rgba(248,113,113,.12);color:#b91c1c;border-color:rgba(248,113,113,.28);box-shadow:none}
.lesson-toolbar__button--alert:hover{background:rgba(248,113,113,.18)}
.dark .lesson-toolbar__button{background:rgba(59,130,246,.16);color:#e2e8f0;border-color:rgba(59,130,246,.2)}
.dark .lesson-toolbar__button:hover{background:rgba(59,130,246,.22)}
.dark .lesson-toolbar__button--ghost{background:rgba(148,163,184,.14);color:#e2e8f0;border-color:rgba(148,163,184,.35)}
.dark .lesson-toolbar__button--ghost:hover{background:rgba(148,163,184,.2)}
.dark .lesson-toolbar__button--alert{background:rgba(248,113,113,.18);color:#fecdd3;border-color:rgba(248,113,113,.32)}
.dark .lesson-toolbar__button--alert:hover{background:rgba(248,113,113,.24)}
.lesson-toolbar__label{font-weight:700;letter-spacing:.01em}
@media (max-width:640px){.lesson-toolbar__label{display:none}}
.lesson-toolbar__divider{width:1px;height:1.6rem;background:rgba(15,23,42,.08);flex-shrink:0}
.dark .lesson-toolbar__divider{background:rgba(148,163,184,.2)}
.lesson-toolbar__palette{flex-shrink:0}
.lesson-toolbar__extras{grid-area:extras;display:flex;align-items:center;gap:.35rem;justify-content:flex-end;align-self:stretch}
.lesson-toolbar__extras>.lesson-toolbar__divider{height:2rem}
#font-size-menu{z-index:120}
#font-size-menu.font-size-menu--floating{position:fixed;top:var(--font-menu-top,0);left:var(--font-menu-left,0);right:auto;margin-top:0;z-index:999999;width:var(--font-menu-width,11rem);pointer-events:auto;box-shadow:0 18px 38px -18px rgba(15,23,42,.32),0 12px 28px -24px rgba(15,23,42,.26);isolation:isolate;transform:translateZ(0)}
.highlight-palette{gap:.25rem;padding:.28rem .35rem;border-radius:.65rem;background:rgba(148,163,184,.1);border:1px solid rgba(148,163,184,.22)}
.dark .highlight-palette{background:rgba(30,41,59,.5);border-color:rgba(148,163,184,.2)}
.highlight-palette__swatches{gap:.3rem}
.highlight-swatch{width:1.25rem;height:1.25rem}
.lesson-toolbar__metrics{grid-area:metrics;display:flex;align-items:center;gap:.4rem;justify-content:flex-start;flex-wrap:wrap;color:#475569}
.dark .lesson-toolbar__metrics{color:#cbd5f5}
@media (min-width:640px){.lesson-toolbar__metrics{justify-content:flex-end}}
@media (min-width:1024px){.lesson-toolbar__metrics{flex-wrap:nowrap}}
.lesson-metric{display:inline-flex;align-items:center;gap:.3rem;padding:.28rem .5rem;border-radius:.7rem;background:rgba(15,23,42,.04);border:1px solid rgba(15,23,42,.08);line-height:1;white-space:nowrap;min-height:2rem}
.dark .lesson-metric{background:rgba(15,23,42,.7);border-color:rgba(148,163,184,.18)}
.lesson-metric__icon{display:grid;place-items:center;width:1.75rem;height:1.75rem;border-radius:.55rem;background:rgba(59,130,246,.12);color:#0ea5e9}
.dark .lesson-metric__icon{background:rgba(59,130,246,.18);color:#bfdbfe}
.lesson-metric__value{font-weight:800;font-variant-numeric:tabular-nums;font-feature-settings:"tnum" on,"lnum" on;min-width:6ch;text-align:right;color:#0f172a}
.lesson-metric__value--mono{min-width:7ch}
.dark .lesson-metric__value{color:#e2e8f0}
.lesson-metric--progress{gap:.4rem;padding-right:.6rem}
.lesson-progress-bar{position:relative;display:inline-flex;align-items:center;width:7.5rem;min-width:6.5rem;height:.4rem;border-radius:999px;background:rgba(148,163,184,.35);overflow:hidden}
.dark .lesson-progress-bar{background:rgba(71,85,105,.65)}
.lesson-progress-bar__fill{display:block;height:100%;background:linear-gradient(90deg,#38bdf8,#2563eb);border-radius:inherit;transition:width .25s ease}
.lesson-toolbar__metrics .lesson-metric{flex:0 0 auto}
@media (max-width:640px){
    .lesson-actions{padding:.55rem .65rem}
    .lesson-toolbar__button{height:2.1rem;padding:0 .55rem;font-size:.9rem}
    .lesson-toolbar__controls{gap:.3rem}
    .lesson-toolbar__metrics{gap:.32rem;flex-wrap:nowrap;justify-content:space-between;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;align-items:stretch}
    .lesson-toolbar__metrics .lesson-metric{width:100%;min-width:0;justify-content:center;text-align:center}
    .lesson-metric{padding:.24rem .4rem;gap:.24rem}
    .lesson-metric__icon{width:1.55rem;height:1.55rem}
    .lesson-metric__value,.lesson-metric__value--mono{min-width:0}
    .lesson-metric--progress{gap:.22rem}
    .lesson-progress-bar{width:100%;max-width:4.9rem;min-width:0}
}
.lesson-actions button{background-color:transparent;border:none}
.lesson-actions button:focus,.lesson-actions button:focus-visible{box-shadow:none}

#theme-toggle,
#user-menu-button,
.bookmark,
#reading-settings,
.section-action{
    border:none;
    background:transparent;
    transition:color .2s ease,background-color .2s ease,box-shadow .2s ease;
}
#theme-toggle:hover,
#reading-settings:hover,
.bookmark:hover,
.section-action:hover{
    background:rgba(125,211,252,.18);
    color:#0f172a;
}
.dark #theme-toggle:hover,
.dark #reading-settings:hover,
.dark .bookmark:hover,
.dark .section-action:hover{
    background:rgba(59,130,246,.22);
    color:#e2e8f0;
}

.bookmark.is-active{color:#2563eb;background-color:rgba(125,211,252,.3);box-shadow:0 10px 25px -12px rgba(59,130,246,.45)}
.dark .bookmark.is-active{color:#93c5fd;background-color:rgba(37,99,235,.35);box-shadow:0 10px 25px -16px rgba(191,219,254,.4)}
.bookmark svg{transition:transform .2s ease,fill .2s ease}
.bookmark.is-active svg{fill:currentColor}

#lesson-text{font-size:var(--lesson-font-size,1rem);line-height:var(--lesson-line-height,1.7);-webkit-touch-callout:none;touch-action:manipulation;display:flex;flex-direction:column;gap:1.75rem}
#lesson-text p{font-size:inherit;line-height:inherit}
.lesson-section-card{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:.9rem;overflow:hidden;box-shadow:0 20px 45px -32px rgba(15,23,42,.35)}
.dark .lesson-section-card{background:#1f2937;border-color:rgba(148,163,184,.25);box-shadow:0 20px 40px -28px rgba(15,23,42,.6)}
.lesson-section-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.25rem 1.5rem;border-bottom:1px solid rgba(15,23,42,.08)}
.dark .lesson-section-header{border-color:rgba(148,163,184,.2)}
.lesson-section-title{font-size:1.35rem;line-height:1.8rem;font-weight:600;color:#0f172a;margin:0}
.dark .lesson-section-title{color:#e2e8f0}
.lesson-section-toggle{display:inline-flex;align-items:center;justify-content:center;padding:.35rem;color:#0f172a;background:transparent;border-radius:9999px;box-shadow:none;transition:color .2s ease,transform .2s ease}
.lesson-section-toggle svg{width:1.1rem;height:1.1rem}
.lesson-section-toggle:hover{color:#0284c7;transform:translateY(-1px)}
.dark .lesson-section-toggle{color:#e2e8f0;background:transparent}
.dark .lesson-section-toggle:hover{color:#93c5fd}
.lesson-section-toggle[aria-expanded="true"] .section-toggle-icon{transform:rotate(180deg)}
.lesson-section-toggle[aria-expanded="false"] .section-toggle-icon{transform:rotate(0deg)}
.section-toggle-icon{transition:transform .3s ease}
.lesson-section-panel{display:grid;grid-template-rows:1fr;transition:grid-template-rows .45s ease,opacity .3s ease;opacity:1}
.lesson-section-panel.is-collapsed{grid-template-rows:0fr;opacity:.96}
.lesson-section-panel-inner{overflow:hidden}
.lesson-section-body{padding:1.5rem}
.lesson-section-actions{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;padding:0 1.5rem 1.5rem;color:#475569}
.lesson-section-actions .section-action+.section-action{margin-top:.35rem}
@media (min-width:640px){.lesson-section-actions .section-action+.section-action{margin-top:0}}
@media (max-width:639px){.lesson-section-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;align-items:stretch}.lesson-section-actions .section-action+.section-action{margin-top:0}.lesson-section-actions .section-action{justify-content:center;width:100%}}
.dark .lesson-section-actions{color:#cbd5f5}
.section-action{display:inline-flex;align-items:center;gap:.45rem;padding:.45rem .9rem;border-radius:9999px;color:#0284c7;font-weight:500}
.section-action svg{transition:transform .2s ease}
.section-action:hover svg{transform:scale(1.05)}
.dark .section-action{color:#38bdf8}

@media (min-width:1024px){.lesson-actions{flex-direction:row;align-items:center}.lesson-actions__metrics{margin-left:auto;justify-content:flex-end;align-self:center}}

.sp-lesson-link{display:flex;align-items:center;gap:.55rem;position:relative;width:100%;min-width:0}
.sp-lesson-link__title{flex:1;min-width:0;font-weight:600;line-height:1.3;color:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp-lesson-link__progress{display:inline-flex;align-items:center;gap:.35rem;white-space:nowrap}
.sp-lesson-link__progress-label{font-size:.66rem;color:#64748b;min-width:2.25rem;text-align:right;font-variant-numeric:tabular-nums}
.dark .sp-lesson-link__progress-label{color:#94a3b8}
.sp-lesson-link.has-progress .sp-lesson-link__progress-label{color:#0f172a}
.dark .sp-lesson-link.has-progress .sp-lesson-link__progress-label{color:#e2e8f0}
.sidebar-subsection-container{margin-top:.75rem;padding:.65rem .75rem .75rem;border:1px solid rgba(148,163,184,.18);border-radius:.85rem;background:rgba(255,255,255,.72);display:flex;flex-direction:column;gap:.55rem;box-shadow:0 12px 26px -22px rgba(15,23,42,.35)}
.dark .sidebar-subsection-container{border-color:rgba(148,163,184,.28);background:rgba(17,24,39,.7);box-shadow:0 12px 30px -26px rgba(0,0,0,.85)}
.sidebar-subsection-container[hidden]{display:none}
.sidebar-subsection-toggle{display:flex;align-items:center;gap:.45rem;background:transparent;border:none;padding:0;color:#1e293b;font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;cursor:pointer}
.sidebar-subsection-toggle:focus-visible{outline:2px solid rgba(59,130,246,.45);outline-offset:3px}
.dark .sidebar-subsection-toggle{color:#cbd5f5}
.sidebar-subsection-toggle__label{flex:1;text-align:left}
.sidebar-subsection-toggle__icon{display:inline-flex;align-items:center;justify-content:center;width:1rem;height:1rem;transition:transform .22s ease}
.sidebar-subsection-toggle__icon svg{width:1rem;height:1rem}
.sidebar-subsection-toggle.is-collapsed .sidebar-subsection-toggle__icon{transform:rotate(-90deg)}
.sidebar-subsection-panel{margin-top:.1rem}
.sidebar-subsection-panel[hidden]{display:none}
.sidebar-subsection-list{list-style:none;margin:.6rem 0 0;padding:0;display:flex;flex-direction:column;gap:.85rem}
.sidebar-subsection-group{display:flex;flex-direction:column;gap:.4rem}
.sidebar-subsection-group__title{font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:#64748b;line-height:1.2}
.dark .sidebar-subsection-group__title{color:#94a3b8}
.sidebar-subsection-group__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.35rem}
.sidebar-subsection-item{margin:0;padding:0}
.sidebar-subsection-item.level-3{padding-left:.75rem}
.sidebar-subsection-item.level-4{padding-left:1.15rem}
.sidebar-subsection-item.level-5,.sidebar-subsection-item.level-6{padding-left:1.5rem}
.sidebar-subsection-link{display:flex;align-items:center;gap:.35rem;font-size:.85rem;line-height:1.4;color:#1e293b;text-decoration:none;border-radius:.55rem;padding:.25rem .45rem;transition:color .2s ease,background-color .2s ease}
.dark .sidebar-subsection-link{color:#d1d5db}
.sidebar-subsection-link:hover{color:#0f172a;background:rgba(59,130,246,.1)}
.dark .sidebar-subsection-link:hover{color:#bfdbfe;background:rgba(37,99,235,.2)}
.sidebar-subsection-link.is-active{color:#0f172a;background:rgba(59,130,246,.18);font-weight:600}
.dark .sidebar-subsection-link.is-active{color:#bfdbfe;background:rgba(37,99,235,.32)}

/* Inline lesson content overrides for dark mode */
.dark #lesson-text section[style]{
    background-color:#1f2937!important;
    border-color:rgba(148,163,184,.35)!important;
    color:#e2e8f0!important;
}
.dark #lesson-text section[style] h1,
.dark #lesson-text section[style] h2,
.dark #lesson-text section[style] h3,
.dark #lesson-text section[style] h4,
.dark #lesson-text section[style] h5,
.dark #lesson-text section[style] h6{
    color:#bfdbfe!important;
}
.dark #lesson-text section[style] h2[style]{
    border-color:rgba(147,197,253,.6)!important;
}
.dark #lesson-text section[style] h3{
    color:#93c5fd!important;
}
.dark #lesson-text section[style] p,
.dark #lesson-text section[style] li,
.dark #lesson-text section[style] strong,
.dark #lesson-text section[style] span,
.dark #lesson-text section[style] ul,
.dark #lesson-text section[style] ol{
    color:#e2e8f0!important;
}
.dark #lesson-text section[style] ul{
    border-color:rgba(148,163,184,.3)!important;
}
.dark #lesson-text section[style] div[style*="background:#f7fbff"],
.dark #lesson-text section[style] div[style*="background: #f7fbff"],
.dark #lesson-text section[style] div[style*="background-color:#f7fbff"],
.dark #lesson-text section[style] div[style*="background-color: #f7fbff"]{
    background:rgba(37,99,235,.22)!important;
    border-color:rgba(96,165,250,.75)!important;
    color:#dbeafe!important;
}
.dark #lesson-text section[style] div[style*="background:#fffaf0"],
.dark #lesson-text section[style] div[style*="background: #fffaf0"],
.dark #lesson-text section[style] div[style*="background-color:#fffaf0"],
.dark #lesson-text section[style] div[style*="background-color: #fffaf0"]{
    background:rgba(251,191,36,.18)!important;
    border-color:rgba(250,204,21,.65)!important;
    color:#fde68a!important;
}
.dark #lesson-text section[style] div[style*="border-left:6px solid #1890ff"],
.dark #lesson-text section[style] div[style*="border-left: 6px solid #1890ff"]{
    border-left-color:#60a5fa!important;
}
.dark #lesson-text section[style] div[style*="border-left:6px solid #faad14"],
.dark #lesson-text section[style] div[style*="border-left: 6px solid #faad14"]{
    border-left-color:#fbbf24!important;
}
.dark #lesson-text section[style] strong[style]{
    color:#bfdbfe!important;
}
.dark #lesson-text section[style] table[style]{
    background-color:transparent!important;
    color:#e2e8f0!important;
    border-color:rgba(71,85,105,.65)!important;
}
.dark #lesson-text section[style] thead[style],
.dark #lesson-text section[style] tbody[style]{
    color:inherit!important;
}
.dark #lesson-text section[style] th[style],
.dark #lesson-text section[style] td[style]{
    color:#e2e8f0!important;
    border-color:rgba(71,85,105,.6)!important;
    background-color:rgba(17,24,39,.55)!important;
}
.dark #lesson-text section[style] th[style*="background:#f6f9fc"],
.dark #lesson-text section[style] th[style*="background: #f6f9fc"],
.dark #lesson-text section[style] th[style*="background-color:#f6f9fc"],
.dark #lesson-text section[style] th[style*="background-color: #f6f9fc"]{
    background:rgba(37,99,235,.22)!important;
    color:#dbeafe!important;
}
.dark #lesson-text section[style] tr:nth-child(even) td[style]{
    background-color:rgba(15,23,42,.65)!important;
}
.dark #lesson-text section[style] table[style] sub{
    color:inherit!important;
}

/* Responsive table wrapper */
#lesson-text .lesson-table-scroll{
    position:relative;
    display:block;
    max-width:100%;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    border-radius:.85rem;
    margin:.75rem 0 0;
    padding-bottom:.5rem;
    background:rgba(255,255,255,.92);
    border:1px solid rgba(148,163,184,.25);
    box-shadow:0 18px 36px -30px rgba(15,23,42,.3);
    scrollbar-width:thin;
    scrollbar-color:rgba(59,130,246,.45) rgba(148,163,184,.2);
}
.dark #lesson-text .lesson-table-scroll{
    background:rgba(15,23,42,.85);
    border-color:rgba(71,85,105,.5);
    box-shadow:0 20px 45px -30px rgba(8,47,73,.65);
    scrollbar-color:rgba(56,189,248,.55) rgba(30,41,59,.75);
}
#lesson-text .lesson-table-scroll::-webkit-scrollbar{
    height:8px;
}
#lesson-text .lesson-table-scroll::-webkit-scrollbar-track{
    background:rgba(148,163,184,.2);
    border-radius:9999px;
}
.dark #lesson-text .lesson-table-scroll::-webkit-scrollbar-track{
    background:rgba(30,41,59,.7);
}
#lesson-text .lesson-table-scroll::-webkit-scrollbar-thumb{
    background:rgba(59,130,246,.45);
    border-radius:9999px;
}
.dark #lesson-text .lesson-table-scroll::-webkit-scrollbar-thumb{
    background:rgba(56,189,248,.55);
}
#lesson-text .lesson-table-scroll table{
    width:100%;
    min-width:640px;
}
@media (max-width:640px){
    #lesson-text .lesson-table-scroll{
        margin:.65rem 0 0;
        padding-bottom:.4rem;
    }
    #lesson-text .lesson-table-scroll table{
        min-width:560px;
    }
}

.scroll-to-top{
    position:relative;
    right:auto;
    bottom:auto;
    width:3rem;
    height:3rem;
    border-radius:9999px;
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:#fff;
    display:none;
    align-items:center;
    justify-content:center;
    box-shadow:0 24px 45px -28px rgba(15,23,42,.85);
    opacity:0;
    pointer-events:none;
    transform:translateY(1rem);
    transition:opacity .25s ease,transform .25s ease,box-shadow .25s ease;
    z-index:60;
    align-self:flex-end;
    order:-1;
}

.scroll-to-top:hover{box-shadow:0 28px 55px -32px rgba(37,99,235,.75)}
.scroll-to-top:focus-visible{box-shadow:0 0 0 3px rgba(147,197,253,.6)}
.scroll-to-top.is-visible{display:flex;opacity:1;pointer-events:auto;transform:translateY(0);animation:fade-in .25s ease}
.dark .scroll-to-top{background:linear-gradient(135deg,#0f172a,#1e3a8a);box-shadow:0 24px 45px -32px rgba(15,23,42,.95)}
.dark .scroll-to-top:hover{box-shadow:0 32px 60px -36px rgba(37,99,235,.85)}
@media (max-width:640px){
    .scroll-to-top{
        width:2.75rem;
        height:2.75rem;
    }
}

.focus-timer-container{position:fixed;right:1.5rem;bottom:calc(1.5rem + env(safe-area-inset-bottom,0));z-index:40;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;gap:.75rem}.focus-timer-shell{width:320px;max-width:100%;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);border-radius:1.5rem;border:1px solid rgba(148,163,184,.25);box-shadow:0 18px 45px -30px rgba(15,23,42,.55);overflow:hidden;transition:background .2s ease,border-color .2s ease,box-shadow .2s ease,transform .2s ease;pointer-events:auto}.focus-timer-shell[data-open="true"]{box-shadow:0 26px 55px -28px rgba(37,99,235,.45)}.focus-timer-shell[data-visible="false"]{display:none}.dark .focus-timer-shell{background:rgba(15,23,42,.92);border-color:rgba(148,163,184,.3);box-shadow:0 20px 55px -32px rgba(15,23,42,.7)}.focus-timer-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem .5rem 1rem;gap:.75rem}.focus-timer-toggle{flex:1;display:flex;align-items:center;justify-content:space-between;gap:.75rem;font-weight:600;color:#0f172a;padding:.6rem .2rem;border-radius:1rem}.focus-timer-shell[data-open="true"] .focus-timer-toggle{background:rgba(125,211,252,.25)}.dark .focus-timer-shell[data-open="true"] .focus-timer-toggle{background:rgba(59,130,246,.22)}.focus-timer-label{display:inline-flex;align-items:center;gap:.5rem;font-size:.9rem}.focus-timer-status{font-family:"JetBrains Mono","SFMono-Regular",Menlo,monospace;font-size:1rem;color:#0369a1}.dark .focus-timer-status{color:#bae6fd}.focus-timer-hide{width:36px;height:36px;border-radius:9999px;background:rgba(148,163,184,.18);color:#475569;display:grid;place-items:center;transition:background .2s ease,color .2s ease}.focus-timer-hide:hover{background:rgba(125,211,252,.35);color:#0f172a}.dark .focus-timer-hide{background:rgba(30,41,59,.8);color:#e2e8f0}.dark .focus-timer-hide:hover{background:rgba(37,99,235,.45);color:#f8fafc}.focus-timer-panel{border-top:1px solid rgba(148,163,184,.25);padding:1rem 1.2rem 1.2rem;display:grid;gap:1.1rem;background:linear-gradient(135deg,rgba(191,219,254,.2),rgba(125,211,252,.18))}.dark .focus-timer-panel{border-color:rgba(148,163,184,.3);background:linear-gradient(135deg,rgba(37,99,235,.3),rgba(14,165,233,.25))}.focus-timer-body{display:flex;align-items:center;gap:1rem}.focus-timer-ring{position:relative;width:78px;height:78px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(from 90deg,var(--ring-color,#38bdf8) var(--ring-progress,0%),rgba(148,163,184,.25) 0);box-shadow:inset 0 0 0 1px rgba(148,163,184,.25)}.focus-timer-ring span{position:relative;z-index:1;font-weight:600;font-size:.72rem;color:#0369a1}.dark .focus-timer-ring span{color:#bae6fd}.focus-timer-ring::before{content:"";position:absolute;inset:20%;border-radius:9999px;background:rgba(255,255,255,.92);box-shadow:0 8px 20px rgba(15,23,42,.12);z-index:0}.dark .focus-timer-ring::before{background:rgba(15,23,42,.88)}.focus-timer-message{font-size:.78rem;line-height:1.5;color:#1f2937}.dark .focus-timer-message{color:#e2e8f0}.focus-timer-actions{display:flex;align-items:center;gap:.75rem}.focus-timer-button{flex:1;padding:.6rem .9rem;border-radius:.9rem;background:rgba(255,255,255,.78);color:#1f2937;font-weight:600;box-shadow:0 12px 24px -18px rgba(15,23,42,.6)}.focus-timer-button:hover{background:rgba(191,219,254,.9)}.focus-timer-button-primary{background:#0ea5e9;color:#fff;box-shadow:0 18px 32px -20px rgba(14,165,233,.55)}.focus-timer-button-primary:hover{background:#0284c7}.dark .focus-timer-button{background:rgba(30,41,59,.85);color:#e2e8f0;box-shadow:0 14px 32px -22px rgba(15,23,42,.85)}.dark .focus-timer-button:hover{background:rgba(59,130,246,.35)}.dark .focus-timer-button-primary{background:#1d4ed8}.dark .focus-timer-button-primary:hover{background:#1e40af}.focus-timer-panel.hidden{display:none}.focus-timer-fab{width:48px;height:48px;border-radius:9999px;background:#0ea5e9;color:#f8fafc;display:grid;place-items:center;box-shadow:0 18px 30px -18px rgba(14,165,233,.55);transition:transform .2s ease,box-shadow .2s ease}.focus-timer-fab:hover{transform:translateY(-2px);box-shadow:0 24px 40px -22px rgba(14,165,233,.65)}.dark .focus-timer-fab{background:#1d4ed8;color:#fff;box-shadow:0 20px 40px -24px rgba(37,99,235,.6)}.focus-timer-container .hidden{display:none!important}@media (max-width:767px){    .focus-timer-container{left:1rem;right:1rem;bottom:calc(1rem + env(safe-area-inset-bottom,0));align-items:stretch}    .focus-timer-shell{width:100%;border-radius:1.25rem;box-shadow:0 20px 48px -28px rgba(14,116,144,.55)}    .focus-timer-toggle{padding:.55rem .25rem}    .focus-timer-header{padding:.65rem .8rem .4rem}    .focus-timer-panel{padding:.9rem 1rem 1.1rem}}

@keyframes fade-in{from{opacity:0;transform:translate3d(0,10px,0)}to{opacity:1;transform:translate3d(0,0,0)}}

.focus-timer-body{display:flex;align-items:flex-start;gap:1rem}
.focus-timer-ring{flex-shrink:0}
.focus-timer-message{flex:1;min-width:0;word-break:break-word}

.note-placeholder{display:flex;flex-direction:column;gap:.85rem;margin:1rem 1.5rem 0}
.note-pill{background:#ffffff;border:1px solid rgba(15,23,42,.08);border-radius:12px;padding:.9rem 1.1rem;box-shadow:0 10px 24px -20px rgba(15,23,42,.25);transition:background .18s ease,transform .18s ease,box-shadow .18s ease,border-color .18s ease;color:#0f172a}
.note-pill:hover,.note-pill:focus-within{background:#f8fafc;border-color:rgba(59,130,246,.25);box-shadow:0 16px 32px -24px rgba(2,132,199,.35);transform:translateY(-1px)}
.note-pill.is-expanded{background:#eef6ff;border-color:rgba(59,130,246,.35);box-shadow:0 18px 36px -24px rgba(2,132,199,.4)}
.note-pill+.note-pill{margin-top:.85rem}
.dark .note-pill{background:#0f172a;color:#e2e8f0;border-color:rgba(148,163,184,.18);box-shadow:0 12px 28px -22px rgba(15,23,42,.65)}
.dark .note-pill:hover,.dark .note-pill:focus-within{background:#0b1220;border-color:rgba(56,189,248,.28);box-shadow:0 18px 36px -26px rgba(37,99,235,.5)}
.dark .note-pill.is-expanded{background:#0b1220;border-color:rgba(56,189,248,.38);box-shadow:0 20px 40px -26px rgba(37,99,235,.55)}

.note-pill-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.85rem;text-align:left;color:inherit;padding:.1rem 0;border:none;background:transparent}
.note-pill-toggle::before{content:"";width:.45rem;height:.45rem;border-radius:9999px;background:rgba(14,165,233,.65);flex-shrink:0;transition:transform .2s ease,background .2s ease}
.dark .note-pill-toggle::before{background:rgba(147,197,253,.7)}
.note-pill:hover .note-pill-toggle::before{background:rgba(14,165,233,.85)}
.note-pill.is-expanded .note-pill-toggle::before{transform:scale(1.35)}
.note-pill-icon{display:none}
.note-pill-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:.15rem}
.note-pill-section{font-size:.68rem;text-transform:uppercase;letter-spacing:.12em;color:#0369a1;font-weight:700}
.dark .note-pill-section{color:#7dd3fc}
.note-pill-preview{font-size:.98rem;line-height:1.55;color:#0f172a;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;word-break:break-word}
.note-pill:hover .note-pill-preview{color:#0369a1}
.dark .note-pill-preview{color:#e2e8f0}
.dark .note-pill:hover .note-pill-preview{color:#bae6fd}
.note-pill-caret{color:#0ea5e9;transition:transform .25s ease,color .2s ease}
.note-pill:hover .note-pill-caret{color:#0284c7}
.note-pill.is-expanded .note-pill-caret{transform:rotate(180deg);color:#0284c7}
.dark .note-pill-caret{color:#7dd3fc}
.dark .note-pill:hover .note-pill-caret{color:#bae6fd}
.dark .note-pill.is-expanded .note-pill-caret{color:#bae6fd}
.note-pill-detail{margin-top:.75rem;padding:.95rem 1.05rem;border-radius:.9rem;background:#ffffff;border:1px dashed rgba(59,130,246,.35);box-shadow:none}
.note-pill-detail.hidden{display:none}
.dark .note-pill-detail{background:#0f172a;border-color:rgba(59,130,246,.45)}
.note-pill-text{font-size:.95rem;line-height:1.65;color:#0f172a;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}
.note-pill-text em{color:#475569}
.dark .note-pill-text{color:#e2e8f0}
.dark .note-pill-text em{color:#cbd5f5}
.note-pill-tags{margin-top:.6rem;display:flex;flex-wrap:wrap;gap:.4rem}
.note-pill-tag{padding:.25rem .65rem;border-radius:9999px;background:rgba(125,211,252,.24);color:#0f172a;font-size:.75rem;font-weight:500}
.dark .note-pill-tag{background:rgba(37,99,235,.32);color:#e0f2fe}
.note-pill-footer{margin-top:.9rem;display:flex;align-items:center;justify-content:space-between;gap:.75rem}
.note-pill-meta{font-size:.75rem;color:#475569}
.dark .note-pill-meta{color:#cbd5f5}
.note-pill-edit{display:inline-flex;align-items:center;gap:.4rem;border:1px solid rgba(59,130,246,.3);background:transparent;color:#0369a1;padding:.4rem .85rem;border-radius:.7rem;font-weight:600;transition:background .18s ease,color .18s ease,box-shadow .18s ease,border-color .18s ease}
.note-pill-edit:hover{background:rgba(59,130,246,.08);color:#0b1736;border-color:rgba(59,130,246,.45);box-shadow:0 10px 22px -18px rgba(14,165,233,.35)}
.dark .note-pill-edit{border-color:rgba(59,130,246,.4);color:#bae6fd}
.dark .note-pill-edit:hover{background:rgba(59,130,246,.16);color:#e2e8f0;border-color:rgba(96,165,250,.55);box-shadow:0 14px 28px -18px rgba(37,99,235,.4)}
#note-section-indicator{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

#lesson-text ::selection{background:rgba(125,211,252,.45);color:#0f172a}
.dark #lesson-text ::selection{background:rgba(59,130,246,.45);color:#f8fafc}
#notes-modal{display:flex;align-items:center;justify-content:center;padding:clamp(1.75rem,6vw,3.5rem);overflow-y:auto;z-index:50}
#notes-modal.hidden{display:none!important}
#notes-modal>div[role="dialog"],#notes-modal .notes-modal-dialog{width:min(100%,640px);max-height:calc(100vh - clamp(4.5rem,18vh,7rem));overflow:auto;padding:clamp(1.5rem,2.5vw,2.75rem);border-radius:1.25rem;margin:clamp(2rem,7vh,3.5rem) auto;display:flex;flex-direction:column;gap:clamp(1.25rem,2.5vw,1.75rem)}
@media (max-width:768px){#notes-modal{padding:2.25rem 1.75rem}#notes-modal>div[role="dialog"],#notes-modal .notes-modal-dialog{margin:clamp(1.25rem,6vh,2.5rem) auto;border-radius:1.1rem;padding:1.5rem;max-height:calc(100vh - clamp(4rem,16vh,6.5rem))}}
@media (max-width:480px){#notes-modal{padding:1.75rem 1.1rem}#notes-modal>div[role="dialog"],#notes-modal .notes-modal-dialog{padding:1.25rem;border-radius:1rem;max-height:calc(100vh - clamp(3.5rem,18vh,5.5rem))}}
.notes-modal-header{gap:clamp(.75rem,2vw,1.25rem)}
.notes-modal-body{display:flex;flex-direction:column;gap:clamp(1rem,2.5vw,1.5rem);flex:1 1 auto}
.notes-modal-footer{margin-top:0;padding-top:1rem;border-top:1px solid rgba(148,163,184,.3)}
.dark .notes-modal-footer{border-color:rgba(30,41,59,.6)}
#note-viewer{display:flex;align-items:center;justify-content:center;padding:clamp(1.5rem,5vw,3rem);z-index:50;overflow-y:auto}
#note-viewer.hidden{display:none!important}
#note-viewer .note-viewer-dialog{width:min(100%,560px);max-height:calc(100vh - clamp(3.75rem,16vh,6rem));overflow:auto;border-radius:1.1rem;padding:clamp(1.4rem,2.6vw,2rem);display:flex;flex-direction:column;gap:1rem}
#note-viewer-section{font-weight:600;flex-wrap:wrap}
#note-viewer-section .note-chip{display:inline-flex;align-items:center;gap:.4rem;padding:.3rem .7rem;border-radius:.8rem;background:rgba(59,130,246,.14);color:#0f172a;font-size:.85rem;font-weight:700}
#note-viewer-tags .note-chip{margin-top:.25rem}
#note-viewer-body{font-size:.96rem;line-height:1.7;color:#0f172a}
.dark #note-viewer-body{color:#e2e8f0}
.note-chip{display:inline-flex;align-items:center;gap:.35rem;padding:.28rem .65rem;border-radius:.8rem;background:rgba(15,23,42,.06);color:#0f172a;font-size:.78rem;font-weight:600}
.note-chip__icon{color:#0ea5e9}
.dark .note-chip{background:rgba(148,163,184,.16);color:#e2e8f0}
.dark .note-chip__icon{color:#7dd3fc}
.note-snippet-surface{display:flex;align-items:center;min-height:3.5rem;padding:.85rem 1rem;border-radius:1rem;background:rgba(125,211,252,.18);box-shadow:inset 0 0 0 1px rgba(125,211,252,.22);line-height:1.5;word-break:break-word}
.dark .note-snippet-surface{background:rgba(59,130,246,.22);box-shadow:inset 0 0 0 1px rgba(59,130,246,.2)}
.edge-selection-overlay{position:absolute;left:0;top:0;width:0;height:0;background:rgba(125,211,252,.58);border-radius:.4rem;pointer-events:none;z-index:45;box-shadow:0 0 0 1px rgba(14,165,233,.35);opacity:0;transition:opacity .12s ease}
.edge-selection-overlay.is-active{opacity:1}
.dark .edge-selection-overlay{background:rgba(59,130,246,.4);box-shadow:0 0 0 1px rgba(147,197,253,.35)}
#selection-menu{z-index:70}

.auth-required-banner{position:fixed;right:clamp(1rem,4vw,1.5rem);bottom:clamp(1rem,5vw,1.5rem);max-width:min(360px,calc(100vw-2rem));display:flex;gap:.9rem;align-items:flex-start;padding:1rem 1.15rem;border-radius:1rem;background:rgba(255,255,255,.97);color:#0f172a;border:1px solid rgba(148,163,184,.2);box-shadow:0 24px 45px -30px rgba(15,23,42,.45);opacity:0;transform:translateY(16px);pointer-events:none;transition:opacity .25s ease,transform .25s ease;z-index:80}
.auth-required-banner.is-visible{opacity:1;transform:translateY(0);pointer-events:auto}
.dark .auth-required-banner{background:rgba(17,24,39,.95);color:#e2e8f0;border-color:rgba(71,85,105,.45);box-shadow:0 28px 55px -30px rgba(8,47,73,.65)}
.auth-required-banner__icon{flex-shrink:0;width:2.5rem;height:2.5rem;border-radius:9999px;display:grid;place-items:center;background:rgba(14,165,233,.18);color:#0369a1}
.dark .auth-required-banner__icon{background:rgba(59,130,246,.2);color:#93c5fd}
.auth-required-banner__body{flex:1;min-width:0}
.auth-required-banner__title{margin:0 0 .35rem;font-weight:700;font-size:1rem;color:inherit}
.auth-required-banner__copy{margin:0;color:rgba(15,23,42,.78);font-size:.88rem;line-height:1.5}
.dark .auth-required-banner__copy{color:rgba(226,232,240,.8)}
.auth-required-banner__actions{margin-top:.75rem;display:flex;flex-wrap:wrap;gap:.5rem}
.auth-required-banner__link{display:inline-flex;align-items:center;justify-content:center;padding:.45rem .9rem;border-radius:.75rem;font-weight:600;text-decoration:none}
.auth-required-banner__link--ghost{background:rgba(14,165,233,.12);color:#0369a1}
.auth-required-banner__link--primary{background:#0ea5e9;color:#f8fafc;box-shadow:0 18px 32px -24px rgba(14,165,233,.55)}
.auth-required-banner__link--ghost:hover{background:rgba(14,165,233,.18)}
.auth-required-banner__link--primary:hover{background:#0284c7;color:#fff}
.dark .auth-required-banner__link--ghost{background:rgba(37,99,235,.2);color:#bfdbfe}
.dark .auth-required-banner__link--ghost:hover{background:rgba(59,130,246,.28)}
.dark .auth-required-banner__link--primary{background:#38bdf8;color:#0f172a}
.dark .auth-required-banner__link--primary:hover{background:#0ea5e9;color:#f8fafc}
.auth-required-banner__close{border:none;background:rgba(15,23,42,.05);color:#475569;border-radius:9999px;width:2rem;height:2rem;display:grid;place-items:center;margin-left:.25rem;flex-shrink:0;transition:background .2s ease,color .2s ease}
.auth-required-banner__close:hover{background:rgba(14,165,233,.18);color:#0f172a}
.dark .auth-required-banner__close{background:rgba(30,41,59,.6);color:#e2e8f0}
.dark .auth-required-banner__close:hover{background:rgba(59,130,246,.35);color:#f8fafc}
@media (max-width:640px){.auth-required-banner{left:1rem;right:1rem;max-width:none;padding:.95rem 1rem}}
@media (max-width:480px){.auth-required-banner{flex-direction:column;align-items:flex-start}}

.lesson-section-card--locked{border:1px dashed rgba(14,116,144,.35);background:rgba(240,249,255,.65)}
.dark .lesson-section-card--locked{border-color:rgba(56,189,248,.35);background:rgba(15,23,42,.65)}
.lesson-section-body--locked{display:flex;flex-direction:column;align-items:stretch;gap:1.2rem;padding:1.75rem 1.5rem;background:rgba(14,165,233,.06);border-radius:1rem}
.locked-section-preview{width:100%;padding:1rem 1.1rem;border:1px dashed rgba(14,116,144,.28);border-radius:.9rem;background:rgba(255,255,255,.85)}
.dark .locked-section-preview{background:rgba(15,23,42,.85);border-color:rgba(56,189,248,.32)}
.locked-section{display:flex;flex-wrap:wrap;gap:1rem 1.1rem;align-items:flex-start;justify-content:space-between;background:linear-gradient(135deg,rgba(125,211,252,.12),rgba(14,116,144,.05));border-radius:1rem;padding:1.1rem 1.25rem;border:1px solid rgba(14,116,144,.18);box-shadow:0 14px 30px -22px rgba(14,116,144,.4)}
.dark .locked-section{background:linear-gradient(135deg,rgba(56,189,248,.18),rgba(15,118,110,.12))}
.locked-section-icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;border-radius:9999px;background:rgba(14,116,144,.18);color:#0f172a}
.dark .locked-section-icon{background:rgba(125,211,252,.18);color:#e2e8f0}
.locked-section-copy h3{margin:0 0 .5rem;font-size:1.1rem;font-weight:600;color:#0f172a}
.dark .locked-section-copy h3{color:#e2e8f0}
.locked-section-copy p{margin:0 0 .75rem;color:#1e293b;line-height:1.6}
.dark .locked-section-copy p{color:#cbd5f5}
.locked-section-link{display:inline-flex;align-items:center;gap:.4rem;padding:.45rem .95rem;border-radius:9999px;background:#0ea5e9;color:#fff;font-weight:600;text-decoration:none;transition:transform .2s ease,box-shadow .2s ease}
.locked-section-link:hover{transform:translateY(-1px);box-shadow:0 12px 24px -18px rgba(14,116,144,.75)}
.dark .locked-section-link{background:#38bdf8;color:#0f172a}
.dark .locked-section-link:hover{box-shadow:0 12px 24px -16px rgba(56,189,248,.75)}
.lesson-section-card--locked .lesson-section-title{color:#0284c7}
.dark .lesson-section-card--locked .lesson-section-title{color:#38bdf8}
.section-action.section-action-complete{background:rgba(34,197,94,.12);color:#15803d}
.section-action.section-action-complete:hover{background:rgba(34,197,94,.18);color:#0f172a}
.dark .section-action.section-action-complete{background:rgba(34,197,94,.24);color:#bbf7d0}
.dark .section-action.section-action-complete:hover{background:rgba(21,128,61,.45);color:#dcfce7}
.section-action.section-action-complete.is-complete{background:rgba(22,163,74,.22);color:#0f5132;cursor:pointer}
.section-action.section-action-complete.is-complete:hover{background:rgba(22,163,74,.28);color:#0f5132}
.dark .section-action.section-action-complete.is-complete{background:rgba(21,128,61,.5);color:#bbf7d0}
.dark .section-action.section-action-complete.is-complete:hover{background:rgba(21,128,61,.6);color:#dcfce7}
.section-action.section-action-complete.is-complete svg{color:currentColor}
#sidebar-saved-container{margin-bottom:1rem}
.sidebar-toggle-row{display:flex;flex-wrap:nowrap;gap:.45rem;align-items:stretch}
.sidebar-toggle-row--backs{justify-content:space-between}
.sidebar-saved-controls{display:flex;flex-direction:column;gap:.6rem;margin-bottom:1.1rem}
.sidebar-saved-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;flex:1;min-width:0;padding:.55rem .85rem;border-radius:8px;background:rgba(37,99,235,.08);color:#0f172a;font-weight:600;transition:background .2s ease,color .2s ease,transform .2s ease}
.sidebar-saved-toggle span{display:inline-flex;align-items:center;gap:.45rem}
.sidebar-saved-toggle:hover,.sidebar-saved-toggle:focus-visible{background:rgba(37,99,235,.12);color:#0b1736}
.sidebar-saved-toggle.is-active{background:rgba(37,99,235,.18);color:#0f172a}
.sidebar-saved-count{display:inline-flex;align-items:center;justify-content:center;min-width:1.65rem;padding:.1rem .45rem;border-radius:9999px;background:rgba(15,23,42,.08);color:#0f172a;font-size:.72rem;font-weight:700;transition:background .2s ease,color .2s ease}
.sidebar-saved-count.hidden{display:none}
.dark .sidebar-saved-toggle{background:rgba(37,99,235,.28);color:#e2e8f0}
.dark .sidebar-saved-toggle:hover,.dark .sidebar-saved-toggle:focus-visible{background:rgba(59,130,246,.35);color:#f8fafc}
.dark .sidebar-saved-toggle.is-active{background:rgba(59,130,246,.45);color:#f8fafc}
.dark .sidebar-saved-count{background:rgba(148,163,184,.18);color:#e0f2fe}
.sidebar-saved-back{align-self:flex-start;padding:.35rem .7rem;border-radius:.75rem;font-size:.82rem;font-weight:500;color:#1f2937;background:rgba(15,23,42,.05);transition:background .2s ease,color .2s ease}
.sidebar-saved-back:hover,.sidebar-saved-back:focus-visible{background:rgba(15,23,42,.08);color:#0f172a}
.dark .sidebar-saved-back{background:rgba(148,163,184,.18);color:#e2e8f0}
.dark .sidebar-saved-back:hover,.dark .sidebar-saved-back:focus-visible{background:rgba(148,163,184,.26);color:#f8fafc}
.dark .sidebar-note-group__header{color:#e2e8f0}
.dark .sidebar-note-group__badge{background:rgba(148,163,184,.2);color:#e2e8f0}

.sidebar-note-group{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}
.sidebar-note-group__header{display:flex;align-items:center;justify-content:space-between;padding:.2rem .2rem .15rem;color:#0f172a;font-weight:700;font-size:.9rem}
.sidebar-note-group__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-note-group__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.7rem;padding:.15rem .55rem;border-radius:999px;background:rgba(15,23,42,.06);color:#0f172a;font-size:.78rem;font-weight:700}
.sidebar-note-group__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.45rem}
.sidebar-note{display:flex;gap:.65rem;align-items:flex-start;width:100%;text-align:left;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:12px;padding:.7rem .85rem;box-shadow:0 10px 24px -20px rgba(15,23,42,.25);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease;color:#0f172a}
.sidebar-note:hover,.sidebar-note:focus-visible{transform:translateY(-1px);box-shadow:0 18px 32px -24px rgba(2,132,199,.35);border-color:rgba(59,130,246,.25);background:#f8fafc}
.sidebar-note__icon{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:10px;background:rgba(37,99,235,.12);color:#0f172a;flex-shrink:0}
.sidebar-note__body{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}
.sidebar-note__title{font-weight:700;font-size:.9rem;color:#0f172a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-note__meta{font-size:.78rem;color:#475569;display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}
.sidebar-note__preview{font-size:.9rem;color:#0f172a;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word}
.sidebar-note__tags{display:flex;align-items:center;gap:.35rem;font-size:.75rem;color:#0ea5e9;flex-wrap:wrap}
.sidebar-note__tag{padding:.2rem .6rem;border-radius:9999px;background:rgba(14,165,233,.12);border:1px solid rgba(14,165,233,.2);color:#0369a1}
.dark .sidebar-note{background:#0f172a;color:#e2e8f0;border-color:rgba(148,163,184,.18);box-shadow:0 12px 28px -22px rgba(15,23,42,.65)}
.dark .sidebar-note:hover,.dark .sidebar-note:focus-visible{background:#0b1220;border-color:rgba(96,165,250,.35);box-shadow:0 18px 36px -26px rgba(37,99,235,.5)}
.dark .sidebar-note__icon{background:rgba(59,130,246,.18);color:#e2e8f0}
.dark .sidebar-note__title{color:#e2e8f0}
.dark .sidebar-note__meta{color:#cbd5f5}
.dark .sidebar-note__preview{color:#e2e8f0}
.dark .sidebar-note__tag{background:rgba(59,130,246,.22);border-color:rgba(125,211,252,.25);color:#bae6fd}
#saved-lessons-empty{margin:0;padding:.4rem 0;font-size:.85rem;color:#64748b}
.dark #saved-lessons-empty{color:#cbd5f5}
#saved-lessons-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}
#saved-lessons-list li{list-style:none}
#saved-lessons-list .sp-lesson-link{position:relative;padding:.45rem .6rem .45rem 1.3rem;border-radius:.7rem;background:rgba(37,99,235,.08);box-shadow:none;color:#0f172a}
#saved-lessons-list .sp-lesson-link::before{content:"";position:absolute;left:.45rem;top:.55rem;bottom:.55rem;width:.18rem;border-radius:9999px;background:linear-gradient(180deg,#2563eb,#38bdf8);opacity:1}
.dark #saved-lessons-list .sp-lesson-link{background:rgba(37,99,235,.28);color:#f8fafc}
.sidebar-category-list{list-style:none;margin:0;padding:.35rem;display:flex;flex-direction:column;gap:.35rem;border-radius:1rem;background:rgba(255,255,255,.6);backdrop-filter:blur(10px);border:1px solid rgba(15,23,42,.06);box-shadow:0 10px 30px -24px rgba(15,23,42,.35)}
.sidebar-category{list-style:none;padding:.05rem;margin:0;border-radius:.9rem;transition:background .2s ease,transform .2s ease}
.sidebar-category-toggle{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;gap:.65rem;font-weight:700;font-size:.93rem;color:#0b1120;padding:.65rem .85rem;border-radius:.85rem;background:rgba(15,23,42,.04);cursor:pointer;transition:color .2s ease,transform .2s ease,background .2s ease,box-shadow .2s ease}
.sidebar-category-toggle__label{display:inline-flex;align-items:center;gap:.55rem}
.sidebar-category-toggle__label i{width:1rem;height:1rem}
.sidebar-category-toggle:hover,.sidebar-category-toggle:focus-visible{color:#0b1120;background:rgba(59,130,246,.12);box-shadow:0 10px 24px -20px rgba(59,130,246,.35);transform:translateY(-1px)}
.sidebar-category-toggle .collapsible-arrow{transition:transform .2s ease}
.dark .sidebar-category-list{background:rgba(17,24,39,.65);border-color:rgba(148,163,184,.16);box-shadow:0 10px 34px -26px rgba(0,0,0,.85)}
.dark .sidebar-category{background:transparent}
.dark .sidebar-category-toggle{color:#f8fafc;background:rgba(255,255,255,.03);border:1px solid rgba(148,163,184,.08)}
.dark .sidebar-category-toggle:hover,.dark .sidebar-category-toggle:focus-visible{color:#f8fafc;background:rgba(59,130,246,.18);box-shadow:0 12px 30px -24px rgba(59,130,246,.4)}
.sidebar-lesson-list{list-style:none;margin:0;padding:.4rem;display:flex;flex-direction:column;gap:.3rem;border-radius:.9rem;background:rgba(255,255,255,.82);border:1px solid rgba(15,23,42,.04);box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.dark .sidebar-lesson-list{background:rgba(17,24,39,.6);border-color:rgba(148,163,184,.16)}
.sidebar-lesson-item{list-style:none}
.sidebar-lesson-link{position:relative;display:grid;grid-template-columns:1fr auto;align-items:flex-start;column-gap:.65rem;row-gap:.15rem;padding:.55rem .7rem .55rem 1.15rem;border-radius:.75rem;background:transparent;text-decoration:none;color:#0b1120;font-size:.86rem;transition:color .18s ease,background .18s ease,transform .18s ease;min-height:2.3rem}
.sidebar-lesson-link::before{content:"";position:absolute;left:.55rem;top:.55rem;bottom:.55rem;width:.12rem;border-radius:9999px;background:rgba(148,163,184,.35);opacity:0;transition:opacity .18s ease,background .18s ease}
.sidebar-lesson-link:hover,.sidebar-lesson-link:focus-visible{color:#0b1120;background:rgba(59,130,246,.12);transform:translateX(1px)}
.sidebar-lesson-link:hover::before,.sidebar-lesson-link:focus-visible::before{opacity:1}
.sidebar-lesson-link .sp-lesson-link__title{grid-column:1/2;font-weight:700;color:inherit;line-height:1.25;white-space:normal;overflow:visible;text-overflow:clip}
.sidebar-lesson-link .sp-lesson-link__progress{grid-column:2/3;display:inline-flex;align-items:center;gap:.35rem;min-width:2.3rem;justify-self:end}
.sidebar-lesson-link .sp-lesson-link__progress-label{font-size:.68rem;color:#1f2937;font-variant-numeric:tabular-nums;min-width:2.3rem;text-align:right}
.sidebar-lesson-link--active{background:linear-gradient(120deg,rgba(59,130,246,.16),rgba(14,165,233,.18));color:#0b1120;box-shadow:0 10px 24px -20px rgba(59,130,246,.35)}
.sidebar-lesson-link--active::before{opacity:1;background:linear-gradient(180deg,#2563eb,#38bdf8)}
.sidebar-lesson-link--active .sp-lesson-link__progress-label{color:#0b1120}
.dark .sidebar-lesson-link{color:#f8fafc;background:transparent}
.dark .sidebar-lesson-link:hover,.dark .sidebar-lesson-link:focus-visible{background:rgba(59,130,246,.2);color:#f8fafc}
.dark .sidebar-lesson-link::before{background:rgba(148,163,184,.55)}
.dark .sidebar-lesson-link--active{background:linear-gradient(120deg,rgba(59,130,246,.28),rgba(14,165,233,.22));color:#f8fafc;box-shadow:0 12px 28px -24px rgba(37,99,235,.55)}
.dark .sidebar-lesson-link--active::before{background:linear-gradient(180deg,#38bdf8,#60a5fa)}
.dark .sidebar-lesson-link .sp-lesson-link__progress-label{color:#f8fafc}
.dark .sidebar-lesson-link--active .sp-lesson-link__progress-label{color:#f8fafc}
#lesson-text [data-section-copy],#lesson-text .section-action-copy{display:none!important}
.lesson-section-actions{padding:0 1.5rem .75rem}
.note-placeholder:empty{display:none;margin:0;padding:0}
.lesson-section-actions{padding:0 1.5rem .75rem;margin-bottom:.5rem}
.lesson-section-actions+.note-placeholder{margin-top:.25rem}

/* Multi-note professional grouping */
.note-list{display:flex;flex-direction:column;gap:.75rem}
.note-list .note-pill{margin:0}
.note-list .note-pill.is-expanded{border-style:solid}
.lesson-quiz{margin-top:2.5rem;scroll-margin-top:5rem}
.lesson-quiz-cta{margin-top:2.5rem}
.lesson-quiz-cta__card{display:flex;flex-direction:column;gap:1rem;padding:1.1rem;border:1px solid rgba(15,23,42,.08);border-radius:.85rem;background:#fff;box-shadow:0 16px 30px -24px rgba(15,23,42,.28)}
@media (min-width:640px){.lesson-quiz-cta__card{flex-direction:row;align-items:center;justify-content:space-between}}
.lesson-quiz-cta__content{display:flex;flex-direction:column;gap:.45rem}
.lesson-quiz-cta__title{margin:0;font-size:1.45rem;font-weight:600;color:#0f172a}
.lesson-quiz-cta__summary{margin:0;font-size:.95rem;color:#475569}
.lesson-quiz-cta__actions{display:flex;align-items:center;gap:.75rem}
.lesson-quiz-cta__button{padding:.6rem 1.3rem;border-radius:.85rem;font-weight:600;background:linear-gradient(135deg,#38bdf8,#0ea5e9);color:#f8fafc;box-shadow:0 18px 36px -24px rgba(14,165,233,.55);transition:transform .2s ease,box-shadow .2s ease}
.lesson-quiz-cta__button:hover{transform:translateY(-1px);box-shadow:0 22px 44px -26px rgba(14,165,233,.65)}
.lesson-quiz-shell{border:1px solid rgba(148,163,184,.28);border-radius:.85rem;background:#fff;box-shadow:0 14px 28px -24px rgba(15,23,42,.24);padding:1rem;display:flex;flex-direction:column;gap:1rem}
@media (min-width:640px){.lesson-quiz-shell{padding:1.5rem}}
@media (min-width:1024px){.lesson-quiz-shell{padding:1.75rem}}
.dark .lesson-quiz-shell{background:#0f172a;border-color:rgba(71,85,105,.6);box-shadow:0 22px 48px -30px rgba(15,23,42,.75)}
.lesson-quiz-header{display:flex;flex-direction:column;gap:.75rem}
@media (min-width:768px){.lesson-quiz-header{flex-direction:row;align-items:flex-start;justify-content:space-between}}
.lesson-quiz-header__meta{display:flex;flex-direction:column;gap:.5rem;max-width:100%}
@media (min-width:640px){.lesson-quiz-header__meta{flex-direction:row;align-items:center;gap:1rem}}
.lesson-quiz-close{display:inline-flex;align-items:center;gap:.4rem;padding:.35rem .7rem;border-radius:.6rem;border:1px solid rgba(148,163,184,.4);background:rgba(148,163,184,.12);color:#0f172a;font-weight:600;transition:background .2s ease,color .2s ease,border-color .2s ease}
.lesson-quiz-close:hover,.lesson-quiz-close:focus-visible{background:rgba(191,219,254,.6);color:#0f172a;border-color:rgba(59,130,246,.45);text-decoration:none}
.dark .lesson-quiz-close{border-color:rgba(71,85,105,.6);background:rgba(30,41,59,.75);color:#f8fafc}
.dark .lesson-quiz-close:hover,.dark .lesson-quiz-close:focus-visible{background:rgba(56,189,248,.28);border-color:rgba(56,189,248,.6);color:#f8fafc}
.lesson-quiz-heading{display:flex;flex-direction:column;gap:.2rem}
.lesson-quiz-title{margin:0;font-size:1.15rem;font-weight:700;color:#0f172a}
.dark .lesson-quiz-title{color:#f8fafc}
.lesson-quiz-subtitle{margin:0;font-size:.8rem;color:#475569}
.dark .lesson-quiz-subtitle{color:#cbd5f5}
.lesson-quiz-header__status{display:flex;flex-direction:column;gap:.6rem;min-width:0}
@media (min-width:768px){.lesson-quiz-header__status{flex-direction:row;align-items:stretch;gap:1rem}}
.lesson-quiz-progress{display:flex;flex-direction:column;gap:.45rem;padding:.55rem .75rem;border-radius:.7rem;background:rgba(191,219,254,.38);border:1px solid rgba(148,163,184,.25);transition:background .2s ease,border-color .2s ease}
.lesson-quiz-progress[data-state="empty"]{background:rgba(226,232,240,.5)}
.lesson-quiz-progress[data-state="locked"]{background:rgba(203,213,225,.5);border-color:rgba(148,163,184,.35);opacity:.9}
.lesson-quiz-progress[data-state="complete"]{background:rgba(187,247,208,.55);border-color:rgba(74,222,128,.45)}
.lesson-quiz-progress__text{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem}
.lesson-quiz-progress__label{font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#0369a1}
.lesson-quiz-progress__value{font-size:.88rem;font-weight:700;color:#0b1120;font-variant-numeric:tabular-nums}
.lesson-quiz-progress[data-state="locked"] .lesson-quiz-progress__value,.lesson-quiz-progress[data-state="empty"] .lesson-quiz-progress__value{color:#334155}
.lesson-quiz-progress__track{position:relative;display:block;width:100%;height:.28rem;border-radius:9999px;background:rgba(148,163,184,.28);overflow:hidden}
.lesson-quiz-progress__fill{position:absolute;inset:0;width:0;border-radius:inherit;background:linear-gradient(90deg,#38bdf8,#2563eb);transition:width .3s ease}
.dark .lesson-quiz-progress{background:rgba(30,64,175,.3);border-color:rgba(71,85,105,.5)}
.dark .lesson-quiz-progress[data-state="empty"]{background:rgba(30,41,59,.7)}
.dark .lesson-quiz-progress[data-state="locked"]{background:rgba(51,65,85,.7);border-color:rgba(71,85,105,.65)}
.dark .lesson-quiz-progress[data-state="complete"]{background:rgba(34,197,94,.32);border-color:rgba(34,197,94,.55)}
.dark .lesson-quiz-progress__label{color:#bae6fd}
.dark .lesson-quiz-progress__value{color:#f8fafc}
.lesson-quiz-history{display:flex;flex-wrap:wrap;gap:.5rem;padding:.75rem;border-radius:.85rem;background:rgba(248,250,255,.82);border:1px solid rgba(148,163,184,.22)}
.lesson-quiz-history__item{flex:1;min-width:120px;display:flex;align-items:center;justify-content:space-between;gap:.45rem;padding:.4rem .6rem;border-radius:.6rem;background:#fff}
.lesson-quiz-history__label{font-size:.68rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#0369a1}
.lesson-quiz-history__value{font-size:.95rem;font-weight:600;color:#0b1120;font-variant-numeric:tabular-nums}
.dark .lesson-quiz-history{background:rgba(17,24,39,.82);border-color:rgba(71,85,105,.45)}
.dark .lesson-quiz-history__item{background:rgba(30,41,59,.9)}
.dark .lesson-quiz-history__label{color:#bae6fd}
.dark .lesson-quiz-history__value{color:#f8fafc}
.lesson-quiz-body{display:flex;flex-direction:column;gap:1.5rem}
.lesson-quiz-nav{position:relative;width:100%;border-radius:.7rem;border:1px solid rgba(148,163,184,.28);background:#fff;box-shadow:0 10px 22px -20px rgba(15,23,42,.24);padding:.6rem}
.lesson-quiz-nav__scroller{overflow:visible;padding-bottom:0;margin:0}
.lesson-quiz-nav__list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:.45rem;min-width:0}
.lesson-quiz-nav__item{list-style:none;flex:0 0 auto;scroll-snap-align:start}
.lesson-quiz-nav__button{min-width:0;padding:.35rem .6rem;border-radius:.6rem;border:1px solid rgba(148,163,184,.4);background:rgba(248,250,255,.9);color:#0f172a;font-weight:600;font-size:.85rem;display:inline-flex;align-items:center;justify-content:center;gap:.35rem;transition:transform .18s ease,background .18s ease,border-color .18s ease,color .18s ease}
.lesson-quiz-nav__button:hover,.lesson-quiz-nav__button:focus-visible{transform:translateY(-1px);background:rgba(219,234,254,.95);border-color:rgba(59,130,246,.45);color:#0f172a;text-decoration:none}
.lesson-quiz-nav__button.is-active{border-color:#0ea5e9;background:rgba(186,230,253,.95);color:#0f172a}
.lesson-quiz-nav__button.is-answered{border-color:rgba(14,165,233,.45);background:rgba(224,242,254,.95)}
.lesson-quiz-nav__button.is-correct{background:rgba(220,252,231,.95);border-color:rgba(34,197,94,.5);color:#14532d}
.lesson-quiz-nav__button.is-incorrect{background:rgba(254,226,226,.95);border-color:rgba(239,68,68,.5);color:#7f1d1d}
.dark .lesson-quiz-nav{background:#0f172a;border-color:rgba(71,85,105,.6);box-shadow:0 14px 32px -24px rgba(15,23,42,.7)}
.dark .lesson-quiz-nav__button{border-color:rgba(100,116,139,.55);background:rgba(30,41,59,.92);color:#e2e8f0}
.dark .lesson-quiz-nav__button:hover,.dark .lesson-quiz-nav__button:focus-visible{background:rgba(30,64,175,.65);border-color:rgba(56,189,248,.55);color:#f8fafc}
.dark .lesson-quiz-nav__button.is-active{background:rgba(14,165,233,.35);border-color:rgba(56,189,248,.6)}
.dark .lesson-quiz-nav__button.is-answered{background:rgba(14,165,233,.28);border-color:rgba(56,189,248,.55)}
.dark .lesson-quiz-nav__button.is-correct{background:rgba(34,197,94,.32);border-color:rgba(34,197,94,.65);color:#bbf7d0}
.dark .lesson-quiz-nav__button.is-incorrect{background:rgba(239,68,68,.32);border-color:rgba(239,68,68,.65);color:#fecaca}
.lesson-quiz-scroll{display:none}
.lesson-quiz-scroll:hover,.lesson-quiz-scroll:focus-visible{background:rgba(191,219,254,.75);border-color:rgba(59,130,246,.45);color:#0f172a;text-decoration:none}
.dark .lesson-quiz-scroll{background:rgba(30,41,59,.85);border-color:rgba(71,85,105,.6);color:#f8fafc}
.dark .lesson-quiz-scroll:hover,.dark .lesson-quiz-scroll:focus-visible{background:rgba(56,189,248,.25);border-color:rgba(56,189,248,.55);color:#f8fafc}
.lesson-quiz-panel{display:flex;flex-direction:column;gap:.9rem;width:100%;max-width:100%;margin:0}
@media (min-width:768px){.lesson-quiz-panel{margin:0 auto;max-width:780px}}
.lesson-quiz-card{display:none;background:#fff;border:1px solid rgba(148,163,184,.25);border-radius:.8rem;box-shadow:0 16px 36px -28px rgba(15,23,42,.24);padding:1rem;transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease,background .2s ease}
.lesson-quiz-card.is-active{display:block;transform:translateY(-2px);box-shadow:0 26px 56px -28px rgba(15,23,42,.32)}
.lesson-quiz-card.is-correct{border-color:rgba(34,197,94,.45);box-shadow:0 24px 52px -32px rgba(34,197,94,.35)}
.lesson-quiz-card.is-incorrect{border-color:rgba(239,68,68,.45);box-shadow:0 24px 52px -32px rgba(239,68,68,.3)}
.dark .lesson-quiz-card{background:#0f172a;border-color:rgba(71,85,105,.55);box-shadow:0 28px 60px -32px rgba(15,23,42,.75)}
.dark .lesson-quiz-card.is-active{box-shadow:0 30px 64px -30px rgba(15,23,42,.85)}
.lesson-quiz-card__header{display:flex;flex-direction:column;gap:.4rem;margin-bottom:.7rem}
.lesson-quiz-card__title{margin:0;font-size:1.05rem;font-weight:700;color:#0f172a}
.dark .lesson-quiz-card__title{color:#f8fafc}
.lesson-quiz-card__status{display:inline-flex;align-items:center;gap:.35rem;padding:.15rem .55rem;border-radius:9999px;background:rgba(148,163,184,.2);color:#475569;font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.dark .lesson-quiz-card__status{background:rgba(71,85,105,.45);color:#e2e8f0}
.lesson-quiz-card__prompt{margin:0 0 .8rem;color:#0f172a}
.dark .lesson-quiz-card__prompt{color:#e2e8f0}
.lesson-quiz-card__choices{display:flex;flex-direction:column;gap:.55rem;margin:0;padding:0;border:none}
.lesson-quiz-choice{display:flex;align-items:center;gap:.6rem;padding:.6rem .8rem;border-radius:.7rem;border:1px solid rgba(148,163,184,.4);background:rgba(148,163,184,.08);cursor:pointer;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease,background .2s ease}
.lesson-quiz-choice:hover{transform:translateY(-1px);border-color:rgba(59,130,246,.45);background:rgba(59,130,246,.12)}
.lesson-quiz-choice input{width:1rem;height:1rem;accent-color:#0ea5e9}
.lesson-quiz-choice span{flex:1;font-size:.9rem;color:#0f172a}
.dark .lesson-quiz-choice{border-color:rgba(71,85,105,.6);background:rgba(30,41,59,.8)}
.dark .lesson-quiz-choice:hover{border-color:rgba(56,189,248,.55);background:rgba(56,189,248,.18)}
.dark .lesson-quiz-choice span{color:#e2e8f0}
.lesson-quiz-choice.is-selected{border-color:#0284c7;background:rgba(14,165,233,.16);box-shadow:0 12px 28px -20px rgba(14,165,233,.5)}
.lesson-quiz-choice.is-correct{border-color:rgba(34,197,94,.55);background:rgba(34,197,94,.18);box-shadow:0 14px 28px -20px rgba(34,197,94,.35)}
.lesson-quiz-choice.is-incorrect{border-color:rgba(239,68,68,.45);background:rgba(248,113,113,.16)}
.dark .lesson-quiz-choice.is-selected{border-color:rgba(56,189,248,.55);background:rgba(14,165,233,.28)}
.dark .lesson-quiz-choice.is-correct{border-color:rgba(34,197,94,.6);background:rgba(34,197,94,.28)}
.dark .lesson-quiz-choice.is-incorrect{border-color:rgba(239,68,68,.6);background:rgba(239,68,68,.28)}
.lesson-quiz-card__actions{display:flex;flex-wrap:wrap;gap:.55rem;margin-top:.8rem}
.lesson-quiz-check,.lesson-quiz-next,.lesson-quiz-prev{padding:.45rem .9rem;border-radius:.7rem;font-weight:700;border:1px solid transparent;transition:transform .2s ease,box-shadow .2s ease,background .2s ease,color .2s ease}
.lesson-quiz-check{background:linear-gradient(135deg,#38bdf8,#0ea5e9);color:#f8fafc;box-shadow:0 18px 36px -24px rgba(14,165,233,.55)}
.lesson-quiz-check:hover{transform:translateY(-1px);box-shadow:0 22px 44px -26px rgba(14,165,233,.65)}
.lesson-quiz-check:disabled{opacity:.55;box-shadow:none;cursor:not-allowed;transform:none}
.lesson-quiz-next{background:rgba(148,163,184,.18);color:#0f172a}
.lesson-quiz-next:hover{background:rgba(59,130,246,.18);color:#0f172a}
.dark .lesson-quiz-next{background:rgba(71,85,105,.45);color:#e2e8f0}
.dark .lesson-quiz-next:hover{background:rgba(56,189,248,.28);color:#f8fafc}
.lesson-quiz-prev{background:rgba(148,163,184,.12);color:#0f172a;border-color:rgba(148,163,184,.35)}
.lesson-quiz-prev:hover{background:rgba(148,163,184,.2);color:#0f172a}
.lesson-quiz-prev:disabled{opacity:.55;cursor:not-allowed}
.dark .lesson-quiz-prev{background:rgba(30,41,59,.75);border-color:rgba(71,85,105,.55);color:#e2e8f0}
.dark .lesson-quiz-prev:hover{background:rgba(56,189,248,.22);color:#f8fafc}
.dark .lesson-quiz-prev:disabled{opacity:.4}
.lesson-quiz-feedback{margin-top:1.35rem;padding:1.1rem 1.2rem;border-radius:1rem;background:rgba(14,165,233,.12);border:1px solid rgba(14,165,233,.28)}
.lesson-quiz-feedback__status{margin:0 0 .45rem;font-weight:600;color:#0f172a}
.lesson-quiz-feedback__body{margin:0;color:#1e293b}
.dark .lesson-quiz-feedback{background:rgba(56,189,248,.2);border-color:rgba(56,189,248,.35)}
.dark .lesson-quiz-feedback__status{color:#e2e8f0}
.dark .lesson-quiz-feedback__body{color:#cbd5f5}
@media (max-width:640px){.lesson-quiz-card{padding:1.35rem 1.1rem}.lesson-quiz-card__actions{flex-direction:column;align-items:stretch}.lesson-quiz-check,.lesson-quiz-next,.lesson-quiz-prev{width:100%}}
.lesson-quiz-empty{padding:2.25rem;text-align:center;color:#475569;font-weight:500}
.dark .lesson-quiz-empty{color:#cbd5f5}
.sp-lesson-quiz-slot{margin:.4rem 0 0 0;padding-left:1.4rem}
.sp-lesson-quiz-entry{width:100%;display:flex;align-items:center;gap:.65rem;padding:.45rem .75rem;border-radius:.6rem;background:transparent;font-size:.85rem;font-weight:600;color:#0b1120;text-align:left;transition:background .2s ease,color .2s ease,transform .2s ease}
.sp-lesson-quiz-entry:hover{background:rgba(191,219,254,.55);color:#0b1120;transform:translateY(-1px)}
.sp-lesson-quiz-entry__label{display:inline-flex;align-items:center;gap:.5rem;min-width:0;color:inherit}
.sp-lesson-quiz-entry__label span{display:inline-flex;align-items:center;gap:.35rem;white-space:nowrap}
.sp-lesson-quiz-entry__progress{margin-left:auto;display:inline-flex;align-items:center;gap:.45rem;flex:0 0 auto}
.sp-lesson-quiz-entry__bar{position:relative;display:block;width:4.3rem;height:.18rem;border-radius:9999px;background:rgba(148,163,184,.32);overflow:hidden}
.sp-lesson-quiz-entry__fill{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:9999px;background:linear-gradient(135deg,#38bdf8,#0ea5e9);transition:width .25s ease}
.sp-lesson-quiz-entry__count{font-size:.7rem;font-weight:500;color:#1f2937;white-space:nowrap}
.dark .sp-lesson-quiz-entry{color:#f8fafc}
.dark .sp-lesson-quiz-entry:hover{background:rgba(59,130,246,.32);color:#f8fafc}
.dark .sp-lesson-quiz-entry__bar{background:rgba(71,85,105,.6)}
.dark .sp-lesson-quiz-entry__count{color:#f8fafc}

@media (min-width:1024px){.focus-timer-shell{width:260px}.focus-timer-header{padding:.6rem .85rem .45rem .85rem}.focus-timer-toggle{gap:.6rem;padding:.5rem .15rem}.focus-timer-status{font-size:.95rem}.focus-timer-hide{width:32px;height:32px}.focus-timer-panel{padding:.85rem 1rem 1rem;gap:.85rem}.focus-timer-body{gap:.75rem;align-items:flex-start}.focus-timer-ring{width:66px;height:66px}.focus-timer-ring::after{inset:10px}.focus-timer-ring span{font-size:.68rem}.focus-timer-message{font-size:.75rem;line-height:1.4}.focus-timer-actions{gap:.6rem}.focus-timer-button{padding:.5rem .75rem}}