/* Business Times masthead, adapted from the F1 V13 story. */
.bt-masthead,.mobile-nav{
  --bt-header-bg:var(--paper);
  --bt-header-ink:var(--ink);
  --bt-header-rule:var(--border);
  --bt-social-bg:transparent;
  --bt-nav-active:var(--selected);
  --bt-logo-filter:invert(1);
}
.bt-masthead{
  --bt-header-bg:var(--intro-sky);
  --bt-header-ink:var(--intro-ink);
  position:relative;z-index:41;background:var(--bt-header-bg);color:var(--bt-header-ink);border-bottom:1px solid var(--bt-header-rule)
}
html[data-theme="dark"] .bt-masthead,html[data-theme="dark"] .mobile-nav{
  --bt-social-bg:rgba(255,255,255,.06);
  --bt-logo-filter:none
}
body:not(.paper-surface):not(.reporting-mode) .mobile-nav{
  --bt-header-bg:var(--ocean);
  --bt-header-ink:var(--scene-text);
  --bt-header-rule:rgba(245,239,223,.3);
  --bt-nav-active:var(--scene-text)
}
body.paper-surface .mobile-nav{
  --bt-header-bg:var(--intro-sky);
  --bt-header-ink:var(--intro-ink);
  --bt-nav-active:var(--intro-ink)
}
.bt-masthead__inner{display:flex;width:min(calc(100% - 32px),1180px);min-height:64px;margin-inline:auto;align-items:center;justify-content:space-between;gap:16px}
.bt-masthead__brand{display:block;width:clamp(188px,18vw,232px);height:auto;filter:var(--bt-logo-filter)}
.bt-masthead__socials{display:flex;align-items:center;gap:10px}
.bt-masthead__socials a{display:grid;width:28px;height:28px;place-items:center;border:1px solid var(--bt-header-rule);border-radius:50%;background:var(--bt-social-bg);color:var(--bt-header-ink);font-size:12px;font-weight:800;line-height:1;text-decoration:none}
.bt-masthead__socials a:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
/* Match the opening content bounds on tablet and desktop. */
@media(min-width:768px){.bt-masthead__inner{width:min(calc(100% - 56px),1024px)}}
@media(min-width:1024px){#surfaceSection{padding-top:36px}}
.chapter-navigation{display:contents}
@media(max-width:1366px){
  .chapter-navigation{display:block;position:sticky;top:var(--safe-top);z-index:38}
  .chapter-navigation .story-progress{position:absolute;top:100%;left:0;width:100%}
  .bottom-dock{display:none}
  .mobile-nav{display:flex;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;position:relative;top:0;bottom:auto;left:auto;right:auto;z-index:38;width:100%;max-width:none;min-height:49px;margin:0;padding:0 12px;gap:16px;border:0;border-bottom:1px solid var(--bt-header-rule);border-radius:0;background:var(--bt-header-bg);box-shadow:none;backdrop-filter:none}
  .mobile-nav::-webkit-scrollbar{display:none}
  .mobile-nav>:first-child{margin-left:auto}
  .mobile-nav>:last-child{margin-right:auto}
  .mobile-nav button{flex:0 0 auto;scroll-snap-align:center;border:0;background:transparent;white-space:nowrap;min-height:48px;padding:10px 2px;border-radius:0;color:var(--bt-header-ink);font-weight:750}
  .mobile-nav button.active{background:transparent;color:var(--bt-nav-active);box-shadow:inset 0 3px currentColor}
  #surfaceSection{padding-top:24px}
  #reporting,.reporting-inner section{scroll-margin-top:calc(65px + var(--safe-top))}
}
@media(max-width:767px){
  .bt-masthead{padding-top:var(--safe-top)}
  .bt-masthead__brand{width:172px}
  .bt-masthead__socials{gap:8px}
  .bt-masthead__socials a{width:26px;height:26px;font-size:10px}
  #surfaceSection{padding-top:20px}
}
/* Include the masthead and navigation in the opening viewport. */
@media(max-width:1366px){
  #surfaceSection{min-height:calc(100svh - 114px - var(--safe-top))}
}
@media(min-width:1367px) and (orientation:portrait){
  #surfaceSection{min-height:calc(100svh - 65px)}
}

/* Reading depth stays fixed beneath the visible navigation as titles scroll. */
.bottom-dock{max-width:calc(100% - 32px);overflow-x:auto;scrollbar-width:none}
.bottom-dock::-webkit-scrollbar{display:none}
.bottom-dock .dock-item,.bottom-dock .dock-divider{flex-shrink:0}
.story-progress{position:fixed;z-index:39;height:3px;pointer-events:none;overflow:hidden;background:color-mix(in srgb,var(--ink) 22%,transparent);color:var(--selected)}
.story-progress__fill{display:block;width:100%;height:100%;background:currentColor;transform:scaleX(var(--story-progress,0));transform-origin:left}
.story-progress i{position:absolute;top:0;bottom:0;width:1px;background:var(--paper);opacity:.7}
body.paper-surface .story-progress{color:var(--intro-ink);background:color-mix(in srgb,var(--intro-ink) 22%,transparent)}
body:not(.paper-surface):not(.reporting-mode) .story-progress{color:var(--scene-text);background:color-mix(in srgb,var(--scene-text) 25%,transparent)}
