/* Theme UI extras (mega panels, alerts, toast visibility). */

.mb-mega__panel-body[hidden] {
  display: none !important;
}

.mb-mega__main-col {
  min-width: 0;
  max-height: min(52vh, 460px);
  overflow: auto;
  padding-right: 0.25rem;
}

.mb-alert {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.mb-alert[hidden] {
  display: none !important;
}

.mb-alert--error {
  background: #fdecec;
  color: #b42318;
}

.mb-alert--success {
  background: #ecfdf3;
  color: #027a48;
}

.mb-alert--info {
  background: #eff4ff;
  color: #175cd3;
}

.mb-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 80;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mb-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mb-auth-page-blur {
  background-size: cover;
  background-position: center;
}

.pr-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.pr-empty h2 {
  margin: 0 0 0.5rem;
}

.pr-empty p {
  margin: 0 0 1.25rem;
  color: inherit;
  opacity: 0.78;
}

.mb-mega__cat {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
}

.mb-mega__cat-icon img {
  display: block;
}

.mb-mega__subs {
  display: grid;
  gap: 0.85rem;
}

.mb-btn--ghost-nav {
  background: transparent !important;
  border: 1px solid rgba(0, 0, 0, 0.28) !important;
  color: #111 !important;
}

.mb-header.is-scrolled .mb-btn--ghost-nav,
.mb-header--light.is-scrolled .mb-btn--ghost-nav,
.mb-header--mega.is-scrolled .mb-btn--ghost-nav,
.mb-header--industries.is-scrolled .mb-btn--ghost-nav,
.mb-header--pricing.is-scrolled .mb-btn--ghost-nav,
.mb-header--mega.is-mega-open.is-scrolled .mb-header__inner .mb-btn--ghost-nav {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
}

.mb-nav__item--mega::after {
  display: none;
}

.mb-header--mega.is-mega-open .mb-mega {
  max-height: min(68vh, 540px);
  overflow: hidden;
}

.mb-mega__spotlight {
  align-self: start !important;
  grid-column: 3;
  grid-row: 1;
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  max-height: min(52vh, 460px);
  overflow: auto;
}

.mb-mega__spotlight-media {
  max-height: 140px !important;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
}

button.mb-mega__sub {
  font: inherit;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.mb-footer__newsletter-form {
  flex-wrap: wrap;
}

.mb-footer__newsletter-form input {
  flex: 1 1 150px;
}

.mb-footer__newsletter {
  grid-template-columns: auto minmax(180px, 1fr) !important;
  grid-template-areas:
    "icon copy"
    "form form"
    "perks perks" !important;
}

.mb-footer__newsletter-form {
  grid-area: form;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0.5rem;
  width: 100%;
}

.mb-footer__newsletter-form .mb-btn {
  min-width: 110px;
}

@media (max-width: 900px) {
  .mb-footer__newsletter-form {
    grid-template-columns: 1fr;
  }
}

body.mb-auth-body .mb-auth-overlay,
body.mb-auth-body .mb-auth-overlay,
.mb-auth-overlay.is-open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.mb-auth-body.is-auth-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .mb-mega__spotlight {
    grid-column: 1 / -1;
    max-width: none;
    margin-left: 0;
  }
}

a.mb-mega__cat {
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.mb-mega__heading-link {
  color: inherit;
  text-decoration: none;
}

.mb-mega__heading-link:hover {
  color: var(--mb-red);
}

.mb-mega[hidden] {
  display: none !important;
}

.mb-archive {
  background: #fff;
}

.mb-archive__hero.mb-hero-services,
.mb-hero-industries.mb-hero-services {
  color: #000000;
}

.mb-archive__hero .mb-hero-services__scrim,
.mb-hero-industries .mb-hero-services__scrim {
  background: linear-gradient(
    to top right,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.9) 18%,
    rgba(255, 255, 255, 0.65) 35%,
    rgba(255, 255, 255, 0.2) 55%,
    transparent 72%
  );
}

.mb-archive__hero .mb-hero__label {
  color: #e60000;
}

.mb-archive__hero .mb-hero__title {
  color: #000000;
}

.mb-archive__hero .mb-hero__text {
  color: #666666;
}

.mb-insights-hero .mb-hero-industries__title-line {
  display: block;
}

.mb-insights-hero .mb-hero-industries__title-black {
  display: block;
  color: #111111;
}

.mb-insights-hero .mb-hero-industries__title-red {
  color: #e60000;
}

.mb-insights-search {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 1.25rem 0 1rem;
  max-width: 560px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.mb-insights-search__icon {
  display: flex;
  align-items: center;
  padding-left: 1rem;
  color: #888;
}

.mb-insights-search__input {
  flex: 1;
  border: 0;
  outline: none;
  padding: 0.85rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  background: transparent;
}

.mb-insights-search__btn {
  border: 0;
  background: #e60000;
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.85rem 1.35rem;
  cursor: pointer;
}

.mb-insights-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.mb-insights-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: #f3f3f3;
  color: #333;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  border: 0;
  cursor: pointer;
}

.mb-insights-chip.is-active {
  background: #e60000;
  color: #fff;
}

.mb-insights-more {
  position: relative;
}

.mb-insights-more > summary {
  list-style: none;
}

.mb-insights-more > summary::-webkit-details-marker {
  display: none;
}

.mb-insights-more__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 0.4rem;
  z-index: 5;
}

.mb-insights-more__list a {
  display: block;
  padding: 0.4rem 0.6rem;
  color: #222;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
}

.mb-insights-more__list a:hover {
  background: #f6f6f6;
}

.mb-case-study__layout {
  max-width: 820px;
}

.mb-case-study__hero {
  margin: 0 0 1.75rem;
  border-radius: 12px;
  overflow: hidden;
}

.mb-case-study__hero img {
  display: block;
  width: 100%;
  height: auto;
}

.mb-case-study__body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #222;
}

.mb-case-study__body h2 {
  margin: 1.75rem 0 0.7rem;
  font-size: 1.35rem;
}

.mb-case-study__back {
  margin: 2rem 0 0;
}

.mb-featured-cases--archive {
  margin-top: 0.5rem;
}

.mb-archive__posts {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

.mb-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.mb-archive-grid .mb-insight-card {
  flex: none;
  width: 100%;
  min-width: 0;
}

.mb-archive__pager {
  margin-top: 2rem;
}

.mb-archive__pager .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.mb-archive__pager a,
.mb-archive__pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #ececec;
  text-decoration: none;
  color: #111;
  font-size: 0.85rem;
}

.mb-archive__pager .current {
  background: #e60000;
  border-color: #e60000;
  color: #fff;
}

@media (max-width: 900px) {
  .mb-archive-grid {
    grid-template-columns: 1fr;
  }

  .mb-header--mega.is-mega-open .mb-mega {
    max-height: none;
    overflow: auto;
  }

  .mb-mega__main-col,
  .mb-mega__spotlight {
    max-height: none;
  }
}

button.mb-july-btn,
button.mb-btn {
  font: inherit;
  cursor: pointer;
}

.mb-july-btn.mb-july-btn--ghost,
.mb-july-btn.mb-july-btn--outline {
  appearance: none;
}

/* Strategy consultation modal */
.mb-strategy-modal[hidden] {
  display: none !important;
}

.mb-strategy-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.mb-strategy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, 0.55);
  backdrop-filter: blur(2px);
}

.mb-strategy-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  padding: 28px 24px 24px;
}

.mb-strategy-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f4f4f5;
  color: #333;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mb-strategy-modal__close svg {
  width: 16px;
  height: 16px;
}

.mb-strategy-modal__steps {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
}

.mb-strategy-modal__steps span {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: #e8e8e8;
}

.mb-strategy-modal__steps span.is-active {
  background: #e60000;
}

.mb-strategy-modal__steps span.is-done {
  background: #f5b0b0;
}

.mb-strategy-panel__title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mb-strategy-panel__lead {
  margin: 0 0 16px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #666;
}

.mb-strategy-modal form label {
  display: block;
  margin: 0 0 12px;
}

.mb-strategy-modal form input[type="text"],
.mb-strategy-modal form input[type="email"] {
  width: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-size: 0.88rem;
  background: #fff;
  outline: none;
}

.mb-strategy-modal form input:focus {
  border-color: #e60000;
  box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.08);
}

.mb-strategy-modal form .mb-btn {
  width: 100%;
  margin-top: 4px;
}

.mb-strategy-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 8px;
}

.mb-strategy-dates,
.mb-strategy-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.mb-strategy-chip {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.mb-strategy-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mb-strategy-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 10px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 600;
}

.mb-strategy-chip input:checked + span {
  border-color: #e60000;
  background: #e60000;
  color: #fff;
}

.mb-strategy-chip .mb-strategy-chip__sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 2px;
}

.mb-strategy-dates .mb-strategy-chip span {
  flex-direction: column;
  min-width: 86px;
  padding: 10px 12px;
  line-height: 1.2;
}

body.is-strategy-modal-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .mb-strategy-actions {
    grid-template-columns: 1fr;
  }

  .mb-strategy-modal__dialog {
    padding: 24px 16px 18px;
  }
}

html[data-mb-theme="dark"] .mb-strategy-modal__dialog {
  background: #161616;
  color: #eee;
}

html[data-mb-theme="dark"] .mb-strategy-modal__close {
  background: #222;
  color: #eee;
}

html[data-mb-theme="dark"] .mb-strategy-modal form input[type="text"],
html[data-mb-theme="dark"] .mb-strategy-modal form input[type="email"],
html[data-mb-theme="dark"] .mb-strategy-chip span {
  background: #1a1a1a;
  border-color: #333;
  color: #eee;
}

.pr-tabs--account .pr-tabs__btn {
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

button.mb-july-btn {
  appearance: none;
  -webkit-appearance: none;
}

.mb-header__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.mb-credits-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.7rem 0.2rem 0.2rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  line-height: 1.15;
  white-space: nowrap;
  flex-shrink: 0;
  font: inherit;
  position: relative;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.mb-credits-chip:hover,
.mb-credits-chip:focus-visible {
  border-color: var(--mb-red, #e60000);
  box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.08);
  color: inherit;
  text-decoration: none;
}

.mb-credits-chip:focus-visible {
  outline: none;
}

.mb-credits-chip__mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--mb-red, #e60000);
  color: #fff;
  flex-shrink: 0;
}

.mb-credits-chip__mark svg {
  width: 15px;
  height: 15px;
  display: block;
}

.mb-credits-chip__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 0.15rem;
  min-width: 3.25rem;
}

.mb-credits-chip__kicker {
  font-size: 0.65rem;
  font-weight: 500;
  color: #6b7280;
}

.mb-credits-chip__value {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: inherit;
}

.mb-credits-chip__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.mb-header.is-scrolled .mb-credits-chip,
.mb-header--dark.is-scrolled .mb-credits-chip,
.mb-header--mega.is-scrolled .mb-credits-chip,
.mb-header--industries.is-scrolled .mb-credits-chip,
.mb-header--pricing.is-scrolled .mb-credits-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.mb-header.is-scrolled .mb-credits-chip__kicker,
.mb-header--dark.is-scrolled .mb-credits-chip__kicker,
.mb-header--mega.is-scrolled .mb-credits-chip__kicker,
.mb-header--industries.is-scrolled .mb-credits-chip__kicker,
.mb-header--pricing.is-scrolled .mb-credits-chip__kicker {
  color: rgba(255, 255, 255, 0.65);
}

.mb-header.is-scrolled .mb-credits-chip:hover,
.mb-header--dark.is-scrolled .mb-credits-chip:hover,
.mb-header--mega.is-scrolled .mb-credits-chip:hover,
.mb-header--industries.is-scrolled .mb-credits-chip:hover,
.mb-header--pricing.is-scrolled .mb-credits-chip:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
  color: #fff;
}

html[data-mb-theme="dark"] .mb-header .mb-credits-chip {
  background: #141414;
  border-color: #2a2a2a;
  color: #f2f2f2;
}

html[data-mb-theme="dark"] .mb-header .mb-credits-chip__kicker {
  color: #b0b0b0;
}

.mb-header__session {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.mb-header__who {
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: #111;
}

.mb-header.is-scrolled .mb-header__who,
.mb-header--dark.is-scrolled .mb-header__who,
.mb-header--mega.is-scrolled .mb-header__who,
.mb-header--industries.is-scrolled .mb-header__who,
.mb-header--pricing.is-scrolled .mb-header__who {
  color: #fff;
}

.mb-header__session .mb-btn--ghost-nav {
  padding: 0.5rem 0.85rem;
}

@media (max-width: 900px) {
  .mb-nav__item--mega::after {
    display: none;
  }

  .mb-header__actions {
    display: none !important;
  }

  .mb-header.is-open:not(.is-mega-open) .mb-header__actions:not([hidden]) {
    display: flex !important;
    flex-wrap: wrap;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 65;
    gap: 0.65rem;
    width: auto;
    padding: 0.9rem 1.25rem calc(0.9rem + env(safe-area-inset-bottom));
    background: #0b0b0b;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .mb-header.is-open .mb-header__session {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .mb-header.is-open .mb-header__who {
    width: 100%;
    max-width: none;
    color: #fff;
  }

  .mb-header--light.is-open:not(.is-scrolled):not(.is-mega-open) .mb-header__who {
    color: #111;
  }

  .mb-header--light.is-open:not(.is-scrolled):not(.is-mega-open) .mb-header__actions {
    background: #fff;
    border-top-color: #ececec;
  }

  .mb-header.is-open .mb-nav:not([hidden]) {
    padding-bottom: 5.5rem;
    background: #ffffff;
  }

  .mb-header.is-open .mb-nav a,
  .mb-header.is-open .mb-nav__trigger {
    color: #000000;
  }

  .mb-header.is-open.is-scrolled .mb-nav,
  .mb-header--light.is-open.is-scrolled .mb-nav {
    background: #0b0b0b;
  }

  .mb-header.is-open.is-scrolled .mb-nav a,
  .mb-header.is-open.is-scrolled .mb-nav__trigger,
  .mb-header--light.is-open.is-scrolled .mb-nav a,
  .mb-header--light.is-open.is-scrolled .mb-nav__trigger {
    color: #ffffff;
  }

  .mb-header.is-open .mb-btn--solid {
    display: inline-flex !important;
  }

  html[data-mb-theme="dark"] .mb-header.is-open .mb-nav,
  html[data-mb-theme="dark"] .mb-header--light.is-open .mb-nav {
    background: #111111;
    border-bottom-color: #2a2a2a;
  }

  html[data-mb-theme="dark"] .mb-header.is-open .mb-nav a,
  html[data-mb-theme="dark"] .mb-header.is-open .mb-nav__trigger,
  html[data-mb-theme="dark"] .mb-header--light.is-open .mb-nav a,
  html[data-mb-theme="dark"] .mb-header--light.is-open .mb-nav__trigger {
    color: #f2f2f2;
  }

  html[data-mb-theme="dark"] .mb-header.is-mega-open .mb-mega {
    background: #0b0b0b;
  }
}

.mb-archive__crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
}

.mb-archive__crumbs a {
  color: #e60000;
  text-decoration: none;
}

.mb-archive-empty {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.mb-archive-empty__label {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e60000;
}

.mb-archive-empty__title {
  margin: 0 0 0.75rem;
  font-size: 1.65rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.mb-archive-empty__text {
  margin: 0 auto 1.5rem;
  max-width: 42ch;
  color: #666;
  line-height: 1.55;
}

.mb-archive-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

html[data-mb-theme="dark"] .mb-archive-empty {
  background: #161616;
  border-color: #2a2a2a;
  color: #f2f2f2;
}

html[data-mb-theme="dark"] .mb-archive-empty__text {
  color: #b0b0b0;
}

body.admin-bar .mb-header,
body.admin-bar .pr-topbar,
body.admin-bar .pr-sidebar {
  top: 32px;
}

body.admin-bar .mb-header.is-open .mb-nav,
body.admin-bar .mb-header.is-mega-open .mb-mega {
  top: calc(32px + var(--mb-header-h, 72px));
}

body.admin-bar .pr-sidebar {
  height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .mb-header,
  body.admin-bar .pr-topbar,
  body.admin-bar .pr-sidebar {
    top: 46px;
  }

  body.admin-bar .mb-header.is-open .mb-nav,
  body.admin-bar .mb-header.is-mega-open .mb-mega {
    top: calc(46px + var(--mb-header-h, 72px));
  }

  body.admin-bar .pr-sidebar {
    height: calc(100vh - 46px);
  }
}

@media screen and (max-width: 600px) {
  body.admin-bar .mb-header,
  body.admin-bar .pr-topbar,
  body.admin-bar .pr-sidebar {
    top: 0;
  }

  body.admin-bar .mb-header.is-open .mb-nav,
  body.admin-bar .mb-header.is-mega-open .mb-mega {
    top: var(--mb-header-h, 72px);
  }

  body.admin-bar .pr-sidebar {
    height: 100vh;
  }
}

/* Legal popup cards (Privacy / Terms) */
body.mb-modal-open {
  overflow: hidden;
}
.mb-legal-modal[hidden] {
  display: none !important;
}

.mb-legal-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.mb-legal-modal .mb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 24, 0.55);
}

.mb-legal-modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(88vh, 820px);
  background: #fff;
  border-radius: 18px;
  padding: 1.5rem 1.5rem 1.15rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  color: #111;
  display: flex;
  flex-direction: column;
}

.mb-legal-modal .mb-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #888;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mb-legal-modal .mb-modal__close svg {
  width: 18px;
  height: 18px;
}

.mb-legal-modal .mb-modal__close:hover {
  color: #e60000;
  background: rgba(230, 0, 0, 0.08);
}

.mb-legal-modal__brand {
  padding-right: 2.25rem;
  border-bottom: 3px solid #e60000;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
}

.mb-legal-modal__logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.mb-legal-modal__logo span {
  color: #e60000;
}

.mb-legal-modal__tag {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #777;
}

.mb-legal-modal h2 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.mb-legal-modal__body {
  overflow: auto;
  padding-right: 0.35rem;
  margin-right: -0.15rem;
  min-height: 0;
}

.mb-legal-updated {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: #777;
}

.mb-legal-section {
  margin: 0 0 1.15rem;
}

.mb-legal-section h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
}

.mb-legal-section p,
.mb-legal-section li {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #333;
}

.mb-legal-section ul {
  margin: 0.4rem 0 0.65rem 1.1rem;
  padding: 0;
}

.mb-legal-section li {
  margin: 0 0 0.3rem;
}

.mb-legal-note {
  background: #fdecec;
  border-left: 3px solid #e60000;
  padding: 0.65rem 0.8rem;
  color: #7a1010 !important;
  font-weight: 600;
}

html[data-mb-theme="dark"] .mb-legal-modal__panel {
  background: #16181d;
  color: #f3f4f6;
}

html[data-mb-theme="dark"] .mb-legal-modal__tag,
html[data-mb-theme="dark"] .mb-legal-updated {
  color: #9aa0a6;
}

html[data-mb-theme="dark"] .mb-legal-section p,
html[data-mb-theme="dark"] .mb-legal-section li {
  color: #d5d8de;
}

html[data-mb-theme="dark"] .mb-legal-note {
  background: rgba(230, 0, 0, 0.16);
  color: #ffc9c9 !important;
}
