/* V36.10.29 / V36.10.30 — Decouple the fixed category control from the flowing ticker.
   Do not anchor the menu toggle to the ticker's centered row. The older
   V36.10.28 rule put BOTH elements into document flow and caused overlap. */
@media (min-width:420px) and (hover:hover) and (pointer:fine) {
  html body #header-menu-row.header-menu-row {
    position:relative!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    width:min(1480px,calc(100vw - 132px))!important;
    max-width:min(1480px,calc(100vw - 132px))!important;
    min-width:0!important;
    min-height:36px!important;
    height:36px!important;
    margin:8px auto 4px!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:0!important;
    transform:none!important;
    pointer-events:auto!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    z-index:auto!important;
  }
  /* Fixed independent button, not a fixed header row or fixed ticker. */
  html body #header-menu-row.header-menu-row #mobile-menu-toggle.mobile-menu-toggle {
    display:inline-flex!important;
    position:fixed!important;
    top:calc(var(--v36-header-height,104px) + 7px)!important;
    left:14px!important;
    right:auto!important;
    bottom:auto!important;
    width:40px!important;
    min-width:40px!important;
    max-width:40px!important;
    height:36px!important;
    min-height:36px!important;
    flex:none!important;
    order:0!important;
    margin:0!important;
    transform:none!important;
    z-index:1818!important;
    pointer-events:auto!important;
  }
  /* This strip is part of the document. On widescreen it is symmetrically
     centered; at narrow desktop sizes its left edge clears the 54px menu. */
  html body #header-menu-row.header-menu-row #site-ticker.site-ticker:not([hidden]),
  html body #header-menu-row.header-menu-row #site-ticker.site-ticker.site-ticker-resting:not([hidden]) {
    position:relative!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:36px!important;
    flex:1 1 100%!important;
    margin:0!important;
    transform:none!important;
    z-index:auto!important;
  }
  /* Drawer tracks the same header as its fixed toggle, never the main cards. */
  html body #app-sidebar.app-sidebar {
    top:calc(var(--v36-header-height,104px) + 50px)!important;
  }
  html.v169-header-scrolled body #header-menu-row.header-menu-row #mobile-menu-toggle.mobile-menu-toggle {
    top:8px!important;
  }
  html.v169-header-scrolled body #app-sidebar.app-sidebar {
    top:51px!important;
  }
}
@media (min-width:420px) and (max-width:760px) and (hover:hover) and (pointer:fine) {
  html body #header-menu-row.header-menu-row #mobile-menu-toggle.mobile-menu-toggle,
  html.v169-header-scrolled body #header-menu-row.header-menu-row #mobile-menu-toggle.mobile-menu-toggle {
    top:calc(var(--v170-header-height,var(--v36-header-height,56px)) + 7px)!important;
  }
  html body #app-sidebar.app-sidebar,
  html.v169-header-scrolled body #app-sidebar.app-sidebar {
    top:calc(var(--v170-header-height,var(--v36-header-height,56px)) + 50px)!important;
  }
}
/* V36.10.30: Strengthen and lengthen the LEFT decorative fade only.
   The unmodified 18px glyph mask below still controls text readability;
   no speaker background or standalone tile is drawn. */
html body #header-menu-row #site-ticker.site-ticker:not([hidden])::before,
html body #header-menu-row #site-ticker.site-ticker.site-ticker-resting:not([hidden])::before {
  inset:0!important;
  border-top:1px solid var(--border-color,rgba(145,166,203,.34))!important;
  border-bottom:1px solid var(--border-color,rgba(145,166,203,.34))!important;
  border-left:0!important;
  border-right:0!important;
  background:transparent!important;
  -webkit-mask-image:linear-gradient(to right,
    transparent 0px, rgba(0,0,0,.12) 16px,
    rgba(0,0,0,.48) 32px, #000 52px,
    #000 58%, transparent 100%)!important;
  mask-image:linear-gradient(to right,
    transparent 0px, rgba(0,0,0,.12) 16px,
    rgba(0,0,0,.48) 32px, #000 52px,
    #000 58%, transparent 100%)!important;
}
html body #header-menu-row #site-ticker.site-ticker:not([hidden])::after,
html body #header-menu-row #site-ticker.site-ticker.site-ticker-resting:not([hidden])::after {
  inset:0!important;
  background:linear-gradient(to right,
    transparent 0px,
    color-mix(in srgb,var(--bg-surface,#182640) 12%,transparent) 16px,
    color-mix(in srgb,var(--bg-surface,#182640) 48%,transparent) 32px,
    color-mix(in srgb,var(--bg-surface,#182640) 88%,transparent) 52px,
    color-mix(in srgb,var(--bg-surface,#182640) 88%,transparent) 54%,
    color-mix(in srgb,var(--bg-surface,#182640) 50%,transparent) 82%,
    transparent 100%)!important;
}
html body #header-menu-row #site-ticker.site-ticker:not(.site-ticker-static) .site-ticker-viewport {
  -webkit-mask-image:linear-gradient(to right,transparent 0px,#000 18px,
    #000 calc(100% - var(--site-ticker-fade-size,24px)),transparent 100%)!important;
  mask-image:linear-gradient(to right,transparent 0px,#000 18px,
    #000 calc(100% - var(--site-ticker-fade-size,24px)),transparent 100%)!important;
}

/* V36.10.30: Smaller desktop-only vertical gap beneath the ticker.
   Leave room for the card edge without moving the fixed left menu/drawer.
   Phone/touch layout remains unchanged. */
@media (min-width:420px) and (hover:hover) and (pointer:fine) {
  html body main.main-container,
  html body.dashboard-home main.main-container,
  html body.dashboard-tab-mode main.main-container {
    padding-top:5px!important;
  }
}
/* The desktop layout rules from older files set padding on the main shell
   with higher specificity. Match those states so a desktop Admin/Customer page
   actually receives the smaller top padding, without moving the left drawer. */
@media (min-width:420px) and (hover:hover) and (pointer:fine) {
  html body.sidebar-expanded.dashboard-tab-mode main.main-container,
  html body.sidebar-collapsed.dashboard-tab-mode main.main-container,
  html body.sidebar-expanded.dashboard-home main.main-container,
  html body.sidebar-collapsed.dashboard-home main.main-container,
  html body.sidebar-expanded main.main-container,
  html body.sidebar-collapsed main.main-container,
  html body main.main-container {
    padding-top:5px!important;
  }
}


/* V36.10.34 — Keep the masked viewport composited across ticker pauses.
   The older stylesheet applies visibility:hidden to the entire viewport while
   resting. Some Chromium builds defer repainting that masked layer until scroll.
   Hide only the glyphs in a break; never suppress the viewport layer itself. */
html body #site-ticker.site-ticker.site-ticker-resting .site-ticker-viewport,
html body #header-menu-row #site-ticker.site-ticker.site-ticker-resting .site-ticker-viewport {
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
html body #header-menu-row #site-ticker.site-ticker.site-ticker-resting .site-ticker-text {
  opacity:0!important;
}
html body #header-menu-row #site-ticker.site-ticker:not(.site-ticker-resting) .site-ticker-text {
  opacity:1!important;
}


/* V36.10.35 — independent opacity/color settings; retain existing edge fades. */
html body #header-menu-row #site-ticker.site-ticker:not([hidden]),
html body #header-menu-row #site-ticker.site-ticker.site-ticker-resting:not([hidden]) {
  opacity:1!important;
  --ticker-visual-color:var(--site-ticker-custom-color,var(--bg-surface,#182640));
  --ticker-visual-tint:color-mix(in srgb,var(--ticker-visual-color) var(--site-ticker-bg-opacity,90%),transparent);
}
html body #header-menu-row #site-ticker.site-ticker:not([hidden])::after,
html body #header-menu-row #site-ticker.site-ticker.site-ticker-resting:not([hidden])::after {
  background:linear-gradient(to right,
    transparent 0px,
    color-mix(in srgb,var(--ticker-visual-tint) 12%,transparent) 16px,
    color-mix(in srgb,var(--ticker-visual-tint) 48%,transparent) 32px,
    color-mix(in srgb,var(--ticker-visual-tint) 88%,transparent) 52px,
    color-mix(in srgb,var(--ticker-visual-tint) 88%,transparent) 54%,
    color-mix(in srgb,var(--ticker-visual-tint) 50%,transparent) 82%,
    transparent 100%)!important;
}
html body #header-menu-row #site-ticker.site-ticker:not([hidden])::before,
html body #header-menu-row #site-ticker.site-ticker.site-ticker-resting:not([hidden])::before {
  border-top-color:color-mix(in srgb,var(--border-color,rgba(145,166,203,.34)) var(--site-ticker-bg-opacity,90%),transparent)!important;
  border-bottom-color:color-mix(in srgb,var(--border-color,rgba(145,166,203,.34)) var(--site-ticker-bg-opacity,90%),transparent)!important;
}
html body #header-menu-row #site-ticker.site-ticker:not(.site-ticker-resting) .site-ticker-text {
  opacity:var(--site-ticker-text-opacity,.9)!important;
}
html body #header-menu-row #site-ticker.site-ticker.site-ticker-resting .site-ticker-text {
  opacity:0!important;
}
html body #admin-pane-site-ticker #ticker-bar-color {width:64px;height:42px;padding:2px;border-radius:9px;cursor:pointer;}
html body #admin-pane-site-ticker #ticker-bar-color:disabled {opacity:.5;cursor:default;}


/* V36.10.35 — landscape touch navigation keeps breathing room above the menu.
   JS anchors the drawer to the viewport after the header scrolls out. */
@media (orientation:landscape) and (hover:none) and (max-height:820px) {
  html body #app-sidebar.app-sidebar {
    top:max(12px,var(--v36-sidebar-follow-top,12px))!important;
    box-sizing:border-box!important;
  }
}

/* V36.10.36 — narrow desktop: follow the scrolling header until the
   hamburger reaches a small 8px viewport gutter, then pin it there.
   Keep the drawer exactly 7px below the button; neither follows main cards. */
@media (min-width:420px) and (max-width:760px) and (hover:hover) and (pointer:fine) {
  html body #header-menu-row.header-menu-row #mobile-menu-toggle.mobile-menu-toggle,
  html.v169-header-scrolled body #header-menu-row.header-menu-row #mobile-menu-toggle.mobile-menu-toggle {
    top:var(--v36-narrow-menu-toggle-top, calc(var(--v170-header-height,var(--v36-header-height,56px)) + 7px))!important;
  }
  html body #app-sidebar.app-sidebar,
  html.v169-header-scrolled body #app-sidebar.app-sidebar {
    top:calc(var(--v36-narrow-menu-toggle-top, calc(var(--v170-header-height,var(--v36-header-height,56px)) + 7px)) + 43px)!important;
  }
}
