/* One navigation shell across the catalogue, guide and public reading pages. */
:root { scrollbar-width: auto; scrollbar-gutter: stable; }
.shared-navigation { --site-navigation-height: 77px; }
.shared-topbar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid #dedee3; background: #fff; color: #1d1d1f;
  font: 400 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.shared-topbar *, .shared-topbar *::before, .shared-topbar *::after { box-sizing: border-box; }
.shared-topbar [hidden] { display: none !important; }
.shared-topbar a { color: inherit; text-decoration: none; overflow-wrap: normal; }
.shared-topbar button { margin: 0; border: 0; border-radius: 0; background: transparent; cursor: pointer; font-family: inherit; line-height: 1.5; }
.shared-topbar :is(a, button):focus-visible { outline: 2px solid #1d1d1f; outline-offset: -3px; border-radius: 3px; }
.shared-topbar .shared-nav-inner { width: 100%; max-width: 1280px; min-height: 76px; margin-inline: auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.shared-topbar .brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; white-space: nowrap; }
.shared-topbar .brand svg { width: 31px; height: 31px; flex-shrink: 0; }
.shared-topbar .brand strong { font-size: 23px; font-weight: 650; letter-spacing: -.02em; }
.shared-topbar .brand > span { display: inline; padding-left: 2px; color: #626268; font-size: 13px; letter-spacing: -.01em; }
.shared-topbar .shared-nav-inner > nav { align-self: stretch; display: flex; align-items: stretch; flex-wrap: nowrap; gap: 28px; margin: 0; }
.shared-topbar .nav-link { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 76px; padding: 0 1px; color: #626268; font-size: 14px; font-weight: 400; line-height: 1.5; white-space: nowrap; }
.shared-topbar .nav-link.active, .shared-topbar .nav-link[aria-current="page"] { color: #1d1d1f; font-weight: 600; }
.shared-topbar .nav-link.active::after, .shared-topbar .nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #1d1d1f; }
.shared-topbar .nav-link span { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 3px; padding: 0 4px; border-radius: 5px; background: #f5f5f7; font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.shared-topbar .nav-actions { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.shared-topbar .about-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; color: #626268; font-size: 13px; white-space: nowrap; }
.shared-topbar .about-link span { margin-left: 5px; }
.shared-topbar .account-actions { display: flex; align-items: center; justify-content: flex-end; min-width: 134px; gap: 5px; }
.shared-topbar .account-entry { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border-radius: 999px; color: #1d1d1f; font-size: 13px; white-space: nowrap; }
.shared-topbar .account-register { padding-inline: 19px; background: #1d1d1f; color: #fff; }
.shared-topbar .account-signed-in { padding-inline: 4px; color: #26744b; font-size: 12px; white-space: nowrap; }
.shared-navigation .skip-link { z-index: 40; }
.shared-navigation .reading-toc { top: calc(var(--site-navigation-height) + 24px); }
.shared-navigation :is(.reading-section, .detail-section) { scroll-margin-top: calc(var(--site-navigation-height) + 24px); }
@media (hover: hover) {
  .shared-topbar :is(.nav-link, .about-link):hover { color: #1d1d1f; text-decoration: none; }
  .shared-topbar .account-register:hover { background: #353539; color: #fff; }
}
@media (max-width: 1150px) {
  .shared-topbar .shared-nav-inner { padding-inline: 32px; gap: 18px; }
  .shared-topbar .shared-nav-inner > nav { gap: 23px; }
  .shared-topbar .nav-actions { gap: 12px; }
  .shared-topbar .nav-actions .about-link, .shared-topbar .brand > span { display: none; }
}
@media (max-width: 900px) {
  .shared-navigation { --site-navigation-height: 113px; }
  .shared-topbar .shared-nav-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 112px; padding-top: 12px; gap: 0 15px; }
  .shared-topbar .brand { grid-column: 1; grid-row: 1; justify-self: start; }
  .shared-topbar .nav-actions { grid-column: 2; grid-row: 1; }
  .shared-topbar .shared-nav-inner > nav { grid-column: 1 / -1; grid-row: 2; width: 100%; min-height: 48px; gap: 24px; justify-content: space-between; overflow-x: auto; scrollbar-width: none; }
  .shared-topbar .shared-nav-inner > nav::-webkit-scrollbar { display: none; }
  .shared-topbar .nav-link { min-height: 48px; font-size: 13px; flex-shrink: 0; }
}
@media (max-width: 700px) {
  .shared-topbar .shared-nav-inner { padding-inline: 22px; }
  .shared-topbar .brand strong { font-size: 21px; }
  .shared-topbar .brand svg { width: 29px; height: 29px; }
  .shared-topbar .account-entry { padding: 10px 13px; }
}
@media (max-width: 600px) {
  .shared-topbar .shared-nav-inner > nav { gap: 0; }
  .shared-topbar .nav-link { font-size: 12px; }
  .shared-topbar .nav-link span { min-width: 16px; height: 17px; margin-left: 2px; font-size: 10px; }
}
@media print { .shared-topbar { display: none; } }
