/* Brand image authority. Loaded after the application styles. */
.boot-screen .boot-wordmark {
  display: block !important;
  width: min(420px, 78vw) !important;
  height: auto !important;
  object-fit: contain !important;
  animation: tea-incoming 1.4s ease-in-out infinite !important;
}

@keyframes tea-incoming {
  0%, 100% {
    opacity: 0.68;
    transform: translateY(0) scale(0.98);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px) scale(1);
  }
}

body.logged-out .public-auth-logo.brand-image {
  display: block !important;
  margin: 0 !important;
  width: min(430px, 42vw) !important;
  height: auto !important;
  object-fit: contain !important;
  overflow: visible !important;
}

.topbar.app-topbar .brand,
body.logged-in .topbar.app-topbar .brand {
  align-self: stretch !important;
  align-items: center !important;
  overflow: visible !important;
}

.topbar.app-topbar .brand > .brand-lockup,
body.logged-in .topbar.app-topbar .brand > .brand-lockup {
  display: flex !important;
  box-sizing: border-box !important;
  min-height: 72px !important;
  padding: 2px 0 4px !important;
  flex-direction: column !important;
  justify-content: center !important;
  overflow: visible !important;
}

.topbar.app-topbar .brand .brand-header-image,
body.logged-in .topbar.app-topbar .brand .brand-header-image {
  display: block !important;
  width: 230px !important;
  max-width: 24vw !important;
  height: auto !important;
  object-fit: contain !important;
  overflow: visible !important;
}

.topbar.app-topbar .brand small,
body.logged-in .topbar.app-topbar .brand small {
  display: block !important;
  margin: -9px 0 0 6px !important;
  line-height: 1.1 !important;
}

body.logged-in .topbar.app-topbar {
  min-height: 78px !important;
}

@media (prefers-reduced-motion: reduce) {
  .boot-screen .boot-wordmark {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  body.logged-out .public-auth-logo.brand-image {
    width: min(330px, 76vw) !important;
  }

  .topbar.app-topbar .brand .brand-header-image,
  body.logged-in .topbar.app-topbar .brand .brand-header-image {
    width: 174px !important;
    max-width: 46vw !important;
  }

  .topbar.app-topbar .brand > .brand-lockup,
  body.logged-in .topbar.app-topbar .brand > .brand-lockup {
    min-height: 60px !important;
    padding: 2px 0 4px !important;
  }
}

body.logged-in .right-rail h2 small {
  margin-left: 0.35rem;
  color: var(--ss-muted, #806f74);
  font: inherit;
  font-size: 0.72em;
  font-weight: 500;
  text-transform: none;
}

.trend-list .boiling-empty {
  color: var(--ss-muted, #806f74);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Inbox shell authority: keep legacy feed grids out of the messaging workspace. */
@media (min-width: 901px) {
  html body.logged-in.inbox-view #home.app-grid,
  html body.logged-in.inbox-view.sidebar-collapsed #home.app-grid {
    grid-template-columns: 76px minmax(0, 1fr) !important;
    column-gap: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: calc(100dvh - var(--ss-topbar-height, 97px)) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  html body.logged-in.inbox-view #home.app-grid > .left-rail {
    grid-column: 1 !important;
    align-self: stretch !important;
    align-items: center !important;
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    box-sizing: border-box !important;
    padding: 18px 10px !important;
    height: 100% !important;
    min-height: 0 !important;
    border-right: 1px solid var(--ss-border, #eadde1) !important;
    overflow: hidden !important;
  }

  html body.logged-in.inbox-view .left-rail .nav-pill,
  html body.logged-in.inbox-view .left-rail .spill-button {
    display: inline-flex !important;
    justify-content: center !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }

  html body.logged-in.inbox-view .left-rail .nav-pill span,
  html body.logged-in.inbox-view .left-rail .spill-button span,
  html body.logged-in.inbox-view .left-rail .rail-card,
  html body.logged-in.inbox-view .left-rail .rail-drawer-head {
    display: none !important;
  }

  html body.logged-in.inbox-view .left-rail .nav-pill svg,
  html body.logged-in.inbox-view .left-rail .spill-button svg {
    margin: 0 !important;
  }

  html body.logged-in.inbox-view .feed-column {
    grid-column: 2 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  html body.logged-in.inbox-view #feed {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  html body.logged-in.inbox-view .inbox-screen {
    display: grid !important;
    grid-template-rows: 52px 44px minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  html body.logged-in.inbox-view .inbox-toolbar,
  html body.logged-in.inbox-view .inbox-tabs {
    width: 100% !important;
    margin: 0 !important;
    padding-inline: 24px !important;
  }

  html body.logged-in.inbox-view .inbox-workspace {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  html body.logged-in.inbox-view .inbox-workspace > .conversation-layout {
    display: grid !important;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-width: 1px 0 0 !important;
    border-radius: 0 !important;
  }

  html body.logged-in.inbox-view .conversation-list,
  html body.logged-in.inbox-view .conversation-panel,
  html body.logged-in.inbox-view .message-list {
    min-width: 0 !important;
    min-height: 0 !important;
  }

  html body.logged-in.inbox-view .conversation-panel {
    height: 100% !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
  }

  html body.logged-in.inbox-view .message-list {
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
  }

  html body.logged-in.inbox-view .request-list {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 24px !important;
    overflow-y: auto !important;
  }

  html body.logged-in.inbox-view .request-row {
    grid-template-columns: 48px minmax(0, 1fr) auto !important;
    gap: 14px !important;
    padding: 16px 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
}

@media (max-width: 900px) {
  html body.logged-in.inbox-view #home.app-grid,
  html body.logged-in.inbox-view .feed-column,
  html body.logged-in.inbox-view #feed,
  html body.logged-in.inbox-view .inbox-screen,
  html body.logged-in.inbox-view .inbox-workspace {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding-inline: 0 !important;
  }

  html body.logged-in.inbox-view .inbox-screen {
    display: grid !important;
    grid-template-rows: 48px 44px minmax(0, 1fr) !important;
    height: calc(100dvh - var(--ss-mobile-topbar-height, 72px) - 68px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html body.logged-in.inbox-view .inbox-toolbar,
  html body.logged-in.inbox-view .inbox-tabs {
    padding-inline: 16px !important;
  }

  html body.logged-in.inbox-view .inbox-workspace,
  html body.logged-in.inbox-view .request-list {
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }

  html body.logged-in.inbox-view .request-list {
    padding: 0 16px !important;
  }

  html body.logged-in.inbox-view .inbox-workspace > .conversation-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-width: 1px 0 0 !important;
    border-radius: 0 !important;
  }

  html body.logged-in.conversation-view .conversation-list {
    display: none !important;
  }

  html body.logged-in.conversation-view .conversation-panel {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  html body.logged-in.conversation-view .message-list {
    max-height: none !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
}
