/* Shared navigation, isolated from individual book and reader layouts. */
.site-dark .hub-header {
  position: relative;
  z-index: 200;
  color: var(--site-text);
  background: radial-gradient(ellipse at 12% 0, #19493b30, transparent 50%), #10171e;
  border-bottom: 1px solid #293a40;
}
.hub-header::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, #6ee7b7, #448c9c 55%, #6ee7b700); }
.hub-header-inner, .hub-quick-inner { width: min(1100px, 92%); margin-inline: auto; }
.hub-header-inner { display: flex; align-items: center; gap: 28px; min-height: 100px; }
.site-dark .hub-brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; color: #edf7f5; }
.hub-brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #6ee7b74a; border-radius: 15px; background: linear-gradient(145deg, #28594b, #142e2b); color: #a0f4d2; box-shadow: 0 4px 18px #0003, inset 0 1px 0 #ffffff12; transform: rotate(-5deg); }
.hub-brand-mark svg { width: 29px; height: 29px; transform: rotate(5deg); }
.hub-brand-type { display: flex; flex-direction: column; gap: 5px; }
.hub-brand-type > span { font-size: 23px; font-weight: 800; letter-spacing: -.9px; line-height: 1.15; }
.hub-brand-type b { color: var(--site-accent); }
.hub-brand-dot { color: #e4fcf4; }
.hub-brand-type small { color: #8da9a5; font-size: 7px; letter-spacing: 1.55px; font-weight: 600; }
.hub-navigation { display: flex; align-items: center; gap: 3px; }
.hub-nav-group { display: flex; }
.hub-nav-trigger, .hub-home-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 11px; border: 1px solid transparent; border-radius: 11px; color: #c3d1da; background: transparent; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .18s, color .18s, border-color .18s; }
.hub-nav-trigger > i { font-size: 8px; color: #6f8b8b; transition: transform .18s; }
.hub-home-link { width: 38px; padding-inline: 0; color: #89a19f; }
.hub-nav-trigger:hover, .hub-nav-trigger[aria-expanded="true"], .hub-home-link:hover, .hub-home-link[aria-current="page"] { background: #6ee7b70b; color: #9bf4d0; border-color: #6ee7b71c; }
.hub-nav-trigger[aria-expanded="true"] > i { transform: rotate(180deg); }
.hub-panel { position: absolute; top: calc(100% - 44px); left: 50%; transform: translateX(-50%); width: min(720px, 92vw); max-height: min(620px, 75vh); overflow-y: auto; padding: 24px; border: 1px solid #355349; border-radius: 18px; background: #142028; box-shadow: 0 28px 70px #0009, inset 0 1px 0 #a1f7d410; z-index: 5; }
.hub-panel[hidden], .hub-mobile-menu[hidden], .hub-menu-backdrop[hidden] { display: none; }
.hub-panel-heading { display: flex; align-items: center; gap: 13px; padding-bottom: 18px; margin-bottom: 14px; border-bottom: 1px solid #ffffff0c; }
.hub-panel-icon { display: grid; place-items: center; width: 42px; height: 42px; color: #8debc5; background: #6ee7b70d; border: 1px solid #6ee7b721; border-radius: 12px; }
.hub-panel-heading strong { font-size: 15px; letter-spacing: -.25px; }
.hub-panel-heading p { margin: 3px 0 0; font-size: 11px; color: #8da5b0; }
.hub-panel-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; }
.site-dark .hub-panel-links a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border-radius: 8px; color: #bfd0db; font-size: 12px; }
.hub-panel-links a span { opacity: 0; color: var(--site-accent); }
.site-dark .hub-panel-links a:hover, .site-dark .hub-panel-links a:focus-visible { background: #6ee7b70c; color: #a5f3d4; }
.hub-panel-links a:hover span, .hub-panel-links a:focus-visible span { opacity: 1; }
.hub-search { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 180px; margin: 0 0 0 auto; padding: 5px 5px 5px 14px; border: 1px solid #304049; background: #ffffff04; border-radius: 12px; transition: border-color .18s, box-shadow .18s; }
.hub-search:focus-within { border-color: #6ee7b780; box-shadow: 0 0 0 3px #6ee7b70a; }
.hub-search > i { font-size: 13px; color: #8aa59f; }
.site-dark .hub-search input, .site-dark .hub-search input:focus { width: 100%; min-width: 0; height: 32px; padding: 0; background: transparent; color: #e5edf4; border: 0; outline: none; box-shadow: none; font: inherit; font-size: 11px; }
.hub-search input::placeholder { color: #829aab; }
.hub-search-shortcut { padding: 0; min-width: 21px; height: 23px; display: grid; place-items: center; border: 1px solid #3a4850; border-radius: 5px; background: transparent; color: #82979f; font-size: 11px; }
.hub-search button { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; padding: 0; border: 1px solid #6ee7b721; border-radius: 8px; background: #6ee7b710; color: #86ebc2; font-size: 12px; cursor: pointer; }
.hub-search button:hover { background: #6ee7b7; color: #0c2a20; }
.hub-quickbar { border-top: 1px solid #ffffff06; background: #080e122a; }
.hub-quick-inner { min-height: 43px; display: flex; align-items: center; gap: 26px; overflow-x: auto; scrollbar-width: none; }
.hub-quick-inner::-webkit-scrollbar { display: none; }
.hub-quick-label { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; color: #7c9a96; font-size: 9px; font-weight: 700; letter-spacing: 1.7px; }
.hub-quick-label > span { width: 5px; height: 5px; border-radius: 50%; background: var(--site-accent); box-shadow: 0 0 9px #6ee7b760; }
.site-dark .hub-quick-inner a { display: inline-flex; align-items: center; gap: 7px; align-self: stretch; position: relative; flex-shrink: 0; color: #a4b8c3; font-size: 11px; }
.hub-quick-inner a > i { font-size: 11px; color: #6e9690; }
.site-dark .hub-quick-inner a:hover, .site-dark .hub-quick-inner a[aria-current="page"] { color: #a5f3d4; }
.hub-quick-inner a[aria-current="page"]::after { content: ""; position: absolute; bottom: 0; inset-inline: 0; height: 2px; background: #6ee7b7; }
.hub-menu-toggle { display: none; }
.hub-menu-backdrop { position: fixed; inset: 0; z-index: 9998; background: #02090cc2; backdrop-filter: blur(5px); animation: hub-backdrop-in .2s ease both; }
.site-dark .hub-mobile-menu { position: fixed; inset: 0 0 0 auto; z-index: 9999; width: min(400px, 92vw); height: 100dvh; overflow-y: auto; overscroll-behavior: contain; padding: 26px 22px; background: radial-gradient(ellipse at top right, #244c3d40, transparent 40%), #111c24; color: var(--site-text); border-left: 1px solid #345044; box-shadow: -20px 0 80px #0005; }
.hub-mobile-menu:not([hidden]) { animation: hub-drawer-in .24s ease both; }
@keyframes hub-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hub-drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.hub-mobile-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.hub-mobile-eyebrow { color: #87b9a8; font-size: 9px; font-weight: 700; letter-spacing: 2px; }
.hub-mobile-heading h2 { font-size: 21px; font-weight: 700; letter-spacing: -.6px; margin: 7px 0 0; }
.hub-menu-close { width: 38px; height: 38px; border: 1px solid #364a4a; border-radius: 11px; background: #ffffff05; color: #cde8de; font-size: 26px; line-height: 1; }
.hub-mobile-home, .hub-mobile-section summary { display: flex; align-items: center; gap: 12px; padding: 17px 4px; color: #d5e3e9; font-size: 14px; font-weight: 600; cursor: pointer; }
.hub-mobile-home > span, .hub-mobile-section summary > i:last-child { margin-left: auto; font-size: 11px; color: #96bbac; }
.hub-mobile-home > i, .hub-mobile-section summary > i:first-child { width: 20px; color: #84c6ae; }
.hub-mobile-section { border-top: 1px solid #ffffff0c; }
.hub-mobile-section summary { list-style: none; }
.hub-mobile-section summary::-webkit-details-marker { display: none; }
.hub-mobile-section[open] summary > i:last-child { transform: rotate(45deg); }
.hub-mobile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-bottom: 20px; }
.site-dark .hub-mobile-grid a { padding: 10px; background: #ffffff04; border: 1px solid #ffffff07; border-radius: 8px; color: #b5c9d2; font-size: 12px; }
.site-dark .hub-mobile-grid a:hover { color: var(--site-accent); border-color: #6ee7b755; }
.site-dark .hub-mobile-feature { display: block; margin-top: 30px; padding: 18px; border: 1px solid #6ee7b726; border-radius: 14px; background: linear-gradient(120deg, #6ee7b70a, transparent); color: #c6e4d8; }
.hub-mobile-feature > span { display: block; margin-bottom: 8px; font-size: 11px; color: #7fbaa4; }
.hub-mobile-feature strong { font-size: 13px; font-weight: 600; }
html.hub-menu-locked, body.hub-menu-locked { overflow: hidden; }
@media (min-width: 992px) and (max-width: 1199px) {
  .hub-header-inner { gap: 18px; }
  .hub-brand-type > span { font-size: 20px; }
  .hub-brand-type small { font-size: 6px; letter-spacing: 1.3px; }
  .hub-brand-mark { width: 40px; height: 40px; }
  .hub-nav-trigger { padding-inline: 8px; font-size: 12px; }
  .hub-home-link, .hub-search-shortcut { display: none; }
}
@media (max-width: 991.98px) {
  .hub-header-inner { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 18px 16px; padding-block: 20px 16px; }
  .hub-navigation { display: none; }
  .hub-brand-type > span { font-size: 22px; }
  .hub-brand-type small { font-size: 6.5px; letter-spacing: 1.2px; }
  .hub-brand-mark { width: 42px; height: 42px; border-radius: 13px; }
  .hub-search { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; }
  .site-dark .hub-search input { font-size: 12px; }
  .hub-search-shortcut { display: none; }
  .hub-menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 42px; height: 42px; border: 1px solid #30443f; border-radius: 12px; background: #6ee7b706; color: #a5d6c5; }
  .hub-menu-toggle span { width: 17px; height: 1.5px; background: currentColor; border-radius: 1px; }
  .hub-menu-toggle span:last-child { width: 11px; align-self: flex-start; margin-left: 12px; }
  .hub-quick-inner { gap: 22px; min-height: 43px; }
  .hub-quick-label { display: none; }
}
@media (max-width: 359px) {
  .hub-brand-type > span { font-size: 19px; }
  .hub-brand-type small { font-size: 5.5px; letter-spacing: 1px; }
  .hub-brand { gap: 9px; }
}
