/* Conteúdo do portal. A navegação adaptável é definida em portal-navigation.css. */
.student-portal { margin: 0; background: #f4f8fc; color: var(--site-ink,#163653); }
.student-portal * { box-sizing: border-box; }
.student-portal :is(a,button,select,summary):focus-visible { outline: 3px solid var(--site-blue,#17659a); outline-offset: 3px; }
.portal-skip { position: absolute; left: -9999px; top: 10px; z-index: 160; padding: 12px; background: #fff; }
.portal-skip:focus { left: 10px; }
/* Fallback legível antes da inicialização do menu compartilhado. */
.portal-layout { display: grid; grid-template-columns: 252px minmax(0,1fr); min-height: 100vh; }
.portal-sidebar { display: flex; flex-direction: column; gap: 20px; padding: 20px 16px; background: #fff; border-right: 1px solid var(--site-line,#dae5ed); }
.portal-brand { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--site-muted,#516a7f); font-size: .875rem; }
.portal-brand-name { color: var(--site-ink,#163653); font-size: 1.45rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.2; }
.portal-brand-subtitle { font-size: .875rem; }
.site-brand-image { display: block; width: auto; max-width: 100%; max-height: 48px; object-fit: contain; }
.portal-navigation { display: flex; flex-direction: column; gap: 8px; }
.portal-navigation a { padding: 10px 12px; min-height: 44px; border-radius: 10px; color: var(--site-muted,#516a7f); font-weight: 600; text-decoration: none; }
.portal-navigation a:is(:hover,[aria-current="page"]) { background: #eaf3fa; color: var(--site-blue,#17659a); }
.portal-back { margin-top: auto; color: var(--site-blue,#17659a); font-weight: 600; text-decoration: none; }
/* Painel alinhado à área disponível, sem margem lateral automática. */
.portal-main { width: 100%; min-width: 0; margin: 0; padding: 24px clamp(16px,2vw,32px) 40px; }
.portal-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; color: var(--site-muted,#516a7f); }
.portal-topbar a { color: var(--site-blue,#17659a); font-weight: 600; text-decoration: none; }
.portal-welcome { padding: 22px 28px; border-radius: 18px; background: linear-gradient(125deg,#17659a,#30b0f6); color: #fff; }
.portal-welcome > p:first-child { font-size: .8125rem; font-weight: 750; letter-spacing: .1em; }
.portal-welcome h1 { margin: 8px 0; font-size: clamp(1.5rem,3vw,2.2rem); }
.portal-welcome p { margin: 8px 0; line-height: 1.5; }
.portal-quick-links { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.portal-quick-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 10px; background: #fff; color: var(--site-blue,#17659a); font-weight: 650; text-decoration: none; }
.portal-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 18px; padding: 14px 20px; border: 1px solid var(--site-line,#dae5ed); border-radius: 14px; background: #fff; }
.portal-resume a { color: var(--site-blue,#17659a); font-weight: 650; }
.portal-courses { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.portal-course-card,.portal-progress { min-width: 0; padding: 20px 22px; border: 1px solid var(--site-line,#dae5ed); border-radius: 18px; background: #fff; box-shadow: 0 6px 24px #16365308; }
:is(.portal-course-card,.portal-progress) h2 { margin: 0 0 10px; font-size: 1.4rem; }
:is(.portal-course-card,.portal-progress) p { margin: 8px 0; color: var(--site-muted,#516a7f); line-height: 1.6; }
.portal-course-card a { display: inline-flex; align-items: center; min-height: 44px; margin: 6px 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #eaf3fa; color: var(--site-blue,#17659a); text-decoration: none; font-weight: 650; }
.portal-course-card a:hover { background: #d7ebf9; }
.portal-progress { margin-top: 18px; }
.portal-progress-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.portal-progress h3 { margin: 4px 0 10px; font-size: 1rem; }
.portal-progress progress { width: 100%; height: 14px; accent-color: var(--site-blue,#17659a); }
.portal-progress > p:last-child { margin: 14px 0 0; font-size: .9375rem; }
/* Cards funcionais do painel, sem o pôster institucional da página pública. */
.portal-dashboard-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(280px,1fr); gap: 20px; margin-top: 18px; align-items: start; }
.portal-study-column,.portal-personal-column { display: grid; gap: 18px; min-width: 0; }
.portal-study-column > .portal-courses,.portal-personal-column > .portal-progress { margin-top: 0; }
.portal-personal-column .portal-progress-results { grid-template-columns: minmax(0,1fr); gap: 14px; }
.portal-panel { min-width: 0; padding: 20px 22px; border: 1px solid var(--site-line,#dae5ed); border-radius: 18px; background: #fff; box-shadow: 0 6px 24px #16365308; }
.portal-panel h2 { margin: 0 0 10px; font-size: 1.4rem; }
.portal-panel p { margin: 8px 0 14px; color: var(--site-muted,#516a7f); line-height: 1.6; }
.portal-activity-list,.portal-game-links,.portal-lab-links { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.portal-activity-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
.portal-game-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
.portal-activity-list a,.portal-game-links a,.portal-lab-links a { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 48px; height: 100%; padding: 12px; border: 1px solid var(--site-line,#dae5ed); border-radius: 10px; color: var(--site-blue,#17659a); text-decoration: none; font-weight: 600; }
.portal-activity-list a:hover,.portal-game-links a:hover,.portal-lab-links a:hover { background: #eaf3fa; }
.portal-activity-list span,.portal-lab-links span { font-size: .9375rem; font-weight: 400; color: var(--site-muted,#516a7f); }
.portal-visitor-badge { display: inline-block; margin-left: 8px; padding: 4px 10px; border-radius: 20px; background: #eaf3fa; color: var(--site-blue,#17659a); font-size: .875rem; font-weight: 600; }
.portal-access-note { margin-top: 20px; color: var(--site-muted,#516a7f); line-height: 1.6; }
.portal-access-note a { color: var(--site-blue,#17659a); font-weight: 600; }
@media(max-width:1100px) { .portal-dashboard-grid { grid-template-columns: minmax(0,1fr); } .portal-personal-column .portal-progress-results { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:640px) { .portal-activity-list,.portal-game-links,.portal-personal-column .portal-progress-results { grid-template-columns: minmax(0,1fr); } .portal-panel { padding: 18px; } }
/* Integração visual das páginas de aprendizagem. */
body.portal-learning > .site-header { display: none; }
body.portal-learning > main { box-sizing: border-box; width: 100%; min-width: 0; max-width: 1600px; margin-inline: auto; padding: 28px clamp(16px,3vw,42px) 48px; }
.portal-discipline { margin: 0 0 16px; color: var(--site-blue,#17659a); font-weight: 700; font-size: .9375rem; }
.portal-learning .math-practice .card { border: 1px solid var(--site-line,#dae5ed); border-radius: 18px; background: #fff; box-shadow: 0 8px 28px #1636530d; }
.portal-learning .portal-subject-selector { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; margin-bottom: 24px; border: 1px solid #dceaf5; border-radius: 14px; background: #f4f9fd; }
.portal-subject-selector label { font-weight: 700; }
.portal-subject-selector select { flex: 1 1 220px; min-width: 0; padding: 11px 14px; border: 1px solid #b8d4e8; border-radius: 9px; background: #fff; color: var(--site-ink,#163653); font: inherit; }
@media(max-width:900px) {
 .portal-layout { grid-template-columns: minmax(0,1fr); }
 .portal-sidebar { border-right: 0; border-bottom: 1px solid var(--site-line,#dae5ed); }
 .portal-main { padding-top: 18px; }
}
@media(max-width:640px) {
 .portal-topbar { align-items: flex-start; font-size: .9375rem; }
 .portal-welcome { padding: 20px; }
 .portal-courses,.portal-progress-results { grid-template-columns: minmax(0,1fr); gap: 16px; }
 .portal-course-card,.portal-progress { padding: 18px; }
 .portal-learning .portal-subject-selector { flex-direction: column; align-items: stretch; }
 .portal-subject-selector select { flex: 0 0 auto; width: 100%; }
}

/* Perfil visitante no canto superior direito; sem dados pessoais simulados. */
.portal-header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.portal-header-actions > a { display: inline-flex; align-items: center; min-height: 44px; }
.portal-profile { position: relative; z-index: 135; }
.portal-profile-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--site-line,#dae5ed); border-radius: 50%; color: var(--site-blue,#17659a); background: #eaf3fa; cursor: pointer; }
.portal-profile-toggle svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.portal-profile-menu { position: absolute; top: calc(100% + 8px); right: 0; width: min(280px,calc(100vw - 32px)); max-height: 65vh; overflow-y: auto; padding: 10px; border: 1px solid var(--site-line,#dae5ed); border-radius: 12px; background: #fff; box-shadow: 0 8px 28px #16365326; }
.profile-identity { display: grid; gap: 6px; padding: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--site-line,#dae5ed); }
.profile-identity span { color: var(--site-muted,#516a7f); font-size: .9375rem; }
.portal-profile-menu a { display: flex; align-items: center; min-height: 44px; padding: 10px; border-radius: 8px; color: var(--site-blue,#17659a); font-weight: 600; text-decoration: none; }
.portal-profile-menu a:is(:hover,:focus) { background: #eaf3fa; }
