/* Small glass tool rail, opaque fallbacks, original modals and filters. */
/* The feed is an isolated stacking context. Lift the entire toolbar above it,
   not just the dropdown trapped inside the glass rail. Keep drawers above us. */
.mx-compact-toolbar{position:relative;z-index:30;overflow:visible;flex-wrap:wrap;gap:8px!important}
.mx-compact-toolbar .mx-toolbar-actions{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--line);border-radius:14px;background:var(--bg2);box-shadow:inset 0 1px 0 #ffffff12;flex-shrink:0}
.mx-compact-toolbar #mxDevBar{width:auto;margin:0;padding:0;gap:3px;font-size:inherit;display:flex;align-items:center;flex-wrap:nowrap}
body:not(.demo-arb):not(.m-arb) .mx-compact-toolbar #mxDevBar{display:none!important}
.mx-compact-toolbar #mxDevBar[hidden]{display:none!important}
.mx-compact-toolbar #mxDevBar>div{gap:0}
.mx-compact-toolbar .mx-toolbar-actions :is(.mx-search-toggle,.dev-insights-open,.funded-toggle,#mxPageFilters,#lowholdAssistantPill,#promoAssistantPill){display:inline-flex!important;align-items:center;justify-content:center;width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;border:0!important;border-radius:10px;background:transparent!important;color:var(--t2);box-shadow:none;font:inherit;cursor:pointer;position:relative;flex:none;gap:0}
.mx-compact-toolbar .mx-toolbar-actions :is(.mx-search-toggle,.dev-insights-open,.funded-toggle,#mxPageFilters,#lowholdAssistantPill,#promoAssistantPill)[hidden]{display:none!important}
.mx-compact-toolbar .mx-toolbar-actions button>svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.mx-compact-toolbar :is(#lowholdAssistantPill,#promoAssistantPill)>b,.top #pageSettingsPill>:is(b,span:not(.ctl-count)){display:none!important}
:is(#mxPageFilters,.top #pageSettingsPill)>.ctl-count{position:absolute;top:-2px;right:-1px;margin:0;min-width:15px;height:15px;line-height:15px;font-size:9px;padding:0 3px;border-radius:5px;pointer-events:none;background:var(--acc);color:#141414}
.top #pageSettingsPill{position:relative;align-items:center;justify-content:center;flex:none;align-self:center;width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;border:0!important;border-radius:10px;background:none!important;box-shadow:none!important;color:var(--t2);cursor:pointer}
.top #pageSettingsPill>svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.top #pageSettingsPill[hidden]{display:none!important}
.top #pageSettingsPill:focus-visible{outline:2px solid var(--t)!important;outline-offset:2px}
.mx-compact-toolbar .mx-search-toggle.has-query:after{content:'';position:absolute;right:5px;top:5px;width:5px;height:5px;border-radius:50%;background:var(--acc)}
.mx-compact-toolbar .mx-toolbar-actions button:focus-visible,.mx-compact-toolbar .mx-search-close:focus-visible{outline:2px solid var(--t)!important;outline-offset:2px}
.mx-compact-toolbar #demoBoardSearch{flex:0 0 100%;order:20;width:100%;max-width:none;height:46px;padding:0 8px 0 13px;border-radius:12px;margin:0 0 4px;background:var(--bg2)}
.mx-compact-toolbar #demoBoardSearch[hidden]{display:none!important}
.mx-compact-toolbar #demoBoardSearch #search{font-size:16px}
.mx-compact-toolbar #demoBoardSearch button{height:38px;min-width:38px;width:38px;border-radius:8px}
.mx-compact-toolbar #demoBoardSearch .mx-search-close{display:grid;place-items:center;border-left:1px solid var(--line);border-radius:0}
.mx-search-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.mx-compact-toolbar .funded-menu{z-index:1;top:calc(100% + 10px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 170px);overflow-y:auto;overscroll-behavior:contain}
@supports(backdrop-filter:blur(12px)){.mx-compact-toolbar .mx-toolbar-actions{background:color-mix(in srgb,var(--bg2) 78%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}}
@media(hover:hover){.mx-compact-toolbar .mx-toolbar-actions :is(.mx-search-toggle,.dev-insights-open,.funded-toggle,#mxPageFilters,#lowholdAssistantPill,#promoAssistantPill):hover,.top #pageSettingsPill:hover{background:var(--bg3)!important;color:var(--t)}}
@media(max-width:767px){.top #pageSettingsPill{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important}}
@media(max-width:540px){.mx-compact-toolbar{padding-inline:12px!important;gap:4px!important}.mx-compact-toolbar .modttl{font-size:13px;letter-spacing:.025em;white-space:nowrap}.mx-compact-toolbar #modInfo{width:22px;min-width:22px}.mx-compact-toolbar .sp{min-width:0}.mx-compact-toolbar .mx-toolbar-actions{gap:0;padding:2px;border-radius:12px}.mx-compact-toolbar #mxDevBar{gap:0}.mx-compact-toolbar .mx-toolbar-actions :is(.mx-search-toggle,.dev-insights-open,.funded-toggle,#mxPageFilters,#lowholdAssistantPill,#promoAssistantPill){width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important}.mx-compact-toolbar .funded-menu{right:-40px;left:auto}}
@media(max-width:359px){.mx-compact-toolbar #modInfo{display:none!important}}

.mx-compact-toolbar .mx-toolbar-actions:not(:has(>button:not([hidden]))):not(:has(>#mxDevBar:not([hidden]))){display:none}

/* Unified page settings lives beside Assistant, with the other page tools. */
.mx-compact-toolbar .mx-toolbar-actions #pageSettingsPill{display:inline-flex;align-items:center;justify-content:center;position:relative;flex:none;width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;border:0!important;border-radius:10px;background:transparent!important;box-shadow:none!important;color:var(--t2)}
.mx-compact-toolbar #pageSettingsPill[hidden]{display:none!important}
.mx-compact-toolbar #pageSettingsPill>:is(b,span:not(.ctl-count)){display:none!important}
.mx-compact-toolbar #pageSettingsPill>.ctl-count{position:absolute;top:-2px;right:-1px;margin:0;min-width:15px;height:15px;line-height:15px;font-size:9px;padding:0 3px;border-radius:5px;pointer-events:none;background:var(--acc);color:#141414}
@media(max-width:767px){html[data-design=apple] .mx-toolbar-actions #pageSettingsPill{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important}}
@media(hover:hover){.mx-compact-toolbar .mx-toolbar-actions #pageSettingsPill:hover{background:var(--bg3)!important;color:var(--t)}}

body:is(.demo-arb, .m-arb) .mx-compact-toolbar #modttl {
  font-size: clamp(17px, 1.4vw + 10px, 23px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.015em;
  text-transform: none;
  gap: 7px;
}
body:is(.demo-arb, .m-arb) .mx-compact-toolbar #modttl .mi { width: 17px; height: 17px; }
body:is(.demo-arb, .m-arb) .mx-compact-toolbar .mx-toolbar-actions { margin-inline-start: auto; }
@media (max-width: 359px) {
  body:is(.demo-arb, .m-arb) .mx-compact-toolbar #modttl { font-size: 16px; }
}

/* The visible rail stays slimmer than its touch targets. */
html[data-theme] .mx-compact-toolbar {
  --mx-tool-size: 36px;
  padding-block: 3px;
  gap: 4px !important;
}
html[data-theme]:not([data-large-text]) .mx-compact-toolbar:not(:has(> #demoBoardSearch:not([hidden]))) {
  flex-wrap: nowrap;
}
@media (max-width: 359px) {
  body.m-promo .mx-compact-toolbar #modttl { font-size: 12px; letter-spacing: .01em; }
}
html[data-theme] .mx-compact-toolbar .mx-toolbar-actions {
  position: relative;
  isolation: isolate;
  gap: 0 !important;
  padding: 0 2px;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-theme] .mx-compact-toolbar .mx-toolbar-actions::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  height: 34px;
  box-sizing: border-box;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg2);
  pointer-events: none;
  z-index: -1;
}
html[data-theme] .mx-compact-toolbar #mxDevBar { gap: 0 !important; }
html[data-theme] .mx-compact-toolbar .mx-toolbar-actions :is(.mx-search-toggle, .dev-insights-open, .funded-toggle, #mxPageFilters, #lowholdAssistantPill, #promoAssistantPill, #promoFiltersPill, #pageSettingsPill) {
  width: var(--mx-tool-size) !important;
  min-width: var(--mx-tool-size) !important;
  height: var(--mx-tool-size) !important;
  min-height: var(--mx-tool-size) !important;
  border-radius: 8px;
}
html[data-theme] .mx-compact-toolbar .mx-toolbar-actions button > svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.6;
}
html[data-theme] .mx-compact-toolbar :is(#pageSettingsPill,#promoFiltersPill,#mxPageFilters) > .ctl-count {
  top: 2px;
  right: 1px;
}
@media (max-width: 767px), (max-width: 1024px) and (pointer: coarse) {
  html[data-theme] .mx-compact-toolbar { --mx-tool-size: 44px; }
}

/* Keep the Sharp name available to assistive technology on the icon button. */
.top #planChip:has(> #planChipMark:not([hidden])) {
  position:relative;display:inline-grid;place-items:center;flex:0 0 44px;
  width:44px;height:44px;padding:0;border:0;border-radius:8px;
  background:none;box-shadow:none;cursor:pointer;
}
.top #planChip[hidden],.top #planChipMark[hidden] { display:none !important; }
.top #planChipMark { display:block;width:22px;height:22px;object-fit:contain; }
.top #planChip:has(> #planChipMark:not([hidden])) #planChipLabel {
  position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;
}
.top #planChip:focus-visible { outline:2px solid var(--acc);outline-offset:1px; }

#demoPromoControls .ctl-inline-clear {
  justify-self: start;
  min-height: 32px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--acc);
  font: inherit;
  cursor: pointer;
}
#demoPromoControls .ctl-inline-clear[hidden] { display: none; }
#demoPromoControls .ctl-inline-clear:hover { text-decoration: underline; }
