/* Opt-in Mini App shell/reader chrome. No selectors target the ordinary store. */
html body .app-shell.sc-navigation-shell > .sc-navigation-topbar.sc-navigation-topbar{
  position:sticky;
  top:0;
  z-index:calc(var(--layer-sticky,3) + 2);
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  column-gap:var(--space-1,4px);
  height:52px;
  min-height:52px;
  margin-inline:0;
  padding:var(--space-1,4px) 0;
  border:0;
  border-radius:0;
  background:var(--color-bg,#050b12);
}
html body .app-shell.sc-navigation-shell.is-shop > .sc-navigation-topbar.sc-navigation-topbar{
  padding-inline:var(--space-page,16px);
}
html body .app-shell.sc-navigation-shell > .sc-navigation-topbar.sc-navigation-topbar > .brand{
  grid-column:2;
  grid-row:1;
  justify-self:center;
  justify-content:center;
  min-width:44px;
  min-height:44px;
  width:auto;
  max-width:100%;
  padding:0;
  gap:var(--space-2,8px);
}
html body .sc-navigation-shell > .sc-navigation-topbar .brand-mark{width:23px;height:23px;flex:0 0 23px}
html body .sc-navigation-shell > .sc-navigation-topbar .brand-wordmark{width:105px;max-width:100%;height:auto}
html body .sc-navigation-shell > .sc-navigation-topbar > .sc-topbar-actions{
  grid-column:3;
  grid-row:1;
  display:flex;
  align-items:center;
  gap:0;
  min-width:0;
  justify-content:flex-end;
}
html body .sc-navigation-shell > .sc-navigation-topbar > .sc-topbar-leading{
  grid-column:1;
  grid-row:1;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  gap:0;
}
html body .app-shell.sc-navigation-shell > .sc-navigation-topbar.sc-navigation-topbar .sc-topbar-back,
html body .app-shell.sc-navigation-shell > .sc-navigation-topbar.sc-navigation-topbar .sc-topbar-action{
  position:relative;
  inset:auto;
  display:grid;
  place-items:center;
  flex:0 0 44px;
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  margin:0;
  padding:0;
  border:0;
  border-radius:var(--radius-small,8px);
  background:transparent;
  color:var(--color-ice,#a3ccff);
  box-shadow:none;
}
html body .app-shell.sc-navigation-shell:not(.is-shop) > .sc-navigation-topbar .shop-cart{display:none}
html body .sc-navigation-shell > .sc-navigation-topbar .sc-topbar-action svg{
  width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
html body .sc-navigation-shell > .sc-navigation-topbar .sc-topbar-back:disabled{opacity:.4;cursor:default}
html body .sc-navigation-shell > .sc-navigation-topbar :is(a,button):focus-visible{outline:2px solid var(--color-focus,var(--color-ice));outline-offset:-2px}
html body .sc-navigation-shell > .sc-navigation-topbar :is(.sc-topbar-back,.sc-topbar-action):active{background:var(--control-pressed)}
@media(hover:hover){html body .sc-navigation-shell > .sc-navigation-topbar :is(.sc-topbar-back,.sc-topbar-action):hover{background:var(--control-hover)}}
/* Keep jump destinations below the pinned bar; readers retain their TOC-aware offset. */
.sc-navigation-shell.app :is([id],h1,h2,h3){scroll-margin-top:calc(var(--sc-topbar-height,52px) + var(--space-4,16px))}
html body .app-shell.sc-navigation-shell:not(.is-shop):not(.has-native-form) > main{
  padding-bottom:calc(max(100px,var(--sc-nav-space,80px)) + env(safe-area-inset-bottom));
}
@media(max-width:380px){
  html body .sc-navigation-shell > .sc-navigation-topbar .brand-mark{display:none}
  html body .sc-navigation-shell > .sc-navigation-topbar .brand-wordmark{width:92px}
}

/* Five 44px actions and the brand must fit the actual content width. */
@media(max-width:430px){
  html body .app-shell.sc-navigation-shell:is(.is-shop,.reader-shell) > .sc-navigation-topbar .brand-mark{display:none}
  html body .app-shell.sc-navigation-shell:is(.is-shop,.reader-shell) > .sc-navigation-topbar .brand-wordmark{width:92px}
}
@media(max-width:350px){
  html body .app-shell.sc-navigation-shell:is(.is-shop,.reader-shell) > .sc-navigation-topbar .brand-mark{display:block}
  html body .app-shell.sc-navigation-shell:is(.is-shop,.reader-shell) > .sc-navigation-topbar .brand-wordmark{display:none}
}

@media(max-width:374px){
  html body .app-shell.sc-navigation-shell.reader-shell > .sc-navigation-topbar .brand-mark{display:block}
  html body .app-shell.sc-navigation-shell.reader-shell > .sc-navigation-topbar .brand-wordmark{display:none}
}

/* Pointer transfers must also win over the reader's later glass focus rule. */
html body.reader-page .reader-shell.sc-navigation-shell [data-pointer-focus]:is(:focus,:focus-visible){outline:none!important}

/* A transparent cart must not blur the badge protruding beyond its circle. */
html[data-sc-glass="smoke-v3"] body .app-shell.sc-navigation-shell > .sc-navigation-topbar .shop-cart{background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
html body .app-shell.sc-navigation-shell .shop-cart [data-shop-count]{box-shadow:none;text-shadow:none;filter:none;backdrop-filter:none;-webkit-backdrop-filter:none}
