:root{
  --mbe-ink:#111827;
  --mbe-bg:#ffffff;
  --mbe-soft:#f6f8f7;
  --mbe-gold:#c9a44c;
  --mbe-gold-dark:#9b7628;
  --mbe-teal:#2f7d7a;
  --mbe-navy:#0b1f3a;
  --mbe-rule:#e5e0d6;
  --mbe-muted:#5f6673;
  --mbe-ivory:#f7f3e8;
  --mbe-max:1080px;
  --mbe-accent:var(--mbe-gold);
  --mbe-accent-dark:var(--mbe-gold-dark);
  --mbe-font-display:"Cormorant Garamond",Georgia,serif;
  --mbe-font-reading:"Literata",Georgia,serif;
  --mbe-font-ui:"Inter",system-ui,sans-serif;
}

.mbe-global-shell *,
.mbe-global-footer *{box-sizing:border-box;}

.mbe-global-shell[data-tool="hermeneutics"],
.mbe-global-footer[data-tool="hermeneutics"]{--mbe-accent:#6b54b3;--mbe-accent-dark:#4b3b87;}
.mbe-global-shell[data-tool="psalms"],
.mbe-global-footer[data-tool="psalms"]{--mbe-accent:#c9a44c;--mbe-accent-dark:#2f7d7a;}
.mbe-global-shell[data-tool="daniel"],
.mbe-global-footer[data-tool="daniel"]{--mbe-accent:#c9a44c;--mbe-accent-dark:#5a7049;}
.mbe-global-shell[data-tool="revelation"],
.mbe-global-footer[data-tool="revelation"]{--mbe-accent:#c1564f;--mbe-accent-dark:#8a2f3a;}
.mbe-global-shell[data-tool="sanctuary"],
.mbe-global-footer[data-tool="sanctuary"]{--mbe-accent:#c9a44c;--mbe-accent-dark:#36432f;}
.mbe-global-shell[data-tool="last-day-events"],
.mbe-global-footer[data-tool="last-day-events"]{--mbe-accent:#3f5f86;--mbe-accent-dark:#283a54;}
.mbe-global-shell[data-tool="romans"],
.mbe-global-footer[data-tool="romans"]{--mbe-accent:#c9a44c;--mbe-accent-dark:#4f5f3a;}
.mbe-global-shell[data-tool="parables"],
.mbe-global-footer[data-tool="parables"]{--mbe-accent:#9a704f;--mbe-accent-dark:#6f5139;}
.mbe-global-shell[data-tool="steps-to-christ"],
.mbe-global-footer[data-tool="steps-to-christ"]{--mbe-accent:#d6a04c;--mbe-accent-dark:#e6bd74;--mbe-ink:#f6f0f8;--mbe-muted:#b8afc0;--mbe-navy:#f6f0f8;--mbe-soft:#211a28;--mbe-rule:#3a303f;--mbe-ivory:#120e16;}

.mbe-global-shell[data-tool="steps-to-christ"],
.mbe-global-footer[data-tool="steps-to-christ"]{
  background:linear-gradient(180deg,#17111c 0%,#100c14 100%);
  border-color:#3a303f;
  color:#b8afc0;
}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-library-panel{
  background:#141019;
  border-color:#3a303f;
  color:#f6f0f8;
}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-library-item[aria-current="page"]{
  background:rgba(214,160,76,.16);
}

.mbe-global-shell{
  position:fixed;
  top:0;
  right:0;
  left:0;
  z-index:1200;
  min-height:46px;
  background:linear-gradient(180deg,#fffdf8 0%,var(--mbe-ivory) 100%);
  border-bottom:1px solid var(--mbe-rule);
  box-shadow:0 14px 32px -28px rgba(11,31,58,.38);
  color:var(--mbe-muted);
  font-family:var(--mbe-font-ui);
}

body.mbe-shell-managed{
  padding-top:46px;
}

.mbe-global-shell + .site-header{
  top:46px;
}

.mbe-global-shell + .topbar,
.mbe-global-shell ~ .topbar{
  top:46px;
}

.mbe-global-shell + .site-nav,
.mbe-global-shell ~ .site-nav{
  top:46px;
}

.mbe-global-shell ~ .reader-header{
  top:46px !important;
}

.mbe-global-shell ~ .fixed.left-0.top-0{
  top:46px !important;
}

/* Hermeneutics renders its native navigation inside the React root, not as
   .site-header. Keep those sticky bars below the shared library ribbon. */
body > #root > div > header.sticky.top-0{
  top:46px !important;
}

#root .top-\[65px\]{
  top:111px !important;
}

#root .top-\[67px\]{
  top:113px !important;
}

#root .top-\[73px\]{
  top:119px !important;
}

#root .top-\[122px\]{
  top:168px !important;
}

.mbe-shell-wrap{
  max-width:var(--mbe-max);
  margin:0 auto;
  padding:0 28px;
}

.mbe-global-shell .mbe-shell-wrap{
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.mbe-ribbon-left{
  min-width:0;
  display:flex;
  align-items:center;
  gap:18px;
}

.mbe-ribbon-brand{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  color:var(--mbe-navy);
  text-decoration:none;
  white-space:nowrap;
}

.mbe-ribbon-logo{
  display:block;
  width:auto;
  height:34px;
}

.mbe-ribbon-brand:hover,
.mbe-ribbon-back:hover,
.mbe-global-nav a:hover,
.mbe-library-menu[open] .mbe-library-toggle,
.mbe-library-toggle:hover{
  color:var(--mbe-gold-dark);
}

.mbe-ribbon-back{
  color:var(--mbe-muted);
  font-size:.73rem;
  font-weight:700;
  letter-spacing:.14em;
  line-height:1;
  text-decoration:none;
  text-transform:uppercase;
  white-space:nowrap;
}

.mbe-ribbon-back::before{
  content:"";
  display:inline-block;
  width:1px;
  height:16px;
  margin-right:18px;
  background:rgba(155,118,40,.28);
  vertical-align:-3px;
}

.mbe-global-nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:18px;
  color:var(--mbe-muted);
  font-size:.82rem;
  font-weight:700;
  line-height:1;
}

.mbe-global-nav a,
.mbe-library-toggle{
  color:inherit;
  text-decoration:none;
  transition:color .18s ease;
  white-space:nowrap;
}

.mbe-library-menu{position:relative;}
.mbe-library-toggle{list-style:none;cursor:pointer;}
.mbe-library-toggle::-webkit-details-marker{display:none;}

.mbe-library-toggle::after{
  content:"";
  display:inline-block;
  width:.38rem;
  height:.38rem;
  margin-left:.42rem;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translateY(-.1rem);
}

.mbe-library-menu[open] .mbe-library-toggle::after{
  transform:rotate(225deg) translateY(-.08rem);
}

.mbe-library-panel{
  position:absolute;
  right:0;
  top:calc(100% + 14px);
  width:min(920px,calc(100vw - 32px));
  max-height:calc(100vh - 96px);
  overflow:auto;
  overscroll-behavior:contain;
  padding:12px;
  border:1px solid var(--mbe-rule);
  border-radius:8px;
  background:#fff;
  color:var(--mbe-ink);
  box-shadow:0 24px 50px -34px rgba(11,31,58,.55);
}

.mbe-library-panel::before{
  content:"";
  position:absolute;
  top:-14px;
  right:0;
  left:0;
  height:14px;
}

.mbe-library-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}

.mbe-library-item{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:11px 12px;
  border-radius:6px;
  color:var(--mbe-ink);
  text-decoration:none;
}

.mbe-library-item:hover{background:var(--mbe-soft);}
.mbe-library-item[aria-current="page"]{background:rgba(201,164,76,.13);}
.mbe-library-name{font-family:var(--mbe-font-display);font-size:1.02rem;font-weight:600;line-height:1.1;}
.mbe-library-desc{color:var(--mbe-muted);font-size:.78rem;font-weight:500;line-height:1.35;overflow-wrap:anywhere;}

.mbe-global-footer{
  background:linear-gradient(180deg,#fffdf8 0%,var(--mbe-ivory) 100%);
  color:var(--mbe-muted);
  font-family:var(--mbe-font-ui);
  border-top:1px solid var(--mbe-rule);
  box-shadow:0 -14px 32px -30px rgba(11,31,58,.42);
  padding:0;
}

.mbe-global-footer .mbe-shell-wrap{
  max-width:none;
}

.mbe-footer-wrap{
  min-height:auto;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px clamp(18px,3vw,34px);
  padding:24px clamp(20px,3vw,42px);
  font-size:clamp(.86rem,.95vw,.98rem);
  line-height:1.4;
}

.mbe-footer-brand{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  color:inherit;
  text-decoration:none;
  border-bottom:0;
}

.mbe-footer-logo{
  display:block;
  width:clamp(168px,16vw,240px);
  max-width:100%;
  height:auto;
}

.mbe-footer-wrap > span:last-child{
  flex-basis:100%;
  color:var(--mbe-muted);
  font-size:clamp(.78rem,.85vw,.9rem);
}

.mbe-footer-link{
  color:var(--mbe-gold-dark);
  text-decoration:none;
  font-weight:700;
  border-bottom:1px solid rgba(155,118,40,.45);
  padding-bottom:2px;
}

.mbe-footer-link:hover{
  color:var(--mbe-navy);
  border-bottom-color:var(--mbe-navy);
}

html{
  scroll-padding-top:64px;
}

body:has(> .mbe-global-footer){
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

body:has(> .mbe-global-footer) > main,
body:has(> .mbe-global-footer) > #root,
body:has(> .mbe-global-footer) > .page,
body:has(> .mbe-global-footer) > .app-shell,
body:has(> .mbe-global-footer) > .atlas-page{
  flex:1 0 auto;
  min-width:0;
}

body:has(> .mbe-global-footer) > .mbe-global-footer{
  margin-top:auto;
  flex:0 0 auto;
}

body > #root:empty{
  min-height:calc(100vh - 260px);
  display:grid;
  place-items:start center;
  padding:clamp(36px,8vh,80px) 24px;
}

body > #root:empty::before{
  content:"";
  display:block;
  width:min(680px,100%);
  height:220px;
  border:1px solid var(--mbe-rule);
  border-radius:10px;
  background:
    linear-gradient(90deg,rgba(255,255,255,.22),rgba(255,255,255,.72),rgba(255,255,255,.22)) 0 0/220% 100%,
    linear-gradient(180deg,#fffdf8 0%,var(--mbe-ivory) 100%);
  box-shadow:0 18px 42px -34px rgba(11,31,58,.42);
  animation:mbe-shell-loading 1.45s ease-in-out infinite;
}

@keyframes mbe-shell-loading{
  0%{background-position:0 0,0 0;}
  100%{background-position:220% 0,0 0;}
}

@media all {
.mbe-global-shell[data-tool="steps-to-christ"],
.mbe-global-footer[data-tool="steps-to-christ"]{
  background:linear-gradient(180deg,#17111c 0%,#100c14 100%);
  border-color:#3a303f;
  color:#b8afc0;
}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-library-panel{
  background:#141019;
  border-color:#3a303f;
  color:#f6f0f8;
}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-library-item[aria-current="page"]{
  background:rgba(214,160,76,.16);
}
}

.mbe-global-shell[data-tool="steps-to-christ"] .mbe-ribbon-brand,
.mbe-global-footer[data-tool="steps-to-christ"] .mbe-footer-brand{
  background:#fffaf0;
  border:1px solid rgba(214,160,76,.38);
  border-radius:7px;
  box-shadow:0 5px 18px rgba(0,0,0,.22);
}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-ribbon-brand{
  padding:2px 8px;
}
.mbe-global-footer[data-tool="steps-to-christ"] .mbe-footer-brand{
  padding:7px 12px;
}

.mbe-global-shell[data-tool="steps-to-christ"],
.mbe-global-footer[data-tool="steps-to-christ"]{
  background:#09070e !important;
  border-color:rgba(201,164,76,.18) !important;
  color:#b9ad90 !important;
}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-ribbon-brand,
.mbe-global-footer[data-tool="steps-to-christ"] .mbe-footer-brand{
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  color:#ece0c4 !important;
}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-ribbon-back::before{
  background:rgba(201,164,76,.30) !important;
}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-ribbon-logo,
.mbe-global-footer[data-tool="steps-to-christ"] .mbe-footer-logo{
  filter:grayscale(1) brightness(0) invert(88%) sepia(18%) saturate(320%) hue-rotate(2deg);
}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-library-panel{
  background:#12263f !important;
  color:#ece0c4 !important;
  border-color:rgba(201,164,76,.22) !important;
  box-shadow:0 26px 60px -30px rgba(0,0,0,.7) !important;
}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-library-item{color:#ece0c4 !important;}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-library-item:hover{background:#17304c !important;}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-library-item[aria-current="page"]{background:rgba(201,164,76,.16) !important;}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-library-name{color:#f3e8cc !important;}
.mbe-global-shell[data-tool="steps-to-christ"] .mbe-library-desc{color:#b1a488 !important;}
.mbe-global-footer[data-tool="steps-to-christ"] .mbe-footer-link{
  color:#e0c37e !important;
  border-bottom-color:rgba(201,164,76,.45) !important;
}

@media (max-width:720px){
  .mbe-global-shell .mbe-shell-wrap{
    padding:0 18px;
    gap:12px;
  }

  .mbe-ribbon-back{display:none;}

  .mbe-ribbon-logo{
    height:30px;
  }

  .mbe-global-nav{
    gap:14px;
    font-size:.78rem;
  }

  .mbe-library-panel{
    right:-76px;
    width:min(360px,calc(100vw - 24px));
  }

  .mbe-library-grid{grid-template-columns:1fr;}

  .mbe-footer-wrap{
    min-height:auto;
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
    padding:28px 20px;
  }
}

/* Home hero spacing */
.home-showcase{
  padding-top:clamp(1rem,2vw,2rem);
}

.home-showcase-hero{
  align-items:center;
  min-height:clamp(24rem,52vh,36rem);
  margin-bottom:clamp(3rem,6vw,5rem);
  padding-top:clamp(1.25rem,3vw,2.75rem);
}

@media(max-width:980px){
  .home-showcase{
    padding-top:clamp(1rem,4vw,2rem);
  }

  .home-showcase-hero{
    min-height:auto;
    padding-top:clamp(1rem,5vw,2.5rem);
  }
}

/* MBE canonical subsite ribbon */
.mbe-global-shell,.mbe-global-footer{--mbe-ink:#ede4d3;--mbe-muted:#b9c0ce;--mbe-navy:#ede4d3;--mbe-gold-dark:#e3c278;--mbe-rule:#344055;--mbe-soft:#202c3e;background:linear-gradient(180deg,#1b283b,#142032);color:#b9c0ce;}
.mbe-library-panel{position:fixed;top:var(--mbe-ribbon-occupied-height,47px);right:max(12px,calc((100vw - var(--mbe-max))/2 + 28px));width:min(920px,calc(100vw - 24px));background:#142032;color:#ede4d3;border-color:#344055;}
.mbe-library-groups{display:grid;grid-template-columns:2fr 1fr;gap:18px;padding:4px;}
.mbe-library-group{min-width:0;}
.mbe-library-heading{margin:2px 8px 9px;color:#e3c278;font:700 .7rem/1 var(--mbe-font-ui);letter-spacing:.16em;text-transform:uppercase;}
.mbe-library-grid{display:grid;gap:6px;}
.mbe-library-grid-books{grid-template-columns:repeat(2,minmax(0,1fr));}
.mbe-library-grid-topics{grid-template-columns:1fr;}
.mbe-library-item{color:#ede4d3;}
.mbe-library-item:hover{background:#202c3e;}
.mbe-library-item[aria-current="page"]{background:rgba(237,228,211,.12);}
.mbe-library-desc{display:none!important;}
.mbe-ribbon-logo,.mbe-footer-logo{background:transparent;border-radius:0;padding:0;filter:grayscale(1) brightness(0) invert(88%) sepia(18%) saturate(320%) hue-rotate(2deg);}
@media(max-width:720px){.mbe-library-groups{grid-template-columns:1fr;gap:18px}.mbe-library-grid-books,.mbe-library-grid-topics{grid-template-columns:1fr;}}
