:root{--study-bg:#0b1020;--study-card:#121a2b;--study-border:#263149;--study-muted:#9aa8bd;--study-accent:#76a9fa;--study-good:#34d399;--study-warn:#fbbf24;--study-bad:#fb7185}html[data-bs-theme="dark"] body{background:var(--study-bg);color:#e8eef8}.navbar,.offcanvas{background:#0e1627!important}.card{background:var(--study-card);border-color:var(--study-border)}.text-muted{color:var(--study-muted)!important}.progress{height:.65rem;background:#263149}.btn-primary{--bs-btn-bg:#3978d3;--bs-btn-border-color:#3978d3}.study-shell{min-height:100vh}.sidebar{width:270px;border-right:1px solid var(--study-border);background:#0e1627}.sidebar .nav-link{color:#b9c6d8;border-radius:.75rem;padding:.7rem .85rem}.sidebar .nav-link:hover{background:#18233a;color:#fff}.content{min-width:0}.metric{font-size:1.65rem;font-weight:700}.eyebrow{font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--study-muted)}.study-content{font-size:1.08rem;line-height:1.78}.study-content p{margin-bottom:1.1rem}.question-card.correct{border-color:var(--study-good)}.question-card.incorrect{border-color:var(--study-bad)}.soft-badge{background:#1b2942;border:1px solid #2c4166}.mindmap-node{border-left:3px solid var(--study-accent);padding:.5rem .75rem;margin:.35rem 0;background:#101a2d;border-radius:.4rem}.focus-mode .sidebar,.focus-mode .topbar{display:none!important}.focus-mode .content{width:100%!important}.timer{font-variant-numeric:tabular-nums}.table{--bs-table-bg:transparent}.form-control,.form-select{background-color:#0e1627;border-color:#33425f}.form-control:focus,.form-select:focus{background-color:#0e1627}.logo-dot{width:10px;height:10px;border-radius:50%;background:var(--study-good);display:inline-block}.tv-mode{font-size:1.15rem}@media(max-width:991.98px){.sidebar{display:none}.content{width:100%}.study-content{font-size:1.03rem}.mobile-bottom{display:flex!important}}@media(min-width:1600px){body{font-size:1.08rem}.container-fluid{max-width:1800px}.card{border-radius:1rem}.metric{font-size:2rem}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* V2 adaptive learning */
.study-mark{background:rgba(118,169,250,.04)}
.mastery-low{color:var(--study-bad)}.mastery-mid{color:var(--study-warn)}.mastery-high{color:var(--study-good)}
@media(max-width:575.98px){.question-card .fs-5{font-size:1.05rem!important}.confidence-group{width:100%}.confidence-group label{flex:1}.study-content{line-height:1.72}.metric{font-size:1.45rem}}

/* V3 multi-track product layout */
.nav-svg,.section-icon{width:1.18rem;height:1.18rem;flex:0 0 auto}.menu-svg{width:1rem;height:1rem}.sidebar-nav .nav-link{display:flex;align-items:center;gap:.72rem}.sidebar-label{padding:.55rem .85rem .25rem;font-size:.68rem;letter-spacing:.12em;text-transform:uppercase;color:var(--study-muted)}.brand{color:inherit}.brand:hover{color:inherit}.logo-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:linear-gradient(135deg,#3978d3,#34d399);color:#fff;font-weight:800}.profile-avatar{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#233453;color:#fff;font-weight:700;font-size:.8rem;border:1px solid #3a4d70}.profile-avatar-lg{width:72px;height:72px;font-size:1.25rem}.user-menu{border:0;background:transparent;color:inherit;padding:.25rem .45rem}.user-menu:hover,.user-menu:focus{background:rgba(118,169,250,.08);color:inherit}.track-card{transition:transform .15s ease,border-color .15s ease}.track-card:hover{transform:translateY(-2px);border-color:#3978d3}.milestone-item{border-left:3px solid var(--study-accent);padding-left:.75rem}.track-check{cursor:pointer;border-color:var(--study-border);background:rgba(118,169,250,.025)}.track-check:has(input:checked){border-color:#3978d3;background:rgba(57,120,211,.1)}
html[data-study-theme="dark-hc"]{--study-bg:#000;--study-card:#080808;--study-border:#4b5563;--study-muted:#c8d0dc;--study-accent:#8fc4ff}html[data-study-theme="dark-hc"] body{background:#000;color:#fff}html[data-study-theme="dark-hc"] .sidebar,html[data-study-theme="dark-hc"] .topbar,html[data-study-theme="dark-hc"] .offcanvas{background:#050505!important}html[data-study-theme="dark-hc"] .card{background:#090909;border-color:#555}html[data-study-theme="light"]{--study-bg:#f5f7fb;--study-card:#fff;--study-border:#dce3ee;--study-muted:#667085;--study-accent:#2868c7}html[data-study-theme="light"] body{background:var(--study-bg);color:#1f2937}html[data-study-theme="light"] .sidebar,html[data-study-theme="light"] .topbar,html[data-study-theme="light"] .offcanvas{background:#fff!important}html[data-study-theme="light"] .card{background:#fff;border-color:var(--study-border)}html[data-study-theme="light"] .sidebar .nav-link{color:#475467}html[data-study-theme="light"] .sidebar .nav-link:hover{background:#edf4ff;color:#1d4f91}html[data-study-theme="light"] .form-control,html[data-study-theme="light"] .form-select{background:#fff;border-color:#cfd8e6;color:#1f2937}html[data-study-theme="light"] .profile-avatar{background:#dce9fb;color:#174a8b}


/* V3.1 responsive actions */
.btn-icon{display:inline-grid;place-items:center;width:2.5rem;height:2.5rem;padding:0;border:1px solid var(--study-border);border-radius:.75rem;background:transparent;color:inherit}.btn-icon:hover{background:rgba(118,169,250,.10);color:inherit}.btn-action{display:inline-flex;align-items:center;justify-content:center;gap:.42rem;white-space:nowrap}.action-icon{width:1rem;height:1rem}.mobile-bottom-nav{position:fixed;z-index:1035;left:0;right:0;bottom:0;display:flex;background:rgba(14,22,39,.96);backdrop-filter:blur(12px);border-top:1px solid var(--study-border);padding:max(.25rem,env(safe-area-inset-bottom)) .35rem calc(.25rem + env(safe-area-inset-bottom))}.mobile-bottom-nav>a,.mobile-bottom-nav>button{flex:1;min-width:0;border:0;background:transparent;color:var(--study-muted);text-decoration:none;display:flex;flex-direction:column;align-items:center;gap:.1rem;padding:.35rem .15rem;font-size:.68rem}.mobile-bottom-nav>a:hover,.mobile-bottom-nav>button:hover{color:#fff}.mobile-nav-icon{width:1.35rem;height:1.35rem}.pb-mobile-nav{padding-bottom:5.25rem!important}.responsive-actions{display:flex;gap:.5rem;flex-wrap:wrap}.compact-table-actions{white-space:nowrap}.compact-table-actions .btn{margin:.1rem}.study-card-action{min-height:46px}.card-header{min-width:0}.card-header>*{min-width:0}.table-responsive{border-radius:inherit}.topbar{position:sticky;top:0;z-index:1020;background:rgba(14,22,39,.93);backdrop-filter:blur(12px)}
@media(max-width:575.98px){.action-label{display:none!important}.btn-action{width:2.5rem;height:2.5rem;padding:0;border-radius:.7rem}.responsive-actions{gap:.35rem}.card-body{padding:.9rem}.h3{font-size:1.35rem}.metric{font-size:1.3rem}.table{font-size:.88rem}.table>:not(caption)>*>*{padding:.55rem .45rem}.desktop-only-label{display:none!important}.study-content{font-size:1rem;line-height:1.68}.track-card .btn{flex:0 0 auto}}
@media(min-width:992px){.pb-mobile-nav{padding-bottom:1.5rem!important}.mobile-bottom-nav{display:none!important}}
html[data-study-theme="light"] .mobile-bottom-nav{background:rgba(255,255,255,.96)}html[data-study-theme="light"] .mobile-bottom-nav>a:hover,html[data-study-theme="light"] .mobile-bottom-nav>button:hover{color:#174a8b}html[data-study-theme="light"] .topbar{background:rgba(255,255,255,.93)}


/* V3.4 CSP-clean views */
.login-card{max-width:440px;width:100%}
.filter-scope{max-width:190px}.filter-search{max-width:220px}
.study-progress{height:.65rem;border:0;border-radius:999px;overflow:hidden;background:#263149;appearance:none;-webkit-appearance:none}
.study-progress::-webkit-progress-bar{background:#263149;border-radius:999px}.study-progress::-webkit-progress-value{background:#3978d3;border-radius:999px}.study-progress::-moz-progress-bar{background:#3978d3;border-radius:999px}
@media(max-width:575.98px){.filter-scope,.filter-search{max-width:none;width:100%}}

/* =========================================================
   V3.5 — Study-first themes, contrast and typography
   ========================================================= */
:root{
  --study-font: "Segoe UI Variable Text","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --study-font-display: "Segoe UI Variable Display","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --study-text:#eaf0f8;
  --study-text-strong:#f8fbff;
  --study-surface:#121b2d;
  --study-surface-2:#172238;
  --study-surface-3:#1d2a43;
  --study-link:#8ec5ff;
  --study-shadow:0 8px 28px rgba(0,0,0,.18);
}
html,body{font-family:var(--study-font);font-weight:450;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
body{letter-spacing:.002em}
h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,.brand strong{font-family:var(--study-font-display);font-weight:650;letter-spacing:-.012em;color:var(--study-text-strong)}
strong,b,.fw-bold{font-weight:650}
.form-label,.card-header,.dropdown-header,.eyebrow,.sidebar-label{font-weight:600}
.study-content{font-weight:450;line-height:1.82;width:100%;max-width:none}
.study-content h1,.study-content h2,.study-content h3,.study-content h4{font-weight:650;line-height:1.25;margin-top:1.45em;margin-bottom:.6em}
.study-content p,.study-content li{color:var(--study-text)}
.study-content li+li{margin-top:.32rem}
a{color:var(--study-link)}
.card{box-shadow:var(--study-shadow)}
.btn{font-weight:550}.btn-sm{font-weight:550}
.btn-icon{width:2.55rem;height:2.55rem;display:inline-grid;place-items:center;padding:0;border:1px solid var(--study-border);border-radius:.8rem;color:var(--study-text);background:var(--study-surface)}
.btn-icon:hover,.btn-icon:focus{color:var(--study-text-strong);background:var(--study-surface-2);border-color:var(--study-accent)}
.dropdown-toggle-no-caret::after{display:none!important}
.theme-menu{min-width:220px}.theme-menu .dropdown-item.active{font-weight:650}
.topbar .dropdown-menu{margin-top:.45rem}
.metric{color:var(--study-text-strong);font-weight:750;letter-spacing:-.025em}
.card-header{color:var(--study-text-strong)}
.table th{font-weight:650}.table td{font-weight:450}
.list-group-item strong{font-weight:650}

/* Dark confortável */
html[data-study-theme="dark"]{
  --study-bg:#0c1220;
  --study-card:#121b2d;
  --study-surface:#121b2d;
  --study-surface-2:#172238;
  --study-surface-3:#1d2a43;
  --study-border:#33415b;
  --study-muted:#aebbd0;
  --study-accent:#7db7ff;
  --study-link:#91c4ff;
  --study-text:#e3ebf6;
  --study-text-strong:#f7faff;
  --study-good:#46dba2;
  --study-warn:#ffd166;
  --study-bad:#ff7f91;
  --bs-body-bg:#0c1220;
  --bs-body-color:#e3ebf6;
  --bs-secondary-color:#aebbd0;
  --bs-border-color:#33415b;
  --bs-link-color:#91c4ff;
  --bs-link-hover-color:#b7d9ff;
}
html[data-study-theme="dark"] body{background:var(--study-bg);color:var(--study-text)}
html[data-study-theme="dark"] .sidebar,html[data-study-theme="dark"] .topbar,html[data-study-theme="dark"] .offcanvas{background:#0f1829!important;color:var(--study-text)}
html[data-study-theme="dark"] .card,html[data-study-theme="dark"] .card-header{background:var(--study-card);color:var(--study-text);border-color:var(--study-border)}
html[data-study-theme="dark"] .card-header{background:#152137}
html[data-study-theme="dark"] .list-group-item{background:var(--study-card);color:var(--study-text);border-color:var(--study-border)}
html[data-study-theme="dark"] .list-group-item-action:hover{background:var(--study-surface-2);color:var(--study-text-strong)}
html[data-study-theme="dark"] .table{--bs-table-color:var(--study-text);--bs-table-bg:transparent;--bs-table-border-color:var(--study-border);--bs-table-striped-color:var(--study-text);--bs-table-hover-color:var(--study-text-strong);--bs-table-hover-bg:rgba(125,183,255,.06)}
html[data-study-theme="dark"] .dropdown-menu{--bs-dropdown-bg:#121b2d;--bs-dropdown-color:var(--study-text);--bs-dropdown-link-color:var(--study-text);--bs-dropdown-link-hover-bg:#1a2942;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-border-color:var(--study-border)}
html[data-study-theme="dark"] .form-control,html[data-study-theme="dark"] .form-select{background:#0f1829;color:var(--study-text);border-color:#40506e}
html[data-study-theme="dark"] .form-control::placeholder{color:#8190a8}
html[data-study-theme="dark"] .soft-badge{background:#1b2942;color:#dce8f8;border-color:#40557a}
html[data-study-theme="dark"] .text-muted{color:var(--study-muted)!important}

/* Light — low glare, high legibility */
html[data-study-theme="light"]{
  --study-bg:#edf2f7;
  --study-card:#ffffff;
  --study-surface:#ffffff;
  --study-surface-2:#f5f8fc;
  --study-surface-3:#e8eef6;
  --study-border:#c7d2df;
  --study-muted:#526178;
  --study-accent:#1f64c8;
  --study-link:#1658ad;
  --study-text:#263449;
  --study-text-strong:#101b2d;
  --study-good:#16794e;
  --study-warn:#9b6500;
  --study-bad:#b4233f;
  --study-shadow:0 7px 22px rgba(31,50,77,.08);
  --bs-body-bg:#edf2f7;
  --bs-body-color:#263449;
  --bs-secondary-color:#526178;
  --bs-border-color:#c7d2df;
  --bs-link-color:#1658ad;
  --bs-link-hover-color:#0f4385;
  color-scheme:light;
}
html[data-study-theme="light"] body{background:var(--study-bg)!important;color:var(--study-text)!important}
html[data-study-theme="light"] h1,html[data-study-theme="light"] h2,html[data-study-theme="light"] h3,html[data-study-theme="light"] h4,html[data-study-theme="light"] h5,html[data-study-theme="light"] h6,html[data-study-theme="light"] .h1,html[data-study-theme="light"] .h2,html[data-study-theme="light"] .h3,html[data-study-theme="light"] .h4,html[data-study-theme="light"] .h5,html[data-study-theme="light"] .h6{color:var(--study-text-strong)!important}
html[data-study-theme="light"] .sidebar,html[data-study-theme="light"] .topbar,html[data-study-theme="light"] .offcanvas{background:#fff!important;color:var(--study-text)!important;border-color:var(--study-border)!important}
html[data-study-theme="light"] .sidebar .nav-link{color:#3e4e65}
html[data-study-theme="light"] .sidebar .nav-link:hover,html[data-study-theme="light"] .sidebar .nav-link:focus{background:#e9f1fb;color:#124f9e}
html[data-study-theme="light"] .sidebar-label{color:#68778c}
html[data-study-theme="light"] .brand{color:#152238!important}
html[data-study-theme="light"] .brand .text-muted{color:#68778c!important}
html[data-study-theme="light"] .card{background:#fff!important;color:var(--study-text)!important;border-color:var(--study-border)!important;box-shadow:var(--study-shadow)}
html[data-study-theme="light"] .card-header{background:#f6f8fb!important;color:#17243a!important;border-color:var(--study-border)!important}
html[data-study-theme="light"] .card-header strong{color:#17243a!important}
html[data-study-theme="light"] .list-group-item{background:#fff!important;color:#263449!important;border-color:#d4dde8!important}
html[data-study-theme="light"] .list-group-item-action:hover,html[data-study-theme="light"] .list-group-item-action:focus{background:#edf4fc!important;color:#10213a!important}
html[data-study-theme="light"] .list-group-item strong{color:#17243a!important}
html[data-study-theme="light"] .table{--bs-table-color:#263449;--bs-table-bg:#fff;--bs-table-border-color:#d4dde8;--bs-table-striped-color:#263449;--bs-table-striped-bg:#f7f9fc;--bs-table-hover-color:#101b2d;--bs-table-hover-bg:#edf4fc;color:#263449!important}
html[data-study-theme="light"] .table thead th{background:#f2f5f9;color:#24334a;border-bottom-color:#c7d2df}
html[data-study-theme="light"] .table td{color:#334258}
html[data-study-theme="light"] .text-muted{color:#59687d!important}
html[data-study-theme="light"] .eyebrow{color:#5a6a81!important}
html[data-study-theme="light"] .metric{color:#13223a!important}
html[data-study-theme="light"] .dropdown-menu{--bs-dropdown-bg:#fff;--bs-dropdown-color:#263449;--bs-dropdown-link-color:#263449;--bs-dropdown-link-hover-bg:#edf4fc;--bs-dropdown-link-hover-color:#123f7c;--bs-dropdown-border-color:#c7d2df;--bs-dropdown-header-color:#65738a;background:#fff!important;color:#263449!important;border-color:#c7d2df!important}
html[data-study-theme="light"] .dropdown-item{color:#263449}
html[data-study-theme="light"] .dropdown-item.active{background:#e4effc;color:#164f96}
html[data-study-theme="light"] .dropdown-divider{border-color:#dbe2ea}
html[data-study-theme="light"] .form-control,html[data-study-theme="light"] .form-select{background:#fff!important;color:#24334a!important;border-color:#b9c6d5!important}
html[data-study-theme="light"] .form-control:focus,html[data-study-theme="light"] .form-select:focus{background:#fff!important;color:#17243a!important;border-color:#4f86d5!important;box-shadow:0 0 0 .2rem rgba(31,100,200,.12)}
html[data-study-theme="light"] .form-control::placeholder{color:#7b8798}
html[data-study-theme="light"] .btn-icon{background:#fff;color:#32435b;border-color:#c5d0dd}
html[data-study-theme="light"] .btn-icon:hover,html[data-study-theme="light"] .btn-icon:focus{background:#edf4fc;color:#124f9e;border-color:#7ca7dc}
html[data-study-theme="light"] .user-menu{color:#17243a}
html[data-study-theme="light"] .user-menu:hover,html[data-study-theme="light"] .user-menu:focus{background:#edf4fc;color:#10213a}
html[data-study-theme="light"] .profile-avatar{background:#e5effb;color:#164f96;border-color:#9ab9df}
html[data-study-theme="light"] .soft-badge{background:#e8eef6;color:#34455d;border-color:#c2cedd}
html[data-study-theme="light"] .mindmap-node{background:#f5f8fc;color:#24334a;border-left-color:#2f73cd}
html[data-study-theme="light"] .study-mark{background:#f6f9fd}
html[data-study-theme="light"] .study-progress{background:#d8e0eb}
html[data-study-theme="light"] .study-progress::-webkit-progress-bar{background:#d8e0eb}html[data-study-theme="light"] .study-progress::-webkit-progress-value{background:#236bc8}html[data-study-theme="light"] .study-progress::-moz-progress-bar{background:#236bc8}
html[data-study-theme="light"] .mobile-bottom-nav{background:rgba(255,255,255,.98);border-color:#cbd5e1;box-shadow:0 -5px 18px rgba(31,50,77,.08)}
html[data-study-theme="light"] .mobile-bottom-nav>a,html[data-study-theme="light"] .mobile-bottom-nav>button{color:#53637a}
html[data-study-theme="light"] .mobile-bottom-nav>a:hover,html[data-study-theme="light"] .mobile-bottom-nav>button:hover{color:#124f9e}
html[data-study-theme="light"] .alert-secondary{background:#eef3f8;color:#31425a;border-color:#cbd6e3}

/* Dark alto contraste */
html[data-study-theme="dark-hc"]{
  --study-bg:#000000;
  --study-card:#090909;
  --study-surface:#090909;
  --study-surface-2:#151515;
  --study-surface-3:#202020;
  --study-border:#6d7480;
  --study-muted:#d0d5dc;
  --study-accent:#92c9ff;
  --study-link:#9ed0ff;
  --study-text:#f2f4f7;
  --study-text-strong:#ffffff;
  --study-good:#66f0b1;
  --study-warn:#ffe27a;
  --study-bad:#ff8799;
  --study-shadow:none;
  --bs-body-bg:#000;
  --bs-body-color:#f2f4f7;
  --bs-secondary-color:#d0d5dc;
  --bs-border-color:#6d7480;
  --bs-link-color:#9ed0ff;
  --bs-link-hover-color:#c9e7ff;
  color-scheme:dark;
}
html[data-study-theme="dark-hc"] body{background:#000!important;color:#f2f4f7!important}
html[data-study-theme="dark-hc"] .sidebar,html[data-study-theme="dark-hc"] .topbar,html[data-study-theme="dark-hc"] .offcanvas{background:#030303!important;color:#fff!important;border-color:#686f79!important}
html[data-study-theme="dark-hc"] .sidebar .nav-link{color:#e7e9ed}
html[data-study-theme="dark-hc"] .sidebar .nav-link:hover{background:#171717;color:#fff;outline:1px solid #757b84}
html[data-study-theme="dark-hc"] .card,html[data-study-theme="dark-hc"] .card-header{background:#090909!important;color:#f7f7f8!important;border-color:#707780!important}
html[data-study-theme="dark-hc"] .card-header{background:#101010!important}
html[data-study-theme="dark-hc"] .list-group-item{background:#090909!important;color:#f2f4f7!important;border-color:#626872!important}
html[data-study-theme="dark-hc"] .list-group-item-action:hover{background:#171717!important;color:#fff!important}
html[data-study-theme="dark-hc"] .table{--bs-table-color:#f2f4f7;--bs-table-bg:#090909;--bs-table-border-color:#636a73;--bs-table-striped-color:#fff;--bs-table-striped-bg:#111;--bs-table-hover-color:#fff;--bs-table-hover-bg:#181818}
html[data-study-theme="dark-hc"] .table thead th{background:#111;color:#fff}
html[data-study-theme="dark-hc"] .text-muted{color:#d0d5dc!important}
html[data-study-theme="dark-hc"] .dropdown-menu{--bs-dropdown-bg:#090909;--bs-dropdown-color:#fff;--bs-dropdown-link-color:#f5f5f5;--bs-dropdown-link-hover-bg:#1b1b1b;--bs-dropdown-link-hover-color:#fff;--bs-dropdown-border-color:#707780;background:#090909!important}
html[data-study-theme="dark-hc"] .dropdown-item.active{background:#173a5d;color:#fff}
html[data-study-theme="dark-hc"] .form-control,html[data-study-theme="dark-hc"] .form-select{background:#060606!important;color:#fff!important;border-color:#7c838c!important}
html[data-study-theme="dark-hc"] .btn-icon{background:#080808;color:#fff;border-color:#7b818a}
html[data-study-theme="dark-hc"] .btn-icon:hover{background:#181818;border-color:#a7cfff}
html[data-study-theme="dark-hc"] .soft-badge{background:#181818;color:#fff;border-color:#747b84}
html[data-study-theme="dark-hc"] .mobile-bottom-nav{background:#050505;border-color:#737a83}

/* Reading comfort and responsive polish */
@media(max-width:991.98px){
  body{font-weight:460}
  .study-content{font-size:1.04rem;line-height:1.78}
  .topbar{min-height:58px}
}
@media(max-width:575.98px){
  .study-content{font-size:1.02rem;line-height:1.74}
  .card-header{font-weight:650}
  .dropdown-menu.theme-menu{min-width:205px}
}

/* V3.7 — leitura ampla, ações compactas e importação segura */
.study-icon-action{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:2.85rem;height:2.65rem;padding:.45rem .65rem;border-radius:.72rem;gap:.25rem}
.study-action-icon{width:1.15rem;height:1.15rem}
.study-action-count{font-size:.68rem;font-weight:750;line-height:1;min-width:1.1rem;text-align:center}
.study-quick-actions form{margin:0}
.import-target-box{background:rgba(118,169,250,.07);border-color:var(--study-border)!important}

/* O texto normal mantém largura confortável. No modo leitura usa toda a largura disponível. */
.focus-mode .container-fluid{max-width:none!important;width:100%!important;padding-left:clamp(.8rem,2vw,2.25rem)!important;padding-right:clamp(.8rem,2vw,2.25rem)!important}
.focus-mode .study-day-card{width:100%!important;max-width:none!important}
.focus-mode .study-content{max-width:none!important;width:100%!important}
.focus-mode .study-content p,.focus-mode .study-content ul,.focus-mode .study-content ol,.focus-mode .study-content blockquote{max-width:none!important;width:100%!important}
.focus-mode .mobile-bottom-nav{display:none!important}

@media(max-width:575.98px){
  .study-icon-action{min-width:2.65rem;height:2.55rem;padding:.4rem .55rem}
  .study-action-count{font-size:.64rem}
}

/* V3.8 - conteudo de estudo sempre usa toda a largura disponivel. */
.study-content,.study-content>*,.study-content p,.study-content ul,.study-content ol,.study-content blockquote{max-width:none!important}
.study-content{width:100%!important}
body.focus-mode .content,body.focus-mode .container-fluid,body.focus-mode .study-day-card,body.focus-mode .card-body,body.focus-mode .study-content{width:100%!important;max-width:none!important}
body.focus-mode .study-content>*{width:100%!important;max-width:none!important}

/* V3.9 - acessibilidade de leitura: escala de fonte por usuário */
html{--study-reading-size:1.05rem;--study-reading-line:1.78}
html[data-font-scale="normal"]{--study-reading-size:1.05rem;--study-reading-line:1.78}
html[data-font-scale="large"]{--study-reading-size:1.18rem;--study-reading-line:1.84}
html[data-font-scale="xlarge"]{--study-reading-size:1.32rem;--study-reading-line:1.90}
.study-content,.question-text,.answer-explanation,.active-recall,.recall-card,.question-card .card-body{font-size:var(--study-reading-size)!important;line-height:var(--study-reading-line)!important;font-weight:500}
.study-content p,.answer-explanation p,.active-recall p{margin-bottom:1.2rem}
.study-content h1,.study-content h2,.study-content h3,.study-content h4{font-weight:650;line-height:1.3}
.font-size-button span{font-weight:700;letter-spacing:-.04em;font-size:1rem}
.font-menu{min-width:220px}
.font-choice-preview{display:inline-flex;align-items:center;justify-content:center;width:2rem;font-weight:700}
.font-choice-normal{font-size:.9rem}.font-choice-large{font-size:1.05rem}.font-choice-xlarge{font-size:1.2rem}
@media(max-width:575.98px){
 html[data-font-scale="large"]{--study-reading-size:1.14rem}
 html[data-font-scale="xlarge"]{--study-reading-size:1.26rem}
 .font-menu{min-width:205px}
}

/* =========================================================
   V4.0 — Mobile navigation, study identity and compact mastery
   ========================================================= */
.app-study-logo{background:linear-gradient(135deg,#3978d3,#34d399);color:#fff}
.app-logo-icon{width:1.45rem;height:1.45rem;stroke-width:2}
.mobile-menu-trigger .menu-svg{width:1.35rem;height:1.35rem}
.mobile-main-menu{--bs-offcanvas-width:min(88vw,360px)}
.mobile-full-nav .nav-link{min-height:48px;font-size:1rem;font-weight:550}
.mobile-full-nav .nav-svg{width:1.3rem;height:1.3rem}
.study-topic-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.study-topic-title{min-width:0;flex:1}
.mastery-summary{display:grid;grid-template-columns:auto;justify-items:end;min-width:112px}
.mastery-label{font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--study-muted);font-weight:650;white-space:nowrap}
.mastery-value{font-size:1.45rem;line-height:1.15;color:var(--study-text-strong)}
.mastery-status{font-size:.8rem}
@media(max-width:991.98px){
  .topbar .mobile-menu-trigger{order:-1}
}
@media(max-width:575.98px){
  .study-topic-header{display:block}
  .mastery-summary{margin-top:1rem;padding-top:.8rem;border-top:1px solid var(--study-border);display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%;min-width:0}
  .mastery-label{font-size:.82rem;letter-spacing:.06em}
  .mastery-value{font-size:1.25rem;margin-left:auto}
  .mastery-status{display:none}
  .mobile-main-menu .offcanvas-header{padding:1rem}
  .mobile-main-menu .offcanvas-body{padding-bottom:max(1rem,env(safe-area-inset-bottom))!important}
}
/* v4.3 - assessment UX */
.icon-only{display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:42px}.answer-explanation{background:var(--bs-body-bg)}.sticky-assessment-action{position:sticky;bottom:calc(88px + env(safe-area-inset-bottom));z-index:20;padding:12px;background:color-mix(in srgb,var(--bs-body-bg) 94%,transparent);border:1px solid var(--bs-border-color);border-radius:14px;margin:18px 0}@media(min-width:992px){.sticky-assessment-action{bottom:16px;max-width:420px;margin-left:auto}}

/* V4.4: ações do diagnóstico no fluxo da página, sem sobreposição */
.assessment-footer-action{position:static;padding:16px;background:var(--bs-tertiary-bg);border:1px solid var(--bs-border-color);border-radius:14px;margin:24px 0 110px}.quick-answer>summary{display:inline-flex;align-items:center;gap:.45rem;cursor:pointer;list-style:none}.quick-answer>summary::-webkit-details-marker{display:none}.quick-answer[open]>summary{margin-bottom:.5rem}

/* V4.8 — progresso de domínio e memória visual da leitura */
.mastery-summary{min-width:190px}
.mastery-line{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.mastery-progress{height:7px;margin:.35rem 0 .2rem;background:var(--bs-border-color)}
.mastery-progress .progress-bar{background:var(--bs-primary)}
.study-mark-badge{font-size:.75rem;letter-spacing:.02em}
.study-mark[data-current-mark="understood"]{border-left:4px solid var(--bs-success)!important}
.study-mark[data-current-mark="review"]{border-left:4px solid var(--bs-warning)!important}
.study-mark[data-current-mark="doubt"]{border-left:4px solid var(--bs-danger)!important}
.study-doubt-panel textarea{font-size:1rem;line-height:1.55;resize:vertical}
@media(max-width:767.98px){.mastery-summary{width:100%;min-width:0}.mastery-line{width:100%}.study-doubt-panel .d-flex{align-items:stretch!important;flex-direction:column}.study-doubt-panel .btn{width:100%}}


/* V4.9 - feedback persistente do diagnóstico. Não depende das cores de .alert do Bootstrap. */
.diagnostic-feedback{display:block!important;visibility:visible!important;opacity:1!important;margin:0;padding:1rem 1.1rem;border:1px solid var(--study-border);border-radius:.75rem;background:var(--study-card);color:inherit!important;min-height:0!important}
.diagnostic-feedback.is-correct{border-color:#198754;background:rgba(25,135,84,.12);color:inherit!important}
.diagnostic-feedback.is-incorrect{border-color:#dc3545;background:rgba(220,53,69,.12);color:inherit!important}
.diagnostic-feedback strong{color:inherit!important}
html[data-study-theme="light"] .diagnostic-feedback.is-correct{background:#eaf7f0;color:#123d27!important}
html[data-study-theme="light"] .diagnostic-feedback.is-incorrect{background:#fff0f1;color:#5d1720!important}
/* V5.2 - indicadores pedagógicos */
.learning-level-badge{white-space:normal;text-align:left}.capacity-scenario{min-height:100%}

/* V6.1 — mapa mental de estudo */
.mindmap-canvas-card{overflow:hidden}.mindmap-canvas{min-height:620px;display:grid;grid-template-columns:minmax(230px,1fr) minmax(260px,.9fr) minmax(230px,1fr);grid-template-areas:"b1 center b2" "b3 center b4" "b5 b5 b5";gap:1.25rem;align-items:center;padding:1rem;background:radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--bs-primary) 13%,transparent),transparent 36%)}
.mindmap-center{grid-area:center;align-self:center;justify-self:center;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:min(100%,280px);min-height:180px;padding:1.5rem;border:2px solid var(--bs-primary);border-radius:20px;background:var(--study-card);box-shadow:0 0 30px color-mix(in srgb,var(--bs-primary) 20%,transparent)}.mindmap-center strong{font-size:1.25rem}.mindmap-center small{margin-top:.5rem;color:var(--study-muted)}.mindmap-center-icon svg{width:2rem;height:2rem;margin-bottom:.6rem}
.mindmap-branch{position:relative;border:2px solid currentColor;border-radius:18px;padding:1rem;background:var(--study-card)}.mindmap-branch h2{font-size:1rem;margin:0 0 .75rem}.mindmap-leaves{display:flex;flex-wrap:wrap;gap:.5rem}.mindmap-leaf{display:inline-flex;padding:.45rem .7rem;border:1px solid currentColor;border-radius:999px;font-size:.82rem;color:inherit;background:color-mix(in srgb,currentColor 6%,var(--study-card))}
.mindmap-branch-1{grid-area:b1;color:#3b82f6}.mindmap-branch-2{grid-area:b2;color:#f59e0b}.mindmap-branch-3{grid-area:b3;color:#22c55e}.mindmap-branch-4{grid-area:b4;color:#a855f7}.mindmap-branch-5{grid-area:b5;color:#f43f5e;max-width:78%;justify-self:center;width:100%}.mindmap-legend{display:flex;flex-wrap:wrap;gap:1.25rem;padding:.8rem 1rem;border:1px solid var(--study-border);border-radius:.75rem}.legend-dot{display:inline-block;width:.7rem;height:.7rem;border-radius:50%;margin-right:.35rem}.is-done{background:#22c55e}.is-doing{background:#f59e0b}.is-new{background:#94a3b8}.is-review{background:#ef4444}
@media(max-width:991.98px){.mindmap-canvas{min-height:0;grid-template-columns:1fr;grid-template-areas:"center" "b1" "b2" "b3" "b4" "b5";padding:.5rem}.mindmap-center{width:100%;min-height:140px}.mindmap-branch-5{max-width:none}.mindmap-leaf{font-size:.9rem}}

/* V6.2 — mapa mental integrado e teste rápido */
.study-inline-mindmap{padding:1rem;border:1px solid var(--study-border);border-radius:1rem;background:color-mix(in srgb,var(--study-card) 92%,var(--bs-primary) 8%)}
.mindmap-canvas-inline{min-height:560px;border:1px solid var(--study-border);border-radius:1rem;background:radial-gradient(circle at 50% 48%,color-mix(in srgb,var(--bs-primary) 15%,transparent),transparent 38%),var(--study-bg)}
.mindmap-study-actions{display:flex;flex-wrap:wrap;align-items:center;gap:1rem}.mindmap-study-actions .study-action-icon{width:1.1rem;height:1.1rem;margin-right:.35rem}
.quick-study-shell{max-width:920px;margin:0 auto}.quick-study-stats{display:flex;flex-wrap:wrap;gap:.65rem}.quick-study-stats span{padding:.65rem .9rem;border:1px solid var(--study-border);border-radius:.75rem;background:var(--study-card)}.quick-options>div{padding:.8rem 1rem;border:1px solid var(--study-border);border-radius:.65rem;margin:.5rem 0}.quick-answer-btn{min-width:3rem}.quick-question .card-body{font-size:var(--study-reading-size)}
@media(max-width:991.98px){.mindmap-canvas-inline{min-height:0}.study-inline-mindmap{padding:.75rem}.quick-study-stats span{flex:1 1 42%;text-align:center}}
