/* Shared site header, breadcrumbs and footer (scripts/site-nav.mjs).
   Colours use the shared theme variables so both themes stay readable.
   Selectors start with html[data-theme] body so the generic theme rules in
   site-theme.css cannot repaint the menu (the PR #317 drawer problem). */
.tfbd-site-header,.tfbd-site-footer,.tfbd-crumbs{--tfbd-nav-max:1240px;font-family:"Noto Sans","TFBD Bengali",system-ui,-apple-system,"Segoe UI",sans-serif;box-sizing:border-box}
.tfbd-site-header *,.tfbd-site-footer *,.tfbd-crumbs *{box-sizing:border-box}
.tfbd-site-header [lang=bn],.tfbd-site-footer [lang=bn],.tfbd-home-list [lang=bn]{font-family:"TFBD Bengali","Noto Sans Bengali","Noto Sans",system-ui,sans-serif}
.tfbd-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
html[data-theme] body header.tfbd-site-header{display:block;position:relative;z-index:70;background:var(--site-surface)!important;color:var(--site-text)!important;border-bottom:1px solid var(--site-line)!important;margin:0;padding:0;width:auto;max-width:none;align-self:stretch;justify-self:stretch}
.tfbd-bar{position:relative;display:flex;align-items:center;gap:12px;width:100%;max-width:var(--tfbd-nav-max);margin:0 auto;padding:8px 20px;min-height:64px}
html[data-theme] body .tfbd-site-header a.tfbd-brand{display:inline-flex;align-items:center;gap:8px;flex:0 0 auto;font-size:16px;font-weight:750;line-height:1.2;color:var(--site-text)!important;text-decoration:none;white-space:nowrap;background:transparent!important}
.tfbd-brand img{width:28px;height:28px;flex:0 0 28px}
html[data-theme] body .tfbd-site-header .tfbd-drawer{display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0;background:transparent!important}
.tfbd-drawer-head,.tfbd-icon-btn{display:none}
.tfbd-primary{flex:1 1 auto;min-width:0}
html[data-theme] body :is(.tfbd-site-header,.tfbd-home-sections) nav.tfbd-primary,html[data-theme] body .tfbd-home-sections{background:transparent!important}
.tfbd-sections{display:flex;align-items:stretch;gap:2px;list-style:none;margin:0;padding:0}
.tfbd-section-item{margin:0;padding:0;list-style:none}
html[data-theme] body .tfbd-section>summary{display:flex;flex-direction:column;justify-content:center;gap:1px;min-height:48px;padding:6px 10px;border-radius:10px;cursor:pointer;list-style:none;color:var(--site-text)!important;background:transparent!important;font-size:14px;font-weight:700;line-height:1.2;white-space:nowrap}
.tfbd-section>summary::-webkit-details-marker{display:none}
.tfbd-section>summary .tfbd-bn{font-size:12px;font-weight:500;color:var(--site-muted)}
html[data-theme] body .tfbd-section>summary:hover,html[data-theme] body .tfbd-section[open]>summary{background:var(--site-accent-bg)!important;color:var(--site-accent)!important}
html[data-theme] body .tfbd-section[data-current]>summary{box-shadow:inset 0 -3px var(--site-accent)}
html[data-theme] body .tfbd-section .tfbd-mega{position:absolute;left:20px;right:20px;top:calc(100% - 4px);z-index:80;padding:18px 20px;border:1px solid var(--site-line)!important;border-radius:14px;background:var(--site-surface)!important;color:var(--site-text)!important;box-shadow:0 18px 40px #0b223a24}
html[data-theme] body .tfbd-site-header .tfbd-mega a,html[data-theme] body .tfbd-home-list .tfbd-mega a{color:var(--site-accent)!important;background:transparent!important;text-decoration:none}
html[data-theme] body .tfbd-site-header .tfbd-mega a:hover,html[data-theme] body .tfbd-home-list .tfbd-mega a:hover{text-decoration:underline;color:var(--site-text)!important}
html[data-theme] body .tfbd-mega a[aria-current=page]{font-weight:750;box-shadow:none!important}
.tfbd-mega-hub{display:inline-block;margin:0 0 12px;font-weight:750;font-size:15px}
.tfbd-mega-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px 24px}
.tfbd-mega-title{margin:0 0 6px;font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--site-muted)}
.tfbd-mega-title span{text-transform:none;letter-spacing:0;font-weight:600;margin-left:4px}
.tfbd-mega ul{list-style:none;margin:0;padding:0}
.tfbd-mega li{margin:0;padding:0}
.tfbd-mega li a{display:block;padding:5px 0;font-size:14px;line-height:1.35}
.tfbd-search{display:flex;align-items:center;gap:6px;flex:0 1 270px;min-width:180px;margin:0}
html[data-theme] body .tfbd-search input{flex:1 1 auto;min-width:0;height:40px;min-height:40px;padding:8px 10px;font-size:14px;border:1px solid var(--site-line)!important;border-radius:10px}
html[data-theme] body .tfbd-search button{flex:0 0 auto;min-height:40px;height:40px;padding:0 12px;font-size:13px;font-weight:700}
html[data-theme] body .tfbd-site-header a.tfbd-search-link{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;min-height:40px;padding:0 12px;border:1px solid var(--site-line)!important;border-radius:10px;font-size:14px;font-weight:700;text-decoration:none}
.tfbd-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
html[data-theme] body .tfbd-actions .site-theme-toggle{min-height:40px}
.tfbd-backdrop[hidden]{display:none!important}
html.tfbd-nav-locked,html.tfbd-nav-locked body{overflow:hidden}
/* Breadcrumbs */
.tfbd-crumbs{max-width:var(--tfbd-nav-max);margin:0 auto;padding:10px 20px 0;font-size:14px}
html[data-theme] body nav.tfbd-crumbs{background:transparent!important;color:var(--site-muted)!important}
.tfbd-crumbs ol{display:flex;flex-wrap:wrap;gap:4px 6px;list-style:none;margin:0;padding:0}
.tfbd-crumbs li{margin:0;padding:0;overflow-wrap:anywhere}
.tfbd-crumbs li+li::before{content:"›";margin-right:6px;color:var(--site-muted)}
html[data-theme] body .tfbd-crumbs li[aria-current=page]{background:transparent!important;box-shadow:none!important;color:var(--site-text)!important;font-weight:600}
/* Footer */
html[data-theme] body footer.tfbd-site-footer{display:block;margin:40px 0 0;padding:0;border-top:1px solid var(--site-line)!important;background:var(--site-surface)!important;color:var(--site-text)!important;max-width:none;font-size:14px}
.tfbd-foot-inner{max-width:var(--tfbd-nav-max);margin:0 auto;padding:28px 20px 24px}
html[data-theme] body .tfbd-site-footer nav{background:transparent!important}
.tfbd-foot-cols{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:20px}
.tfbd-foot-title{margin:0 0 8px;font-weight:800;line-height:1.3}
.tfbd-foot-title span{display:block;font-weight:500;font-size:12px;color:var(--site-muted)}
.tfbd-foot-col ul{list-style:none;margin:0;padding:0}
.tfbd-foot-col li{margin:0;padding:3px 0}
html[data-theme] body .tfbd-site-footer a{text-decoration:none}
html[data-theme] body .tfbd-site-footer a:hover{text-decoration:underline}
.tfbd-foot-base{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px 24px;margin-top:22px;padding-top:16px;border-top:1px solid var(--site-line)}
.tfbd-foot-legal{display:flex;flex-wrap:wrap;gap:6px 16px}
html[data-theme] body .tfbd-foot-meta{margin:0;color:var(--site-muted)!important;max-width:640px}
/* Homepage: the section menus sit in the existing header bar. */
.tfbd-home-list{display:flex;gap:2px;margin:0 6px 0 0}
html[data-theme] body .tfbd-home-list .tfbd-mega{left:auto;right:12px;top:100%;width:min(900px,calc(100vw - 32px))}
/* Homepage: #appSidebar carries the shared sections as a stacked accordion at
   every width (fixed column from 981px, drawer below), so there is no second
   homepage drawer or Menu button. */
#appSidebar .tfbd-app-sections{margin:6px 0 4px}
#appSidebar .tfbd-app-primary .tfbd-mobile-sections,#appSidebar .tfbd-mobile-group,#appSidebar .tfbd-mobile-group-list{list-style:none;margin:0;padding:0}
#appSidebar .tfbd-app-primary .tfbd-mobile-sections{display:flex;flex-direction:column;gap:4px}
#appSidebar .tfbd-mobile-group{display:block}
#appSidebar .tfbd-mobile-group-list{display:flex;flex-direction:column;gap:2px}
#appSidebar .tfbd-mobile-group-title{margin:10px 6px 4px;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--site-muted)}
#appSidebar .tfbd-mobile-group-title span{margin-left:6px;font-size:11px;font-weight:600;text-transform:none;letter-spacing:0}
#appSidebar [lang=bn]{font-family:"TFBD Bengali","Noto Sans Bengali","Noto Sans",system-ui,sans-serif}
html[data-theme] body #appSidebar .tfbd-section>summary{flex-direction:row;flex-wrap:wrap;align-items:baseline;justify-content:flex-start;gap:2px 8px;min-height:44px;padding:8px 10px;border:0!important;white-space:normal;font-size:13px;font-weight:700}
html[data-theme] body #appSidebar .tfbd-section>summary .tfbd-bn{font-size:12px}
html[data-theme] body #appSidebar .tfbd-section .tfbd-mega{position:static;width:auto;margin:2px 0 6px;padding:6px 8px 6px 12px;border:0!important;border-left:1px solid var(--site-line)!important;border-radius:0;box-shadow:none!important;background:transparent!important}
#appSidebar .tfbd-section:not([open]) .tfbd-mega{display:none}
#appSidebar .tfbd-mega-cols{display:grid;grid-template-columns:1fr;gap:8px}
#appSidebar .tfbd-mega-hub{margin:0 0 6px;font-size:13px}
html[data-theme] body #appSidebar .tfbd-mega a{display:block;min-height:0;padding:5px 0;font-size:13px;line-height:1.35;color:var(--site-accent)!important;background:transparent!important;border-radius:0;text-decoration:none}
html[data-theme] body #appSidebar .tfbd-mega a:hover{text-decoration:underline;color:var(--site-text)!important}
#appSidebar .tfbd-app-legal{display:flex;flex-wrap:wrap;gap:2px 12px;margin:10px 6px 4px}
html[data-theme] body #appSidebar .tfbd-app-legal a{font-size:12px;color:var(--site-muted)!important;text-decoration:underline;padding:6px 0}
/* Homepage 1181-1279px: the section menus and header tools share one row
   without wrapping under the brand. */
@media(min-width:1181px) and (max-width:1279px){
  html[data-theme] body.member-home .member-header{padding:0 16px!important}
  html[data-theme] body.member-home .member-header>a[href="/"]{min-width:0}
  html[data-theme] body .tfbd-home-list .tfbd-section>summary{padding:6px 7px}
}
/* Desktop dropdowns open one at a time (site-nav.js); keep the menu on screen. */
@media(min-width:1181px){.tfbd-section:not([open]) .tfbd-mega{display:none}}
/* One sidebar (blueprint step 2.1). On inner pages at 1181px and up, the phone
   drawer's five groups are the only navigation sidebar: a 276px column fixed
   under a 72px topbar. Brand, search and the theme toggle stay in the topbar.
   site-nav.js adds a Hide/Show menu button that keeps the choice in
   localStorage; without JavaScript or storage the sidebar simply stays open.
   The homepage keeps its own header. */
.tfbd-mobile-group,.tfbd-mobile-group-list{list-style:none;margin:0;padding:0}
.tfbd-sidebar-toggle{display:none}
@media screen and (min-width:1181px){
  html[data-theme]:has(body header.tfbd-site-header){--tfbd-topbar:72px;--tfbd-sidebar:276px;padding-top:var(--tfbd-topbar);padding-left:var(--tfbd-sidebar);scroll-padding-top:calc(var(--tfbd-topbar) + 12px)}
  html[data-theme].tfbd-sidebar-off:has(body header.tfbd-site-header){padding-left:0}
  html[data-theme] body header.tfbd-site-header{position:fixed!important;top:0;left:0;right:0;height:var(--tfbd-topbar,72px);z-index:70}
  html[data-theme] body header.tfbd-site-header .tfbd-bar{max-width:none;height:100%;min-height:0;padding:0 20px}
  html[data-theme] body header.tfbd-site-header .tfbd-drawer{display:contents!important}
  html[data-theme] body header.tfbd-site-header .tfbd-search,html[data-theme] body header.tfbd-site-header a.tfbd-search-link{margin-left:auto}
  html[data-theme] body header.tfbd-site-header nav.tfbd-primary{position:fixed;top:var(--tfbd-topbar,72px);left:0;bottom:0;width:var(--tfbd-sidebar,276px);max-height:none;margin:0;border-radius:0;box-shadow:none;overflow-y:auto;overscroll-behavior:contain;padding:12px 12px 28px;border-right:1px solid var(--site-line)!important;background:var(--site-surface)!important}
  html.tfbd-sidebar-off body header.tfbd-site-header nav.tfbd-primary{display:none!important}
  html.tfbd-js .tfbd-sidebar-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;min-height:40px;min-width:40px;padding:0 10px;border:1px solid var(--site-line)!important;border-radius:10px;background:transparent!important;color:var(--site-text)!important;font:700 13px/1 inherit;cursor:pointer}
  .tfbd-sidebar-toggle:focus-visible{outline:3px solid var(--site-accent);outline-offset:2px}
  header.tfbd-site-header .tfbd-sections{flex-direction:column;gap:4px}
  header.tfbd-site-header .tfbd-mobile-sections{gap:6px}
  .tfbd-mobile-group-title{margin:10px 4px 4px;font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--site-muted)}
  .tfbd-mobile-group-title span{margin-left:6px;font-size:12px;font-weight:600;text-transform:none;letter-spacing:0}
  .tfbd-mobile-group-list{display:flex;flex-direction:column;gap:2px}
  html[data-theme] body header.tfbd-site-header .tfbd-section>summary{flex-direction:row;align-items:baseline;justify-content:flex-start;gap:8px;min-height:40px;padding:8px 10px;white-space:normal}
  html[data-theme] body header.tfbd-site-header .tfbd-section[data-current]>summary{box-shadow:inset 3px 0 var(--site-accent)}
  html[data-theme] body header.tfbd-site-header .tfbd-section .tfbd-mega{position:static;margin:2px 0 6px;padding:8px 10px 8px 14px;border:0!important;border-left:1px solid var(--site-line)!important;border-radius:0;box-shadow:none}
  header.tfbd-site-header .tfbd-mega-cols{grid-template-columns:1fr;gap:8px}
  header.tfbd-site-header .tfbd-mega-hub{margin:0 0 6px;font-size:14px}
  header.tfbd-site-header .tfbd-mega li a{padding:4px 0;font-size:14px}
  html[data-theme]:has(body header.tfbd-site-header):not(.tfbd-sidebar-off) .tfbd-analytics-consent{left:calc(var(--tfbd-sidebar,276px) + 12px)!important}
}
/* Publisher pages (contact, about, terms and the trade-finance guides) style
   body.publisher>header for their old brand bar; site-theme.css's rule also
   caught the shared header and squeezed the logo at 390px. */
html[data-theme] body.publisher>header.tfbd-site-header{display:block!important;gap:0!important;padding:0!important;background:var(--site-surface)!important;color:var(--site-text)!important;border:0!important;border-bottom:1px solid var(--site-line)!important;border-radius:0!important}
html[data-theme] body.publisher>header.tfbd-site-header nav{display:block!important;gap:0!important}
html[data-theme] body.publisher .tfbd-site-header :is(.tfbd-icon-btn,.tfbd-sidebar-toggle,.tfbd-search button){width:auto}
/* portal-theme.css draws a 16px gradient strip above any body>header; the
   shared topbar has its own bottom rule, so the strip only added height. */
html[data-theme] body>header.tfbd-site-header::before{content:none!important;display:none!important}
@media(max-width:1180px){
  .tfbd-home-list{display:none}
  .tfbd-icon-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px}
  html[data-theme] body .tfbd-site-header .tfbd-icon-btn{min-height:44px;min-width:44px;padding:0 10px;font-size:14px;font-weight:700}
  .tfbd-search-open{margin-left:auto}
  .tfbd-brand span{overflow:hidden;text-overflow:ellipsis}
  html[data-theme] body .tfbd-site-header a.tfbd-brand{flex:0 1 auto;min-width:0}
  /* Without JavaScript the menu is shown in place, so every link stays reachable. */
  html:not(.tfbd-js) .tfbd-icon-btn{display:none}
  html:not(.tfbd-js) .tfbd-bar{flex-wrap:wrap}
  html:not(.tfbd-js) body .tfbd-site-header .tfbd-drawer{flex:1 1 100%;flex-direction:column;align-items:stretch}
  html.tfbd-js body .tfbd-site-header .tfbd-drawer{display:none}
  html.tfbd-js body .tfbd-site-header[data-open] .tfbd-drawer{display:flex;position:fixed;top:0;right:0;bottom:0;z-index:90;width:min(400px,88vw);flex-direction:column;align-items:stretch;gap:12px;padding:12px 16px 24px;overflow-y:auto;overscroll-behavior:contain;background:var(--site-surface)!important;color:var(--site-text)!important;border-left:1px solid var(--site-line);box-shadow:-12px 0 40px #0b223a33}
  html[data-theme] body .tfbd-site-header .tfbd-backdrop{position:fixed;inset:0;z-index:85;background:#0b1a2a8c!important;border:0}
  .tfbd-drawer-head{display:flex;order:-2;align-items:center;justify-content:space-between;font-weight:800}
  .tfbd-search{order:-1;flex:0 0 auto;min-width:0}
  .tfbd-sections{flex-direction:column;gap:4px}
  .tfbd-mobile-sections{gap:10px}
  .tfbd-mobile-group{list-style:none;margin:0;padding:0}
  .tfbd-mobile-group-title{margin:7px 0 4px;font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--site-muted)}
  .tfbd-mobile-group-title span{margin-left:6px;font-size:12px;font-weight:600;text-transform:none;letter-spacing:0}
  .tfbd-mobile-group-list{display:flex;flex-direction:column;gap:4px;list-style:none;margin:0;padding:0}
  html[data-theme] body .tfbd-section>summary{flex-direction:row;align-items:baseline;justify-content:flex-start;gap:8px;min-height:48px;padding:10px 12px;border:1px solid var(--site-line)!important;white-space:normal}
  html[data-theme] body .tfbd-section .tfbd-mega{position:static;margin:6px 0 4px;padding:10px 12px;box-shadow:none;border-radius:10px}
  .tfbd-mega-cols{grid-template-columns:1fr;gap:10px}
  .tfbd-mega li a{padding:8px 0;font-size:15px}
  .tfbd-actions{justify-content:flex-start}
  .tfbd-foot-cols{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:640px){
  /* Homepage: brand and Menu share the first row; the header tools wrap below. */
  html[data-theme] body.member-home .member-header>a[href="/"]{flex:1 1 auto;min-width:0}
}
@media(max-width:600px){
  .tfbd-bar{padding:6px 12px;gap:6px;min-height:58px}
  .tfbd-menu-open span{display:none}
  .tfbd-crumbs{padding:8px 14px 0;font-size:13px}
  .tfbd-foot-inner{padding:22px 14px}
  .tfbd-foot-cols{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 14px}
}
@media print{.tfbd-site-header,.tfbd-site-footer,.tfbd-crumbs{display:none!important}}
@media(prefers-reduced-motion:reduce){.tfbd-site-header *{transition:none!important}}
/* Homepage workspace: "AI Search" names its two searches instead of repeating the Policy view. */
#appSidebar .unified-search-label{margin:0;padding:9px 12px 4px;font-size:13px;font-weight:750;color:var(--site-text,inherit)}
