/* PRO22_37: scoped launcher, genuine notifications, account panel, interior scrolling. */
.b37-head-btn,
.b37-account-toggle{flex:0 0 auto;position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:39px;min-height:39px;min-width:39px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);box-shadow:0 2px 10px rgba(34,29,80,.035);transition:background .15s,border-color .15s}
.b37-head-btn:hover,.b37-account-toggle:hover,.b37-head-btn[aria-expanded="true"],.b37-account-toggle[aria-expanded="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
.b37-account-toggle{max-width:200px;padding:4px 10px 4px 4px;text-decoration:none}
.b37-account-toggle>.label{max-width:126px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:670}
.b37-account-toggle .b37-avatar{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;border-radius:50%;overflow:hidden;background:linear-gradient(145deg,#8663f1,#4d36c5);color:#fff;font-size:11px;font-weight:800;letter-spacing:.025em}
.b37-avatar .ui-icon{width:18px;height:18px}
.b37-avatar img,.b37-account-picture img,.b37-account-page-avatar img{width:100%;height:100%;display:block;object-fit:cover}
.b37-head-btn .ui-icon{width:20px;height:20px}
.b37-bell .b37-unread{position:absolute;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 3px;border-radius:20px;background:var(--accent);color:var(--on-accent);font-weight:800;font-size:9px;line-height:17px;box-shadow:0 0 0 2px var(--surface);text-align:center}
.b37-actions,.top-actions{isolation:isolate}
.b37-popover{box-sizing:border-box;position:fixed;z-index:1000;display:flex;flex-direction:column;width:min(370px,calc(100vw - 24px));padding:14px;border:1px solid var(--line);border-radius:21px;background:var(--surface);color:var(--text);box-shadow:0 24px 60px rgba(17,19,49,.24);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.b37-popover[hidden]{display:none!important}
.b37-popover-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px 2px}
.b37-popover-head>strong{font-size:16px;letter-spacing:-.02em}
.b37-popover-close{width:30px;height:30px;min-width:30px;min-height:30px;border-radius:10px;background:var(--surface2)!important;color:var(--muted)!important}
.b37-app-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.b37-app-tile{display:flex;align-items:center;flex-direction:column;justify-content:flex-start;min-width:0;min-height:99px;gap:7px;padding:9px 4px;border-radius:14px;text-decoration:none;color:var(--text);text-align:center;transition:background .15s,transform .15s}
.b37-app-tile[href]:hover{background:var(--surface2);transform:translateY(-1px)}
.b37-app-tile.b37-unavailable{opacity:.58;cursor:default}
.b37-app-mark{display:grid;place-items:center;width:46px;height:46px;border-radius:15px;background:var(--accent);color:#fff;box-shadow:0 4px 12px rgba(30,25,90,.08);font-size:16px;font-weight:800;letter-spacing:-.02em}
.b37-tone-violet{background:linear-gradient(145deg,#7969f0,#5139c4)}.b37-tone-blue{background:linear-gradient(145deg,#4c8afd,#265fcd)}.b37-tone-cyan{background:linear-gradient(145deg,#19bad0,#188cab)}.b37-tone-indigo{background:linear-gradient(145deg,#687cfb,#4b50c3)}.b37-tone-pink{background:linear-gradient(145deg,#f963a7,#cf3e82)}.b37-tone-amber{background:linear-gradient(145deg,#ecaa37,#b8751b)}
.b37-app-name{font-size:11px;line-height:1.25;font-weight:650;overflow-wrap:anywhere}
.b37-app-note{color:var(--muted);font-size:10px}
.b37-popover-body,.b37-account-body{min-height:0}
.b37-notification-list{display:flex;flex-direction:column;gap:7px}
.b37-notification{display:flex;flex-direction:column;gap:3px;padding:11px 12px;background:var(--surface2);border:1px solid var(--line);border-radius:12px;min-width:0}
.b37-notification-unread{border-left:3px solid var(--accent)}
.b37-notification strong{font-size:13px;overflow-wrap:anywhere}
.b37-notification p{margin:0;color:var(--muted);font-size:12px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.b37-notification-date{font-size:10px;color:var(--muted)}
.b37-notification-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-top:13px}
.b37-notification-actions .b37-action{flex:1 1 130px;min-width:0;font-size:12px;white-space:normal}
.b37-notification-all{font-size:12px;color:var(--accent);text-decoration:none}
.b37-message{margin:10px 0 16px;color:var(--muted);font-size:13px;line-height:1.55}
.b37-account-summary{display:flex;gap:12px;align-items:center;min-width:0;margin:1px 0 14px;padding:15px 13px;border:1px solid var(--line);border-radius:16px;background:var(--surface2)}
.b37-account-picture{width:51px;height:51px;flex:0 0 51px;border-radius:50%;display:grid;place-items:center;overflow:hidden;color:#fff;background:linear-gradient(135deg,#8663f1,#4d36c5);font-weight:800}
.b37-account-copy{min-width:0;display:flex;flex-direction:column;gap:2px}
.b37-account-copy strong{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.b37-account-copy span{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.b37-account-copy small{font-size:11px;color:var(--accent);font-weight:650}
.b37-account-nav{display:flex;flex-direction:column;gap:4px}
.b37-panel-link{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:40px;padding:10px 13px;border:0;border-radius:10px;text-decoration:none;background:transparent;color:var(--text);font:inherit;font-size:13px;font-weight:600;cursor:pointer;text-align:left}
.b37-panel-link:hover,.b37-panel-link:focus-visible{background:var(--surface2);color:var(--accent)}
.b37-primary-link{background:var(--accent);color:var(--on-accent);justify-content:center}
.b37-account-page-avatar{position:relative;display:grid;place-items:center;overflow:hidden;border-radius:50%;background:linear-gradient(145deg,#8068ee,#5539bd);color:#fff}
.b37-account-page-avatar .b37-initials{font-size:20px;font-weight:800}
/* Dashboard/sidebar stay in place; only contents and navigation lists scroll. */
@media screen {
  body:has(> .ui12-layout){overflow:hidden;height:100dvh}
  .ui12-layout{height:100dvh;min-height:0;max-height:100dvh;overflow:hidden}
  .ui12-layout>.main{height:100%;min-height:0;min-width:0;display:flex;flex-direction:column;overflow:hidden}
  .ui12-layout>.main>.topbar{flex:0 0 var(--top);position:relative;top:auto;min-height:var(--top)}
  .ui12-layout>.main>.content{flex:1 1 auto;width:100%;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
  .ui12-layout .sidebar-nav{overflow-y:auto}
  /* Only the Bigger search home is viewport-fixed; legal and result pages keep natural page scroll. */
  body.home25{height:100dvh;min-height:0;max-height:100dvh;overflow:hidden}
  body.home25>.public-header,body.home25>.footer25,body.home25>.locale24{flex:0 0 auto}
  body.home25>.web7-home{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
}
@media(max-width:760px){
  .public-header .b37-actions{gap:6px}
  .b37-account-toggle{max-width:140px;padding-right:6px}
  .b37-account-toggle>.label{max-width:75px}
  .b37-head-btn{width:36px;min-width:36px;height:36px;min-height:36px}
  .b37-popover{border-radius:18px;padding:12px}
  .ui12-layout .topbar .top-actions{gap:4px}
}
@media(max-width:560px){
  .b37-account-toggle{min-width:38px;padding:3px;max-width:44px}
  .b37-account-toggle>.label{display:none}
  .b37-avatar{width:30px;height:30px}
  .public-header .b37-actions{margin-left:auto;flex-shrink:0}
  .public-header .b37-head-btn{min-height:36px;height:36px;width:36px;min-width:36px}
  .b37-app-mark{width:43px;height:43px}
}
@media print{
  body:has(> .ui12-layout),body.home25{height:auto!important;max-height:none!important;overflow:visible!important}
  .ui12-layout,.ui12-layout>.main,.ui12-layout>.main>.content,body.home25>.web7-home{height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important}
  .b37-popover{display:none!important}
}

/* FIX4: Remove accidental outlines after touch on navigation text only.
   Keyboard navigation removes the modality flag in bigger-header37.js. */
html[data-b37-input="pointer"] .ui-brand:focus-visible,
html[data-b37-input="pointer"] .public-nav a:focus-visible,
html[data-b37-input="pointer"] .sidebar-brand a:focus-visible,
html[data-b37-input="pointer"] .sidebar-nav .nav-btn:focus-visible,
html[data-b37-input="pointer"] .sidebar-nav summary:focus-visible{outline:none!important;box-shadow:none!important}

/* FIX6: modality is set before painting; preserve real keyboard focus. */
html[data-b37-input="pointer"] :is(.ui12-layout,.public-header,.ui12-hub,.ai37-page) :is(a,button,summary,[tabindex="-1"]):focus {outline:none!important}
html[data-b37-input="keyboard"] :is(a,button,summary,[tabindex]):focus-visible {outline:2px solid var(--accent);outline-offset:3px}
html[data-b37-route]:not([data-b37-route-ready]) .ui12-hub .view {display:none!important}
.remember37-choice{display:flex;align-items:center;gap:10px;margin:16px 0;font-size:14px}
.remember37-choice input{width:19px!important;height:19px;min-height:19px!important;flex:none}
.b37-avatar{contain:layout paint}

/* FIX7: no AJAX navigation/cache of private pages. New documents still authenticate server-side.
   Supporting browsers keep header snapshots stable; others retain ordinary navigation. */
@view-transition { navigation:auto; }
@media (prefers-reduced-motion:no-preference){
  .public-header,.ui12-layout>.main>.topbar{view-transition-name:bigger-header37}
  ::view-transition-old(bigger-header37),::view-transition-new(bigger-header37){animation:none;mix-blend-mode:normal}
  ::view-transition-group(bigger-header37){animation:none}
  ::view-transition-old(root),::view-transition-new(root){animation-duration:0s}
}
@media (prefers-reduced-motion:reduce){@view-transition { navigation:none; }}

/* FIX7 local language control. Reuses the existing language preference, no new cookies. */
.b37-language-control{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:10px 12px;font-size:13px;color:var(--text)}
.b37-language-control select{min-width:0;max-width:65%;width:auto;min-height:36px;color:var(--text);background:var(--surface2);border:1px solid var(--line);border-radius:9px;padding:5px 8px;font:inherit}
