/* The Muugart top bar, footer and account corner: the same on every page.
   Self-contained: it brings its own colours, so it looks the same on the
   home page, the plain book, the gallery and the discussion. */
.mbar, .mfoot, [data-mbar-me] {
  --mb-bg: rgba(11, 13, 20, .78); --mb-ink: #efe9df; --mb-soft: #a9a59c; --mb-accent: #ffb86b; --mb-card: #141824;
  --mb-sign: "Barlow Semi Condensed", Bahnschrift, "DIN Alternate", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --mb-serif: "TeX Gyre Pagella", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
.mbar { position: fixed; inset: 0 0 auto 0; z-index: 95; height: 48px; display: flex; align-items: center; gap: 1.6rem; padding: 0 max(1rem, calc(50% - 540px)); background: var(--mb-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--mb-ink); font-family: var(--mb-sign); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; line-height: 1; box-sizing: border-box; }
.mbar *, .mfoot *, [data-mbar-me] * { box-sizing: border-box; }
.mbar a { color: var(--mb-ink); text-decoration: none; }
.mbar a:hover { text-decoration: none; }
.mbar-brand { font-weight: 700; letter-spacing: .24em; white-space: nowrap; }
.mbar-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.mbar-nav a { opacity: .78; white-space: nowrap; padding: .4rem 0; }
.mbar-nav a:hover { opacity: 1; color: var(--mb-accent); }
.mbar-nav a[aria-current="page"] { opacity: 1; color: var(--mb-accent); box-shadow: inset 0 -2px 0 var(--mb-accent); }
.mbar-right { display: flex; align-items: center; gap: .6rem; }
.mbar-tool { border: 0; background: none; color: var(--mb-ink); font: inherit; font-size: 1rem; letter-spacing: 0; padding: .35rem .5rem; border-radius: 2px; cursor: pointer; opacity: .8; }
.mbar-tool:hover { opacity: 1; background: rgba(255,255,255,.1); }
.mbar-menu { display: none; border: 0; background: none; width: 40px; height: 40px; padding: 0; cursor: pointer; position: relative; }
.mbar-menu span, .mbar-menu::before, .mbar-menu::after { content: ""; position: absolute; left: 11px; right: 11px; height: 2px; background: var(--mb-ink); transition: transform .25s, opacity .25s; }
.mbar-menu::before { top: 13px; } .mbar-menu span { top: 19px; } .mbar-menu::after { top: 25px; }
.mbar-menu[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.mbar-menu[aria-expanded="true"] span { opacity: 0; }
.mbar-menu[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

/* the account corner: also used inside the journey's own bar */
[data-mbar-me] { position: relative; display: flex; align-items: center; font-family: var(--mb-sign); }
.mbar-login { display: inline-block; font-family: var(--mb-sign); font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: #17100a !important; background: var(--mb-accent); padding: .5rem .9rem; border-radius: 2px; white-space: nowrap; line-height: 1; }
.mbar-login:hover { filter: brightness(1.12); text-decoration: none; }
.mbar-who { display: flex; align-items: center; gap: .55rem; border: 0; background: none; color: var(--mb-ink); font: inherit; font-family: var(--mb-sign); font-size: .78rem; letter-spacing: .08em; text-transform: none; padding: .2rem .5rem .2rem .2rem; border-radius: 99px; cursor: pointer; max-width: 15rem; }
.mbar-who:hover, .mbar-who[aria-expanded="true"] { background: rgba(255,255,255,.1); }
.mbar-who img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; display: block; }
.mbar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbar-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 12rem; background: var(--mb-card); border-radius: 3px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.8), inset 0 2px 0 var(--mb-accent); padding: .4rem 0; z-index: 96; text-transform: none; letter-spacing: .04em; font-size: .9rem; }
.mbar-pop[hidden] { display: none; }
.mbar-pop a, .mbar-pop button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--mb-ink) !important; font: inherit; font-family: var(--mb-sign); padding: .65rem 1.1rem; text-decoration: none; cursor: pointer; }
.mbar-pop a:hover, .mbar-pop button:hover { background: rgba(255,255,255,.07); color: var(--mb-accent) !important; text-decoration: none; }
.mbar-pop .mbar-pop-who { padding: .5rem 1.1rem .7rem; color: var(--mb-soft); font-size: .78rem; box-shadow: inset 0 -1px 0 rgba(255,255,255,.08); margin-bottom: .3rem; }

/* search: the button in the bar and the panel */
.mbar-search { border: 0; background: none; color: var(--mb-ink, #efe9df); width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 2px; cursor: pointer; opacity: .85; }
.mbar-search:hover { opacity: 1; background: rgba(255,255,255,.1); }
.mbar-search svg { width: 18px; height: 18px; display: block; }
.msearch { position: fixed; inset: 0; z-index: 200; background: rgba(6, 7, 11, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 8vh 1rem 2rem; }
.msearch[hidden] { display: none; }
.msearch-in { width: min(46rem, 100%); max-height: 84vh; display: flex; flex-direction: column; background: #0f121b; border-radius: 4px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.95), inset 0 2px 0 #ffb86b; color: #efe9df; }
.msearch-head { display: flex; align-items: center; gap: .5rem; padding: 1rem 1rem .4rem 1.2rem; }
.msearch-head input { flex: 1; min-width: 0; border: 0; border-radius: 2px; background: rgba(255,255,255,.07); color: #efe9df; font: 1.2rem/1.4 "TeX Gyre Pagella", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; padding: .7rem .9rem; }
.msearch-head input:focus { outline: 2px solid #ffb86b; outline-offset: 0; }
.msearch-x { border: 0; background: none; color: #a9a59c; font-size: 1.8rem; line-height: 1; width: 44px; height: 44px; cursor: pointer; border-radius: 2px; }
.msearch-x:hover { color: #efe9df; background: rgba(255,255,255,.08); }
.msearch-info { margin: .2rem 1.2rem .6rem; font-family: "Barlow Semi Condensed", Bahnschrift, "Arial Narrow", sans-serif; font-size: .8rem; letter-spacing: .06em; color: #a9a59c; }
.msearch-list { list-style: none; margin: 0; padding: 0 .6rem 1rem; overflow-y: auto; }
.msearch-list li { position: relative; border-radius: 3px; }
.msearch-list li.first { margin-top: .5rem; }
.msearch-hit { display: block; padding: .7rem .8rem .3rem; color: #efe9df !important; text-decoration: none !important; border-radius: 3px; }
.msearch-list li:hover, .msearch-list li:focus-within { background: rgba(255,255,255,.05); }
.msearch-where { display: block; font-family: "Barlow Semi Condensed", Bahnschrift, "Arial Narrow", sans-serif; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #ffb86b; margin-bottom: .25rem; }
.msearch-snip { margin: 0; font-family: "TeX Gyre Pagella", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-size: 1rem; line-height: 1.5; color: #d9d3c8; }
.msearch-snip mark { background: rgba(255,184,107,.28); color: #fff; border-radius: 2px; padding: 0 .1em; }
.msearch-other { display: inline-block; margin: 0 0 .5rem .8rem; font-family: "Barlow Semi Condensed", Bahnschrift, "Arial Narrow", sans-serif; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #a9a59c !important; text-decoration: none; }
.msearch-other:hover { color: #ffb86b !important; }
html.msearch-open { overflow: hidden; }
/* the passage a search result opens at, marked in our colours */
::target-text, mark.mfound { background: #ffb86b; color: #17100a; border-radius: 2px; box-shadow: 0 0 0 3px #ffb86b; }
.msearch-head input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
@media (max-width: 760px) { .msearch { padding: 0; } .msearch-in { max-height: 100vh; height: 100%; border-radius: 0; } }

/* quote cards: the button that follows a selection, and the card */
.qc-btn { position: absolute; z-index: 120; border: 0; border-radius: 3px; padding: .5rem .9rem; background: #ffb86b; color: #17100a; font: 700 .74rem/1 "Barlow Semi Condensed", Bahnschrift, "Arial Narrow", sans-serif; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; box-shadow: 0 10px 26px -8px rgba(0,0,0,.8); }
.qc-btn[hidden] { display: none; }
.qc { position: fixed; inset: 0; z-index: 220; background: rgba(6,7,11,.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 1rem; }
.qc[hidden] { display: none; }
html.qc-open { overflow: hidden; }
.qc-in { position: relative; width: min(34rem, 100%); background: #0f121b; border-radius: 4px; padding: 1.2rem; box-shadow: 0 40px 90px -30px rgba(0,0,0,.95), inset 0 2px 0 #ffb86b; }
.qc-canvas { display: block; width: 100%; height: auto; border-radius: 2px; }
.qc-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; }
.qc-row .btn { display: inline-block; font-family: "Barlow Semi Condensed", Bahnschrift, "Arial Narrow", sans-serif; font-weight: 700; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; padding: .75rem 1.1rem; border-radius: 2px; background: #ffb86b; color: #17100a; border: 0; cursor: pointer; }
.qc-row .btn.ghost { background: none; color: #efe9df; box-shadow: inset 0 0 0 1px currentColor; }
.qc-row .btn[hidden] { display: none; }
.qc-formats { display: flex; margin-right: auto; border-radius: 2px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.qc-f { border: 0; background: none; color: #a9a59c; font: .74rem/1 "Barlow Semi Condensed", Bahnschrift, "Arial Narrow", sans-serif; letter-spacing: .12em; text-transform: uppercase; padding: .7rem .9rem; cursor: pointer; }
.qc-f.on { background: rgba(255,184,107,.18); color: #ffb86b; }
.qc-share { margin-top: .7rem; gap: .2rem .9rem; }
.qc-label { font: .7rem/1 "Barlow Semi Condensed", Bahnschrift, "Arial Narrow", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #a9a59c; margin-right: .2rem; }
.qc-site { border: 0; background: none; padding: .35rem 0; color: #ffb86b; font: .86rem/1 "Barlow Semi Condensed", Bahnschrift, "Arial Narrow", sans-serif; letter-spacing: .04em; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.qc-site:hover { color: #fff; }
.qc-note { margin: .7rem 0 0; min-height: 1.2em; font: .82rem/1.3 "Barlow Semi Condensed", Bahnschrift, "Arial Narrow", sans-serif; letter-spacing: .04em; color: #ffb86b; }
.qc-row .btn { padding: .7rem .9rem; }
.qc-x { position: absolute; right: .3rem; top: -2.8rem; border: 0; background: none; color: #efe9df; font-size: 2rem; width: 44px; height: 44px; cursor: pointer; }
@media print { .qc-btn, .qc { display: none !important; } }

/* selected text: the site's amber, glowing, not the browser's blue (light pages get a softer wash) */
::selection { background: rgba(255, 184, 107, .38); color: #fff; text-shadow: 0 0 10px rgba(255, 184, 107, .7); }
:root[data-theme="light"] ::selection { background: rgba(255, 154, 60, .3); color: #17100a; text-shadow: none; }
/* hover hints, in the site's own look */
.mtip { position: fixed; z-index: 300; max-width: 18rem; pointer-events: none; background: #141824; color: #efe9df; font-family: "Barlow Semi Condensed", Bahnschrift, "DIN Alternate", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif; font-size: .78rem; letter-spacing: .04em; line-height: 1.35; padding: .45rem .7rem; border-radius: 3px; box-shadow: 0 10px 30px -8px rgba(0,0,0,.8), inset 0 2px 0 #ffb86b; }
.mtip[hidden] { display: none; }

/* the footer */
.mfoot { position: relative; z-index: 1; text-align: center; padding: 3.5rem 1.25rem 4.5rem; background: #0b0d14; color: var(--mb-soft); font-family: var(--mb-serif); font-size: 1rem; line-height: 1.6; }
.mfoot p { margin: 0 auto; max-width: 36rem; }
.mfoot a { color: var(--mb-accent); text-underline-offset: .18em; }
.mfoot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; margin: 0 0 1.8rem; font-family: var(--mb-sign); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.mfoot-nav a { color: var(--mb-ink); text-decoration: none; opacity: .75; }
.mfoot-nav a:hover { opacity: 1; color: var(--mb-accent); }
.mfoot-book { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin: 0 0 2.2rem !important; max-width: none !important; }
.mfoot-book a { font-family: var(--mb-sign); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: .6rem 1rem; border-radius: 2px; box-shadow: inset 0 0 0 1px currentColor; }
.mfoot-c { font-family: var(--mb-sign); font-size: .74rem; letter-spacing: .06em; margin-top: 1rem !important; }

@media (max-width: 760px) {
  .mbar { gap: .4rem; padding: 0 .4rem 0 1rem; }
  .mbar-right { margin-left: auto; gap: .2rem; }
  .mbar-menu { display: block; }
  .mbar-name { display: none; }
  .mbar-who { padding: .2rem; }
  .mbar-nav { display: none; position: fixed; inset: 48px 0 auto 0; flex-direction: column; gap: 0; margin: 0; padding: .6rem 0 1.2rem; background: #0b0d14; box-shadow: 0 30px 50px -20px rgba(0,0,0,.9); font-size: 1rem; letter-spacing: .18em; }
  .mbar-nav.open { display: flex; }
  .mbar-nav a { padding: 1rem 1.5rem; opacity: 1; }
  .mbar-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--mb-accent); }
}
@media print { .mbar, .mfoot, .mtip, [data-mbar-me] { display: none !important; } }
