/* Shared desktop, tablet and phone layout. Screen-only rules preserve authority printing. */
@media screen {
  :root{--layout-radius:16px;--layout-space:24px}
  body{line-height:1.6;text-rendering:optimizeLegibility}
  .content{width:calc(100% - 248px);max-width:1760px;margin-left:248px;padding:32px clamp(24px,3vw,48px) 40px;min-width:0}
  .content>header{align-items:flex-start;gap:24px;margin-bottom:24px}
  .content h1{font-size:clamp(26px,2.5vw,36px);letter-spacing:-.8px}
  .header-right{flex-wrap:wrap;justify-content:flex-end;gap:8px;max-width:600px}
  .header-right>button{font-size:12px;padding:10px 12px}
  .sidebar{width:248px;height:100dvh;overflow-y:auto;padding:28px 22px;z-index:30}
  .sidebar nav{margin:24px -6px}
  .sidebar nav a{min-height:46px;display:flex;align-items:center;gap:8px;line-height:1.4;margin-bottom:5px}
  .sidebar nav a[aria-current=page]{background:#eaf0fb;color:#174fa1;border-left:3px solid #235caa;padding-left:12px}
  .sidebar .profile{padding-top:18px;margin-top:auto;overflow-wrap:anywhere}
  .sidebar .profile form{margin-top:8px}
  .menu-toggle{display:none}
  .skip-link{position:fixed;left:16px;top:-100px;padding:12px 18px;background:#174fa1;color:white;z-index:100;border-radius:8px}
  .skip-link:focus{top:12px}
  .content .card{border-radius:var(--layout-radius);padding:26px;box-shadow:0 4px 18px #17346305}
  .grid{gap:20px;min-width:0}.grid>*{min-width:0}
  .stats{grid-template-columns:repeat(3,minmax(0,1fr))}
  .quick-access{gap:16px;padding:16px 20px;flex-wrap:wrap;margin-bottom:24px}
  .quick-access-title{flex:1 1 160px}
  .quick-access-links{gap:8px}
  .quick-access .quick-access-links a{min-height:44px;padding:10px 14px;display:flex;align-items:center;justify-content:center}
  .section-head{flex-wrap:wrap;gap:14px}.section-head>div{min-width:0}
  .filters{flex-wrap:wrap;gap:16px}.filters label{flex:1 1 170px;min-width:0}
  .filters input{max-width:none}.filters>button{flex:0 0 auto}
  .content input:not([type=checkbox]):not([type=radio]),.content select,.content textarea{font-size:16px;min-height:48px;border-radius:9px}
  .content label{font-size:13px;line-height:1.5}
  .content button,.content .button{min-height:44px;line-height:1.4}
  .content :is(input[type=checkbox],input[type=radio]){min-height:20px;min-width:20px}
  .content textarea{min-height:110px}
  .content .table-wrap{max-width:100%;border-radius:10px;overscroll-behavior-x:contain}
  .content th{padding:14px 16px;line-height:1.5;white-space:nowrap}
  .content .authority-sheet th{white-space:normal}
  .content td{padding:18px 16px;overflow-wrap:anywhere;line-height:1.6}
  .content td> a{display:inline-flex;align-items:center;min-height:40px;font-weight:600}
  .content summary{min-height:44px;padding:10px 0;line-height:1.5}
  .content td details{margin:2px 0}
  .content td form button{margin:4px 4px 4px 0}
  .content .badge{font-size:12px;line-height:1.5;padding:5px 11px;white-space:normal}
  .content .empty{padding:48px 20px}
  .notification{gap:18px;overflow-wrap:anywhere}
  .content footer{gap:16px;flex-wrap:wrap;line-height:1.7}
  .content .expired-confirm{align-items:flex-start;gap:10px}
  .content .expired-confirm input{min-width:20px;min-height:20px;height:20px;margin:1px 0 0}
  :is(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline:3px solid #b27b09;outline-offset:4px}
  html[data-theme=dark] .sidebar nav a[aria-current=page]{background:#243b5d;color:#d5e5ff;border-left-color:#8bb9ff}
  html[data-theme=dark] :is(a,button,summary,input,select,textarea,[tabindex]):focus-visible{outline-color:#f2c76b}
  @media(min-width:801px) and (max-width:1150px){
    .sidebar{width:216px;padding:24px 16px}.content{width:calc(100% - 216px);margin-left:216px;padding:28px 24px}
    .content>header{flex-direction:column;gap:14px}.header-right{justify-content:flex-start;max-width:none}
    .stats{grid-template-columns:repeat(3,minmax(0,1fr))}.content .stats .card{padding:20px}.stats h2{font-size:28px}
  }
  @media(max-width:800px){
    .sidebar{position:relative;inset:auto;display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:12px;width:100%;height:auto;padding:14px 20px;border-right:0;border-bottom:1px solid var(--line)}
    .sidebar .agency-brand{flex:1;min-width:0}.sidebar .agency-brand img{width:42px;height:42px}.sidebar .agency-brand small{max-width:190px}
    .sidebar>.eyebrow{display:none}.menu-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:76px;min-height:44px;padding:10px 14px}
    .sidebar nav{flex:0 0 100%;display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:0}
    .sidebar nav a{margin:0;font-size:13px;padding:12px;min-width:0;overflow-wrap:anywhere}
    .sidebar .profile{display:block;flex:0 0 100%;margin:0;padding-top:12px;border-top:1px solid var(--line)}
    .sidebar .profile .avatar{display:none}.sidebar .profile strong,.sidebar .profile small{display:inline-block;margin-right:8px}
    .sidebar .profile form{display:inline-block;float:right;margin:0}
    .sidebar[data-menu-open=false] nav,.sidebar[data-menu-open=false] .profile{display:none}
    .content{width:100%;margin:0;padding:24px 20px 32px}
    .content>header{flex-direction:column;gap:16px;margin-bottom:20px}
    .header-right{justify-content:flex-start;width:100%;max-width:none;gap:8px}
    .header-right .dot{display:none}.header-right .live-status{order:5;flex-basis:100%;width:fit-content}
    .quick-access{padding:14px;gap:12px}.quick-access-title{display:none}.quick-access-links{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .quick-access .quick-access-links a{white-space:normal;font-size:13px;padding:10px}
    .quick-access-links>a:last-child:nth-child(odd){grid-column:1/-1}
    .two,.profile-editor{grid-template-columns:1fr}.profile-preview{order:-1;position:static}
    .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stats>.card:first-child{grid-column:1/-1}
    .content .card{padding:22px;border-radius:14px}.content .stats .card{padding:20px}
    .filters{gap:12px}.filters label{flex-basis:calc(50% - 12px)}
    .notification{flex-direction:column;gap:8px}.notification small{white-space:normal}
    #toast{left:16px;right:16px;bottom:max(16px,env(safe-area-inset-bottom));max-width:none}
    .checkpoint-grid{grid-template-columns:1fr}.checkpoint .checkpoint-details>div{grid-template-columns:1fr 1fr}
    .content .narrow{max-width:none}
    .auth-story{padding:20px 24px}.auth-intro{display:none}.auth-panel{padding:24px 20px}
    .auth-panel .card{margin-top:18px;border-radius:16px;padding:26px}.auth-bottom{margin-top:24px}
  }
  @media(max-width:600px){
    .content{padding:20px 14px 28px}.sidebar{padding:12px 16px}
    .content .card{padding:18px}.content h1{font-size:28px}.content h2{font-size:21px}
    .header-right>button{flex:1 1 140px}.header-right .theme-switch{margin-right:auto}
    .stats{gap:12px}.stats h2{font-size:28px}.stats .eyebrow{letter-spacing:1px;font-size:9px}
    .filters label{flex-basis:100%}.filters>button{flex:1 1 110px}
    .content .records-table,.records-table tbody{display:block;width:100%}
    .records-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
    .content .records-table tbody>tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px 0;border-bottom:1px solid var(--line)}
    .content .records-table tbody>tr:first-child{padding-top:8px}.content .records-table tbody>tr:last-child{border-bottom:0}
    .content .records-table td{display:block;border:0;padding:0;min-width:0;font-size:14px}
    .records-table td::before{content:attr(data-label);display:block;color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.5px;margin-bottom:6px;text-transform:uppercase}
    .records-table td:first-child,.records-table td:last-child,.records-table td[colspan]{grid-column:1/-1}
    .records-table td:last-child{padding-top:10px!important;border-top:1px dashed var(--line)!important}
    .records-table td[colspan]::before{content:none}.records-table td[colspan]{padding:24px 0!important}
    .records-table td strong{font-size:16px}.records-table .expired-action{max-width:none;min-width:0}
    .records-table td form button{min-height:46px}.records-table td:last-child> a{min-height:44px}
    .content .records-table .empty{padding:24px 0}
    .content .section-head .button{width:100%;text-align:center}
    .content footer{font-size:12px;margin-top:24px}.content footer span{display:block}
    .auth-panel{padding:22px 14px}.auth-panel .card{padding:22px 18px}.auth-agency strong{font-size:15px}
    .auth-tabs a{min-height:46px;display:flex;align-items:center;justify-content:center}
    .scene-tiles{gap:8px}.checkpoint-details>div{gap:8px}
    .content .printable{overflow-x:auto}
  }
  @media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
}
@media print{.menu-toggle,.skip-link{display:none!important}}
