/* Pixel artwork stays sharp without the stacked mask darkening the skyline. */
body.home-view .academy-night-art{
 image-rendering:crisp-edges;
 image-rendering:pixelated;
 filter:grayscale(1) brightness(1.16) contrast(1.04);
 mask-image:none;
 -webkit-mask-image:none;
}
/* The site header occupies normal document flow and scrolls away with the page. */
body>header{position:relative!important;inset:auto!important;transform:none!important;transition:none!important;width:100%;max-height:none}
body>header .journey-menu-panel{max-height:calc(100dvh - var(--academy-header-height,150px) - 16px);overflow-y:auto;overscroll-behavior:contain}
body>header .owner-line a{display:inline-flex;align-items:center;gap:4px}

/* A fresh vector pixel dial, aligned to the clock tower at every crop. */
#home .academy-clock{position:absolute;z-index:2;display:grid;place-items:center;width:max(48px,var(--clock-width));height:max(48px,var(--clock-height));padding:0;border:0;background:transparent;transform:translate(-50%,-50%);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.academy-clock svg{display:block;width:var(--clock-width);height:var(--clock-height);overflow:visible;filter:drop-shadow(0 0 4px #fff8);animation:academy-clock-glow 4s ease-in-out infinite}
#home .academy-clock:hover svg{filter:drop-shadow(0 0 9px #fffc)}
#home .academy-clock:focus-visible{outline:2px dashed #eeeeeeb3;outline-offset:5px;border-radius:4px}
#home .academy-clock.is-accelerating svg{animation:academy-clock-rush .7s ease-in-out infinite alternate}
@keyframes academy-clock-glow{0%,100%{filter:drop-shadow(0 0 3px #fff5)}50%{filter:drop-shadow(0 0 8px #fffb)}}
@keyframes academy-clock-rush{from{filter:drop-shadow(0 0 7px #fffb)}to{filter:drop-shadow(0 0 13px #fffe)}}
/* Retain ink-black rooftops and reveal the midtone masonry. */
body.home-view .academy-night-art{filter:grayscale(1) brightness(1.2) contrast(1.06)}
@media(prefers-reduced-motion:reduce){#home .academy-clock svg{animation:none;filter:drop-shadow(0 0 4px #fff8)}}
/* Foreground birds cross above the dial, with empty sky still click-through. */
#home .academy-night-birds{z-index:3;pointer-events:none}
#home .academy-night-birds .academy-raven{pointer-events:auto}
/* Restored lossless pixel artwork carries its own contrast and monochrome palette. */
body.home-view .academy-night-art{filter:none;opacity:.8;image-rendering:crisp-edges;image-rendering:pixelated}
.academy-lights{position:absolute;z-index:0;pointer-events:none;overflow:visible;mix-blend-mode:screen}
.academy-moonlight{animation:academy-moon-glow 6s ease-in-out infinite}
.academy-windowlight{animation:academy-window-glow 5.5s ease-in-out infinite}
@keyframes academy-moon-glow{0%,100%{opacity:.12}50%{opacity:.6}}
@keyframes academy-window-glow{0%,100%{opacity:.08}50%{opacity:.65}}
body:not(.home-view) .academy-lights *{animation-play-state:paused}
.milestone-emblem{display:none!important}
.academy-welcome .welcome-bubble{text-align:center;padding:22px clamp(16px,4vw,32px)}
.academy-welcome .welcome-bubble>p{max-width:47ch;margin:12px auto 20px;line-height:1.65;text-wrap:pretty}
.academy-welcome .welcome-course-label{font:12px/1.4 'Academy Pixel',monospace;letter-spacing:.03em;margin:20px 0 10px;color:#d7d7d7}
.academy-welcome .welcome-milestones{margin:0;gap:8px;grid-template-columns:repeat(4,minmax(0,1fr))}
.academy-welcome .welcome-milestones>div{min-width:0;padding:12px 4px;display:flex;flex-direction:column;align-items:center;gap:7px}
.academy-welcome .welcome-milestones small{font-size:10px;white-space:nowrap}
.academy-welcome .welcome-milestones span:not(.chapter-badge){font-size:11px}
.custom-badges{align-items:center;flex-wrap:wrap;gap:6px}.stock-badge{flex:none}
@media(max-width:420px){.academy-welcome .welcome-bird{height:130px}.academy-welcome #academyWelcomeTitle{font-size:24px}.academy-welcome .welcome-bubble{padding:18px 14px}.academy-welcome .welcome-bubble>p{font-size:13px}.academy-welcome .welcome-milestones{gap:5px}}
@media(prefers-reduced-motion:reduce){.academy-moonlight,.academy-windowlight{animation:none;opacity:.3}}
.academy-all-windowlight{animation:academy-all-windows-glow 4.5s ease-in-out infinite}
@keyframes academy-all-windows-glow{0%,100%{opacity:.35}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.academy-all-windowlight{animation:none;opacity:.7}}

/* Darken only the scenery; interactive birds and light layers keep their contrast. */
body.home-view .academy-night-shade{pointer-events:none}
body.home-view #home.academy-night-home{background:#000}

/* Homepage monochrome finish: black canvas, silver masonry, white light. */
body.home-view{background:#000;color:#eee;color-scheme:dark}
body.home-view>header{background:#000;border-bottom-color:#292929}
body.home-view>header :is(.brand,.owner-line,nav){filter:grayscale(1)}
body.home-view .academy-night-art{
 filter:grayscale(1) contrast(1.28) brightness(.82);
 opacity:1;
 image-rendering:crisp-edges;
 image-rendering:pixelated;
}
body.home-view .academy-night-shade{
 background:linear-gradient(180deg,#0005 0%,#0001 38%,#0002 72%,#000 100%);
 pointer-events:none;
}
body.home-view .academy-lights{filter:grayscale(1)}
body.home-view .academy-clouds i{background:#484848;box-shadow:inset 0 -12px #242424}
body.home-view .academy-raven svg{
 filter:drop-shadow(1px 1px 0 #bdbdbd80) drop-shadow(-1px -1px 0 #bdbdbd40);
}
body.home-view .raven-bubble{background:#e2e2e2;color:#111}
body.home-view #home :is(button,a):focus-visible{outline:2px solid #fff;outline-offset:4px}
@media(max-width:767px){
 body.home-view .raven-bubble{max-width:min(160px,42vw);text-align:center;overflow-wrap:anywhere}
}
