/* Separate navigation within a site from the link that switches sites. */
.nav-shell .nav .brand small { color: var(--theme-muted); }
.nav-shell .links .site-portal-link {
  padding: 9px 12px;
  border: 1px solid var(--theme-line);
  border-radius: 10px;
  background: var(--theme-soft);
  color: var(--theme-primary);
  white-space: nowrap;
}
.portal-return-bar {
  border-bottom: 1px solid var(--theme-line);
  background: color-mix(in srgb, white 65%, var(--theme-page));
}
.portal-return-bar > .shell { display: flex; align-items: center; min-height: 42px; }
.portal-return-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 7px 0;
  color: var(--theme-primary);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}
.portal-return-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.portal-return-link:focus-visible { outline: 3px solid var(--theme-accent); outline-offset: 2px; }
.portal-brand-context { margin-top: 3px; }
@media (max-width: 1050px) {
  .nav-shell .nav { grid-template-columns: minmax(0, 1fr) auto; }
  .nav-shell .nav .menu-button { grid-column: 2; font-size: .84rem; min-height: 44px; padding: 8px 12px; }
  .nav-shell .nav .brand small { display: block; margin-top: 3px; font-size: .65rem; line-height: 1.25; }
  .nav-shell .links { gap: 8px; padding: 12px; }
  .nav-shell .links > a { min-height: 46px; padding: 9px 11px; font-size: .85rem; }
  .nav-shell .links .site-portal-link {
    grid-column: auto;
    order: 1;
    justify-content: flex-start;
    min-height: 46px;
    margin-top: 0;
    padding: 9px 11px;
    font-weight: 800;
    white-space: normal;
  }
  .nav-shell .links .family-nav-link { grid-column: auto; margin-top: 0; }
  .nav-shell .links .family-nav-link::after { display: none; }
  .nav-shell .links .theme-submenu { order: 2; grid-column: auto; min-width: 0; }
  .nav-shell .links .theme-submenu > summary { display: flex; align-items: center; min-height: 46px; padding: 9px 11px; border: 1px solid var(--theme-line); border-radius: 11px; background: var(--theme-soft); color: var(--theme-ink); font-size: .85rem; line-height: 1.25; white-space: normal; }
  .nav-shell .links .theme-submenu[open] { grid-column: 1 / -1; }
  .nav-shell .links .theme-submenu[open] > summary { border-color: var(--theme-primary); background: color-mix(in srgb, var(--theme-primary) 11%, var(--theme-page)); color: var(--theme-primary); }
  .nav-shell .links .theme-submenu > .site-tools-panel { padding: 10px 0 0; }
}
@media (max-width: 380px) {
  .nav-shell .links { gap: 7px; padding: 10px; }
  .nav-shell .links > a, .nav-shell .links .theme-submenu > summary { padding: 8px 9px; font-size: .79rem; }
}
@media (max-width: 960px) {
  .portal-js .nav .brand strong { font-size: .88rem; letter-spacing: .035em; }
  .portal-js .nav .brand img { width: 44px; height: 44px; }
  .portal-js .nav .menu-toggle { min-height: 44px; padding: 8px 12px; font-size: .84rem; }
  .portal-js .nav .brand .portal-brand-context { display: block; font-size: .63rem; line-height: 1.3; }
}
@media (max-width: 360px) {
  .nav-shell .nav .brand { gap: 7px; }
  .nav-shell .nav .mark { width: 42px; height: 42px; }
  .nav-shell .nav .brand strong { font-size: .82rem; }
  .nav-shell .nav .menu-button { padding: 8px 9px; font-size: .78rem; }
  .portal-js .nav .brand img { width: 38px; height: 38px; }
  .portal-js .nav .brand strong { font-size: .8rem; }
  .portal-js .nav .menu-toggle { padding: 8px 9px; font-size: .79rem; }
}
