/* Shared scenery stays behind content and never replaces instructional media. */
:root { --theme-accent:#8af6df; }
:root[data-theme="neo-pop"] { --theme-accent:#8af6df; }
:root[data-theme="pixel"] { --theme-accent:#a0ecff; }
:root[data-theme="cosmic"] { --theme-accent:#d5bbff; }
:root[data-theme="candy"] { --theme-accent:#843363; }
:root[data-theme="solar"] { --theme-accent:#14613e; }
:root[data-theme="light"] { --theme-accent:#056354; }
:root[data-theme="green"] { --theme-accent:#8af6df; }
@media screen {
  body[data-student-portal] :is(.profile-eyebrow,.profile-identity-stats strong,.profile-section-heading small,.profile-certificate-callout small,.certificate-empty-integrated small,.profile-text-action,.recognition-section-head small,.recognition-overview strong,.recognition-overview span,.student-tools-heading > div > span) {
    color:var(--theme-accent);
  }
  body[data-student-portal] .badge-info small { color:var(--app-muted); }
  body[data-student-portal] .mia-global-launcher-name { color:var(--app-text); text-shadow:none; }
  body[data-student-portal] .mia-global-launcher-name strong { color:inherit; }
  body[data-student-portal] .mia-bubble .mia-message-head strong { color:var(--app-text); }
  body[data-student-portal] .accent { color:var(--theme-accent); }
  body[data-student-portal] :is(.recognition-hero,.student-tools-hero,.student-theme-banner) :is(.accent,.recognition-kicker) { color:var(--brand); }
  body[data-student-portal] .recognition-hero h1 span { color:var(--brand); }
  body[data-student-portal] .notebook-hero .accent { color:var(--brand); }
  body[data-student-portal]:not(.notebook-embedded-page) .notebook-page { color:var(--app-text); border-color:var(--app-line); background:var(--app-panel); }
  body[data-student-portal] :is(.autopilot-intro,.autopilot-example,.autopilot-card) { color:var(--app-text); border-color:var(--app-line); background:var(--app-panel-2); }
  body[data-student-portal] :is(.notebook-page > header > span,.notebook-field > span,.autopilot-list-head span,.autopilot-example p b) { color:var(--app-text); }
  body[data-student-portal] :is(.notebook-page > header small,.notebook-form-actions span) { color:var(--app-muted); }
  body[data-student-portal] :is(.autopilot-card-number,.autopilot-example span,.notebook-entry-autopilots b) { color:var(--theme-accent); }
  body[data-student-portal] .notebook-add-autopilot { background:var(--app-panel); border-color:var(--app-line); }
  body[data-student-portal] :is(.notebook-invitation,.notebook-form-actions small) { color:var(--app-muted); }
  body[data-student-portal] .autopilot-intro span { color:var(--theme-accent); }
  body[data-student-portal] .autopilot-card-number { background:var(--app-panel); border-color:var(--app-line); box-shadow:none; }
  body[data-student-portal] .autopilot-card .notebook-field { background:var(--app-panel-2); border-color:var(--app-line); }
  body[data-student-portal] .autopilot-card .notebook-field :is(input,textarea) { color:var(--app-text); border-color:var(--app-line); background:var(--app-panel); }
  body[data-student-portal] .notebook-field :is(input,textarea) { color:var(--app-text); border-color:var(--app-line); background:var(--app-panel); }
  body[data-student-portal] .notebook-field :is(input,textarea)::placeholder { color:var(--app-muted); }
  body[data-student-portal]:not(.notebook-embedded-page) .app-shell::before {
    background:linear-gradient(color-mix(in srgb,var(--app-bg-bottom) 92%,transparent),color-mix(in srgb,var(--app-bg-bottom) 86%,transparent)),var(--student-banner-image) center/cover no-repeat;
    opacity:1;
  }
  body[data-student-portal] .mia-global-panel {
    color:var(--app-text);
    border-color:var(--app-line);
    background:linear-gradient(color-mix(in srgb,var(--app-panel) 96%,transparent),color-mix(in srgb,var(--app-panel) 90%,transparent)),var(--student-banner-image) center/cover no-repeat;
  }
  body[data-student-portal] .mia-global-panel > header { border-color:var(--app-line); }
  body[data-student-portal] :is(.mia-global-panel header small,.mia-global-context,.mia-global-drag-icon) { color:var(--app-muted); }
  body[data-student-portal] .mia-global-context { background:var(--app-panel-2); }
  body[data-student-portal] :is(.mia-global-context svg,.mia-global-nav svg) { color:var(--theme-accent); }
  body[data-student-portal] :is(.mia-global-nav a,.mia-global-actions a) { color:var(--app-text); border-color:var(--app-line); background:var(--app-panel-2); }
  body[data-student-portal] .mia-global-message.assistant p { color:var(--app-text); border-color:var(--app-line); background:var(--app-panel-2); }
  body[data-student-portal] .mia-global-message.user p { color:var(--app-text); border-color:var(--app-line); background:color-mix(in srgb,var(--brand) 12%,var(--app-panel)); }
  body[data-student-portal] .mia-global-form { color:var(--app-text); background:var(--app-panel-2); }
  body[data-student-portal] :is(.mia-global-form,.mia-home-prompt,.mia-chapter-control,.mia-answer-panel,.coach-form) textarea {
    color:var(--app-text);
    background:linear-gradient(var(--app-panel-2),var(--app-panel-2)) padding-box,conic-gradient(from var(--mia-orbit-angle),transparent 0deg 220deg,var(--brand) 279deg,#ffffff 286deg,var(--brand) 310deg,transparent 332deg) border-box !important;
  }
  body[data-student-portal] :is(.mia-global-form,.mia-home-prompt,.mia-chapter-control,.mia-answer-panel,.coach-form) textarea::placeholder {
    color:var(--app-muted);
  }
}
:where(body[data-student-portal]) .student-menu-toggle { display:none; }
@media (max-width:840px) {
  body[data-student-portal] .student-menu-toggle { display:inline-grid; place-items:center; width:40px; height:40px; flex:0 0 40px; padding:8px; border:1px solid var(--app-line); border-radius:6px; color:var(--app-text); background:var(--app-panel); }
  body[data-student-portal] .student-menu-toggle svg { width:22px; height:22px; }
  body[data-student-portal] .app-topbar { display:flex; flex-wrap:nowrap; gap:8px; position:fixed; top:0; left:0; right:0; z-index:50; height:56px; min-height:56px; padding:8px 12px; background:var(--app-panel); border-bottom:1px solid var(--app-line); }
  /* The legacy mobile workspace uses display:contents, so reserve space on its parent. */
  body[data-student-portal] .app-shell { padding-top:56px !important; }
  body[data-student-portal] .app-sidebar { display:none !important; }
  body[data-student-portal].student-menu-open .app-sidebar { display:flex !important; position:fixed; top:56px; left:0; z-index:45; width:min(320px,100%); height:auto; max-height:calc(100dvh - 56px); overflow-y:auto; background:var(--app-sidebar); box-shadow:12px 0 30px rgba(0,0,0,.25); }
  body[data-student-portal].student-menu-open .side-nav { grid-template-columns:1fr; }
  body[data-student-portal] .app-actions { flex-wrap:nowrap; }
  body[data-student-portal] .app-actions > .user-chip,body[data-student-portal] .app-actions > .logout-link { display:none; }
  body[data-student-portal] .mobile-app-logo { flex:0 0 90px; width:90px; }
}
