:root {
  --kb-nav-height: 120px;
}
.kb-shell {
  position: relative;
  z-index: 20;
  background: #fbfaf5;
  color: #253e37;
  font:
    14px/1.5 "PingFang SC",
    "Microsoft Yahei",
    sans-serif;
  flex: none;
}
.kb-shell .kb-top {
  height: 70px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 50px;
  border-bottom: 1px solid #d9dfd5;
}
.kb-shell .kb-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  font:
    600 26px Georgia,
    serif;
  letter-spacing: 1px;
  color: #26614c;
  text-decoration: none;
}
.kb-shell .kb-brand span {
  font: 12px sans-serif;
  letter-spacing: 0;
  color: #728078;
}
.kb-shell .kb-global {
  align-items: center;
  position: static;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  height: auto;
  pointer-events: auto;
}
.kb-shell .kb-global a {
  color: #728078;
  font-size: 14px;
  text-decoration: none;
}
.kb-shell .kb-global a[aria-current] {
  color: #26614c;
  font-weight: 600;
  border-bottom: 2px solid #26614c;
  padding: 22px 0;
}
.kb-tabs,
nav.kb-tabs {
  position: relative;
  inset: auto;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 6px 16px;
  background: #fbfaf5;
  border-bottom: 1px solid #d9dfd5;
  z-index: 19;
  font:
    13px/1.5 "PingFang SC",
    "Microsoft Yahei",
    sans-serif;
  pointer-events: auto;
  color: #253e37;
}
.kb-tabs[hidden] {
  display: none !important;
}
.kb-tabs a {
  display: block;
  padding: 8px 22px;
  border-radius: 5px;
  color: #52645a;
  text-decoration: none;
  white-space: nowrap;
}
.kb-tabs a:hover {
  background: #e8ede2;
}
.kb-tabs a[aria-current] {
  background: #254f40;
  color: #fffaf0;
}
.kb-tabs a:focus-visible,
.kb-shell a:focus-visible {
  outline: 3px solid #d4a85c;
  outline-offset: 2px;
}
body.explore-view > .layout {
  height: calc(100dvh - var(--kb-nav-height));
}
body.dag-view > header {
  height: 108px;
}
body.dag-view > .workspace {
  height: calc(100dvh - var(--kb-nav-height) - 108px);
}
body.map-view .map-stage {
  position: relative;
  height: calc(100dvh - var(--kb-nav-height));
}
body.map-view #map {
  height: 100%;
}
body.map-view .map-stage > aside {
  height: 100%;
}
body.library-view > .layout {
  min-height: calc(100dvh - var(--header) - 50px);
}
body.library-view > .layout > .sidebar {
  top: calc(var(--header) + 50px);
  height: calc(100dvh - var(--header) - 50px);
}
body.library-view > #libraryTabs {
  position: sticky;
  top: var(--header);
}
@media (max-width: 1100px) {
  body.explore-view > .layout {
    height: auto;
  }
}
@media (max-width: 800px) {
  :root {
    --kb-nav-height: 112px;
  }
  .kb-shell .kb-top {
    height: 62px;
    padding: 0 16px;
    gap: 18px;
    justify-content: space-between;
  }
  .kb-shell .kb-brand {
    font-size: 21px;
  }
  .kb-shell .kb-brand span {
    display: none;
  }
  .kb-shell .kb-global {
    align-items: center;
    gap: 18px;
  }
  .kb-shell .kb-global a {
    font-size: 13px;
  }
  .kb-shell .kb-global a[aria-current] {
    padding: 18px 0;
  }
  .kb-tabs,
  nav.kb-tabs {
    gap: 4px;
    padding: 6px 8px;
  }
  .kb-tabs a {
    padding: 8px 13px;
    font-size: 12px;
  }
  body.map-view .map-stage {
    height: auto;
  }
  body.map-view #map {
    height: calc((100dvh - var(--kb-nav-height)) * 0.62);
  }
  body.map-view .map-stage > aside {
    height: calc((100dvh - var(--kb-nav-height)) * 0.38);
    min-height: 240px;
  }
  body.map-view .map-stage > nav {
    top: calc((100dvh - var(--kb-nav-height)) * 0.62 - 48px);
  }
  body.dag-view > .workspace {
    height: auto;
  }
  body.dag-view > header {
    height: 100px;
  }
  body.dag-view main {
    height: 58dvh;
  }
  body.library-view > .layout > .sidebar {
    height: calc(100dvh - var(--header) - 50px);
  }
}
/* The existing reader keeps its search and course navigation within the same shell. */
body:has(> .topbar) {
  --header: 70px;
}
.topbar {
  padding-left: 28px;
  padding-right: 28px;
  gap: 50px;
}
.topbar .brand {
  font:
    600 26px Georgia,
    serif;
  letter-spacing: 1px;
  color: #26614c;
}
.topbar .brand span {
  font: 12px sans-serif;
  letter-spacing: 0;
  border: 0;
  padding-left: 0;
}
@media (max-width: 800px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
    gap: 16px;
  }
}
