/* Keep the space scene continuous on sign-in; the embedded return link stays available. */
body.student-account-page:has(#authView:not([hidden])) .student-header{display:none}
html:root[data-theme] body.student-account-page:has(#authView:not([hidden])) #accountMain{padding:0;max-width:none;width:100%}
html:root[data-theme] body.student-account-page #authView.student-auth-layout{min-height:100dvh}
html:root[data-theme] body.student-account-page #authView .student-auth-intro{min-height:calc(100dvh - 56px)}
@media(max-width:680px){html:root[data-theme] body.student-account-page #authView .student-auth-intro{min-height:265px}}
/* Focus belongs to the complete search field, never its borderless inner input. */
html:root[data-theme] .lib-search:focus-within{border-color:var(--brand-ink);box-shadow:0 0 0 2px color-mix(in srgb,var(--brand-ink) 18%,transparent)}
html:root[data-theme] .lib-search input:focus-visible{outline:none;box-shadow:none}
/* Each course keeps its own accent against the shared neutral shell. */
html:root[data-theme] body[data-track-identity] #app .dash>.hero{border-color:color-mix(in srgb,var(--brand-accent) 28%,var(--brand-line));background:linear-gradient(120deg,color-mix(in srgb,var(--brand-accent) 8%,var(--brand-surface)),var(--brand-surface) 70%)}
html:root[data-theme] body[data-track-identity] #app .stat{border-color:color-mix(in srgb,var(--brand-accent) 20%,var(--brand-line))}
html:root[data-theme] body[data-track-identity] #app .cat-card{border-color:color-mix(in srgb,var(--brand-accent) 20%,var(--brand-line))}
html:root[data-theme] body[data-track-identity] #app .cat-card .cc-icon{background:color-mix(in srgb,var(--brand-accent) 18%,var(--brand-surface));color:var(--brand-accent-ink)}
html:root[data-theme] body[data-track-identity] #app .cc-progress{background:color-mix(in srgb,var(--brand-accent) 16%,var(--brand-surface))}
html:root[data-theme] body[data-track-identity] #app .cc-progress span{background:var(--brand-accent)}
/* A predictable exit from every learning workspace. */
.stellar-back-paths{display:flex;align-items:center;padding:10px 12px;margin:4px 0 8px;border:1px solid var(--brand-line);border-radius:8px;color:var(--brand-ink);font-family:inherit;font-size:11px;font-weight:600;line-height:1.4;text-decoration:none}
.stellar-back-paths:hover{background:var(--brand-soft);border-color:var(--brand-accent)}
.stellar-back-paths:focus-visible{outline:2px solid var(--brand-accent-ink);outline-offset:2px}
/* Interactive miniature cosmic portals; labels and links stay native and keyboard accessible. */
html:root[data-theme] .stellar-path-navigator .stellar-path-grid{gap:14px 6px}
html:root[data-theme] .stellar-path-navigator .stellar-path-link{gap:7px;min-height:94px}
html:root[data-theme] .stellar-path-navigator .stellar-path-portal{width:min(62px,86%);border:1px solid color-mix(in srgb,var(--path-color) 70%,#e2e8f5);background:radial-gradient(circle at 50% 49%,#03070e 0 41%,#0c1928 53%,color-mix(in srgb,var(--path-color) 40%,#06101d) 66%,#050a14 76%);box-shadow:inset 0 0 12px #000,0 0 0 2px color-mix(in srgb,var(--path-color) 15%,transparent),0 0 12px color-mix(in srgb,var(--path-color) 35%,transparent)}
html:root[data-theme] .stellar-path-navigator .stellar-path-portal:before{inset:4px;border:1px solid color-mix(in srgb,var(--path-color) 70%,white);box-shadow:0 0 7px var(--path-color),inset 0 0 6px var(--path-color)}
html:root[data-theme] .stellar-path-navigator .stellar-path-orbit{opacity:.75;inset:-5px -8px;border:1px solid var(--path-color);box-shadow:0 0 5px var(--path-color);transform:rotate(-25deg) scaleY(.64)}
html:root[data-theme] .stellar-path-navigator .stellar-path-portal:after{opacity:1;top:5px;right:1px;width:7px;height:7px;background:radial-gradient(circle at 30% 25%,#f4faff,#20425e 45%,#030814 80%);border:1px solid color-mix(in srgb,var(--path-color) 65%,white);box-shadow:0 0 7px var(--path-color)}
html:root[data-theme] .stellar-path-navigator .stellar-path-line-icon{color:color-mix(in srgb,var(--path-color) 55%,white)}
html:root[data-theme] .stellar-path-navigator .stellar-path-mask{background:color-mix(in srgb,var(--path-color) 65%,white)}
html:root[data-theme] .stellar-path-navigator .stellar-path-link[aria-current=page] .stellar-path-portal{border-width:2px;box-shadow:0 0 0 3px color-mix(in srgb,var(--path-color) 20%,transparent),0 0 18px color-mix(in srgb,var(--path-color) 65%,transparent),inset 0 0 12px #000}
html:root[data-theme] .stellar-path-navigator .stellar-path-link:hover .stellar-path-portal{transform:translateY(-2px) scale(1.04);box-shadow:0 0 18px color-mix(in srgb,var(--path-color) 65%,transparent),inset 0 0 12px #000}
@media(prefers-reduced-motion:reduce){html:root[data-theme] .stellar-path-navigator .stellar-path-portal{transition:none}}

/* Profile media controls and editing */
.stellar-social .so-avatar-edit { position: relative; display: inline-flex; flex: none; }
/* Restrained controls stay legible over both photographs and the default cover. */
.stellar-social .so-avatar-edit-btn, .stellar-social .so-cover-edit { position: absolute; z-index: 4; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.28); background: rgba(22,26,34,.78); color: #fff; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.14); backdrop-filter: blur(10px); transition: background .18s ease, box-shadow .18s ease; }
.stellar-social .so-avatar-edit-btn { right: 1px; bottom: 1px; width: 28px; height: 28px; padding: 0; border-radius: 50%; }
.stellar-social .so-avatar-edit-btn::after { content: ""; position: absolute; inset: -7px; }
.stellar-social .so-cover-edit { top: 14px; right: 14px; gap: 5px; min-height: 30px; padding: 5px 10px; border-radius: 8px; font-size: 11px; font-weight: 600; line-height: 1; }
.stellar-social .so-avatar-edit-btn svg, .stellar-social .so-cover-edit svg { width: 13px; height: 13px; }
.stellar-social .so-media-picker svg, .stellar-social .so-media-editor-icon svg { width: 17px; height: 17px; }
.stellar-social .so-avatar-edit-btn:hover, .stellar-social .so-cover-edit:hover { background: rgba(30,39,53,.95); box-shadow: 0 3px 10px rgba(0,0,0,.2); }
.stellar-social .so-avatar-edit-btn:focus-visible, .stellar-social .so-cover-edit:focus-visible, .stellar-social .so-media-picker:focus-within { outline: 3px solid #548ff5; outline-offset: 3px; }
.stellar-social .so-edit-group + .so-edit-group { margin-top: 28px; padding-top: 23px; border-top: 1px solid var(--so-line); }
.stellar-social .so-edit-group h3 { margin: 0 0 18px; font-size: 15px; font-weight: 700; }
.stellar-social .so-edit-group .so-muted { line-height: 1.55; }
.stellar-social .so-media-editor { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 36px 24px; }
.stellar-social .so-media-editor-icon { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--so-line); border-radius: 18px; background: var(--so-bg); }
.stellar-social .so-media-editor-icon svg { width: 24px; height: 24px; }
.stellar-social .so-media-picker { position: relative; display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px; border: 1px solid var(--so-line); border-radius: 10px; font-weight: 600; cursor: pointer; }
.stellar-social .so-media-picker input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.stellar-social .so-media-file { margin: 0; overflow-wrap: anywhere; }
.stellar-social .so-media-remove { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }

/* Hide internal build notes from learning dashboards. */
.dash-foot { display: none; }

/* An anchored reaction tray opens without interrupting the feed. */
.stellar-social .so-reaction-emoji { font-size: 17px; line-height: 1; }
.stellar-social .so-react-wrap { position: relative; }
.stellar-social .so-react-wrap.is-open { z-index: 40; }
.stellar-social .so-post:has(.so-react-wrap.is-open) { z-index: 40; }
.stellar-social .so-reaction-picker { position: absolute; bottom: calc(100% + 7px); inset-inline-start: 0; display: flex; align-items: center; gap: 3px; width: max-content; max-width: calc(100vw - 44px); padding: 5px; border: 1px solid var(--so-line); border-radius: 999px; background: var(--so-surface); box-shadow: 0 6px 24px #0002; }
.stellar-social .so-reaction-picker[hidden] { display: none; }
.stellar-social .so-reaction-picker::after { content: ""; position: absolute; top: 100%; height: 12px; left: 0; right: 0; }
.stellar-social .so-reaction-option { position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 3px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font: inherit; }
.stellar-social .so-reaction-option-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 28px; line-height: 1; transition: transform .14s ease; transform-origin: center bottom; }
.stellar-social .so-reaction-option-icon svg { width: 22px; height: 22px; }
.stellar-social .so-reaction-like { background: linear-gradient(145deg,#29a7ff,#3857e8); color: #fff; }
.stellar-social .so-reaction-love { background: linear-gradient(145deg,#ff5583,#e21b44); color: #fff; }
.stellar-social .so-reaction-love svg { width: 21px; height: 21px; }
.stellar-social .so-reaction-option:hover .so-reaction-option-icon, .stellar-social .so-reaction-option:focus-visible .so-reaction-option-icon { transform: translateY(-5px) scale(1.17); }
.stellar-social .so-reaction-option[aria-pressed="true"] { background: var(--so-soft); box-shadow: inset 0 0 0 1px var(--so-line); }
.stellar-social .so-reaction-option:focus-visible { outline: 2px solid var(--brand-accent,#e65b10); outline-offset: 1px; }
.stellar-social .so-reaction-tooltip { position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%); padding: 5px 8px; border-radius: 6px; background: #20242c; color: #fff; font-size: 11px; line-height: 1.2; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; }
.stellar-social .so-reaction-option:hover .so-reaction-tooltip, .stellar-social .so-reaction-option:focus-visible .so-reaction-tooltip { opacity: 1; }
@media(max-width:380px) { .stellar-social .so-reaction-picker { gap: 0; padding: 4px; } .stellar-social .so-reaction-option { width: 39px; } }
@media(prefers-reduced-motion:reduce) { .stellar-social .so-reaction-option-icon { transition: none; } }

/* Compact course/community navigation keeps account controls inside the viewport. */
@media(max-width:700px){
 html:root[data-theme] .student-header-inner .student-brand{gap:6px}
 html:root[data-theme] .student-header-inner .student-brand .stellar-wordmark{width:92px}
 html:root[data-theme] .student-header-inner .student-brand .stellar-symbol{width:24px;height:24px}
 html:root[data-theme] .student-header-inner .student-nav{min-width:0;flex:1 1 0;order:0;margin:0;overflow-x:auto;scrollbar-width:none}
 html:root[data-theme] .student-header-inner .student-nav>a{flex:none;width:28px;min-width:28px}
 html:root[data-theme] .student-header-inner .student-nav>a>span{display:none}
 html:root[data-theme] .student-header-inner .student-header-tools{flex:none}
 html:root[data-theme] .student-header-inner .stellar-settings-shortcut{display:none}
}
