/* Shared responsive rules, loaded after component styles. Content stays readable;
   only wide data tables and explicit tab strips scroll horizontally. */
html{scroll-padding-top:16px}
body{margin:0}
.shell,.shell *,dialog,dialog *{box-sizing:border-box}
.shell .main,.main :where(section,article,header,div,form,fieldset,label,details),dialog :where(div,form,fieldset,label,details){min-width:0}
.main,.auth-form,dialog{overflow-wrap:anywhere}
.main :where(img,video,iframe),dialog :where(img,video,iframe){max-width:100%}
.main :where(input,select,textarea),dialog :where(input,select,textarea){min-width:0;max-width:100%;font-size:16px}
.main :where(button,.button),dialog :where(button,.button){max-width:100%;white-space:normal;min-height:44px;line-height:1.45}
.main :where(.head,.page-head,.row,.form-actions,.announcement-actions,.announcement-meta){flex-wrap:wrap}
.main :where(.head,.page-head)>div:first-child{min-width:0;flex:1 1 260px}
.main :where(.prose,.note,.announcement-card,.empty,.badge),dialog :where(.prose,.note,.badge){overflow-wrap:anywhere;max-width:100%}
.main .badge{white-space:normal}
.main .grid,.main .grid.two,.fields{min-width:0}
.main .fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.main .tabs{max-width:100%;overscroll-behavior-x:contain;scrollbar-width:thin;scroll-padding:8px}
.main .tabs button{flex-shrink:0}
.main .hub-table-scroll,dialog .hub-table-scroll{min-width:0;max-width:100%;width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;border-radius:10px}
.hub-table-scroll table{margin:0;min-width:560px}
.hub-table-scroll :where(th,td){overflow-wrap:normal;word-break:normal}
.table-scroll-hint{font-size:.8125rem;color:#526a79;margin:8px 0}
.table-scroll-hint[hidden],[hidden]{display:none!important}
.hub-skip{position:fixed;left:12px;top:-100px;z-index:300;background:#fff;color:#163e5a;padding:12px 18px;border-radius:10px}
.hub-skip:focus{top:12px}
.sidebar .my-hub-menu button.active{background:#d9f4f1;color:#103f59}
.sidebar .brand img{max-width:100%;object-fit:contain}
.sidebar nav{min-height:0}
.announcement-source{display:inline-flex;gap:6px;align-items:center;max-width:100%;padding:4px 0;color:#126478;text-decoration:underline;text-underline-offset:3px;font-weight:600;white-space:normal}
.main .announcement-card{width:100%;min-width:0}
.main .announcement-card .prose{font-size:1rem;line-height:1.65}
.main .announcement-actions{gap:12px;margin-top:18px}
.main .announcement-card>.row.section{margin-top:20px;padding-top:16px;border-top:1px solid #dce7ed}
.shell .main.account-security{max-width:1040px;margin-left:auto;margin-right:auto}
.account-security>.page-head{margin-bottom:20px}
.account-security>section.card{margin-bottom:16px}
.account-security #passkey-add{max-width:560px}
.security-option{border:1px solid #d6e4eb;border-radius:14px;background:#fff;margin:12px 0;overflow:hidden}
.security-option>summary{cursor:pointer;font-size:1rem;font-weight:650;padding:18px 20px;min-height:56px;color:#173d53}
.security-option>section.card{border:0;box-shadow:none;margin:0;border-radius:0;padding-top:4px}
.account-security .list{max-height:440px;overflow-y:auto;overscroll-behavior:contain}
.main .intake-dashboard{padding:16px 20px;border-radius:14px;margin:16px 0 24px}
.main .intake-dashboard .eyebrow{font-size:.75rem}
.main .intake-dashboard h2{font-size:1.125rem;margin:4px 0}
.main .tcm-metric>strong{font-size:clamp(1.4rem,2.4vw,2.3rem)}
.main .tcm-pagination{flex-wrap:wrap}
dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
dialog .close{position:sticky;top:0;float:right;z-index:2;min-width:44px;min-height:44px;background:#edf4f7;color:#173d53}
dialog h2{padding-right:48px}
dialog .fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:901px){
 .shell{grid-template-columns:248px minmax(0,1fr)}
 .shell .sidebar{height:100dvh;position:sticky;top:0;padding:24px 14px;overflow-y:auto}
 .shell .main{padding:28px clamp(24px,3vw,48px) 100px}
 .main>.head,.main>.page-head{gap:20px}
 .main .workspace-hero{padding:24px 28px}
 .sidebar .mobile-menu-toggle{display:none}
 .sidebar #workspace-navigation{display:block}
}
@media(max-width:900px){
 .shell{display:block}
 .shell .sidebar{position:sticky;top:0;z-index:50;height:auto;padding:10px 16px;background:#123e5b;display:grid;grid-template-columns:126px minmax(0,1fr);align-items:center;gap:12px;overflow:visible;border-bottom:1px solid #ffffff25}
 .sidebar .brand{padding:0;border:0;min-width:0}
 .sidebar .brand img{width:126px;display:block}
 .sidebar .brand small{display:none}
 .sidebar .mobile-menu-toggle{display:flex;min-width:0;width:100%;margin:0;padding:10px;min-height:48px;gap:8px;justify-content:flex-start;background:#ffffff10;color:#fff}
 .mobile-menu-toggle>.nav-icon{flex:0 0 18px;width:18px;height:18px}
 .mobile-menu-toggle>span:not(.mobile-location){font-size:13px}
 .mobile-menu-toggle .mobile-location{margin-left:auto;min-width:0;font-size:12px;line-height:1.35;overflow-wrap:anywhere;text-align:right}
 .sidebar #workspace-navigation{display:none;grid-column:1/-1}
 .sidebar.menu-open #workspace-navigation{display:block;max-height:calc(100dvh - 100px);overflow-y:auto;overscroll-behavior:contain;margin-top:0;padding-bottom:12px}
 .sidebar .nav-group>summary{min-height:48px}
 .sidebar .nav-submenu>button,.sidebar .nav-submenu>a{min-height:46px;font-size:14px}
 .shell .main{padding:20px 20px calc(88px + env(safe-area-inset-bottom));width:100%}
 .main h1{font-size:clamp(1.6rem,4vw,2rem);line-height:1.2}
 .main h2{font-size:1.25rem;line-height:1.35}
 .main .head,.main .page-head{gap:12px}
 .main .workspace-hero{padding:20px}
 .main .head>div:first-child,.main .page-head>div:first-child{flex-basis:auto}
 .main .grid:not(.two){grid-template-columns:repeat(2,minmax(0,1fr))}
 body:has(.sidebar.menu-open) #ally-pal .ally-pal-panel,body:has(.sidebar.menu-open) #ally-pal .ally-pal-hello,body.hub-editing #ally-pal:not(:focus-within) .ally-pal-panel,body.hub-editing #ally-pal:not(:focus-within) .ally-pal-hello{visibility:hidden;pointer-events:none}
 html{scroll-padding-top:90px}
 .auth{gap:20px;padding:20px 16px}
 .auth .auth-intro{gap:12px}
 .auth .auth-intro>div:not(.brand),.auth .auth-intro>p{display:none}
 .auth .auth-intro .brand{max-width:210px}
 .auth .auth-form{padding:24px 20px}
 .auth .auth-form h2{font-size:2rem}
}
@media(max-width:600px){
 .shell .main{padding:18px 14px calc(88px + env(safe-area-inset-bottom))}
 .main .grid,.main .grid.two,.main .grid:not(.two),.main .fields,dialog .fields{grid-template-columns:minmax(0,1fr)}
 .main .card,.main .item,.main .workspace-hero,.main .priority-guide{padding:18px;border-radius:14px}
 .main .head,.main .page-head{flex-direction:column;align-items:stretch;margin-bottom:18px}
 .main .head>.row,.main .page-head>.row{width:100%;margin:0}
 .main .head>.row>*,.main .page-head>.row>*{flex:1 1 140px}
 .main .item{gap:12px}
 .main .item>div:first-child{flex:1 1 100%}
 .main .item>.row{width:100%}
 .main .item>.row>button{flex:1 1 130px}
 .main .section{margin-top:24px}
 .main .announcement-meta{gap:8px;font-size:.8125rem}
 .main .announcement-actions>button:first-child{width:100%}
 .main .announcement-card>.row.section{gap:8px}
 .main .announcement-card>.row.section>button{flex:1 1 120px}
 .main .intake-dashboard{gap:12px;padding:14px 16px;flex-direction:column;align-items:stretch}
 .main .intake-dashboard p{font-size:.8125rem;line-height:1.5}
 .main .intake-dashboard button{width:100%;min-height:44px}
 .main .tcm-metrics{gap:10px}
 .main .tcm-metric{padding:14px}
 .main .tcm-metric>strong{font-size:1.5rem}
 .main .tcm-pagination{gap:8px}
 .main .tcm-pagination>span{order:-1;width:100%;text-align:center}
 .main .tcm-pagination>button{flex:1}
 .security-option>summary{padding:16px}
 .account-security .list{max-height:360px}
 dialog{width:calc(100vw - 20px);padding:18px 14px;max-height:calc(100dvh - 20px);border-radius:16px}
 dialog .form-actions{display:flex;flex-wrap:wrap;gap:10px}
 dialog .form-actions>button{flex:1 1 140px}
 #toast{max-width:calc(100vw - 28px);overflow-wrap:anywhere;bottom:calc(80px + env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
