/* IA Aprova: study-first interface. Shared by dashboard and quiz. */
:root{--bg:#f5f5f7;--navy:#1d1d1f;--muted:#63636b;--blue:#1765d8;--line:#dedee3;--sky:#edf3fc;--surface:#fff;--radius:18px}
body{background:var(--bg);color:var(--navy);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;font-size:15px;line-height:1.5;font-optical-sizing:auto;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}button,a,input,select{touch-action:manipulation}button,a{-webkit-tap-highlight-color:rgba(23,101,216,.12)}
h1,h2,h3{color:var(--navy);text-wrap:balance;letter-spacing:-.025em}p{line-height:1.6}svg{flex-shrink:0}
.ia-app{max-width:1680px;grid-template-columns:224px minmax(0,1fr)}
.ia-side{background:#eeeef0;border-right:1px solid var(--line);padding:28px 16px;gap:22px;backdrop-filter:none}
.logo{font-size:26px;letter-spacing:-1px;margin:0 10px 12px}.logo b{color:var(--blue)}
.ia-side nav{gap:3px}.nav-btn{color:#494951;min-height:44px;padding:11px 14px;font-size:14px;font-weight:500;border:0;border-radius:9px;box-shadow:none}
.nav-btn.active{background:#fff;color:var(--blue);box-shadow:0 1px 3px #0000000d;font-weight:650;border:0}.nav-btn:hover:not(.active){background:#e3e3e8;color:var(--navy)}
.exam-chip{background:#e4e4e9;border:0;border-radius:12px;padding:14px}.exam-chip label{color:var(--muted);font-size:10px;letter-spacing:.08em}.exam-chip strong{line-height:1.5}.exam-chip select{border:1px solid #d2d2d7;color:var(--navy);min-height:44px}.back-portal{color:var(--muted);padding:0 8px}
.ia-main{padding:30px clamp(20px,3vw,48px);min-width:0}.topbar{grid-template-columns:minmax(220px,1fr) minmax(230px,400px) auto;gap:24px;margin-bottom:28px}.topbar h1{font-size:26px;line-height:1.25;letter-spacing:-.035em}.eyebrow{color:var(--muted);font-size:10px;font-weight:650;letter-spacing:.12em}.topbar .eyebrow{display:none}
.dashboard-search{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:none;color:var(--muted);height:46px}.dashboard-search input{color:var(--navy)}.dashboard-search input::placeholder{color:#76767e}.dashboard-search kbd{background:#f5f5f7;color:var(--muted);border-color:var(--line)}.dashboard-search:focus-within{outline:2px solid var(--blue);outline-offset:2px}.visitor{color:var(--muted)}.visitor strong{color:var(--navy)}.visitor .icon-button{background:white;border:1px solid var(--line);border-radius:50%;box-shadow:none;color:var(--navy)}
.hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,30%);grid-template-rows:auto auto;gap:18px 28px;min-height:0;height:auto;max-height:none;padding:32px 36px;background:#fff!important;background-image:none!important;border:1px solid var(--line);border-radius:22px;box-shadow:0 2px 8px #00000004;overflow:hidden;isolation:isolate;color:var(--navy)}
.hero::before,.hero::after,.hero-glow{display:none!important}.hero-copy{grid-column:1;grid-row:1;max-width:640px;min-height:0;padding:0;position:relative}.hero .eyebrow{color:var(--blue)}.hero h2{font-size:clamp(28px,3.3vw,42px);line-height:1.12;margin:12px 0 16px;max-width:580px;color:var(--navy);letter-spacing:-.04em}.hero p{color:var(--muted);font-size:15px;max-width:55ch;margin:0;line-height:1.6}.hero-actions{display:flex;gap:12px;margin-top:24px;flex-wrap:wrap}
.hero-mobile-teacher{display:block!important;position:relative!important;inset:auto!important;grid-column:2;grid-row:1/3;align-self:end;justify-self:center;width:100%!important;max-width:250px!important;height:auto!important;max-height:310px!important;object-fit:contain!important;object-position:center bottom;transform:none!important;opacity:1!important;filter:none!important;margin:0!important;z-index:0}
.mentor-note{grid-column:1;grid-row:2;position:relative;inset:auto;min-height:0;max-width:none;width:auto;margin:0;padding:16px 0 0;background:none;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;transform:none;overflow:visible}.mentor-note::before,.note-icon,.note-arrow{display:none}.mentor-note strong{color:var(--muted);font-size:10px;letter-spacing:.08em}.mentor-note h3{display:none}.mentor-note p{color:var(--muted);font-size:13px;line-height:1.55;white-space:normal;display:block;overflow:visible;-webkit-line-clamp:unset}
.btn,.primary-button,.pause-button,.exit-button{min-height:44px;border-radius:10px;font-size:14px;font-weight:600;padding:11px 18px;box-shadow:none;transition:background-color 140ms,color 140ms,transform 100ms}
.hero-actions .primary,.btn.blue,.form-grid .btn,.timer-actions .btn,.primary-button{background:var(--blue);color:white;border:1px solid transparent;box-shadow:none}.hero-actions .ghost,.btn.ghost,.pause-button{background:#f5f5f7;color:var(--navy);border:1px solid var(--line);box-shadow:none}.btn:disabled,button:disabled{background:#e9e9ed!important;color:#74747c!important;box-shadow:none!important;cursor:not-allowed;opacity:1}
button:active:not(:disabled),.btn:active:not(:disabled){transform:scale(.98);box-shadow:none}button:hover{box-shadow:none}.text-action,.row-action{color:var(--blue);font-weight:600;font-size:13px;min-height:44px;display:inline-flex;align-items:center;padding:6px 0}.text-action:hover,.row-action:hover{text-decoration:underline}
.metric-grid{gap:14px;margin:20px 0 24px;align-items:stretch}.metric{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:start;gap:12px;min-height:144px;padding:20px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:none;backdrop-filter:none}.metric-icon,.metric-icon.green,.metric-icon.blue,.metric-icon.orange,.metric-icon.purple{width:32px;height:32px;flex-basis:32px;margin:0;background:#f0f3f8;color:#42618a;border:0;border-radius:9px;box-shadow:none;filter:none}.metric-icon::before,.metric-icon::after{display:none}.metric-icon svg.metric-glyph{width:20px;height:20px;stroke-width:1.65}.metric>div{display:grid;grid-template-rows:38px 38px auto;gap:4px;min-width:0}.metric>div>span{font-size:12px;line-height:1.4;font-weight:500;color:var(--muted);min-height:0}.metric strong{font-size:27px;line-height:1.2;letter-spacing:-.04em;margin:0;min-height:0;color:var(--navy);font-variant-numeric:tabular-nums}.metric small{font-size:11px;line-height:1.4;margin:0;min-height:0;color:var(--muted)}
.dashboard-grid{gap:18px;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,.8fr)}.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:none;backdrop-filter:none;min-width:0}.panel h3{font-size:17px;line-height:1.35;font-weight:650;letter-spacing:-.025em}.panel-head{align-items:baseline}.panel-head h3{margin-bottom:16px}.subtle,.empty,.next-panel p{color:var(--muted);font-size:13px;line-height:1.6}.row,.recent-row,.subject-line{border-color:#ededf0}.row small,.subject-line small{font-size:12px;color:var(--muted)}.row .badge,.badge{background:#f5f5f7;color:var(--muted);border-radius:8px;font-size:12px;padding:10px;line-height:1.5}.subject-line strong{font-size:13px;color:var(--navy)}.session-visual{background:#edf3fc;color:var(--blue);border-radius:12px}.knowledge{gap:12px}.knowledge div{background:#f5f5f7;border:0;border-radius:10px}.knowledge strong{color:var(--navy)}.knowledge span{color:var(--muted)}.dashboard-footer{color:var(--muted);border-top:1px solid var(--line);margin-top:28px;padding:20px 0;font-size:12px}
#tool-view{padding:28px;min-height:360px}#tool-view h2{font-size:28px;margin:0 0 12px}#tool-view>p{max-width:75ch;color:var(--muted)}.form-grid{gap:20px;margin:24px 0}.form-grid label{font-size:13px;color:var(--navy);font-weight:500;gap:8px}.form-grid input,.form-grid select,#timer-subject{min-height:46px;background:white;border:1px solid #c8c8d0;border-radius:10px;padding:10px 12px;color:var(--navy);width:100%}.timer-display{font-size:clamp(48px,8vw,80px);font-variant-numeric:tabular-nums;letter-spacing:-.04em}.search-result{background:#f7f7f9;border:1px solid var(--line);color:var(--navy);border-radius:10px;padding:16px}.search-result small{color:var(--muted)}
.question-page{background:var(--bg)}.question-shell{max-width:1440px}.question-topbar{background:#ffffffed;border-bottom:1px solid var(--line);backdrop-filter:blur(16px)}.question-card,.session-summary,.aside-mentor{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:none}.question-card{padding:clamp(20px,4vw,40px)}.question-card h1{font-size:clamp(20px,2vw,27px);line-height:1.6;font-weight:550;letter-spacing:-.015em}.alternative{border-radius:12px;min-height:54px}.aside-mentor img{max-width:100%;object-fit:contain}.session-timer{font-variant-numeric:tabular-nums}.confidence-controls button{min-height:44px;border:1px solid var(--line);background:white;border-radius:9px;padding:10px 14px}.confidence-controls button[aria-pressed=true]{background:var(--sky);border-color:var(--blue);color:var(--blue)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,.hero-actions .btn:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
@media(hover:hover){.btn.primary:hover:not(:disabled),.btn.blue:hover:not(:disabled),.primary-button:hover:not(:disabled){background:#1257bd}.hero-actions .ghost:hover{background:#eaeaef}}
@media(max-width:1200px){.topbar{grid-template-columns:1fr auto}.dashboard-search{grid-row:2;grid-column:1/-1}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){.ia-app{grid-template-columns:1fr}.ia-side{position:relative;height:auto;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;padding:16px 20px;gap:14px;border-right:0;border-bottom:1px solid var(--line)}.logo{flex:1;margin:0}.mobile-menu{display:block;background:white;border:1px solid var(--line);color:var(--navy)}.ia-side nav{width:100%;display:none}.ia-side.menu-open nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.exam-chip{width:100%;display:flex;align-items:center;gap:14px;padding:0;background:none}.exam-chip label{flex-shrink:0}.exam-chip strong{display:none}.exam-chip select{margin:0;min-width:0}.ia-main{padding:24px 20px}.topbar{gap:18px}.topbar h1{font-size:25px}.visitor{display:none}.hero{padding:28px;gap:20px;grid-template-columns:minmax(0,1fr) 180px}.hero h2{font-size:32px}.hero-mobile-teacher{max-height:260px!important}.back-portal{display:none}}
@media(max-width:560px){.ia-main{padding:calc(22px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 22px max(16px,env(safe-area-inset-left,0px))}.topbar{display:grid;grid-template-columns:1fr;margin-bottom:22px}.topbar h1{font-size:25px}.dashboard-search{grid-row:auto;grid-column:auto}.dashboard-search kbd{display:none}.hero{grid-template-columns:minmax(0,1fr);padding:24px;gap:20px;border-radius:18px}.hero-copy{grid-column:1;grid-row:1}.hero h2{font-size:30px;line-height:1.15;margin:12px 0}.hero p{font-size:14px}.hero-actions{display:grid;grid-template-columns:1fr;gap:10px;margin-top:20px}.hero-actions .btn{width:100%;justify-content:center}.hero-mobile-teacher{grid-column:1;grid-row:2;justify-self:center;align-self:end;width:160px!important;max-width:160px!important;max-height:220px!important;height:220px!important;object-fit:contain!important}.mentor-note{grid-column:1;grid-row:3;padding-top:16px}.mentor-note p{font-size:12px}.metric-grid{gap:12px;margin:16px 0 20px}.metric{display:flex;flex-direction:column;gap:12px;padding:16px;min-height:174px;border-radius:14px}.metric>div{width:100%;grid-template-rows:34px 32px auto;gap:5px}.metric>div>span{font-size:12px}.metric strong{font-size:24px}.metric small{font-size:11px}.dashboard-grid{grid-template-columns:minmax(0,1fr);gap:16px}.panel{padding:20px;border-radius:16px}.panel-head{flex-wrap:wrap;gap:0 16px}.panel-head h3{margin-bottom:4px}#tool-view{padding:22px 18px}.form-grid{grid-template-columns:1fr}.knowledge{grid-template-columns:repeat(2,minmax(0,1fr))}.timer-actions .btn{flex:1}.question-topbar{flex-wrap:wrap;gap:12px}.question-actions{flex-wrap:wrap}.question-footer{flex-wrap:wrap}.question-footer button{width:100%}.question-layout{grid-template-columns:minmax(0,1fr)}.confidence-controls{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}button:active:not(:disabled){transform:none}}
@media(prefers-reduced-transparency:reduce){.question-topbar{background:white;backdrop-filter:none}}
@media(prefers-contrast:more){:root{--muted:#414149;--line:#898991}.btn.ghost{border-color:#63636b}}

/* Identity stays visible on the opening dashboard without competing with the next study action. */
.home-player-summary{display:grid;grid-template-columns:56px minmax(120px,1fr) auto auto;align-items:center;gap:12px;width:100%;margin:0 0 16px;padding:10px 14px 12px 10px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:0 1px 3px #00000008}.home-player-summary img{display:block;width:56px;height:74px;object-fit:contain;object-position:center bottom}.home-player-identity{display:grid;gap:2px;min-width:0}.home-player-identity .eyebrow{font-size:10px;color:var(--muted)}.home-player-identity strong{overflow:hidden;color:var(--navy);font-size:15px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}.home-player-level,.home-player-rank{display:grid;gap:2px;padding-left:12px;border-left:1px solid var(--line);white-space:nowrap}.home-player-level span,.home-player-rank span{color:var(--muted);font-size:10px;font-weight:650;letter-spacing:.07em}.home-player-level strong,.home-player-rank strong{color:var(--navy);font-size:14px;font-weight:650}.home-player-level strong{color:var(--blue);font-variant-numeric:tabular-nums}.home-player-progress{display:grid;grid-column:1/-1;gap:6px;padding-top:2px}.home-player-progress>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.home-player-progress strong{color:var(--navy);font-size:12px;font-weight:650;font-variant-numeric:tabular-nums}.home-player-progress span{color:var(--muted);font-size:11px;text-align:right}.home-player-progress progress{display:block;width:100%;height:7px;border:0;border-radius:999px;overflow:hidden;background:#e8edf4}.home-player-progress progress::-webkit-progress-bar{background:#e8edf4;border-radius:999px}.home-player-progress progress::-webkit-progress-value{background:var(--blue);border-radius:999px}.home-player-progress progress::-moz-progress-bar{background:var(--blue);border-radius:999px}
@media(max-width:560px){.home-player-summary{grid-template-columns:48px minmax(0,1fr) auto;gap:9px;margin-bottom:14px;padding:8px 10px 10px;border-radius:14px}.home-player-summary img{width:48px;height:62px}.home-player-rank{grid-column:2/-1;grid-row:2;padding-left:0;border-left:0;border-top:1px solid var(--line);padding-top:7px}.home-player-level{padding-left:10px}.home-player-level span,.home-player-rank span{font-size:9px}.home-player-level strong,.home-player-rank strong{font-size:13px}.home-player-progress{grid-row:3;padding-top:3px}.home-player-progress>div{align-items:flex-start;flex-direction:column;gap:2px}.home-player-progress span{text-align:left;font-size:10px}}

/* Compatibility fixes: legacy layout rules must not constrain the new grid. */
.hero-copy{width:100%;max-width:640px;min-width:0}
.hero-actions .primary{color:#fff}.metric .metric-icon{color:#42618a}
.alternative{font-family:inherit;font-size:15px;line-height:1.55;transition:background-color 140ms,border-color 140ms}
.alternative:hover{transform:none}
.alternative:disabled{background:#fbfcfe!important;color:#293951!important}
.alternative.correct:disabled{background:#ecfbf3!important;color:#10633e!important;border-color:#18a76a}
.alternative.incorrect:disabled{background:#fff1f1!important;color:#9d3030!important;border-color:#e36969}
.alternative.selected:disabled:not(.correct):not(.incorrect){background:#edf4ff!important;color:#174aa9!important}
.aside-mentor{display:grid;grid-template-columns:minmax(0,1fr) 105px;align-items:center;gap:12px;min-height:0;padding:20px;background:#fff}
.aside-mentor>div{max-width:none}.aside-mentor p{color:var(--muted);font-size:13px}
.aside-mentor img{position:static;inset:auto;width:105px;height:165px;object-fit:contain;object-position:center;mix-blend-mode:normal}
.question-shell{margin-inline:auto}.question-topbar{min-height:76px;height:auto;padding-block:14px}
.question-meta{flex-wrap:wrap}.flag-button{min-height:44px}.progress-track i{background:var(--blue)}
.search-result:hover{background:#ededf1}.dashboard-footer a{color:var(--blue)}
@media(max-width:560px){.hero-copy{width:100%;max-width:none}.question-topbar{min-height:65px}.hero-mobile-teacher{pointer-events:none}.question-card h1{font-size:20px}.session-summary{gap:12px}.aside-mentor{grid-template-columns:minmax(0,1fr) 105px}}

/* Shared secondary states: forms, feedback, warnings and session surfaces. */
html{font-size:100%}.ia-main{font-size:.9375rem}#page-title{outline-offset:6px}
.ia-side{background:rgba(238,238,240,.94);backdrop-filter:blur(16px)}
button:active:not(:disabled){transform:none}button:hover:not(:disabled){transform:none}
.limitation{background:#fbf7ed;border-color:#e4d6b6;color:#635020;font-size:.8125rem;border-radius:10px;padding:14px}
.empty-state{background:#f7f7f9;color:var(--muted);border:1px solid var(--line);font-size:.875rem;line-height:1.6}
.answer-feedback{font-family:inherit;font-size:.875rem;line-height:1.6;border-radius:12px}.confidence-controls{background:#f5f5f7;border-color:var(--line);font-size:.8125rem}.confidence-controls button.selected{background:var(--sky);color:var(--blue);border-color:var(--blue);transform:none}
.toast{max-width:min(90vw,36rem);background:#242426;color:white;border:1px solid #ffffff24;border-radius:12px;font-size:.875rem;line-height:1.5;box-shadow:0 8px 32px #0002;transition:opacity 150ms,transform 150ms}
.session-modal{background:#1d1d1f66;overscroll-behavior:contain;padding:20px}.modal-card{background:white;border:1px solid var(--line);border-radius:20px;padding:28px;max-height:calc(100dvh - 40px);overflow:auto;box-shadow:0 20px 70px #0003}.modal-card h2{font-size:1.5rem}.modal-card p{color:var(--muted);font-size:.875rem}.session-field select{font-family:inherit;min-height:44px;background:white;border-color:var(--line)}.mode-choice,.session-choice{font-family:inherit;min-height:44px;background:#f5f5f7;color:var(--navy);border-color:var(--line)}
.form-grid input,.form-grid select{font-size:1rem}.timer-display{font-size:clamp(3rem,8vw,5rem)}.btn,.primary-button{font-size:.875rem}
@media(max-width:560px){.hero h2{font-size:1.875rem}.hero p{font-size:.875rem}.metric strong{font-size:1.5rem}.metric>div>span{font-size:.75rem}.metric small{font-size:.6875rem}.topbar h1{font-size:1.5625rem}}
@media(prefers-reduced-transparency:reduce){.ia-side{background:#eeeef0;backdrop-filter:none}}
@media(prefers-contrast:more){.ia-side{background:#eeeef0;backdrop-filter:none}.empty-state,.panel,.metric,.hero{border-color:#898991}}

/* Task hierarchy and mobile density, revision 423. */
.nav-group{display:grid;gap:3px}.nav-group+.nav-group{margin-top:14px}
.nav-group-label{padding:4px 14px;font-size:.625rem;letter-spacing:.08em;text-transform:uppercase;color:#63636b;font-weight:650}
.dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.hero{padding:28px 32px;column-gap:24px}.hero h2{font-size:clamp(1.75rem,3vw,2.5rem)}
.hero-mobile-teacher{max-height:250px!important;max-width:200px!important}
.mentor-note p,.subtle,.row small{font-size:.875rem}
.plan-summary{font-size:.9375rem;line-height:1.6;margin-top:8px}
.knowledge-panel{margin-top:20px}
@media(max-width:850px){.ia-side.menu-open nav{display:grid;grid-template-columns:1fr;gap:12px}.nav-group{grid-template-columns:repeat(2,minmax(0,1fr))}.nav-group-label{grid-column:1/-1}.nav-group+.nav-group{margin-top:0}}
@media(max-width:560px){
 .hero{grid-template-columns:minmax(0,1fr) 96px;gap:16px 12px;padding:22px}
 .hero-copy{grid-column:1/-1;grid-row:1}.hero h2{font-size:1.75rem;line-height:1.16}
 .hero-actions{margin-top:18px}.hero-actions .ghost{background:transparent;border-color:transparent}
 .mentor-note{grid-column:1;grid-row:2;align-self:center;border-top:0;padding:0}
 .mentor-note p{font-size:.8125rem;line-height:1.5}
 .hero-mobile-teacher{grid-column:2;grid-row:2;width:96px!important;height:144px!important;max-height:144px!important;max-width:96px!important;align-self:center}
 .metric{min-height:155px}.metric>div{grid-template-rows:minmax(32px,auto) 30px auto}
 .dashboard-grid{grid-template-columns:minmax(0,1fr)}
 .metric strong{font-size:1.375rem}.panel-head{gap:0 12px}
}

/* Unified web controls: original SVGs, consistent optical weight, Apple Design principles. */
.apple-icon{display:inline-block;width:1.25rem;height:1.25rem;flex:0 0 1.25rem;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;overflow:visible}
.nav-btn{display:flex;align-items:center;gap:11px;min-height:44px;border-radius:10px;padding:10px 12px;font-size:.875rem;line-height:1.35;font-weight:500}
.nav-btn .apple-icon{color:#63636b;width:19px;height:19px;flex-basis:19px}
.nav-btn span{min-width:0}.nav-btn.active{color:#145fc5;background:#fff;font-weight:600;box-shadow:0 1px 2px #00000009}
.nav-btn.active .apple-icon{color:#1765d8;stroke-width:1.9}
.metric-icon,.metric-icon.green,.metric-icon.blue,.metric-icon.orange,.metric-icon.purple{background:transparent;border:0;border-radius:0;box-shadow:none;color:#596b82}
.metric-icon .apple-icon{width:24px;height:24px;flex-basis:24px;stroke-width:1.6}
.btn,.primary-button,.pause-button,.exit-button,.flag-button,.confidence-controls button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border-radius:12px;font-weight:600;line-height:1.3;box-shadow:none}
.btn{background:#e9e9ed;color:#252528;border:1px solid transparent;padding:11px 17px}
.btn.primary,.hero-actions .primary,.btn.blue,.form-grid .btn,.primary-button,.timer-actions #timer-start{background:#1765d8;color:white;border-color:transparent}
.btn.ghost,.hero-actions .ghost,.pause-button,.timer-actions #timer-pause{background:#ededf1;color:#252528;border:1px solid transparent}
.timer-actions #timer-finish{background:#e9f1fc;color:#1257b5;border:1px solid transparent}
.exit-button{background:transparent;color:#b42f2c;border:1px solid #dfc5c4}
.flag-button{background:transparent;color:#526176;border:1px solid transparent}
.flag-button[aria-pressed=true]{background:#fff3d9;color:#805d08;border-color:#ead8ab}
.flag-button[aria-pressed=true] span{color:inherit}
.confidence-controls button{background:#ededf1;border:1px solid transparent;color:#34343a;border-radius:999px}
.confidence-controls button.selected{background:#1765d8;color:white;border-color:#1765d8}
.text-action,.row-action{border-radius:8px;min-height:44px;gap:6px;padding-inline:6px;color:#145fc5;font-size:.8125rem;font-weight:600}
.mobile-menu{gap:8px}.mobile-menu .apple-icon{width:18px;height:18px;flex-basis:18px}
.visitor .icon-button{width:44px;height:44px;border-radius:50%;background:#ededf1;border:1px solid transparent}
.dashboard-search>.apple-icon{width:18px;height:18px;flex-basis:18px;color:#63636b}
button:disabled,.btn:disabled{background:#e9e9ed!important;color:#74747c!important;border-color:transparent!important;box-shadow:none!important}
.alternative.correct:disabled{border-color:#18a76a!important}.alternative.incorrect:disabled{border-color:#e36969!important}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #1765d8;outline-offset:3px}
@media(hover:hover){.nav-btn:hover:not(.active){background:#e1e1e6}.btn.primary:hover:not(:disabled),.btn.blue:hover:not(:disabled),.primary-button:hover:not(:disabled){background:#1259c1}.text-action:hover,.row-action:hover{background:#edf2fa}.flag-button:hover{background:#ededf1}.exit-button:hover{background:#fff1f0;color:#a82422}}
@media(max-width:560px){.nav-btn{min-height:48px;font-size:.8125rem;gap:9px}.nav-btn .apple-icon{width:18px;height:18px;flex-basis:18px}.hero-actions .btn{width:100%}.metric-icon .apple-icon{width:22px;height:22px}.question-actions{gap:8px}}
@media(prefers-contrast:more){.btn.ghost,.pause-button,.confidence-controls button{border-color:#777780}.apple-icon{stroke-width:2}}

.mobile-menu.btn{display:none}@media(max-width:850px){.mobile-menu.btn{display:inline-flex}}

/* Native Apple typography on Apple platforms; native system fallback elsewhere. */
:root{--font-ui:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
body{font-family:var(--font-ui);font-size:.9375rem;line-height:1.5;font-weight:400;font-optical-sizing:auto;-webkit-font-smoothing:antialiased}
.ia-app *,.question-shell *,.toast{font-family:var(--font-ui)}
button,input,select,textarea,.alternative,.confidence-controls button,.mode-choice,.session-choice,.flag-button,.pause-button,.exit-button{font-family:var(--font-ui)}
pre,code,kbd{font-family:var(--font-mono)!important}
h1,h2,h3,h4{font-weight:650;letter-spacing:-.025em;text-wrap:balance}
.topbar h1{font-size:1.625rem;line-height:1.25;letter-spacing:-.035em}
.hero h2{font-size:clamp(1.875rem,3vw,2.5rem);line-height:1.12;font-weight:700;letter-spacing:-.035em}
.hero p{font-size:.9375rem;line-height:1.55;letter-spacing:0}
.eyebrow,.nav-group-label{font-size:.6875rem;line-height:1.4;font-weight:600;letter-spacing:.075em}
.nav-btn{font-size:.875rem;line-height:1.4;font-weight:500;letter-spacing:-.008em}
.nav-btn.active{font-weight:600}
.btn,.primary-button,.pause-button,.exit-button,.confidence-controls button{font-size:.875rem;font-weight:600;letter-spacing:-.01em;line-height:1.3}
.panel h3{font-size:1.0625rem;line-height:1.35;font-weight:650;letter-spacing:-.02em}
.panel p,.subtle,.empty,.mentor-note p{font-size:.875rem;line-height:1.6;letter-spacing:0}
.metric>div>span{font-size:.8125rem;line-height:1.4;font-weight:500;letter-spacing:0}
.metric strong{font-size:1.75rem;line-height:1.1;letter-spacing:-.035em;font-weight:650;font-variant-numeric:tabular-nums}
.metric small{font-size:.75rem;line-height:1.4;font-weight:400;letter-spacing:0}
.form-grid label{font-size:.875rem;line-height:1.4;font-weight:500}.form-grid input,.form-grid select{font-size:1rem;line-height:1.4}
#tool-view h2{font-size:1.75rem;line-height:1.25;font-weight:650}
.question-card h1{font-family:var(--font-ui);font-size:clamp(1.1875rem,2vw,1.5rem);font-weight:550;line-height:1.55;letter-spacing:-.015em;text-wrap:pretty}
.alternative{font-size:.9375rem;line-height:1.55;font-weight:400;letter-spacing:0}
.subject-pill,.difficulty-pill,.format-pill{font-size:.75rem;line-height:1.35;font-weight:500;letter-spacing:0}
.answer-feedback,.confidence-controls{font-size:.875rem;line-height:1.55}
.timer-display{font-variant-numeric:tabular-nums;font-weight:600;letter-spacing:-.045em}
@media(max-width:560px){
 .topbar h1{font-size:1.5rem;line-height:1.25}.hero h2{font-size:1.75rem;line-height:1.16}
 .hero p,.mentor-note p{font-size:.875rem;line-height:1.55}
 .metric>div{grid-template-rows:minmax(38px,auto) minmax(30px,auto) auto}
 .metric>div>span{font-size:.8125rem}.metric strong{font-size:1.375rem}
 .metric small{font-size:.75rem;line-height:1.4}
 .nav-btn{font-size:.875rem}.question-card h1{font-size:1.1875rem}
}

/* Apple Design card system: quiet surfaces, clear grouping, scalable spacing. */
:root{--card-radius:1.25rem;--card-border:#e2e2e7;--card-shadow:0 1px 3px #1d1d1f05}
.hero,.panel,.metric,.question-card,.session-summary,.aside-mentor{
 background:#fff;border:1px solid var(--card-border);border-radius:var(--card-radius);
 box-shadow:var(--card-shadow);backdrop-filter:none;min-width:0
}
.panel{padding:1.5rem;overflow-wrap:anywhere}
.dashboard-grid{gap:1rem;align-items:stretch}
.panel-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:.25rem 1rem;margin-bottom:1rem}
.panel-head h3{flex:1 1 10rem;margin:0}
.panel-head .text-action{flex:0 1 auto;min-width:0;margin-left:auto;white-space:normal;text-align:right;padding:.375rem 0}
.panel>h3{margin:0 0 1rem}
.panel>p{margin-block:.75rem}
.panel .empty,.panel .empty-state{padding:1rem;background:#f5f5f7;border:0;border-radius:.875rem;margin:.75rem 0}
.panel .empty:last-child,.panel>p:last-child{margin-bottom:0}
.metric-grid{gap:1rem;margin:1rem 0 1.5rem}
.metric{display:block;position:relative;padding:1.25rem;min-height:0;overflow-wrap:anywhere}
.metric .metric-icon{position:absolute;inset:1.25rem 1.25rem auto auto;width:1.5rem;height:1.5rem;min-width:0;margin:0;display:grid;place-items:center;overflow:visible}
.metric .metric-icon .apple-icon{width:1.375rem;height:1.375rem;flex-basis:1.375rem;color:#6b6b73;stroke-width:1.65}
.metric>div{display:grid;grid-template-rows:minmax(2.8em,auto) minmax(2.25rem,auto) auto;gap:.5rem;width:100%;padding:0;align-content:start}
.metric>div>span{padding-right:2rem;display:block;font-size:.8125rem;line-height:1.4;min-height:0;color:#63636b}
.metric strong{display:block;font-size:1.75rem;line-height:1.15;min-height:0;margin:0;font-weight:650;letter-spacing:-.035em}
.metric small{display:block;font-size:.75rem;line-height:1.5;min-height:0;margin:0;color:#63636b}
.panel .row,.panel .recent-row,.panel .subject-line{padding-block:1rem;border-bottom:1px solid #ededf0;gap:.75rem}
.panel .row:last-child,.panel .recent-row:last-child,.panel .subject-line:last-child{border-bottom:0;padding-bottom:0}
.panel .row:first-child,.panel .recent-row:first-child,.panel .subject-line:first-child{padding-top:.25rem}
.panel .recent-row{flex-wrap:wrap;align-items:baseline}
.panel .subject-line strong{flex-wrap:wrap;font-size:.875rem;line-height:1.4}
.panel .subject-line small{display:block;font-size:.75rem;line-height:1.5}
.panel .row .badge{background:#f5f5f7;border-radius:.75rem;font-weight:400;white-space:normal}
.panel .knowledge>div{background:#f5f5f7;border:1px solid transparent;border-radius:.875rem;padding:1rem}
.panel progress{accent-color:var(--blue);border:0;border-radius:99px;overflow:hidden;max-width:100%}
.panel progress::-webkit-progress-bar{background:#ededf1;border-radius:99px}
.panel progress::-webkit-progress-value{background:var(--blue);border-radius:99px}
.search-result{border:1px solid var(--card-border);border-radius:.875rem;background:#f5f5f7;padding:1rem;color:var(--navy);transition:background-color 120ms,border-color 120ms}
.search-result:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.search-result:active{background:#e6e6ec}
.question-card{padding:clamp(1.25rem,4vw,2.5rem)}
.session-summary,.aside-mentor{padding:1.25rem}
@media(hover:hover){.search-result:hover{background:#ededf1;border-color:#c8c8d0}}
@media(max-width:560px){
 :root{--card-radius:1rem}
 .panel{padding:1.25rem}.dashboard-grid,.metric-grid{gap:.75rem}
 .metric{padding:1rem}.metric .metric-icon{inset:1rem 1rem auto auto;width:1.25rem;height:1.25rem}
 .metric .metric-icon .apple-icon{width:1.25rem;height:1.25rem}
 .metric>div{grid-template-rows:minmax(3.45rem,auto) minmax(1.875rem,auto) auto;gap:.5rem}
 .metric>div>span{padding-right:1.75rem;font-size:.8125rem}
 .metric strong{font-size:1.5rem;overflow-wrap:normal}
 .panel-head{gap:.25rem .75rem;margin-bottom:.75rem}
 .panel-head h3{flex-basis:9rem}
}
@media(prefers-contrast:more){:root{--card-border:#898991}.metric small,.metric>div>span{color:#414149}.panel .row,.panel .recent-row,.panel .subject-line{border-color:#898991}}
@media(prefers-reduced-motion:reduce){.search-result{transition:none}}

/* Apple calendar refinement: quiet surfaces, clear state hierarchy, predictable density. */
.calendar-overview{margin-top:1rem}.calendar-legend{align-items:center;gap:.5rem .875rem;margin:0 0 .75rem;color:#63636b;font-size:.75rem;line-height:1.35}.calendar-legend span{min-height:1.75rem;padding:.25rem .5rem;border:1px solid #e2e2e7;border-radius:999px;background:#fff}.calendar-key{width:.625rem;height:.625rem;border-radius:3px}.calendar-month-nav{gap:.5rem;margin:0 0 .75rem}.calendar-month-nav a{border-color:#d9e3f2;border-radius:999px;background:#f7faff;color:#145fc5;transition:background-color 120ms,border-color 120ms,color 120ms}.study-calendar{border-color:var(--card-border);border-radius:var(--card-radius);box-shadow:var(--card-shadow);padding:1rem;margin:0 0 1rem;scroll-margin-top:1rem}.study-calendar-head{align-items:baseline;margin-bottom:.75rem}.study-calendar-head strong{font-size:.9375rem;font-weight:650;letter-spacing:-.015em}.study-calendar-head span{color:#63636b;font-size:.75rem;font-variant-numeric:tabular-nums}.study-calendar-weekdays span{font-size:.6875rem;font-weight:600;letter-spacing:.01em}.study-calendar-grid{gap:.375rem}.study-calendar-cell{min-height:4.75rem;border-color:#ededf0;border-radius:.75rem;padding:.5rem;gap:.25rem;background:#fff;transition:background-color 120ms,border-color 120ms,box-shadow 120ms}.study-calendar-cell strong{font-size:.8125rem;font-weight:650;letter-spacing:-.01em}.study-calendar-cell span{font-size:.6875rem;line-height:1.2;color:#52657e}.study-calendar-cell small{font-size:.6875rem;line-height:1.25;color:#63636b}.study-calendar-cell.has-task{background:#f5f8fd;border-color:#d7e5f8}.study-calendar-cell.is-complete{background:#f1faf5;border-color:#c5e8d3}.study-calendar-cell.is-today{box-shadow:inset 0 0 0 2px #1765d8}.study-calendar-cell.is-today strong{color:#145fc5}.study-calendar-cell.is-empty{background:#fafafa;border-color:transparent}
@media(hover:hover){.calendar-month-nav a:hover{background:#edf3fc;border-color:#b7cfee}.study-calendar-cell.has-task:hover{background:#edf3fc;border-color:#b7cfee}}
@media(max-width:640px){.calendar-legend{gap:.375rem .5rem;font-size:.6875rem}.calendar-legend span{min-height:1.625rem;padding:.2rem .4rem}.calendar-month-nav{overflow-x:auto;flex-wrap:nowrap;padding-bottom:.125rem;scrollbar-width:none}.calendar-month-nav::-webkit-scrollbar{display:none}.calendar-month-nav a{flex:0 0 auto}.study-calendar{padding:.75rem;border-radius:1rem}.study-calendar-head{align-items:flex-start;flex-direction:column;gap:.25rem}.study-calendar-weekdays,.study-calendar-grid{gap:.25rem}.study-calendar-cell{min-height:4rem;padding:.375rem;border-radius:.625rem}.study-calendar-cell strong{font-size:.75rem}.study-calendar-cell span,.study-calendar-cell small{font-size:.625rem}}
@media(prefers-reduced-motion:reduce){.calendar-month-nav a,.study-calendar-cell{transition:none}}
.study-calendar-cell.has-task{color:inherit;text-decoration:none}.study-calendar-cell.has-task:focus-visible{outline:3px solid #8bb8f3;outline-offset:2px}

/* Card contents: shared insets, readable groups and explicit action alignment. */
:root{--card-inset:1.5rem;--content-gap:1rem;--detail-gap:.375rem}
.panel{padding:var(--card-inset);overflow-wrap:break-word}
.panel :is(h2,h3,p){max-width:100%}
.panel-head{align-items:center;gap:.5rem 1rem;min-height:2.75rem;margin:0 0 1rem}
.panel-head h3{line-height:1.35;margin:0}
.panel-head .text-action{line-height:1.4;text-align:right;align-self:center;padding:.5rem 0;min-height:2.75rem}
.dashboard-grid>.panel{display:flex;flex-direction:column;align-items:stretch}
.dashboard-grid>.panel>:last-child{margin-bottom:0}
.panel :is(#plan-list,#recent-list,#subject-performance,#full-plan){min-width:0}
.panel .plan-summary{margin:0 0 .75rem;line-height:1.55}
.panel #plan-list>.subtle{margin:0;line-height:1.55}
.panel .row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:.75rem 1rem;padding:1rem 0}
.panel .row>div{min-width:0}
.panel .row b{display:block;font-size:.9375rem;line-height:1.4}
.panel .row small{display:block;margin-top:var(--detail-gap);font-size:.8125rem;line-height:1.5}
.panel .row .row-action{grid-column:2;align-self:start;justify-self:end;min-height:2.75rem;padding:.5rem .75rem;margin:-.5rem -.75rem 0 0}
.panel .row .badge{grid-column:1/-1;width:100%;display:block;box-sizing:border-box;padding:.875rem 1rem;line-height:1.55;margin:0;white-space:normal}
.panel .recent-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:.75rem 1rem;font-size:.875rem;line-height:1.5}
.panel .recent-row>span{min-width:0}
.panel .recent-row>span:last-child,.panel .recent-row>time{text-align:right;font-variant-numeric:tabular-nums}
.panel .recent-row small{display:inline-block;margin-top:var(--detail-gap);font-size:.8125rem;line-height:1.45;color:var(--muted)}
.panel .subject-line{display:grid;gap:.5rem}
.panel .subject-line strong{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:.5rem 1rem;line-height:1.4}
.panel .subject-line strong>span{white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}
.panel .subject-line progress{display:block;width:100%;height:.375rem;margin:0}
.panel .subject-line small{margin:0;line-height:1.5}
.panel>progress{display:block;width:100%;height:.5rem;margin:.25rem 0}
.panel>.btn{align-self:flex-start;max-width:100%;white-space:normal;margin-top:.75rem}
.panel :is(.empty,.empty-state){line-height:1.6;padding:1rem}
.panel .form-grid{align-items:end;gap:1rem 1.25rem;margin:1.5rem 0}
.panel .form-grid label{min-width:0;gap:.5rem}
.panel .form-grid :is(input,select){min-width:0;max-width:100%;min-height:2.875rem;box-sizing:border-box}
#availability,#full-plan{max-width:56rem;margin-inline:auto}
#tool-view{padding:var(--card-inset)}
#availability{border-bottom:1px solid var(--line);padding-bottom:1.5rem;margin-bottom:1.5rem}
#availability>.btn{grid-column:1/-1;justify-self:start;width:auto;min-width:11rem}
#full-plan>h3{margin:1.75rem 0 .75rem;line-height:1.4}
#full-plan>h3:first-child{margin-top:0}
#full-plan>.subtle{border-top:1px solid var(--line);padding-top:1rem;margin:1.5rem 0 0}
#tool-view>.btn+.btn{margin-left:.5rem}
.timer-actions{display:flex;flex-wrap:wrap;gap:.75rem}
#tool-view>label{display:grid;gap:.5rem;max-width:32rem;margin-top:1.5rem}
#tool-view .timer-display{line-height:1.1;margin:1.5rem 0}
#tool-view>h3{margin-top:1.75rem}
.knowledge>div{display:flex;flex-direction:column;gap:.5rem;min-width:0}
.knowledge strong{line-height:1.15;font-variant-numeric:tabular-nums}
.knowledge span{font-size:.8125rem;line-height:1.5}
.hero-copy{display:flex;flex-direction:column;align-items:flex-start;gap:.875rem}
.hero-copy>h2,.hero-copy>p{margin:0}
.hero-copy>.hero-actions{align-self:stretch;margin-top:.375rem;align-items:center;gap:.75rem}
.mentor-note>strong{display:block;margin-bottom:.5rem}
.mentor-note>p{margin:0}
.question-meta{align-items:center;gap:.5rem;min-width:0}
.question-number{margin:1.5rem 0 .625rem}
.question-card h1{margin-bottom:1.5rem}
.alternatives{gap:.75rem}
.alternative{padding:1rem;gap:.75rem;align-items:flex-start;min-width:0}
.alternative-letter{width:1.75rem;height:1.75rem;flex:0 0 1.75rem;line-height:1.4}
.alternative>span:last-child{min-width:0;overflow-wrap:anywhere;align-self:center}
.question-footer{margin-top:1.5rem;padding-top:1rem;gap:1rem}
.confidence-controls{padding:1rem;gap:.625rem}
.session-summary>div{gap:1rem;align-items:baseline}
.session-summary>div span{line-height:1.5}
.aside-mentor>div{min-width:0}
.aside-mentor h2{margin:.5rem 0}
.aside-mentor p{margin:0;line-height:1.55}
@media(max-width:560px){
 :root{--card-inset:1.25rem}
 .panel-head{gap:.25rem .75rem;align-items:baseline;margin-bottom:.875rem}
 .panel-head h3{flex:1 1 9rem}.panel-head .text-action{font-size:.8125rem}
 .panel .recent-row{column-gap:.75rem}
 .panel .form-grid{gap:1rem;margin-block:1.25rem}
 #availability>.btn{justify-self:stretch;width:100%;min-width:0}
 .panel>.btn{align-self:stretch;width:100%}
 #tool-view>.btn+.btn{margin-left:0;margin-top:.75rem}
 .timer-actions>.btn{flex:1 1 5rem;min-width:0}
 .question-meta .flag-button{margin-left:0;flex-basis:100%;justify-content:flex-start;padding-left:0}
 .question-meta .flag-button span{display:inline}
 .question-footer{align-items:stretch}
 .question-footer .keyboard-hint{line-height:1.5}
 .session-summary>div{min-width:0}
}

/* Mobile safety: hidden legacy surfaces must never reserve or paint the viewport. */
.session-modal[hidden]{display:none!important}
@media(max-width:560px){
  .hero-mobile-teacher{display:block!important;width:96px!important;height:144px!important;max-width:96px!important;max-height:144px!important;object-fit:contain!important;position:relative!important;inset:auto!important;overflow:hidden}
}

/* Quiz mobile: keep answer labels and review confidence choices on stable shared axes. */
@media(max-width:560px){
 .question-card h1{font-size:1.1875rem;line-height:1.55;text-wrap:pretty}
 .alternative{display:grid;grid-template-columns:1.75rem minmax(0,1fr);align-items:center;gap:.875rem;padding:.75rem 1rem;text-align:left}
 .alternative-letter{grid-column:1;grid-row:1;align-self:center}
 .alternative>span:last-child{grid-column:2;grid-row:1;align-self:center;min-width:0;line-height:1.5;text-align:left;overflow-wrap:break-word}
 .question-footer .keyboard-hint{display:none}
 .confidence-controls{display:grid;grid-template-columns:minmax(0,.78fr) minmax(0,1.45fr) minmax(0,.85fr);align-items:stretch;gap:.5rem;padding:1rem}
 .confidence-controls span{grid-column:1/-1;width:auto;margin:0 0 .125rem;line-height:1.45}
 .confidence-controls button{width:100%;min-width:0;min-height:44px;padding:.5rem .375rem;white-space:nowrap;font-size:clamp(.6875rem,3.2vw,.875rem);line-height:1.2}
}

/* Quiz review: put the correct answer and its rationale in one deliberate learning card. */
.question-tags,.question-meta-actions{display:flex;align-items:center;gap:.5rem;min-width:0}.question-tags{flex-wrap:wrap}.question-meta-actions{margin-left:auto}.question-meta-actions .flag-button{margin-left:0}.correct-answer-feedback{background:#fff!important;border:1px solid #cce6d7;color:#173c2a}.correct-answer-kicker{display:block;color:#28724d;font-size:.6875rem;font-weight:700;letter-spacing:.08em;line-height:1.4}.correct-answer-row{display:grid;grid-template-columns:1.75rem minmax(0,1fr);align-items:center;gap:.75rem;margin-top:.625rem;padding:.875rem;border:1px solid #bde3cd;border-radius:.75rem;background:#f1fbf5;color:#1e5239;font-weight:600}.correct-answer-letter{display:grid;place-items:center;width:1.75rem;height:1.75rem;border-radius:.5rem;background:#248050;color:#fff;font-size:.8125rem;font-weight:700}.feedback-explanation{display:grid;gap:.25rem;margin-top:1rem;padding-top:1rem;border-top:1px solid #dbeee3;color:#395d49}.feedback-explanation strong{margin:0;color:#173c2a}.feedback-explanation span{display:block}
@media(max-width:560px){.question-meta{display:grid;gap:.75rem;align-items:stretch}.question-meta-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:.5rem;margin:0}.question-meta-actions .flag-button{width:100%;min-width:0;min-height:44px;padding:.5rem .375rem;justify-content:center;white-space:nowrap;font-size:clamp(.6875rem,3.2vw,.8125rem)}.question-meta-actions .flag-button span{display:inline}.correct-answer-row{align-items:start}.correct-answer-letter{margin-top:.125rem}.feedback-explanation{line-height:1.55}}

/* Menu state is driven by the accessible button state as well as the class. */
@media(max-width:850px){
  .ia-side{z-index:20}
  .ia-side .mobile-menu[aria-expanded="true"] + nav{display:grid!important;position:relative;z-index:2;background:var(--bg);padding:4px 0 8px}
  html,body,.ia-app,.ia-main,.ia-side,.ia-side nav{background:#f5f5f7!important;color-scheme:light!important}
  .ia-app{display:block!important;width:100%!important;max-width:none!important;min-height:100vh;overflow:visible!important}
  .ia-side{width:100%!important;height:auto!important;min-height:0!important;margin:0!important;border-radius:0!important;backdrop-filter:none!important;box-shadow:none!important;overflow:visible!important;align-content:flex-start!important;justify-content:flex-start!important}
  .ia-side nav{width:100%!important}
  .ia-side::before,.ia-side::after,.ia-app::before,.ia-app::after{content:none!important;display:none!important}
  .session-modal,.toast{display:none!important}
  .hero-mobile-teacher{display:none!important}
}

/* Dashboard progression: compact hierarchy with one surface and a single data rail. */
.home-player-summary{
  grid-template-columns:64px minmax(0,1fr) auto auto;
  column-gap:10px;
  row-gap:8px;
  width:100%;
  padding:12px 14px;
  border-color:#dbe3ee;
  background:linear-gradient(110deg,#fff 0%,#fff 62%,#f5f8fd 100%);
  box-shadow:0 2px 7px #102a4a08;
}
.home-player-summary img{width:64px;height:78px;padding:4px;border:1px solid #dbe6f4;border-radius:14px;background:#edf3fc}
.home-player-identity{gap:3px;align-self:center}
.home-player-identity .eyebrow{color:#526b8a;font-size:10px;letter-spacing:.1em}
.home-player-identity strong{font-size:17px;letter-spacing:-.02em}
.home-player-level,.home-player-rank{min-width:0;gap:3px;padding:8px 11px;border:1px solid #e1e8f1;border-radius:11px;background:#fff}
.home-player-level span,.home-player-rank span{font-size:10px;letter-spacing:.08em}
.home-player-level strong,.home-player-rank strong{font-size:15px}
.home-player-rank{min-width:94px;border-color:#cfe0fa;background:#eff6ff}
.home-player-rank strong{color:#145fc5}
.home-player-progress{
  grid-column:2/-1;
  gap:6px;
  margin:0;
  padding:9px 0 0;
  border:0;
  border-top:1px solid #e4eaf2;
  border-radius:0;
  background:transparent;
}
.home-player-progress>div{gap:14px}
.home-player-progress strong{font-size:13px}
.home-player-progress span{font-size:12px}
.home-player-progress progress{height:8px;background:#e4ebf4}
.home-player-progress progress::-webkit-progress-bar{background:#e4ebf4}
@media(max-width:560px){
  .home-player-summary{grid-template-columns:54px minmax(0,1fr) auto;column-gap:8px;row-gap:7px;padding:10px}
  .home-player-summary img{width:54px;height:66px;border-radius:12px}
  .home-player-identity .eyebrow,.home-player-level span,.home-player-rank span{font-size:10px}
  .home-player-identity strong{font-size:16px}
  .home-player-level{min-width:0;padding:7px 9px}
  /* The rank is a full-width second row: it must share the progress rail's
     left edge, never float below the identity column. */
  .home-player-rank{
    grid-column:1/-1;
    grid-row:2;
    display:flex;
    align-items:baseline;
    gap:8px;
    min-width:0;
    padding:2px 0;
    border:0;
    background:transparent;
  }
  .home-player-level strong,.home-player-rank strong{font-size:14px}
  .home-player-progress{grid-column:1/-1;padding-top:9px}
  .home-player-progress>div{gap:4px}
  .home-player-progress strong{font-size:12px}
  .home-player-progress span{font-size:11px}
}

/* Rank assets are compact decorative cues, keeping the numerical hierarchy readable. */
.home-player-rank{grid-template-columns:28px minmax(0,1fr);align-items:center;min-width:112px}
.home-player-rank>span{grid-column:1/-1}
.home-player-rank .rank-insignia{width:28px;height:28px;object-fit:contain}
@media(max-width:560px){
  .home-player-rank{display:grid;grid-template-columns:26px minmax(0,1fr);align-items:center;gap:6px}
  .home-player-rank .rank-insignia{width:26px;height:26px}
}

/* Progress HUD: game feedback while preserving the calm IA Aprova reading surface. */
.home-player-summary{--rank-accent:#2e7df6;--rank-deep:#123f87;position:relative;isolation:isolate;overflow:hidden;border-color:#bcd5fa;background:linear-gradient(132deg,#fff 0%,#f9fcff 42%,#e8f2ff 100%);box-shadow:0 14px 34px #174d9617,0 2px 5px #174d9610}
.home-player-summary[data-rank-tone="green"]{--rank-accent:#10a878;--rank-deep:#087254}.home-player-summary[data-rank-tone="purple"]{--rank-accent:#8057d8;--rank-deep:#57389c}.home-player-summary[data-rank-tone="orange"]{--rank-accent:#dc8a18;--rank-deep:#995100}
.home-player-summary::before{content:"";position:absolute;z-index:-1;width:280px;height:280px;right:-90px;top:-176px;border-radius:50%;background:radial-gradient(circle,#fff 0 8%,color-mix(in srgb,var(--rank-accent) 20%,transparent) 36%,transparent 70%);opacity:.95}.home-player-summary::after{content:"";position:absolute;z-index:-1;inset:5px;border:1px solid color-mix(in srgb,var(--rank-accent) 18%,transparent);border-radius:12px;pointer-events:none}
.home-player-summary>*{position:relative;z-index:1}.home-player-identity .eyebrow{color:var(--rank-deep)}.home-player-level{border-color:color-mix(in srgb,var(--rank-accent) 24%,#dfe7f2);background:linear-gradient(145deg,#fff,#f4f8ff);box-shadow:0 4px 10px color-mix(in srgb,var(--rank-accent) 10%,transparent)}.home-player-level strong{color:var(--rank-accent)}
.home-player-rank{border-color:color-mix(in srgb,var(--rank-accent) 35%,#cfe0fa);background:linear-gradient(135deg,color-mix(in srgb,var(--rank-accent) 13%,#fff),#fff);box-shadow:inset 0 1px #fff,0 5px 12px color-mix(in srgb,var(--rank-accent) 12%,transparent)}.home-player-rank strong{color:var(--rank-deep)}.home-player-rank .rank-insignia{filter:drop-shadow(0 3px 4px color-mix(in srgb,var(--rank-accent) 25%,transparent))}
.home-player-progress{border-top-color:color-mix(in srgb,var(--rank-accent) 20%,#e4eaf2)}.home-player-progress progress::-webkit-progress-value{background:linear-gradient(90deg,var(--rank-deep),var(--rank-accent),#8ec4ff);box-shadow:0 0 10px color-mix(in srgb,var(--rank-accent) 58%,transparent)}.home-player-progress progress::-moz-progress-bar{background:linear-gradient(90deg,var(--rank-deep),var(--rank-accent),#8ec4ff)}
@media(max-width:560px){.home-player-summary{box-shadow:0 9px 24px #174d9614}.home-player-summary::before{width:210px;height:210px;right:-82px;top:-130px}.home-player-summary::after{inset:4px;border-radius:10px}.home-player-rank{background:transparent;box-shadow:none}.home-player-progress progress{height:9px}}

/* The reward must lead the hierarchy: mascot, identity, rank, then level. */
.home-player-rank{grid-template-columns:40px minmax(0,1fr);min-width:150px;padding:8px 12px}.home-player-rank .rank-insignia{width:40px;height:40px}.home-player-rank strong{font-size:16px}.home-player-level{min-width:68px;padding-inline:10px}
.home-player-progress>div{display:grid;justify-items:start;gap:2px}.home-player-progress>div small{color:var(--rank-deep);font-size:9px;font-weight:800;letter-spacing:.12em}.home-player-progress>div span{max-width:100%;color:#536b8e;text-align:left}.home-player-progress progress{margin-top:2px}
@media(max-width:560px){.home-player-rank{grid-column:1/3;grid-row:2;grid-template-columns:30px minmax(0,1fr);min-width:0;padding:3px 0}.home-player-rank .rank-insignia{width:30px;height:30px}.home-player-rank strong{font-size:15px}.home-player-level{grid-column:3;grid-row:2;align-self:center;min-width:0;padding:6px 8px}.home-player-progress>div{gap:1px}.home-player-progress>div small{font-size:8px}.home-player-progress>div span{font-size:11px}}

/* XP is a reward readout, not auxiliary metadata. */
.home-player-progress{grid-template-columns:minmax(0,1fr) auto;gap:4px 14px}.home-player-xp-copy{display:grid;gap:2px}.home-player-xp{display:flex;align-items:baseline;gap:4px;color:var(--rank-deep)}.home-player-xp b{font-size:22px;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-.055em}.home-player-xp span{color:#536b8e;font-size:12px;font-weight:750}.home-player-xp i{font-style:normal}.home-player-progress-readout{display:grid;justify-items:end;align-content:center;gap:1px;padding-bottom:1px}.home-player-progress-readout strong{color:var(--rank-deep);font-size:15px;font-variant-numeric:tabular-nums}.home-player-progress-readout span{display:inline-flex;align-items:center;min-height:18px;padding:1px 7px;border:1px solid color-mix(in srgb,var(--rank-accent) 30%,#d8e4f3);border-radius:999px;background:#fff;color:var(--rank-deep);font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.home-player-progress-meter{grid-column:1/-1;position:relative}.home-player-progress-meter::after{content:"";position:absolute;top:50%;right:0;width:10px;height:10px;border:2px solid #fff;border-radius:50%;background:var(--rank-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--rank-accent) 30%,transparent),0 0 12px color-mix(in srgb,var(--rank-accent) 54%,transparent);transform:translateY(-50%);pointer-events:none}.home-player-progress-meter progress{width:100%;margin:0}
@media(max-width:560px){.home-player-progress{grid-template-columns:minmax(0,1fr) auto;gap:4px 9px}.home-player-xp b{font-size:20px}.home-player-xp span{font-size:11px}.home-player-progress-readout strong{font-size:13px}.home-player-progress-readout span{padding-inline:6px;font-size:8px}.home-player-progress-meter::after{width:9px;height:9px}}

/* Laws of UX: chunk decisions, expose detail on demand, and make the commitment legible. */
.quiz-guided-form,.form-grid:has(.quiz-session-intent){align-items:start}
.quiz-session-intent{grid-column:1/-1;display:grid;gap:3px;padding:13px 14px;border:1px solid #d8e5f5;border-radius:13px;background:linear-gradient(125deg,#f1f7ff,#fff)}
.quiz-session-intent span{color:#33669d;font-size:9px;font-weight:800;letter-spacing:.11em}
.quiz-session-intent strong{color:#123e85;font-size:15px;letter-spacing:-.02em}
.quiz-session-intent small{color:#5f738f;font-size:11px;line-height:1.45}
.quiz-advanced-filters{grid-column:1/-1;border:1px solid #dce5f0;border-radius:13px;background:#fbfcfe}
.quiz-advanced-filters summary{display:flex;align-items:center;justify-content:space-between;min-height:46px;padding:0 13px;color:#25466f;font-size:12px;font-weight:750;cursor:pointer;list-style:none}
.quiz-advanced-filters summary::-webkit-details-marker{display:none}
.quiz-advanced-filters summary::after{content:'+';order:3;color:#1765d8;font-size:18px;font-weight:500;line-height:1}
.quiz-advanced-filters[open] summary{border-bottom:1px solid #dce5f0}
.quiz-advanced-filters[open] summary::after{content:'–'}
.quiz-advanced-filters summary small{margin-left:auto;margin-right:10px;color:#708099;font-size:10px;font-weight:600}
.quiz-advanced-filters>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:12px}
.quiz-advanced-filters label{display:grid;gap:5px;color:#53677f;font-size:11px;font-weight:650}
.quiz-advanced-filters select,.quiz-advanced-filters input{min-width:0}
.quiz-guided-form>button[type="submit"],.quiz-guided-form>.btn.blue{grid-column:1/-1;justify-content:center;min-height:48px}
@media(max-width:560px){.quiz-session-intent{padding:12px}.quiz-advanced-filters summary{min-height:48px}.quiz-advanced-filters>div{grid-template-columns:1fr}.quiz-advanced-filters summary small{font-size:9px}.quiz-guided-form>button[type="submit"],.quiz-guided-form>.btn.blue{min-height:50px}}

/* Game layer: physical HUD cues make progression feel collectible, not administrative. */
.home-player-summary{
  background-image:
    radial-gradient(circle at 86% -14%,color-mix(in srgb,var(--rank-accent) 31%,transparent),transparent 31%),
    linear-gradient(132deg,#fff 0%,#f9fcff 43%,#e8f2ff 100%);
  box-shadow:0 18px 38px color-mix(in srgb,var(--rank-accent) 15%,transparent),0 2px 5px #174d9610,inset 0 1px #fff;
}
.home-player-summary::after{
  inset:5px;
  border-color:color-mix(in srgb,var(--rank-accent) 26%,transparent);
  box-shadow:inset 0 0 0 1px #ffffffa8;
}
.home-player-summary img{
  box-shadow:0 6px 14px color-mix(in srgb,var(--rank-accent) 19%,transparent),inset 0 1px #fff;
}
.home-player-rank{
  position:relative;
  overflow:hidden;
  border-width:1px;
}
.home-player-rank::after{
  content:"";
  position:absolute;
  width:62px;
  height:62px;
  right:-25px;
  bottom:-34px;
  border:1px solid color-mix(in srgb,var(--rank-accent) 30%,transparent);
  border-radius:50%;
  box-shadow:0 0 0 7px color-mix(in srgb,var(--rank-accent) 8%,transparent),0 0 0 14px color-mix(in srgb,var(--rank-accent) 5%,transparent);
  pointer-events:none;
}
.home-player-rank .rank-insignia{
  filter:drop-shadow(0 4px 5px color-mix(in srgb,var(--rank-accent) 38%,transparent)) saturate(1.08);
}
.home-player-level{
  position:relative;
  overflow:hidden;
}
.home-player-level::before{
  content:"◆";
  position:absolute;
  top:5px;
  right:6px;
  color:color-mix(in srgb,var(--rank-accent) 48%,#fff);
  font-size:7px;
  line-height:1;
  text-shadow:0 0 7px color-mix(in srgb,var(--rank-accent) 58%,transparent);
}
.home-player-xp-copy small::after{
  content:"  •  PROGRESSÃO";
  color:color-mix(in srgb,var(--rank-deep) 61%,#fff);
  font-weight:750;
}
.home-player-progress-readout span{
  box-shadow:0 2px 5px color-mix(in srgb,var(--rank-accent) 16%,transparent),inset 0 1px #fff;
}
.home-player-progress-meter{
  padding:4px;
  border:1px solid color-mix(in srgb,var(--rank-accent) 22%,#dce7f4);
  border-radius:999px;
  background:linear-gradient(180deg,#ffffffbd,#e7effb);
  box-shadow:inset 0 1px 2px #163f8414,0 3px 8px color-mix(in srgb,var(--rank-accent) 12%,transparent);
}
.home-player-progress-meter::before{
  content:"";
  position:absolute;
  z-index:1;
  inset:4px;
  border-radius:999px;
  background:repeating-linear-gradient(90deg,transparent 0,transparent calc(20% - 1px),#ffffff82 calc(20% - 1px),#ffffff82 20%);
  mix-blend-mode:soft-light;
  pointer-events:none;
}
.home-player-progress-meter progress{
  position:relative;
  z-index:0;
  height:9px;
  border:1px solid #ffffff9e;
  box-shadow:inset 0 1px 2px #123e8512;
}
.home-player-progress-meter::after{
  z-index:2;
  left:var(--progress-position,1.5%);
  right:auto;
  transform:translate(-50%,-50%);
  animation:home-hud-beacon 2.4s ease-in-out infinite;
}
@keyframes home-hud-beacon{50%{box-shadow:0 0 0 3px color-mix(in srgb,var(--rank-accent) 19%,transparent),0 0 17px color-mix(in srgb,var(--rank-accent) 78%,transparent);transform:translate(-50%,-50%) scale(1.12)}}
@media(max-width:560px){
  .home-player-summary{box-shadow:0 12px 27px color-mix(in srgb,var(--rank-accent) 13%,transparent),0 2px 5px #174d9610}
  .home-player-summary::after{inset:5px;border-color:color-mix(in srgb,var(--rank-accent) 18%,transparent);box-shadow:none}
  .home-player-summary::before{opacity:.56}
  .home-player-rank{grid-template-columns:32px minmax(0,1fr);gap:7px;padding:4px 0}
  .home-player-rank .rank-insignia{width:32px;height:32px}
  .home-player-rank::after{display:none}
  .home-player-level{align-self:center;padding:7px 9px}
  .home-player-xp-copy small::after{content:none}
  .home-player-progress{gap:5px 10px;padding-top:10px}
  .home-player-progress-readout{gap:2px}
  .home-player-progress-meter{padding:3px}
  .home-player-progress-meter::before{inset:3px}
  .home-player-progress-meter progress{height:8px}
  .home-player-progress-meter::after{transform:translate(-50%,-50%)}
}
@media(prefers-reduced-motion:reduce){.home-player-progress-meter::after{animation:none}}

/* Página inicial: cada card segue o próprio conteúdo, sem herdar o espaço vazio
   do card vizinho. O bloco de revisão passa a fechar a grade de forma intencional. */
.dashboard-grid{align-items:start}
.dashboard-grid>.panel{min-height:0}
.dashboard-grid>.review-panel{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(15rem,.42fr);
  grid-template-rows:auto auto auto;
  column-gap:1.5rem;
  align-items:center;
}
.dashboard-grid>.review-panel>h3{grid-column:1;grid-row:1;margin:0 0 .35rem}
.dashboard-grid>.review-panel>#review-summary{grid-column:1;grid-row:2;margin:.25rem 0}
.dashboard-grid>.review-panel>.subtle{grid-column:1;grid-row:3;margin:.35rem 0 0}
.dashboard-grid>.review-panel>.btn{grid-column:2;grid-row:1/4;align-self:center;width:100%;margin:0}
@media(max-width:560px){
  .dashboard-grid{align-items:stretch}
  .dashboard-grid>.review-panel{display:flex;gap:0}
  .dashboard-grid>.review-panel>h3{order:1;margin:0 0 1rem}
  .dashboard-grid>.review-panel>#review-summary{order:2;margin:.75rem 0}
  .dashboard-grid>.review-panel>.subtle{order:3;margin:.75rem 0 0}
  .dashboard-grid>.review-panel>.btn{order:4;width:100%;margin-top:.75rem}
}

/* Keep scope subordinate to the selected home-exam matter and topic. */
.quiz-guided-form > [hidden]{display:none!important}
.quiz-guided-form label:has(#quiz-scope){grid-column:1/-1}
#quiz-scope-hint{font-size:11px;line-height:1.5;font-weight:400;color:#53677f}

/* Read-only source provenance, not an additional topic filter. */
.quiz-topic-details{grid-column:1/-1;max-width:100%;min-width:0;font-size:13px;overflow-wrap:anywhere;color:var(--muted,#536175)}
.quiz-topic-details summary{cursor:pointer;padding:8px 0}
.quiz-topic-details p{margin:4px 0 8px}
.quiz-topic-details ul{margin:0 0 12px;padding-left:20px}
