:root {
  --bc-nav-paper: #fcf8ef;
  --bc-nav-ink: #173b2d;
  --bc-nav-rule: #d8cbb4;
  --bc-nav-primary: #214d3b;
  --bc-nav-on-primary: #fff9ee;
}
:root:is([data-theme="night"], [data-theme="dark"]) {
  --bc-nav-paper: #172b23;
  --bc-nav-ink: #fcf4e5;
  --bc-nav-rule: #6f7966;
  --bc-nav-primary: #d8e6c9;
  --bc-nav-on-primary: #193628;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]):not([data-theme="light"]) {
    --bc-nav-paper: #172b23;
    --bc-nav-ink: #fcf4e5;
    --bc-nav-rule: #6f7966;
    --bc-nav-primary: #d8e6c9;
    --bc-nav-on-primary: #193628;
  }
}
.bc-menu-shortcuts, .bc-native-areas {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .55rem 0 .85rem;
}
.bc-menu-shortcuts a, .bc-native-areas a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: .35rem .7rem;
  color: var(--bc-nav-ink);
  background: var(--bc-nav-paper);
  border: 1px solid var(--bc-nav-rule);
  border-radius: .65rem;
  font-size: .875rem;
  line-height: 1.25;
  text-decoration: none;
}
.bc-menu-shortcuts a:last-child, .bc-nudge > a {
  color: var(--bc-nav-on-primary);
  background: var(--bc-nav-primary);
  border-color: var(--bc-nav-primary);
}
.bc-menu-shortcuts a:hover, .bc-native-areas a:hover, .bc-trail a:hover { text-decoration: underline; }
.mast [data-menu-open] { display: inline-flex !important; }
.mast > #site-menu {
  position: absolute;
  inset-inline: 8px;
  top: 100%;
  width: min(46rem, calc(100% - 16px));
  margin: .35rem auto 0;
  background: var(--bc-nav-paper);
  color: var(--bc-nav-ink);
}
.mast.bc-treatment-mast > #site-menu { max-height: calc(100dvh - 8.5rem); }
.bc-nav-details { position: relative; }
.bc-nav-details summary {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding-inline: .75rem;
  cursor: pointer;
  border: 1px solid var(--bc-nav-rule);
  border-radius: 2rem;
  list-style: none;
}
.bc-nav-details summary::-webkit-details-marker { display: none; }
.bc-nav-details > nav {
  position: absolute;
  inset-inline-end: 0;
  top: 100%;
  width: min(18rem, calc(100vw - 24px));
  max-height: min(65vh, 32rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: .65rem;
  background: var(--bc-nav-paper);
  border: 1px solid var(--bc-nav-rule);
  border-radius: .75rem;
}
.bc-nav-details:not([open]) > nav { display: none; }
.hdr .menu__panel { max-height: min(70dvh, 36rem); overflow: auto; overscroll-behavior: contain; }
.bc-trail {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .25rem .65rem;
  width: max-content;
  max-width: 100%;
  margin: .22rem auto 0;
  padding: 0 .45rem;
  border: 1px solid var(--bc-nav-rule);
  border-radius: .8rem;
  color: var(--bc-nav-ink);
  background: var(--bc-nav-paper);
  box-shadow: 0 5px 12px rgb(0 0 0 / .06);
}
.bc-trail a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .15rem .25rem;
  color: inherit;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.15;
  text-decoration: none;
}
.bc-trail-parent { text-decoration: underline !important; text-underline-offset: .2em; }
html:has(.bc-treatment-mast) { scroll-padding-top: calc(var(--bar-h, 4rem) + 4.5rem); }
.bc-conditions {
  max-width: 100%;
  margin: 1rem 0 1.35rem;
  padding: clamp(.75rem, 2vw, 1.1rem);
  border: 1px solid var(--bc-nav-rule);
  border-radius: 1.15rem;
  background: var(--bc-nav-paper);
  color: var(--bc-nav-ink);
}
.hero .bc-conditions > h2 {
  position: relative;
  margin: 0 0 .6rem;
  color: var(--bc-nav-ink);
  font: 700 1rem/1.25 var(--f-ui, system-ui);
}
.bc-conditions ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bc-conditions a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .3rem;
  min-height: 44px;
  height: 100%;
  padding: .4rem .55rem;
  border: 1px solid var(--bc-nav-rule);
  border-radius: .65rem;
  color: inherit;
  font: 650 .9rem/1.25 var(--f-ui, system-ui);
  text-decoration: none;
}
.bc-conditions svg { flex: 0 0 14px; }
.bc-conditions a:hover {
  color: var(--bc-nav-on-primary);
  background: var(--bc-nav-primary);
}
@media (max-width: 350px) {
  .bc-conditions ul { grid-template-columns: minmax(0, 1fr); }
}
.bc-conditions a:focus-visible, .bc-trail a:focus-visible, .bc-menu-shortcuts a:focus-visible,
.bc-nudge :is(a, button):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.bc-nudge[hidden] { display: none !important; }
.bc-nudge {
  position: fixed;
  z-index: 65;
  right: max(.7rem, env(safe-area-inset-right));
  bottom: calc(.7rem + env(safe-area-inset-bottom));
  width: min(21rem, calc(100vw - 1.4rem));
  padding: .6rem .8rem;
  border: 1px solid var(--bc-nav-rule);
  border-radius: 1rem;
  background: var(--bc-nav-paper);
  color: var(--bc-nav-ink);
  box-shadow: 0 10px 28px rgb(0 0 0 / .16);
  font: .875rem/1.3 var(--f-ui, system-ui);
  animation: bc-nudge-in .22s ease-out both;
}
.bc-nudge p { margin: 0 2.65rem .2rem 0; color: inherit; }
#bc-nudge-title { font-weight: 750; }
.bc-nudge button {
  position: absolute;
  top: .2rem;
  right: .2rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}
.bc-nudge > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: .2rem;
  padding: 0 .8rem;
  border-radius: 2rem;
  font-weight: 700;
  text-decoration: none;
}
@keyframes bc-nudge-in { from { opacity: 0; transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .bc-nudge { animation: none; } }
body[data-bc-nudge-visible] :is(.action-bar, .bcdock) { visibility: hidden; pointer-events: none; }
html:is(.menu-open, .callback-open, .is-editing) .bc-nudge,
body.scene-open .bc-nudge, body:has(#site-menu:not([hidden])) .bc-nudge { display: none; }

.mast .w2-menu { display: block; }
.mast .w2-sheet { max-height: min(72dvh, 40rem); overflow: auto; overscroll-behavior: contain; }
.mast #site-menu .bcm__in { display: block; }
html.motion-off .bc-nudge { animation: none; }
