/* app-shell.css — the subset of home-signedin.css every page needs
   (8.168.0): the sidebar / mobile slide-out nav in its signed-out AND
   signed-in states, the compact mobile site-header, the feed pieces
   the homepage renders.

   Chosen on evidence: Chrome CSS coverage across 18 public pages signed
   out and 18 member pages signed in, 5 widths each, mobile nav opened —
   plus every rule selecting the shell or header by name. Order kept.

   This is a COPY, not a move. home-signedin.css is unchanged and still
   loads whole on the signed-in homepage v2, so its cascade is exactly
   what it was; this sheet loads everywhere else INSTEAD. Splitting the
   file was tried first and the sidebar shifted. Keep the two in sync by
   re-running the extraction (tools/browser + /tmp/extract2.js in the
   8.168.0 changelog), never by hand. */

.app-sidebar .sih-passport {
  margin: var(--space-4) 0 0;
  padding: var(--space-4);
  border-radius: var(--radius-md);
}

.app-sidebar .sih-passport__body {
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.app-sidebar .sih-passport__ring {
  width: 60px;
  height: 60px;
}

.app-sidebar .sih-passport__ring::before {
  width: 46px;
  height: 46px;
}
.site-header .header-search {
  position: relative;
  /* Takes the free space between brand and actions, but never grows
     past a comfortable measure on very wide screens. */
  /* flex-basis 0 rather than auto: with `auto` the field is sized from
     its content first and only then grows, which left it at roughly the
     placeholder's natural width.

     And NO auto margins here. `margin-inline: auto` on a flex item
     absorbs all positive free space BEFORE flex-grow is distributed, so
     the previous rule silently cancelled its own `flex: 1 1 auto` and
     the field never reached its cap — the placeholder was clipped
     mid-word as a result. The container is already
     justify-content: space-between, so the three children space
     themselves without any auto margin. */
  flex: 1 1 0;
  min-width: 0;
  /* Roomier cap: with the primary nav hidden there is a lot of free
     space between brand and actions, and 640px left an obvious gap
     after the logo. The field takes what is available up to this. */
  max-width: 720px;
  /* margin-right only. A left margin here pushed the field away from
     the brand and made the gap worse; the container's own gap already
     separates it from the logo. */
  margin-inline: 0 var(--space-4);
}
.site-header .logo,
.site-header .header__actions {
  flex: 0 0 auto;
}

.site-header .header-search__form {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  padding-inline: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg-alt);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.site-header .header-search__form:focus-within {
  border-color: var(--color-primary);
  background: var(--color-bg);
}

.site-header .header-search__icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.site-header .header-search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--fs-sm);
  color: var(--color-ink);
}

.site-header .header-search__input:focus { outline: none; }

.site-header .header-search__input {
  /* Applies to the placeholder too; text-overflow on ::placeholder is
     not honoured, which is why the old rule did nothing when the field
     was narrow. Keeps a clean ellipsis instead of a hard cut mid-word
     at widths where the full string genuinely cannot fit. */
  text-overflow: ellipsis;
}

.site-header .header-search__input::placeholder {
  color: var(--color-text-muted);
}

.site-header .header-search__kbd {
  flex-shrink: 0;
  padding: 2px var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.site-header .header-search__results {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  right: 0;
  z-index: var(--z-dropdown);
}
.site-header .account-menu__toggle { align-items: center; }
@media (max-width: 1023px) {
  .site-header .header-search { display: none; }
}
.app-sidebar__account {
  padding: var(--space-4) var(--space-4) var(--space-3);
  border-bottom: 1px solid var(--color-border-soft);
}
@media (min-width: 1024px) {
  .app-sidebar__account { display: none; }
}

.app-sidebar__account-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.app-sidebar__account-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.app-sidebar__account-name {
  min-width: 0;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--color-ink-heading);
  overflow-wrap: anywhere;
}

.app-sidebar__account-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-secondary-text);
}
.app-sidebar__utility .app-nav-link {
  /* Matches the nav links above it so the group reads as part of the
     same list rather than a separate widget. */
  width: 100%;
}
.app-sidebar__toggle {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: default;
}

.app-sidebar__toggle > span {
  flex: 1 1 auto;
  min-width: 0;
}
.app-sidebar__toggle .dark-mode-switch {
  flex-shrink: 0;
}
.app-nav-link--logout,
.app-nav-link--logout span {
  color: var(--color-danger);
}
@media (max-width: 767px) {
  .site-header .header__actions {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
  }

  .site-header .icon-btn {
    /* 40px keeps a comfortable target while reclaiming the padding that
       pushed the row over. */
    width: 40px;
    height: 40px;
    padding: 0;
    flex-shrink: 0;
  }
  .site-header .logo__tagline { display: none; }

  .site-header .logo { flex-shrink: 1; min-width: 0; }
  .site-header .nav-toggle {
    flex-shrink: 0;
    order: 10;
  }
}
@media (max-width: 360px) {
  .site-header .icon-btn {
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 767px) {
  .app-nav-link--bottom-dup { display: none; }
}
@media (max-width: 767px) {
  .app-sidebar__nav--primary { display: none; }
}
.app-sidebar__toggle > span {
  white-space: nowrap;
}
.site-header .icon-btn--alerts { color: var(--color-warning); }
.site-header .icon-btn--messages { color: var(--color-secondary-text); }
.site-header .icon-btn--alerts:hover,
.site-header .icon-btn--alerts:focus-visible,
.site-header .icon-btn--messages:hover,
.site-header .icon-btn--messages:focus-visible {
  color: var(--color-ink);
}
@media (min-width: 1024px) {
  .app-sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
  }
}
.feed__toolbar {
  /* Full row of its own, taking over the flex-basis the tab strip used
     to carry directly. */
  flex-basis: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
}
.feed__toolbar .feed__tabs {
  flex: 1 1 auto;
  flex-basis: auto;
  min-width: 0;
}
@media (max-width: 767px) {
  .feed__toolbar .feed__tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
}
.feed__tab { min-height: 44px; }
.app-sidebar .sih-passport__body {
  display: grid;
  justify-items: start;
  gap: var(--space-2);
}

.app-sidebar .sih-passport__text { min-width: 0; }

.app-sidebar .sih-passport__standing,
.app-sidebar .sih-passport__percentile,
.app-sidebar .sih-passport__hint {
  /* Long tokens — a track name, a member's own words — must wrap
     rather than widen the sidebar and push the whole shell across. */
  overflow-wrap: anywhere;
}
.app-sidebar .sih-passport__percentile { font-size: 0.6875rem; line-height: var(--lh-snug); }
.feed-card__type {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 3px var(--space-2);
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(109, 94, 245, 0.1);
  color: var(--color-primary-text); /* 10px bold on a 10% primary tint: --color-action was 3.81:1 */
}