/* Shared navigation for the app and the server-rendered community. */
:root {
  --app-canvas: #f5f5f7;
  --app-paper: #fff;
  --app-ink: #1d1d1f;
  --app-secondary: #68686e;
  --app-line: #e3e3e8;
  --app-blue: #0066cc;
  --app-selected: #e6effa;
  --app-rail-width: 244px;
  --app-gutter: clamp(24px, 3.4vw, 48px);
  --app-system:
    -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.app-shell {
  background: var(--app-canvas);
  color: var(--app-ink);
  min-height: 100vh;
  font-family: var(--app-system);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.app-icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-skip {
  position: fixed;
  left: 12px;
  top: -100px;
  padding: 12px;
  background: white;
  color: var(--app-blue);
  z-index: 120;
  border-radius: 12px;
}
.app-skip:focus {
  top: 12px;
}
.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--app-ink);
  text-decoration: none;
  white-space: nowrap;
  font: 680 17px/1 var(--app-system);
  letter-spacing: -0.65px;
}
.app-brand:hover {
  text-decoration: none;
}
.app-brand img {
  width: 33px;
  height: 33px;
}
.brand-hub {
  color: inherit;
}
.app-rail {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--app-rail-width);
  padding: 30px 18px 22px;
  background: #efeff2;
  border-right: 1px solid #dedee3;
  overflow-y: auto;
  z-index: 42;
}
.app-rail .app-brand {
  margin: 0 8px 38px;
}
.app-nav-label {
  margin: 12px 12px 9px;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #74747c;
}
.app-rail nav + nav {
  margin-top: 26px;
}
.app-destination {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 43px;
  margin-block: 3px;
  padding: 9px 12px;
  border-radius: 11px;
  color: #45454b;
  font: 450 14px/1.35 var(--app-system);
  text-decoration: none;
  text-align: left;
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s;
}
.app-destination .app-icon {
  color: #707079;
  width: 19px;
  height: 19px;
}
.app-destination:hover,
.app-destination:focus-visible {
  color: var(--app-blue);
  background: #e5e5e9;
  text-decoration: none;
}
.app-destination[aria-current] {
  background: white;
  color: var(--app-blue);
  font-weight: 650;
  box-shadow: 0 1px 4px #17172809;
}
.app-destination[aria-current] .app-icon {
  color: var(--app-blue);
}
.app-more {
  width: 100%;
  margin-top: 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.app-rail-foot {
  margin-top: auto;
  padding-top: 36px;
}
.app-rail-foot > .app-destination:last-child {
  border-top: 1px solid #dedee5;
  border-radius: 0;
  margin-top: 12px;
  padding-top: 18px;
}
.app-body {
  min-width: 0;
  margin-left: var(--app-rail-width);
}
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  min-height: 64px;
  margin-inline: auto;
  padding: 8px var(--app-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(245, 245, 247, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
  backdrop-filter: saturate(160%) blur(24px);
  transition:
    box-shadow 0.2s,
    background 0.2s;
}
.app-topbar.is-scrolled {
  box-shadow: 0 1px 0 #d5d5dc88;
  background: rgba(249, 249, 251, 0.88);
}
.app-toolbar-left,
.app-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.app-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  color: var(--app-blue);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.app-back .app-icon {
  width: 20px;
  height: 20px;
  transform: rotate(180deg);
  stroke-width: 2.2;
}
.app-compact-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: 36%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
}
.app-mobile-name {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
  color: #53535a;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.app-mobile-name img {
  width: 23px;
  height: 23px;
}
.app-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  min-height: 38px;
  background: #eaeaec;
  color: #73737a;
  border: 0;
  border-radius: 22px;
  font-size: 12px;
  text-decoration: none;
}
.app-search:hover {
  background: #e1e1e5;
  color: var(--app-blue);
}
.app-search .app-icon {
  width: 16px;
  height: 16px;
}
.app-search kbd {
  margin-left: 22px;
  font: 10px/1.5 var(--app-system);
  opacity: 0.8;
}
.app-round-action,
.app-browse {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--app-blue);
  background: #eaeaec;
  cursor: pointer;
}
.app-round-action:hover,
.app-browse:hover {
  background: #e0e7ef;
}
.app-round-action[aria-pressed="true"] {
  background: var(--app-selected);
}
.app-round-action[aria-pressed="true"] .app-icon {
  fill: var(--app-blue);
}
.app-browse,
.app-tabs,
.app-mobile-brand {
  display: none;
}
.app-directory {
  background: #f5f5f7;
  border: 1px solid white;
  border-radius: 28px;
  color: var(--app-ink);
  z-index: 110;
  padding: 26px;
  box-shadow: 0 24px 90px #17172826;
}
.app-directory h2 {
  font: 700 26px/1.2 var(--app-system);
  letter-spacing: -0.04em;
}
.app-directory nav {
  max-height: min(64dvh, 540px);
  overflow: auto;
  overscroll-behavior: contain;
}
.app-directory .app-nav-label {
  margin-top: 24px;
}
.app-directory .app-nav-label:first-child {
  margin-top: 2px;
}
.app-directory .app-destination {
  min-height: 46px;
  background: white;
  margin: 0;
  border-radius: 0;
  border-bottom: 1px solid #eeeef2;
}
.app-directory .app-nav-label + .app-destination {
  border-radius: 14px 14px 0 0;
}
.app-directory .app-destination:has(+ .app-nav-label),
.app-directory .app-destination:last-child {
  border-radius: 0 0 14px 14px;
  border-bottom: 0;
}
.app-shell :is(a, button, select, input, summary, textarea):focus-visible {
  outline: 3px solid #007aff;
  outline-offset: 3px;
}
.app-save-notice {
  position: fixed;
  left: calc(50% + var(--app-rail-width) / 2);
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  z-index: 115;
  padding: 13px 20px;
  border-radius: 24px;
  background: #252529;
  color: white;
  box-shadow: 0 5px 24px #0002;
  font-size: 14px;
  text-align: center;
}
html {
  scroll-padding-top: 80px;
}
@media (max-width: 1023px) {
  :root {
    --app-gutter: clamp(20px, 4.5vw, 34px);
  }
  .app-shell {
    padding-bottom: calc(98px + env(safe-area-inset-bottom));
  }
  .app-rail {
    display: none;
  }
  .app-body {
    margin-left: 0;
  }
  .app-topbar {
    min-height: 60px;
    padding: 8px var(--app-gutter);
    padding-top: max(8px, env(safe-area-inset-top));
  }
  .app-mobile-brand {
    display: block;
  }
  .app-mobile-name {
    display: flex;
  }
  .app-top-actions {
    gap: 7px;
  }
  .app-search,
  .app-browse,
  .app-round-action {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    background: #e9e9ed;
    border-radius: 50%;
    color: var(--app-blue);
  }
  .app-search .app-icon,
  .app-round-action .app-icon {
    width: 18px;
    height: 18px;
  }
  .app-search span,
  .app-search kbd {
    display: none;
  }
  .app-compact-title {
    max-width: 34%;
    left: 46%;
    font-size: 13px;
  }
  .app-topbar.is-scrolled:has(.app-compact-title) .app-mobile-name span {
    visibility: hidden;
  }
  .app-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    inset: auto 14px calc(12px + env(safe-area-inset-bottom));
    margin-inline: auto;
    max-width: 530px;
    z-index: 41;
    padding: 6px;
    background: rgba(255, 255, 255, 0.87);
    border: 1px solid #fff;
    border-radius: 36px;
    box-shadow:
      0 4px 28px #22223a1a,
      0 0 0 0.5px #d9d9e26b;
    -webkit-backdrop-filter: saturate(180%) blur(28px);
    backdrop-filter: saturate(180%) blur(28px);
  }
  .app-tabs .app-destination {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    margin: 0;
    padding: 7px 1px;
    min-height: 51px;
    border-radius: 26px;
    font-size: 9px;
    font-weight: 550;
    text-align: center;
    letter-spacing: 0.005em;
  }
  .app-tabs .app-icon {
    width: 21px;
    height: 21px;
  }
  .app-tabs .app-destination[aria-current] {
    background: #e9f1fc;
    color: #005fc4;
    box-shadow: none;
  }
  .app-tabs .app-destination[aria-current] .app-icon {
    stroke-width: 2.2;
  }
  .app-save-notice {
    left: 50%;
    bottom: calc(96px + env(safe-area-inset-bottom));
  }
  html {
    scroll-padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}
@media (max-width: 360px) {
  .app-mobile-name {
    font-size: 11px;
    gap: 5px;
  }
  .app-top-actions {
    gap: 4px;
  }
  .app-tabs {
    inset-inline: 10px;
  }
  .app-tabs .app-destination {
    font-size: 8px;
  }
  .app-compact-title {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell *,
  .app-shell *::before,
  .app-shell *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
@media print {
  .app-rail,
  .app-tabs,
  .app-topbar,
  .app-skip,
  .app-directory,
  .app-save-notice {
    display: none !important;
  }
  .app-body {
    margin: 0;
  }
  .app-shell {
    padding: 0;
    background: white;
  }
}

/* Consent actions stay inside the sheet at every supported phone width. */
.app-shell aside[aria-label="Analytics privacy choices"] > div:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.app-shell aside[aria-label="Analytics privacy choices"] > div:last-child button {
  min-width: 0;
  min-height: 46px;
  height: auto;
  padding: 10px 8px;
  white-space: normal;
  line-height: 1.4;
}
