/* Phase 2IA — user-supplied official PRISM Sarimanok logo and secure staff entry.
   Heritage Portal content/public permissions stay unchanged. */
.masthead .brandArt .prismOfficialPublicMark{
  width:83px!important;height:91px!important;object-fit:contain!important;
  padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;
  filter:drop-shadow(0 6px 12px rgba(13,3,32,.55)) drop-shadow(0 1px 8px rgba(234,198,105,.23))!important;
}
.masthead .mastheadInner{gap:16px!important}
.masthead .mastheadSearch{flex:0 1 510px;max-width:100%;min-width:310px;display:flex;align-items:center;gap:9px}
.masthead .mastheadSearch input{min-width:80px;flex:1}
.masthead .prismPortalSignIn,
.intro .prismPortalHeroSignIn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:43px;padding:9px 16px;border-radius:30px;white-space:nowrap;
  font-size:12px;font-weight:850;line-height:1.3;text-decoration:none;
  color:#351543!important;border:1.5px solid rgba(255,255,255,.95);
  background:linear-gradient(135deg,#fff 0%,#eff9ff 29%,#dfd9fc 59%,#fff0d6 100%);
  box-shadow:inset 0 2px 2px #fff,inset 0 -4px 7px rgba(86,70,164,.18),0 5px 12px rgba(16,3,36,.3),0 0 0 1px #adcafa;
  transition:transform .18s ease, box-shadow .18s ease;
}
.masthead .prismPortalSignIn:hover,.intro .prismPortalHeroSignIn:hover{transform:translateY(-2px);box-shadow:inset 0 2px 3px #fff,inset 0 -4px 7px rgba(86,70,164,.18),0 8px 18px rgba(16,3,36,.37),0 0 0 2px #8aceff}
.masthead .prismPortalSignIn:focus-visible,.intro .prismPortalHeroSignIn:focus-visible,.prismPortalLoginClose:focus-visible {outline:3px solid #62d5ff;outline-offset:4px}
.intro .heroArtFrame .prismPortalHeroOfficial{filter:drop-shadow(0 8px 10px rgba(19,0,27,.62)) drop-shadow(0 0 9px rgba(255,222,168,.2))!important}
.intro .heroCopy p:last-of-type{font-size:13px!important;line-height:1.5!important;max-width:675px!important}
.intro .prismPortalHeroActions{margin-top:16px;display:flex;align-items:center;flex-wrap:wrap;gap:14px;position:relative;z-index:5}
.intro .prismPortalHeroSignIn{border-color:#d8c5f9;font-size:12px;min-height:40px;padding:10px 17px}
.intro .prismPortalHeroActions small{font-size:11px;color:#ffebc5}
/* A real modal, not a second sign-in form. iframe is same-origin and uses PRISM's unchanged Supabase auth handler. */
.prismPortalLoginDialog{position:fixed;box-sizing:border-box;left:50%;top:50%;transform:translate(-50%,-50%);width:min(1130px,calc(100vw - 28px));height:min(92vh,830px);max-width:none;max-height:none;margin:0;padding:0;border-radius:27px;border:2px solid rgba(229,209,255,.94);overflow:hidden;color:#17213f;background:#f5f4ff;box-shadow:0 0 0 1px rgba(100,152,255,.5),0 30px 110px rgba(23,6,54,.58),inset 0 2px #fff}
.prismPortalLoginDialog:not([open]){display:none}
.prismPortalLoginDialog::backdrop{background:rgba(18,5,39,.82);backdrop-filter:blur(10px)}
.prismPortalLoginHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:81px;padding:9px 16px 9px 21px;background:linear-gradient(110deg,#120f35,#39316c 48%,#211640);color:white;border-bottom:2px solid rgba(201,184,255,.55)}
.prismPortalLoginIdentity{display:flex;gap:12px;align-items:center;min-width:0}
.prismPortalLoginIdentity img{width:55px;height:55px;object-fit:contain;flex:none;filter:drop-shadow(0 2px 6px #050514)}
.prismPortalLoginIdentity strong{font-size:22px;display:block;line-height:1.2}
.prismPortalLoginIdentity small{font-size:12px;color:#e1daf9;display:block;line-height:1.4;margin-top:2px}
.prismPortalLoginClose{width:44px;height:44px;flex:0 0 44px;border-radius:50%;background:linear-gradient(150deg,#fff,#d9dbff);border:1px solid white;color:#251b56;font-size:30px;line-height:1;cursor:pointer;box-shadow:inset 0 1px #fff,0 3px 10px #0008}
#prismPortalLoginFrame{display:block;width:100%;height:calc(100% - 124px);border:0;background:#560613}
.prismPortalLoginFoot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 20px;height:43px;box-sizing:border-box;background:#fcfaff;font-size:11px;color:#495168}
.prismPortalLoginFoot a{color:#50239b;font-weight:800;white-space:nowrap}
@media(max-width:1340px){
 .masthead .mastheadInner{flex-wrap:wrap!important}
 .masthead .mastheadSearch{flex:1 1 100%;width:100%;max-width:none!important;margin-bottom:6px}
}
@media(max-width:760px){
 .masthead .brandArt .prismOfficialPublicMark{width:57px!important;height:67px!important}
 .masthead .mastheadSearch{gap:7px;min-width:0;flex-wrap:wrap}
 .masthead .mastheadSearch input{flex:1 1 100%;min-height:44px}
 .masthead .mastheadSearch #publicReload{flex:1 1 auto}
 .masthead .prismPortalSignIn{flex:1 1 auto}
 .intro .prismPortalHeroActions{gap:8px}
 .intro .prismPortalHeroSignIn{white-space:normal!important;padding:8px 12px;font-size:11px}
 .intro .prismPortalHeroActions small{font-size:10px}
 .prismPortalLoginDialog{width:calc(100vw - 10px);height:calc(100dvh - 14px);border-radius:17px}
 .prismPortalLoginHeader{min-height:65px;padding:6px 11px}
 .prismPortalLoginIdentity img{width:40px;height:40px}
 .prismPortalLoginIdentity strong{font-size:18px}
 .prismPortalLoginIdentity small{font-size:10px}
 #prismPortalLoginFrame{height:calc(100% - 112px)}
 .prismPortalLoginFoot{height:47px;font-size:10px;padding:7px 12px}
}
@media(max-width:405px){.prismPortalLoginFoot span{max-width:58%}}
@media(prefers-reduced-motion:reduce){.masthead .prismPortalSignIn,.intro .prismPortalHeroSignIn{transition:none}}
/* Avoid four-line headings when small mobile headers share a row with three official marks. */
@media(max-width:620px){
 .masthead .brand{display:flex!important;flex-direction:column;align-items:center;text-align:center;gap:6px!important;width:100%}
 .masthead .brandArt{justify-content:center;gap:15px!important}
 .masthead .brandText{width:100%;text-align:center}
 .masthead .brand h1{font-size:clamp(24px,7vw,30px)!important}
 .masthead .brandOffice{font-size:12px}
 .masthead .brandSub{font-size:10px}
 .masthead .mastheadInner{gap:7px!important}
}
