/* Shared portal presentation. Long pages scroll naturally; content never shrinks
   through browser zoom or gets hidden to force it into a single screen. */
*,*::before,*::after{box-sizing:border-box}
html{min-width:0;scroll-padding-top:20px;-webkit-text-size-adjust:100%}
body{min-width:0;min-height:100vh;min-height:100svh}
main,.page,section,article,aside,form,fieldset,header,footer,nav{min-width:0}
main{max-width:min(100%,var(--portal-page-width,1200px))}
.page main{max-width:100%}
img,video,canvas,iframe{max-width:100%}
h1,h2,h3,p,li,dd,dt,label,td,th{overflow-wrap:anywhere}
input,textarea,select,button{max-width:100%;min-width:0}
input,textarea,select{font-size: max(1rem,1em)}
button,a.button,.service-button,.registration-button{white-space:normal;overflow-wrap:anywhere}
pre{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}
dialog{max-width:calc(100% - 24px);max-height:calc(100svh - 32px);overflow:auto}
/* Text links remain recognizably links, distinct from cards and buttons. */
body a[href]:not(:is(.button,.service-button,.registration-button,.login-link,#authelia-login,.card,.brand,.kofi-button)):not(.profile-options a){color:#c8baff;text-decoration-line:underline;text-decoration-color:rgba(200,186,255,.5);text-decoration-thickness:1px;text-underline-offset:.23em;font-weight:600;overflow-wrap:anywhere;transition:color .15s,text-decoration-color .15s}
body a[href]:not(:is(.button,.service-button,.registration-button,.login-link,#authelia-login,.card,.brand,.kofi-button)):not(.profile-options a):hover{color:#eee6ff;text-decoration-color:currentColor}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #c8baff;outline-offset:4px}
.toolbar,.actions,.buttons,.header-actions,.portal-navigation{flex-wrap:wrap;min-width:0}
.toolbar>*{min-width:0}
.filters label,.filters label.source{min-width:0;max-width:100%;flex:1 1 180px}
.filters select,.filters input{width:100%}
.profile-menu{margin-left:auto;order:99;max-width:100%}
.profile-options{max-width:calc(100vw - 32px);max-height:calc(100svh - 100px);overflow:auto}
.profile-options a{white-space:normal!important}
.profile-menu #account-name{max-width:clamp(65px,15vw,140px)}
@media(min-width:1600px){main{--portal-page-width:1500px}}
@media(max-width:900px){
 /* Preserve all user-management fields without a viewport-wide table. */
 .table table{min-width:0;width:100%}
 .table table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .table table,.table tbody,.table tr,.table td{display:block;width:100%}
 .table tbody{display:grid;gap:16px;padding:12px}
 .table tr{border:1px solid #393343;border-radius:12px;padding:8px;background:#13111b}
 .table td{padding:12px;border-bottom:1px solid #302a3b}
 .table td:last-child{border-bottom:0}
 .table td[data-label]::before{content:attr(data-label);display:block;color:#c8baff;font-weight:700;font-size:.82rem;margin-bottom:8px}
}
@media(max-width:650px){
 main:not(.page main){padding:28px 16px 40px}
 .page{width:calc(100% - 32px)}
 .page main{padding:28px 0 40px}
 header:not(.terms-header),.portal-page-header{gap:12px;flex-wrap:wrap}
 .header-actions,.portal-navigation{gap:10px;flex:1 1 auto;justify-content:flex-end}
 .brand{font-size:.8rem;letter-spacing:.03em}
 .panel,.card,.report,#admin-appointments{padding:18px}
 .setting,.profile{padding:20px;gap:16px}
 .setting{grid-template-columns:minmax(0,1fr)}
 .setting .button,.setting button{width:auto;max-width:100%}
 .profile{flex-wrap:wrap}
 .toolbar input{flex:1 1 100%;width:100%}
 .actions{align-items:flex-start;gap:10px}
 .filters label,.filters label.source{flex-basis:100%}
 h1{font-size:clamp(2rem,8vw,3rem)}
 .notice,.summary{padding:20px}
}
@media(max-width:380px){.header-actions{gap:8px}.profile-menu .portal-profile-trigger{padding:7px 9px;gap:6px}.profile-menu #account-name{max-width:65px}.panel,.card,.report{padding:14px}.grid .day{padding:2px}.grid .day button{font-size:10px}}
@media(prefers-reduced-motion:reduce){body a[href]{transition:none!important}}
@media print{body a[href]{color:inherit!important}}
/* Scale the splash introduction to the available height as well as width. */
body .hero{padding:clamp(32px,7svh,80px) 0 clamp(36px,7svh,80px)}
body .hero h1{font-size:clamp(2.5rem,min(7vw,10svh),6rem);line-height:1.04;max-width:1000px}
body .hero p{font-size:clamp(1rem,1.5vw,1.2rem)}
.storage-stats>*,.function-grid>*,.dashboard>*,.maintenance>*{min-width:0}
@media(max-width:650px){body .hero h1{font-size:clamp(2rem,8.5vw,3.4rem)}body .hero{padding:32px 0 40px}}
/* Wide data views use about three quarters of desktop space. Day cells stay
   square regardless of release count; full titles live in the grouped list. */
body.calendar-page main,body:has(.table table) main{width:75%;max-width:1800px;margin-inline:auto}
body.calendar-page #calendar-grid{align-items:stretch;gap:6px}
body.calendar-page #calendar-grid .day{aspect-ratio:1;min-height:0;overflow:hidden;padding:8px;display:flex;flex-direction:column;gap:3px}
body.calendar-page #calendar-grid .day button{flex:0 0 auto;min-height:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(10px,.85vw,14px);padding:4px;margin:0}
body.calendar-page #calendar-grid .day .day-more{background:transparent;color:#c8baff;padding:1px 4px}
body.calendar-page #calendar-grid .day.empty{aspect-ratio:1}
.release-group{border:1px solid #393343;border-radius:12px;margin:12px 0;padding:0 16px;background:#100e17}
.release-group>summary{padding:16px 0;cursor:pointer;color:#c8baff;font-weight:700;overflow-wrap:anywhere}
.release-group>summary:hover{color:#eee6ff}
.release-group>summary:focus-visible{outline:2px solid #c8baff;outline-offset:3px;border-radius:4px}
.release-group .release-group{background:#17131f}
.release-group .event:last-child{border-bottom:0}
@media(max-width:1100px){body.calendar-page main,body:has(.table table) main{width:94%}}
@media(max-width:650px){body.calendar-page main,body:has(.table table) main{width:100%}body.calendar-page #calendar-grid{gap:3px}body.calendar-page #calendar-grid .day{padding:3px;gap:1px}body.calendar-page #calendar-grid .day button:not(.day-more):not(.day-count){display:none}body.calendar-page #calendar-grid .day{cursor:pointer}body.calendar-page #calendar-grid .day .day-more{font-size:9px;padding:0}.release-group{padding-inline:10px}}
body.calendar-page #calendar-grid .day .day-count{display:none}
@media(max-width:650px){body.calendar-page #calendar-grid .day .day-more{display:none}body.calendar-page #calendar-grid .day .day-count{display:block;font-size:9px;white-space:normal;padding:2px;background:#353046;line-height:1.2}}


@media(max-width:900px){body.calendar-page #calendar-grid .day button:not(.day-count){display:none}body.calendar-page #calendar-grid .day .day-count{display:block;white-space:nowrap;font-size:10px;padding:0 2px;line-height:1.2;background:#353046}}

/* Dynamic announcements do not inherit Astro's scoped element attributes.
   Give every runtime-created announcement a complete global card treatment. */
body #announcements-list .announcement-card{padding:24px;border:1px solid var(--personal-border,rgba(200,186,255,.18));border-radius:18px;background:var(--personal-surface,#14121c);box-shadow:0 10px 30px rgba(0,0,0,.12);min-width:0}
body #announcements-list .announcement-card h3{margin:0 0 12px;font-size:1.3rem;line-height:1.35;color:var(--personal-text,#f5f7fa);overflow-wrap:anywhere}
body #announcements-list .announcement-card p{margin:0;white-space:pre-wrap;line-height:1.65;color:var(--personal-text,#c5c3d0);overflow-wrap:anywhere}
body #announcements-list .announcement-meta{margin-top:16px;padding-top:12px;border-top:1px solid var(--personal-border,rgba(200,186,255,.12));font-size:.8rem;color:var(--personal-muted,#aaa3b8);line-height:1.5}
@media(max-width:650px){body #announcements-list .announcement-card{padding:18px}}
body.calendar-page #calendar-grid .day.today{outline:2px solid var(--personal-link,#c8baff);outline-offset:-2px;background:var(--personal-surface,#20182e)}
body.calendar-page #calendar-grid .day.past{opacity:.6}
#release-disclosure>summary{font-size:1.3rem}

/* Reuse the original wordmark as the sole site-brand home action. */
body a.portal-wordmark{display:inline-flex;align-items:center;flex:0 1 auto;font:800 .88rem Inter,ui-sans-serif,system-ui,sans-serif;letter-spacing:.06em;color:var(--personal-text,#f5f7fa);text-decoration:none!important;line-height:1.4;white-space:normal}
body a.portal-wordmark:hover{color:var(--personal-link,#c8baff)}
.portal-brand-header{display:flex;align-items:center;justify-content:flex-start;gap:16px;width:min(1200px,100%);margin:0 auto;padding:24px 24px 0}
.page>.portal-brand-header{padding:24px 0 0;width:100%}
.portal-brand-floating{position:absolute;inset:0 0 auto;max-width:none;width:100%;padding:24px}
.portal-page-header>.portal-wordmark{margin-right:auto}
@media(max-width:650px){body a.portal-wordmark{font-size:.8rem}.portal-brand-header{padding:20px 16px 0}.page>.portal-brand-header{padding:20px 0 0}.portal-brand-floating{padding:20px 16px}}

body a.portal-wordmark{background:transparent!important;border:0!important;border-radius:0!important;padding:0!important;box-shadow:none!important}

/* Personal visibility overrides card display rules, without changing access. */
[data-layout-card][hidden]{display:none!important}
