/* Preserve the original layout; progressively enhance interaction and focus. */
html {scroll-behavior:smooth} body {opacity:1;transition:opacity .35s ease} body.leaving{opacity:0}
#pageloader{display:none} #wrapper{scroll-behavior:smooth} img{max-width:100%}
.custom{display:block;visibility:hidden;opacity:0;pointer-events:none;transition:opacity .25s ease,visibility .25s}
.custom.open{visibility:visible;opacity:1;pointer-events:auto}
.custom .teaserbox{transform:translateY(14px);transition:transform .3s ease}.custom.open .teaserbox{transform:none}
.custom:not(.open){content-visibility:hidden}
:focus-visible{outline:3px solid #ffce65;outline-offset:5px}
#overlay{z-index:1100;background:rgba(9,25,63,.94);animation:overlay-in .2s ease}
#overlay .stage>.lightbox{animation:profile-in .3s ease}
#overlay .close{border:0;background:transparent;z-index:1}
#overlay .close:focus-visible{outline:3px solid #7b0c4d}
#overlay.gallery-overlay .stage{padding:3rem 1rem;flex-direction:column;gap:1rem}
#overlay.gallery-overlay img{max-width:95vw;max-height:80vh;width:auto;height:auto;object-fit:contain}
#overlay.gallery-overlay .close{position:fixed;right:1rem;top:1rem;background:white;padding:.5rem}
#overlay .gallery-controls{display:flex;gap:1rem;align-items:center;color:white}
#overlay .gallery-controls button{padding:.65rem 1rem;font:inherit;background:white;border:0;cursor:pointer}
.mod_article .lightbox{cursor:pointer}
.reveal-pending{opacity:0;transform:scale(.8)}.reveal-visible{opacity:1;transform:scale(1);transition:opacity .7s ease,transform .7s ease}
@keyframes overlay-in{from{opacity:0}to{opacity:1}}@keyframes profile-in{from{opacity:0;transform:translateY(15px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:47.5em){#main-menu .row{min-height:100%;height:auto;padding-top:4rem;padding-bottom:3rem}#overlay .stage{padding-top:1rem;padding-bottom:1rem}}
/* Legacy min-height + width stretched wide images on tall screens. */
.banner-bild img{width:100%;height:100%;min-height:0;object-fit:cover;object-position:center}
