/* Generated by tools/build-modern.mjs. */
/* Colours for the Modern community. Site identity comes from the saved Appearance palette. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] {
    --sms-modern-surface: #fff;
    --sms-modern-text: #18212b;
    --sms-modern-muted: #576371;
    --sms-modern-line: #dfe3e7;
    --sms-modern-quiet: #edf0f3;
    --sms-modern-canvas: var(--sms-brand-background, #f7f8fa);
    --sms-modern-soft: color-mix(in srgb, var(--sms-primary) 9%, var(--sms-modern-surface));
    --sms-modern-accent-text: var(--sms-link-on-light, #204d8e);
    --sms-modern-radius: 16px;
    --sms-modern-gap: 18px;
}
body.sms-density-compact #smsocial-app.sms-app-root[data-sms-presentation="modern"] { --sms-modern-gap: 12px; }
body.sms-card-flat #smsocial-app.sms-app-root[data-sms-presentation="modern"] { --sms-modern-radius: 8px; }
body.sms-color-mode-dark #smsocial-app.sms-app-root[data-sms-presentation="modern"] {
    --sms-modern-surface: #1c2228;
    --sms-modern-text: #eff3f5;
    --sms-modern-muted: #b2bcc5;
    --sms-modern-line: #3a434d;
    --sms-modern-quiet: #292f37;
    --sms-modern-canvas: #14191f;
    --sms-modern-accent-text: var(--sms-link-on-dark, #abc5ff);
}
@media (prefers-color-scheme: dark) {
    body.sms-color-mode-system #smsocial-app.sms-app-root[data-sms-presentation="modern"] {
        --sms-modern-surface: #1c2228;
        --sms-modern-text: #eff3f5;
        --sms-modern-muted: #b2bcc5;
        --sms-modern-line: #3a434d;
        --sms-modern-quiet: #292f37;
        --sms-modern-canvas: #14191f;
        --sms-modern-accent-text: var(--sms-link-on-dark, #abc5ff);
    }
}

/* The theme, native bridge and router own the workspace height and scrolling. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] {
  background: var(--sms-modern-canvas);
  color: var(--sms-modern-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-shell {
  background: var(--sms-modern-canvas);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar {
  background: var(--sms-modern-surface);
  border-color: var(--sms-modern-line);
  box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-brand__mark:not(.has-image) {
  color: var(--sms-on-primary);
  background: var(--sms-primary);
  border-radius: 13px 13px 13px 4px;
  box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-brand__name {
  font-weight: 750;
  letter-spacing: -.035em;
  color: var(--sms-modern-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-search {
  max-inline-size: 380px;
  border: 1px solid var(--sms-modern-line);
  border-radius: 99px;
  background: var(--sms-modern-canvas);
  color: var(--sms-modern-muted);
  box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-search:focus-within {
  outline: 2px solid var(--sms-modern-accent-text);
  outline-offset: 2px;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-search input {
  background: transparent;
  color: var(--sms-modern-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-search input::placeholder {
  color: var(--sms-modern-muted);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-search kbd {
  background: var(--sms-modern-surface);
  border-color: var(--sms-modern-line);
  border-radius: 6px;
  color: var(--sms-modern-muted);
  box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar__actions > :is(.sms-app-message-action, .sms-app-notification-action, .sms-app-mobile-trigger, .sms-app-logout),
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-mobile-trigger--navigation {
  border: 1px solid var(--sms-modern-line);
  border-radius: 99px;
  background: var(--sms-modern-canvas);
  color: var(--sms-modern-text);
  box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar__actions > :is(.sms-app-message-action, .sms-app-notification-action, .sms-app-mobile-trigger, .sms-app-logout):is(:hover, :focus-visible, [aria-current="page"]),
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-mobile-trigger--navigation:is(:hover, :focus-visible),
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topnav__item:is(:hover, :focus-visible, [aria-current="page"], .is-active) {
  background: var(--sms-modern-soft);
  border-color: var(--sms-modern-line);
  color: var(--sms-modern-accent-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-action--create {
  border-color: transparent;
  border-radius: 99px;
  background: var(--sms-primary);
  color: var(--sms-on-primary);
  box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-account {
  border-color: var(--sms-modern-line);
  color: var(--sms-modern-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-account__copy small {
  color: var(--sms-modern-muted);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-account__avatar {
  background: var(--sms-modern-soft);
  color: var(--sms-modern-accent-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-app-notification-badge, .sms-mobile-bottom-nav__badge)[hidden] {
  display: none !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-app-notification-badge, .sms-mobile-bottom-nav__badge) {
  background: var(--sms-primary);
  color: var(--sms-on-primary);
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-rail {
  --sms-rail-ink: var(--sms-modern-text);
  --sms-rail-subtle: var(--sms-modern-muted);
  --sms-rail-border: var(--sms-modern-line);
  --sms-rail-hover: var(--sms-modern-soft);
  --sms-rail-surface: var(--sms-modern-surface);
  --sms-rail-muted-surface: var(--sms-modern-surface);
  --sms-rail-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail--left .sms-app-navigation {
  gap: 4px;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail--left .sms-app-left-link span strong {
  font-size: 16px !important;
  font-weight: 620 !important;
  letter-spacing: -.018em;
}

/* Override the legacy solid selection on the route link and its icon together. */
body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail :is(.sms-app-left-link, .sms-app-context-link):is(.is-active, [aria-current="page"]) {
  background: var(--sms-modern-soft) !important;
  border-color: transparent !important;
  border-inline-start: 3px solid var(--sms-primary) !important;
  color: var(--sms-modern-accent-text) !important;
  box-shadow: none !important;
}

body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail :is(.sms-app-left-link, .sms-app-context-link):is(.is-active, [aria-current="page"]) :is(.sms-icon, .dashicons, strong, small) {
  color: inherit !important;
}

body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail .sms-app-context-link .sms-app-context-link__badge {
  background: var(--sms-primary);
  color: var(--sms-on-primary);
  font-variant-numeric: tabular-nums;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail--right :is(.sms-app-user-card, .sms-app-theme-card, .sms-app-language-card, .sms-app-incognito-card, .sms-app-guest-card, .sms-app-context-links--admin) {
  padding: 14px;
  border: 1px solid var(--sms-modern-line);
  border-radius: 17px;
  background: var(--sms-modern-surface);
  box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail--right .sms-app-context-section-label {
  color: var(--sms-modern-muted);
  font-size: 12px;
  letter-spacing: .07em;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-app-topbar, .sms-app-rail, .sms-mobile-bottom-nav) :is(a, button):focus-visible {
  outline: 2px solid var(--sms-modern-accent-text);
  outline-offset: 2px;
}

/* Give the real search form a track alongside each site's optional top links. */
@media (min-width: 1024px) {
  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar__inner > .sms-app-brand {
    max-inline-size: 100%;
  }

  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar__inner > .sms-app-search {
    display: flex !important;
    grid-column: 2;
    inline-size: 100%;
    margin: 0;
    align-self: center;
  }

  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar__inner.has-top-navigation {
    grid-template-columns: minmax(125px, var(--sms-left-rail)) minmax(135px, 1fr) minmax(130px, 245px) auto;
  }

  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] .has-top-navigation > .sms-app-search {
    grid-column: 3;
  }

  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] .has-top-navigation > .sms-app-topbar__actions {
    grid-column: 4;
  }
}

/* Every desktop section shares the same outer tracks. Individual views own
   the layout inside their track, including chat panes and full-screen dialogs. */
@media (min-width: 1280px) {
  html:has(> body.sms-app-page.sms-ui-modern) {
    /* A document page and a fixed-height feed reserve the same system gutter. */
    scrollbar-gutter: stable;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] {
    --sms-modern-layout-pad: clamp(12px, 1vw, 16px);
    --sms-modern-layout-gap: clamp(20px, 2.15vw, 40px);
    --sms-modern-layout-left: clamp(195px, 15vw, 234px);
    --sms-modern-layout-right: clamp(244px, 17vw, 276px);
    --sms-modern-layout-top: 24px;
    /* Legacy add-ons use these same variables in their own important grids. */
    --sms-left-rail: var(--sms-modern-layout-left) !important;
    --sms-right-rail: var(--sms-modern-layout-right) !important;
    --sms-modern-columns: var(--sms-left-rail) minmax(0, 1fr) var(--sms-right-rail);
  }

  body.sms-density-compact #smsocial-app.sms-app-root[data-sms-presentation="modern"] {
    --sms-modern-layout-top: 16px;
  }

  body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell {
    box-sizing: border-box;
    inline-size: 100% !important;
    max-inline-size: none !important;
    margin-inline: 0;
    padding-inline: max(var(--sms-modern-layout-pad), var(--sms-safe-left)) max(var(--sms-modern-layout-pad), var(--sms-safe-right));
    grid-template-columns: var(--sms-modern-columns) !important;
    column-gap: var(--sms-modern-layout-gap);
  }

  body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-rail {
    display: grid !important;
    grid-row: 1;
    border-inline-width: 0;
  }

  body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-rail--left {
    grid-column: 1 !important;
  }

  body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-rail--right {
    grid-column: 3 !important;
    /* Let a short window put its rail scrollbar in the outer page gutter.
       Opening account options must not narrow the cards or shift their text. */
    margin-inline-end: calc(-1 * var(--sms-modern-layout-pad));
  }

  body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-rail--right > :is(.sms-app-rail__scroll, .sms-app-context-footer) {
    box-sizing: border-box;
    inline-size: var(--sms-right-rail);
  }

  html.sms-blogsy-social-scroll-lock body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-rail--right {
    display: flex !important;
    flex-direction: column;
  }

  body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-centre {
    grid-column: 2 !important;
    grid-row: 1;
    min-inline-size: 0;
    inline-size: 100%;
    background: var(--sms-modern-canvas);
  }

  body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-rail > .sms-app-rail__scroll {
    padding-inline: 0 !important;
    padding-block-start: var(--sms-modern-layout-top);
  }

  body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-centre > .sms-app-centre__stream[data-sms-router-view] {
    box-sizing: border-box;
    inline-size: 100% !important;
    max-inline-size: none !important;
    margin-inline: 0;
    padding-inline: 0 !important;
    padding-block-start: var(--sms-modern-layout-top);
  }

  /* Let the document, rather than a second non-scrolling body, be the sticky
     containing block. Dialogs continue to lock the viewport. */
  body.sms-app-page.sms-blogsy-theme-bridge.sms-ui-modern:has(#smsocial-app[data-sms-scroll-mode="document"]):not([class*="-open"]) {
    overflow: visible !important;
  }

  /* Keep both rails in view on document pages as their content scrolls past.
     Short windows and expanded menus retain independent keyboard and wheel access. */
  body.sms-app-page.sms-blogsy-theme-bridge #smsocial-app.sms-app-root[data-sms-presentation="modern"][data-sms-scroll-mode="document"] > .sms-app-shell > .sms-app-rail {
    --sms-rail-offset: var(--sms-document-rail-offset, var(--sms-blogsy-header-height, 0px));
    position: sticky !important;
    inset-block-start: var(--sms-rail-offset) !important;
    block-size: max(0px, calc(100dvh - var(--sms-rail-offset))) !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    overflow: hidden !important;
  }

  body.sms-app-page.sms-blogsy-theme-bridge #smsocial-app.sms-app-root[data-sms-presentation="modern"][data-sms-scroll-mode="document"] > .sms-app-shell > .sms-app-rail--left > .sms-app-rail__scroll {
    overflow: auto !important;
    overscroll-behavior-y: contain;
  }

  body.sms-app-page.sms-blogsy-theme-bridge #smsocial-app.sms-app-root[data-sms-presentation="modern"][data-sms-scroll-mode="document"] > .sms-app-shell > .sms-app-rail--right {
    display: flex !important;
    flex-direction: column;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
  }

  body.sms-app-page.sms-blogsy-theme-bridge #smsocial-app.sms-app-root[data-sms-presentation="modern"][data-sms-scroll-mode="document"] > .sms-app-shell > .sms-app-rail--right > :is(.sms-app-rail__scroll, .sms-app-context-footer) {
    flex: none;
  }

  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] {
    --sms-topbar-height: 80px;
  }

  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar__inner {
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: none;
    padding-inline: max(var(--sms-modern-layout-pad), var(--sms-safe-left)) max(var(--sms-modern-layout-pad), var(--sms-safe-right));
    grid-template-columns: var(--sms-modern-columns);
    gap: var(--sms-modern-layout-gap);
  }

  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar__inner.has-top-navigation {
    grid-template-columns: var(--sms-modern-layout-left) minmax(0, 1fr) minmax(135px, 245px) max-content;
  }

  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar__inner > .sms-app-search {
    max-inline-size: 355px;
  }

  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar__actions {
    justify-self: end;
    gap: 8px;
  }

  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar__actions > :is(.sms-app-account, .sms-app-action, .sms-app-logout) {
    inline-size: 42px;
    min-inline-size: 42px;
    block-size: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    justify-content: center;
  }

  body:not(.sms-blogsy-theme-bridge) #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-topbar__actions :is(.sms-app-account__copy, .sms-app-action--create > span) {
    display: none;
  }
}

/* A consistent phone edge for lists, profiles and add-ons. Chat owns its
   edge-to-edge conversation, and immersive viewers sit outside the stream. */
@media (max-width: 767px) {
  body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-centre > .sms-app-centre__stream[data-sms-router-view]:not([data-sms-route="messages"]) {
    box-sizing: border-box;
    inline-size: 100% !important;
    max-inline-size: none !important;
    margin-inline: 0;
    padding-inline: max(12px, var(--sms-safe-left)) max(12px, var(--sms-safe-right)) !important;
  }
}

/* A rail that becomes a drawer still needs its opaque panel background. */
@media (min-width: 1280px) {
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-rail {
    background: var(--sms-modern-canvas);
    border-inline-color: transparent;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail--left .sms-app-navigation:has(> .sms-nav-desktop-visible)::before {
    content: attr(aria-label) / "";
    order: -1;
    margin: 4px 12px 10px;
    color: var(--sms-modern-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail--right .sms-app-context-links--navigation:has(> .sms-nav-desktop-right-visible) {
    padding: 6px;
    border: 1px solid var(--sms-modern-line);
    border-radius: 17px;
    background: var(--sms-modern-surface);
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail--right .sms-app-context-footer {
    background: var(--sms-modern-canvas);
  }
}

@media (forced-colors: active) {
  body.sms-app-page #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail :is(.sms-app-left-link, .sms-app-context-link):is(.is-active, [aria-current="page"]) {
    border: 2px solid Highlight !important;
    background: Highlight !important;
    color: HighlightText !important;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-app-topbar, .sms-app-rail, .sms-mobile-bottom-nav) :is(a, button):focus-visible {
    outline-color: Highlight;
  }
}

/* These dialogs are moved to body when opened, outside the app root. */
body.sms-app-page.sms-ui-modern {
  --sms-portal-link: var(--sms-link-on-light, var(--sms-text));
}

body.sms-app-page.sms-ui-modern.sms-color-mode-dark {
  --sms-portal-link: var(--sms-link-on-dark, var(--sms-text));
}

@media (prefers-color-scheme: dark) {
  body.sms-app-page.sms-ui-modern.sms-color-mode-system {
    --sms-portal-link: var(--sms-link-on-dark, var(--sms-text));
  }
}

body.sms-app-page.sms-ui-modern .sms-share-modal.sms-share-sheet {
  --share-accent: var(--sms-link-on-light, var(--share-fg));
  --share-tint: color-mix(in srgb, var(--sms-primary) 9%, var(--share-bg));
}

/* The cinema can request a dark share sheet independently of the page theme. */
body.sms-app-page.sms-ui-modern .sms-share-modal.sms-share-sheet.is-dark {
  --share-accent: var(--sms-link-on-dark, var(--share-fg));
}

body.sms-app-page.sms-ui-modern .sms-share-sheet .sms-share-sheet__publish,
body.sms-app-page.sms-ui-modern .sms-activity-report-modal button[type="submit"] {
  background: var(--sms-primary);
  border-color: var(--sms-primary);
  color: var(--sms-on-primary);
}

body.sms-app-page.sms-ui-modern .sms-composer__overlay .sms-composer__publish {
  background: var(--sms-primary) !important;
  color: var(--sms-on-primary) !important;
}

body.sms-app-page.sms-ui-modern .sms-composer__overlay .sms-composer__modes button.is-active {
  border-color: var(--sms-portal-link);
  background: color-mix(in srgb, var(--sms-primary) 9%, var(--sms-surface)) !important;
  color: var(--sms-portal-link);
}

body.sms-app-page.sms-ui-modern .sms-activity-more-menu--portal [data-sms-activity-pin].is-pinned,
body.sms-app-page.sms-ui-modern .sms-activity-report-modal header span,
body.sms-app-page.sms-ui-modern .sms-profile-gallery__viewer .sms-profile-gallery__viewer-form-button.is-primary {
  color: var(--sms-portal-link);
}

/* The story editor has a light control panel and user-chosen canvas colours. */
body.sms-app-page.sms-ui-modern .sms-story-composer__overlay :is(.sms-story-composer__publish, .sms-story-composer__mobile-publish):not(:disabled),
body.sms-app-page.sms-ui-modern .sms-story-composer__overlay :is(.sms-story-desktop-sidebar__brand--fallback, .sms-story-desktop-sidebar__profile > span, .sms-story-desktop-start__card--media),
body.sms-app-page.sms-ui-modern .sms-story-composer__overlay .sms-story-editor__music-row-preview[aria-pressed="true"] {
  background: var(--sms-primary) !important;
  color: var(--sms-on-primary) !important;
}

body.sms-app-page.sms-ui-modern .sms-story-composer__overlay :is(.sms-story-desktop-start__card--text, .sms-story-editor__tool-icon),
body.sms-app-page.sms-ui-modern .sms-story-composer__overlay .sms-story-editor__tool-grid button.is-active {
  background: color-mix(in srgb, var(--sms-primary) 9%, white) !important;
  color: var(--sms-link-on-light, #18212b) !important;
}

body.sms-app-page.sms-ui-modern .sms-story-composer__overlay .sms-story-editor__tool-grid button.is-active .sms-story-editor__tool-icon {
  background: var(--sms-primary) !important;
  color: var(--sms-on-primary) !important;
}

body.sms-app-page.sms-ui-modern .sms-story-composer__overlay :is(.sms-story-editor__music-search button, .sms-story-editor__music-row-use) {
  color: var(--sms-link-on-light, #18212b);
}

body.sms-app-page.sms-ui-modern .sms-story-composer__overlay .sms-story-editor__background-preset.is-active {
  border-color: var(--sms-link-on-light, #18212b);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--sms-link-on-light, #18212b);
}

/* Modern feed. The live renderer supplies Story cards, media, permissions and actions. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) {
    --sms-feed-pad: clamp(14px, 2vw, 20px);
    --sms-feed-gap: var(--sms-modern-gap, 18px);
    --sms-feed-line: var(--sms-modern-line, var(--sms-border));
}

/* Use the route title delivered with each server or SPA view. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] > .sms-app-view-heading {
    display: flex;
    align-items: center;
    min-block-size: 0;
    margin: 0 0 var(--sms-feed-gap);
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] > .sms-app-view-heading > div > span {
    display: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] > .sms-app-view-heading h1 {
    margin: 0;
    color: var(--sms-modern-text, var(--sms-text));
    font-size: clamp(29px, 3vw, 38px);
    font-weight: 740;
    line-height: 1.15;
    letter-spacing: -.045em;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] > .sms-feed-highlights:not(.is-empty) {
    gap: 7px;
    margin: 0 0 var(--sms-feed-gap);
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights__header {
    padding: 0 2px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights__header > div:first-child > span {
    display: block;
    color: var(--sms-modern-text, var(--sms-text));
    font-size: 17px;
    font-weight: 720;
    line-height: 1.3;
    letter-spacing: -.025em;
    text-transform: lowercase;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights__header > div:first-child > span::first-letter {
    text-transform: uppercase;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights__controls button {
    border-radius: 50%;
    color: var(--sms-modern-text, var(--sms-text));
    background: var(--sms-modern-surface, var(--sms-surface));
    border: 1px solid var(--sms-feed-line);
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights:not(.is-empty) .sms-feed-highlights__track {
    grid-auto-columns: clamp(98px, calc((100% - 40px) / 5), 148px);
    gap: 10px;
    padding: 3px 2px 4px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights:not(.is-empty) .sms-highlight-card {
    aspect-ratio: 3 / 4;
    inline-size: 100%;
    block-size: auto;
    max-block-size: 178px;
    padding: 11px;
    border-width: 1px;
    border-radius: 14px;
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights:not(.is-empty) .sms-highlight-card--create {
    gap: 12px;
    border-color: color-mix(in srgb, var(--sms-primary) 32%, var(--sms-modern-surface, var(--sms-surface)));
    background: color-mix(in srgb, var(--sms-primary) 8%, var(--sms-modern-surface, var(--sms-surface)));
    color: var(--sms-modern-text, var(--sms-text));
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights:not(.is-empty) .sms-highlight-card__create-mark {
    flex-basis: 42px;
    inline-size: 42px;
    block-size: 42px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-highlight-card:is(.has-image, .has-story-preview)::after {
    inset: 0;
    background: linear-gradient(180deg, rgb(8 12 17 / .12), transparent 32%, transparent 44%, rgb(7 11 18 / .78));
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-highlight-card:is(.has-image, .has-story-preview) .sms-highlight-card__copy small {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-highlight-card.is-text-only:not(.has-text-presentation):not(.has-story-preview) {
    background: var(--sms-modern-canvas, var(--sms-surface-soft));
    color: var(--sms-modern-text, var(--sms-text));
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights.is-empty:not([hidden]) {
    display: grid;
    grid-template: 'title action' auto 'description action' auto / minmax(0, 1fr) auto;
    align-content: center;
    align-items: center;
    gap: 3px 12px;
    min-block-size: 76px;
    margin: 0 0 var(--sms-feed-gap);
    padding: 12px var(--sms-feed-pad);
    background: var(--sms-modern-surface, var(--sms-surface));
    border: 1px solid var(--sms-feed-line);
    border-radius: var(--sms-modern-radius, 17px);
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights.is-empty .sms-feed-highlights__header {
    display: block;
    grid-area: title;
    padding: 0;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights.is-empty .sms-feed-highlights__controls {
    display: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights.is-empty .sms-feed-highlights__empty-copy {
    grid-area: description;
    color: var(--sms-modern-muted, var(--sms-muted-strong));
    font-size: 13px;
    line-height: 1.4;
    font-weight: 450;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights.is-empty .sms-feed-highlights__track {
    grid-area: action;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights.is-empty .sms-highlight-card--create {
    min-block-size: 42px;
    border-radius: 999px;
    padding: 8px 14px;
    background: var(--sms-primary);
    color: var(--sms-on-primary);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] > .sms-composer {
    margin-block: 0 var(--sms-feed-gap);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] > .sms-composer .sms-composer-launcher {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px var(--sms-feed-pad);
    background: var(--sms-modern-surface, var(--sms-surface));
    border: 1px solid var(--sms-feed-line);
    border-radius: var(--sms-modern-radius, 17px);
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-composer-launcher__avatar {
    inline-size: 40px;
    block-size: 40px;
    border-radius: 50%;
    background: var(--sms-modern-soft, var(--sms-primary-soft));
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-composer-launcher__prompt {
    min-block-size: 42px;
    border: 1px solid var(--sms-feed-line);
    background: var(--sms-modern-canvas, var(--sms-surface-soft));
    color: var(--sms-modern-muted, var(--sms-muted-strong));
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    text-align: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-composer-launcher__quick {
    grid-column: auto;
    gap: 2px;
    padding: 0;
    border: 0;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-composer-launcher__quick button {
    inline-size: 38px;
    block-size: 40px;
    border-radius: 10px;
    color: var(--sms-modern-muted, var(--sms-muted-strong));
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-composer-launcher__quick button:is(:hover, :focus-visible),
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-composer-launcher__prompt:is(:hover, :focus-visible) {
    background: var(--sms-modern-soft, var(--sms-primary-soft));
    color: var(--sms-modern-text, var(--sms-text));
    border-color: var(--sms-primary);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) .sms-activity-insertion > .sms-activity-stream {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sms-feed-gap);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card {
    min-inline-size: 0;
    background: var(--sms-modern-surface, var(--sms-surface));
    border: 1px solid var(--sms-feed-line);
    border-radius: var(--sms-modern-radius, 17px);
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card > .sms-activity-card__header {
    display: grid;
    grid-template-columns: 39px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 18px var(--sms-feed-pad) 12px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card .sms-activity-card__avatar {
    inline-size: 39px;
    block-size: 39px;
    border-radius: 50%;
    background: var(--sms-modern-soft, var(--sms-primary-soft));
    color: var(--sms-modern-text, var(--sms-text));
}
/* Published author and time labels share these roles in every activity stream. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-activity-card__header > div:nth-child(2) > a > strong {
    color: var(--sms-modern-text, var(--sms-text));
    font-size: max(15px, .9375rem) !important;
    font-weight: 720;
    line-height: 1.25 !important;
    letter-spacing: -.015em;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-activity-card__header > div:nth-child(2) > span,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-activity-card__header :is(.sms-activity-permalink, time[data-sms-relative-time]) {
    color: var(--sms-modern-muted, var(--sms-muted-strong));
    font-size: max(12px, .75rem) !important;
    line-height: 1.4 !important;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card > .sms-activity-card__body:not(.sms-activity-card__body--highlight) {
    padding: 0 var(--sms-feed-pad) 15px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card .sms-activity-card__body:not(.sms-activity-card__body--highlight) .sms-activity-card__text {
    margin: 0;
    color: var(--sms-modern-text, var(--sms-text));
    font-size: max(15px, .9375rem) !important;
    font-weight: 400;
    line-height: 1.55 !important;
    overflow-wrap: anywhere;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card > :is(.sms-activity-card__media, .sms-activity-gallery-grid, .sms-activity-card__native) {
    margin-inline: 0;
    border-radius: 0;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card .sms-reactions__summary {
    padding-inline: var(--sms-feed-pad);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card .sms-activity-actions {
    justify-content: flex-start;
    gap: 4px;
    padding-inline: max(8px, calc(var(--sms-feed-pad) - 8px));
    border-block-start: 1px solid var(--sms-feed-line);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card .sms-activity-actions :is(.sms-reaction-trigger, .sms-comment-trigger, .sms-share-trigger, .sms-save-trigger) {
    min-block-size: 42px;
    border-radius: 10px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card .sms-activity-actions .sms-save-control {
    margin-inline-start: auto;
}

/* A single uploaded photo uses its own proportions. Multi-photo posts keep their gallery layout. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-gallery-grid--1, .sms-activity-card__media--1) :is(figure, .sms-activity-card__gallery-media, img) {
    min-block-size: 0;
    max-block-size: none;
    block-size: auto;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-gallery-grid--1, .sms-activity-card__media--1) img {
    display: block;
    inline-size: 100%;
    object-fit: contain;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) .sms-activity-insertion > .sms-app-empty-state {
    padding: 16px var(--sms-feed-pad);
    border: 1px solid var(--sms-feed-line);
    border-radius: var(--sms-modern-radius);
    background: var(--sms-modern-surface);
    color: var(--sms-modern-muted);
    box-shadow: none;
}

/* Optional publishing shortcuts and the current site's own news. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-composer-shortcuts {
    container: sms-feed-shortcuts / inline-size;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-composer-shortcuts__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-composer-shortcuts__actions:not(:has(button)),
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-top-news:not(:has(a)) {
    display: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-shortcut-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-block-size: 54px;
    padding: 8px 14px 8px 10px;
    border: 1px solid var(--sms-feed-line);
    border-radius: 12px;
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-shortcut-card__plus {
    display: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-shortcut-card__icon {
    position: static;
    flex: 0 0 32px;
    inline-size: 32px;
    block-size: 32px;
    border-radius: 9px;
    background: var(--sms-modern-soft);
    color: var(--sms-modern-accent-text);
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-shortcut-card__icon .sms-icon {
    inline-size: 18px;
    block-size: 18px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-shortcut-card__copy strong {
    font-size: 14px;
    font-weight: 650;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-shortcut-card__copy small {
    color: var(--sms-modern-muted);
    font-size: 12px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-top-news {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: clamp(9px, 1.2vw, 14px);
    align-items: stretch;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-top-news__item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-inline-size: 0;
    min-block-size: 0;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--sms-feed-line);
    border-radius: 13px;
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-top-news__thumb {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    inline-size: 100%;
    block-size: auto;
    min-block-size: 0;
    max-block-size: 180px;
    aspect-ratio: 2 / 1;
    border-radius: 0;
    background: var(--sms-modern-quiet);
    color: var(--sms-modern-muted);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-top-news__thumb .sms-icon {
    width: 29px;
    height: 29px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-top-news__thumb img {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    border-radius: 0;
    object-fit: cover;
}
/* Failed image requests keep the reserved photo space and the article title usable. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-top-news__thumb img::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--sms-modern-quiet) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2375818d' stroke-width='1.6' stroke-linecap='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='3'/%3E%3Cpath d='M8 8h8m-8 4h8m-8 4h5'/%3E%3C/svg%3E") center / 29px 29px no-repeat;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-top-news__item strong {
    display: -webkit-box;
    margin: 10px 12px 12px;
    padding: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    color: var(--sms-modern-text);
    font-size: max(15px, .9375rem);
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -.012em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] :is(.sms-feed-shortcut-card, .sms-feed-top-news__item):is(:hover, :focus-visible) {
    background: var(--sms-modern-soft);
    transform: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] :is(.sms-feed-shortcut-card, .sms-feed-top-news__item):focus-visible {
    outline: 2px solid var(--sms-modern-accent-text);
    outline-offset: 2px;
}

@media (min-width: 1150px) {
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card .sms-activity-actions :is(.sms-reaction-trigger, .sms-comment-trigger, .sms-share-trigger) {
        display: inline-flex;
        gap: 6px;
        inline-size: auto;
        padding-inline: 8px !important;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card .sms-activity-actions :is(.sms-reaction-trigger, .sms-comment-trigger, .sms-share-trigger) .sms-action-label {
        position: static !important;
        inline-size: auto !important;
        block-size: auto !important;
        max-inline-size: none;
        margin: 0 !important;
        overflow: visible !important;
        clip: auto !important;
        transform: none;
        font-size: 13px;
        font-weight: 650;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card .sms-activity-actions :is(.sms-comment-trigger, .sms-share-trigger) > small:not(:empty) {
        position: static;
        flex: none;
    }
}
@media (max-width: 767px) {
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] {
        padding-inline: max(10px, var(--sms-safe-left, 0px)) max(10px, var(--sms-safe-right, 0px)) !important;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] > .sms-app-view-heading h1 {
        font-size: 30px;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] > .sms-feed-highlights:not(.is-empty) {
        margin-block-end: var(--sms-feed-gap) !important;
        padding-inline: 0 !important;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights.is-empty:not([hidden]),
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card {
        border-inline: 1px solid var(--sms-feed-line) !important;
        border-radius: min(15px, var(--sms-modern-radius, 17px)) !important;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] > .sms-feed-highlights.is-empty:not([hidden]) {
        padding-inline: var(--sms-feed-pad) !important;
        margin-block-end: var(--sms-feed-gap) !important;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights:not(.is-empty) .sms-feed-highlights__track {
        grid-auto-columns: clamp(88px, 23.5%, 115px);
        gap: 7px;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-highlights:not(.is-empty) .sms-highlight-card {
        max-block-size: 146px;
        padding: 8px;
        border-radius: 12px;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) .sms-activity-insertion > .sms-activity-stream {
        gap: var(--sms-feed-gap) !important;
    }
}
@media (max-width: 580px) {
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-shortcut-card {
        min-block-size: 46px;
        padding: 6px 12px 6px 8px;
        gap: 7px;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-shortcut-card__copy small {
        display: none;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] > .sms-composer .sms-composer-launcher {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        gap: 6px;
        padding: 9px 8px;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-composer-launcher__avatar {
        inline-size: 34px;
        block-size: 34px;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-composer-launcher__quick {
        gap: 0;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-composer-launcher__quick button {
        inline-size: 34px;
        block-size: 44px;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-composer-launcher__prompt {
        padding-inline: 9px;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream:is([data-sms-route="feed"], [data-sms-route="profile"], [data-sms-route="groups"], [data-sms-route="pages"]) :is(.sms-activity-stream, .sms-pinned-posts__single-card) > .sms-activity-card .sms-activity-actions {
        flex-wrap: nowrap;
    }
}

/* A visible part of the following article makes horizontal browsing discoverable on smaller feeds. */
@container sms-feed-shortcuts (max-width: 640px) {
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-top-news {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: min(76%, 258px);
        gap: 10px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline proximity;
        scrollbar-width: thin;
        padding: 3px;
        margin: -3px;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-centre__stream[data-sms-route="feed"] .sms-feed-top-news__item {
        scroll-snap-align: start;
    }
}

/* The live directories use the same covers, membership counts and destinations
   as the classic presentation. Size cards against the centre column, which can
   narrow independently of the viewport when site rails are visible. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-groups, .sms-pages, .sms-group-view, .sms-page-detail, .sms-public-profile) {
  --sms-community-cover: linear-gradient(120deg,
    color-mix(in srgb, var(--sms-primary) 12%, var(--sms-modern-surface, var(--sms-surface))),
    color-mix(in srgb, var(--sms-primary) 32%, var(--sms-modern-surface, var(--sms-surface))) 68%,
    color-mix(in srgb, var(--sms-primary) 19%, var(--sms-modern-surface, var(--sms-surface))));
  --sms-community-inset: clamp(15px, 2.2vw, 25px);
  min-inline-size: 0;
}

/* Directory actions and the route title share a single heading on every device. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-groups__intro, .sms-pages__toolbar):has(.sms-community-title) {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 8px 18px !important;
  min-block-size: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-community-title {
  margin: 0;
  color: var(--sms-modern-text, var(--sms-text));
  font-size: clamp(29px, 3vw, 38px) !important;
  font-weight: 740;
  line-height: 1.15;
  letter-spacing: -.04em;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-groups__intro, .sms-pages__toolbar) > .sms-profile-button {
  margin: 0 !important;
  inline-size: auto !important;
  min-block-size: 44px !important;
  max-inline-size: 100%;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-groups, .sms-group-view, .sms-group-workspace, .sms-pages, .sms-page-detail, .sms-page-workspace, .sms-public-profile, .sms-profile-workspace, .sms-profile-workspace__content) {
  box-sizing: border-box;
  min-inline-size: 0;
  inline-size: 100%;
  max-inline-size: none;
  margin-inline: 0;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-groups, .sms-pages) {
  container: sms-community / inline-size;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is([data-sms-groups-list], .sms-pages[data-sms-pages]) > :is(.sms-group-grid, .sms-page-grid) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: auto;
  align-items: stretch;
  gap: 16px !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is([data-sms-groups-list], .sms-pages[data-sms-pages]) :is(.sms-group-card, .sms-page-card) {
  position: relative;
  overflow: hidden;
  min-inline-size: 0;
  min-block-size: 0 !important;
  block-size: auto !important;
  border: 1px solid var(--sms-modern-line, var(--sms-border)) !important;
  border-radius: var(--sms-modern-radius, 16px) !important;
  background: var(--sms-modern-surface, var(--sms-surface)) !important;
  box-shadow: none !important;
  color: var(--sms-modern-text, var(--sms-text));
  text-decoration: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-groups-list] .sms-group-card,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="pages"] > .sms-pages[data-sms-pages] .sms-page-grid > .sms-page-card > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto 1fr !important;
  align-items: stretch;
  min-block-size: 0;
  padding: 0;
  gap: 0;
  text-decoration: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="pages"] > .sms-pages[data-sms-pages] .sms-page-grid > .sms-page-card > a {
  grid-template-rows: auto 1fr auto !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is([data-sms-groups-list], .sms-pages[data-sms-pages]) :is(.sms-group-card__cover, .sms-page-card__cover) {
  position: relative;
  display: block;
  grid-column: 1;
  grid-row: 1;
  aspect-ratio: 2.45 !important;
  min-block-size: 0 !important;
  block-size: auto !important;
  border: 0;
  background: var(--sms-community-cover) !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-card__cover::after,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-page-card__cover::after {
  content: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-grid .sms-group-card__body {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 15px 17px 16px !important;
  gap: 5px !important;
  background: var(--sms-modern-surface, var(--sms-surface));
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-grid .sms-group-card__body small {
  color: var(--sms-modern-muted, var(--sms-muted-strong, var(--sms-muted))) !important;
  font-size: 12px !important;
  font-weight: 650;
  text-transform: none !important;
  letter-spacing: normal !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-grid .sms-group-card__body strong,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-page-grid .sms-page-card__identity strong {
  color: var(--sms-modern-text, var(--sms-text)) !important;
  font-size: clamp(17px, 1.4vw, 21px) !important;
  font-weight: 740;
  line-height: 1.23 !important;
  letter-spacing: -.018em !important;
  overflow-wrap: anywhere;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-grid .sms-group-card__body > span,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-page-grid .sms-page-card__identity small {
  color: var(--sms-modern-muted, var(--sms-muted-strong, var(--sms-muted))) !important;
  font-size: 14px !important;
  line-height: 1.42 !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-grid .sms-group-card__body em {
  margin-block-start: auto;
  padding-block-start: 6px;
  color: var(--sms-modern-muted, var(--sms-muted-strong, var(--sms-muted))) !important;
  font-size: 12px !important;
  font-style: normal;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-card__body > span:empty {
  display: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="pages"] > .sms-pages[data-sms-pages] .sms-page-grid .sms-page-card__identity {
  display: flex;
  align-items: center;
  grid-column: 1;
  grid-row: 2;
  min-inline-size: 0;
  gap: 12px;
  padding: 15px 17px 8px !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-page-grid .sms-page-card__avatar {
  flex: 0 0 44px;
  inline-size: 44px;
  block-size: 44px;
  margin: 0;
  border-radius: 50%;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="pages"] > .sms-pages[data-sms-pages] .sms-page-grid .sms-page-card__stats {
  grid-column: 1;
  grid-row: 3;
  padding: 0 17px 16px !important;
  color: var(--sms-modern-muted, var(--sms-muted-strong, var(--sms-muted)));
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-card, .sms-page-card):hover {
  border-color: color-mix(in srgb, var(--sms-primary) 54%, var(--sms-modern-line, var(--sms-border))) !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-card:focus-visible,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-page-card:focus-within {
  outline: 3px solid var(--sms-primary);
  outline-offset: 2px;
}

/* Make the first group a cover story only where its actual cover exists. */
@container sms-community (min-width: 500px) {
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-grid > .sms-group-card:first-child:has(.sms-group-card__cover img) {
    isolation: isolate;
    grid-column: 1 / -1;
    grid-template-rows: 1fr !important;
    min-block-size: clamp(205px, 34cqi, 310px) !important;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-grid > .sms-group-card:first-child:has(.sms-group-card__cover img) > .sms-group-card__cover {
    position: absolute;
    inset: 0;
    z-index: -1;
    aspect-ratio: auto !important;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-grid > .sms-group-card:first-child:has(.sms-group-card__cover img) > .sms-group-card__cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgb(0 0 0 / .89), rgb(0 0 0 / .62) 57%, transparent);
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-grid > .sms-group-card:first-child:has(.sms-group-card__cover img) > .sms-group-card__body {
    grid-row: 1;
    align-self: end;
    padding: clamp(20px, 3.5cqi, 35px) !important;
    background: transparent;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-grid > .sms-group-card:first-child:has(.sms-group-card__cover img) .sms-group-card__body > * {
    color: white !important;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-group-grid > .sms-group-card:first-child:has(.sms-group-card__cover img) .sms-group-card__body strong {
    font-size: clamp(27px, 4.5cqi, 40px) !important;
    letter-spacing: -.035em !important;
  }
}

@container sms-community (min-width: 900px) {
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] :is([data-sms-groups-list], .sms-pages[data-sms-pages]) > :is(.sms-group-grid, .sms-page-grid) {
    grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)) !important;
  }
}

@container sms-community (max-width: 499px) {
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] :is([data-sms-groups-list], .sms-pages[data-sms-pages]) > :is(.sms-group-grid, .sms-page-grid) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-groups-list] .sms-group-card,
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="pages"] > .sms-pages[data-sms-pages] .sms-page-grid > .sms-page-card > a {
    grid-template-columns: clamp(75px, 24cqi, 118px) minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="pages"] > .sms-pages[data-sms-pages] .sms-page-grid > .sms-page-card > a {
    grid-template-rows: 1fr auto !important;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] :is([data-sms-groups-list], .sms-pages[data-sms-pages]) :is(.sms-group-card__cover, .sms-page-card__cover) {
    grid-row: 1 / -1;
    aspect-ratio: auto !important;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-groups-list] .sms-group-card__body,
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="pages"] > .sms-pages[data-sms-pages] .sms-page-grid .sms-page-card__identity {
    grid-column: 2;
    grid-row: 1;
    padding: 12px !important;
  }

  #smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="pages"] > .sms-pages[data-sms-pages] .sms-page-grid .sms-page-card__stats {
    grid-column: 2;
    grid-row: 2;
    padding: 0 12px 12px !important;
  }
}

/* Profile, group and page headers keep their original media editors and
   permission-dependent action menus. Only the image frame clips its image. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-hero, .sms-page-hero, .sms-public-profile__hero) {
  border: 1px solid var(--sms-modern-line, var(--sms-border)) !important;
  border-radius: var(--sms-modern-radius, 16px) !important;
  background: var(--sms-modern-surface, var(--sms-surface)) !important;
  box-shadow: none !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-hero__cover, .sms-page-hero__cover, .sms-public-profile__cover) {
  position: relative;
  min-block-size: 0 !important;
  block-size: clamp(150px, 21vw, 250px) !important;
  max-block-size: none !important;
  aspect-ratio: auto !important;
  border-radius: var(--sms-modern-radius, 16px) var(--sms-modern-radius, 16px) 0 0 !important;
  background: var(--sms-community-cover) !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-hero__cover, .sms-page-hero__cover, .sms-public-profile__cover) > img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  border-radius: inherit;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__cover-shade {
  pointer-events: none;
  background: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-hero__content, .sms-page-hero__body) {
  padding: 17px var(--sms-community-inset) !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-hero__title, .sms-page-hero__body) {
  display: flex;
  align-items: center !important;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-hero__title, .sms-page-hero__identity, .sms-public-profile__identity) h1 {
  color: var(--sms-modern-text, var(--sms-text));
  font-size: clamp(24px, 2.65vw, 34px) !important;
  line-height: 1.16 !important;
  font-weight: 760 !important;
  letter-spacing: -.033em !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-hero__actions, .sms-page-hero__actions, .sms-public-profile__actions) {
  min-inline-size: 0;
  max-inline-size: 100%;
  gap: 7px;
  flex-wrap: wrap;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile {
  --sms-profile-pad: clamp(16px, 2vw, 24px);
  --sms-avatar-size: 82px;
  gap: 16px;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__hero .sms-public-profile__cover {
  block-size: clamp(158px, 24vw, 238px) !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__summary {
  display: grid;
  position: relative;
  grid-template-columns: auto minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: start !important;
  gap: 15px 12px !important;
  margin: 0 !important;
  padding: 0 var(--sms-profile-pad) 23px !important;
  overflow: visible !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__summary:has(~ .sms-public-profile__bio) {
  padding-block-end: 0 !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__avatar {
  grid-area: 1 / 1 !important;
  inline-size: var(--sms-avatar-size) !important;
  block-size: var(--sms-avatar-size) !important;
  box-sizing: border-box;
  margin: -30px 0 0 !important;
  border: 4px solid var(--sms-modern-surface, var(--sms-surface)) !important;
  border-radius: 50%;
  background: var(--sms-primary) !important;
  color: var(--sms-on-primary) !important;
  box-shadow: none !important;
  font-size: 28px !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__identity {
  grid-area: 2 / 1 / auto / -1 !important;
  align-self: start !important;
  min-inline-size: 0;
  padding: 0 !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-public-profile__identity h1 {
  margin: 0 !important;
  font-size: clamp(27px, 3vw, 36px) !important;
  font-weight: 760 !important;
  line-height: 1.12 !important;
  letter-spacing: -.04em !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__identity .sms-public-profile__location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 12px 0 0 !important;
  font-size: 13px !important;
  line-height: 1.35;
  color: var(--sms-modern-muted, var(--sms-muted));
  white-space: normal !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__location svg {
  inline-size: 15px;
  block-size: 15px;
  flex-shrink: 0;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__actions {
  grid-area: 1 / 2 !important;
  align-self: start !important;
  justify-self: end;
  inline-size: auto !important;
  margin-block-start: 13px !important;
  padding: 0 !important;
  overflow: visible !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__actions:empty,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__actions [data-sms-social-status]:empty,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__hero > .sms-inline-media-status:empty {
  display: none !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-public-profile__actions > .sms-profile-button.is-secondary {
  min-block-size: 40px !important;
  inline-size: auto !important;
  padding: 8px 15px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__actions > .sms-profile-button.is-secondary > span { font: inherit !important; }

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__actions > .sms-profile-button.is-secondary .sms-icon {
  display: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__bio {
  padding: 13px var(--sms-profile-pad) 23px !important;
  color: var(--sms-modern-text, var(--sms-text));
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-public-profile__bio p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 400;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__about-card .sms-public-profile__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-block: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__about-card .sms-public-profile__stats > div {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
}

@media (hover: hover) and (pointer: fine) {
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__hero:not(:hover):not(:focus-within) .sms-header-media-trigger {
    opacity: 0;
  }
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-profile-workspace {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 20px !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-profile-workspace__sidebar {
  position: static;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 12px;
  padding: 0;
  border: 0;
  border-block-end: 1px solid var(--sms-modern-line, var(--sms-border));
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-workspace__nav-title {
  display: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-public-profile__tabs, .sms-page-tabs, .sms-group-tabs) {
  display: flex !important;
  position: static !important;
  flex-flow: row nowrap !important;
  align-items: stretch;
  gap: clamp(9px, 1.7vw, 23px) !important;
  min-inline-size: 0;
  max-inline-size: 100%;
  margin: 0 !important;
  padding: 0 3px !important;
  border: 0 !important;
  border-block-end: 1px solid var(--sms-modern-line, var(--sms-border)) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  backdrop-filter: none;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-workspace .sms-public-profile__tabs {
  flex: 1 1 0;
  border-block-end: 0 !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-public-profile__tabs, .sms-page-tabs, .sms-group-tabs) > button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto !important;
  inline-size: auto !important;
  min-block-size: 44px !important;
  margin: 0;
  padding: 9px 4px !important;
  gap: 6px;
  border: 0 !important;
  border-block-end: 3px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--sms-modern-muted, var(--sms-muted-strong, var(--sms-muted))) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  white-space: nowrap;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-public-profile__tabs, .sms-page-tabs, .sms-group-tabs) > button:is(.is-active, [aria-selected="true"]) {
  border-block-end-color: var(--sms-primary) !important;
  color: var(--sms-modern-text, var(--sms-text)) !important;
  font-weight: 740 !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-public-profile__tabs, .sms-page-tabs, .sms-group-tabs) > button:focus-visible {
  outline: 2px solid var(--sms-primary);
  outline-offset: -3px;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-profile-workspace__sidebar > .sms-composer {
  display: block;
  flex: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-workspace:has([data-sms-profile-tab="posts"][aria-selected="false"]) .sms-profile-workspace__sidebar > .sms-composer { display: none; }

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-compose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-block-size: 44px;
  min-inline-size: 44px;
  padding: 4px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sms-modern-text, var(--sms-text));
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-compose > span:first-child { font-size: 19px; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-compose:is(:hover, :focus-visible) { background: var(--sms-modern-soft, var(--sms-primary-soft)); }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-public-profile__tabs > button .sms-icon { display: none; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-profile-workspace .sms-public-profile__tabs { padding: 0 !important; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-profile-workspace .sms-public-profile__tabs > button { padding-inline: 0 !important; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-public-profile__panel { padding-inline: 0; }

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-workspace__content {
  padding-inline: 0;
}

@media (max-width: 490px) {
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile { --sms-avatar-size: 72px; }
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__hero .sms-public-profile__cover { block-size: 147px !important; }
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__summary:has(.sms-social-actions--compact) .sms-public-profile__actions {
    grid-area: 3 / 1 / auto / -1 !important;
    justify-self: start;
    inline-size: 100% !important;
    margin-block-start: 0 !important;
  }
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__actions .sms-social-actions--compact {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) 44px !important;
    gap: 5px !important;
  }
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__actions .sms-social-actions--compact > .sms-profile-button {
    grid-column: auto !important;
    min-inline-size: 0 !important;
    padding-inline: 5px !important;
    font-size: 13px !important;
  }
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__actions .sms-social-actions--compact > .sms-profile-button > span { font: inherit !important; }
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile__actions .sms-profile-button--message .sms-icon { display: none !important; }
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-public-profile__actions > .sms-profile-button.is-secondary { min-block-size: 44px !important; }
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-compose > span:last-child { display: none; }
}

@media (max-width: 900px) {
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-hero__title, .sms-page-hero__body) {
    align-items: start !important;
  }
}

/* Legacy route sheets colour the owner action even after the route is loaded
   asynchronously. Use the site's saved primary and its paired foreground. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-public-profile, .sms-group-view, .sms-page-detail, .sms-pages, .sms-groups, .sms-profile-state) .sms-profile-button:not(.is-danger),
body:has(#smsocial-app.sms-app-root[data-sms-presentation="modern"]) > :is(.sms-group-create-modal, .sms-page-create-modal) .sms-profile-button:not(.is-danger) {
  border: 1px solid var(--sms-primary) !important;
  border-radius: 10px !important;
  background: var(--sms-primary) !important;
  color: var(--sms-on-primary) !important;
  box-shadow: none !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-public-profile, .sms-group-view, .sms-page-detail, .sms-pages, .sms-groups, .sms-profile-state) .sms-profile-button:is(.is-secondary, .sms-profile-button--relationship):not(.is-danger),
body:has(#smsocial-app.sms-app-root[data-sms-presentation="modern"]) > :is(.sms-group-create-modal, .sms-page-create-modal) .sms-profile-button.is-secondary:not(.is-danger) {
  background: var(--sms-modern-surface, var(--sms-surface)) !important;
  color: var(--sms-modern-text, var(--sms-text)) !important;
  border-color: var(--sms-modern-line, var(--sms-border)) !important;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-public-profile, .sms-group-view, .sms-page-detail, .sms-pages, .sms-groups, .sms-profile-state) .sms-profile-button:not(:disabled):is(:hover, :focus-visible),
body:has(#smsocial-app.sms-app-root[data-sms-presentation="modern"]) > :is(.sms-group-create-modal, .sms-page-create-modal) .sms-profile-button:not(:disabled):is(:hover, :focus-visible) {
  outline: 2px solid var(--sms-primary) !important;
  outline-offset: 2px;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-public-profile .sms-public-profile__identity h1 {
  color: var(--sms-modern-text, var(--sms-text)) !important;
}

/* Group and Page management use the same section tabs as account settings. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-workspace, .sms-page-workspace) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-manage__grid, .sms-page-workspace__grid) {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  min-inline-size: 0;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-workspace__nav, .sms-page-workspace__nav) {
  position: static;
  display: flex;
  grid-column: 1 / -1;
  flex-flow: row wrap;
  gap: 0 clamp(12px, 1.7vw, 25px);
  margin: 0;
  padding: 0;
  border: 0;
  border-block-end: 1px solid var(--sms-modern-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-workspace__nav, .sms-page-workspace__nav) a {
  flex: none;
  inline-size: auto;
  min-block-size: 44px;
  padding: 8px 2px;
  border: 0;
  border-block-end: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--sms-modern-muted);
  font-size: max(14px, .9rem);
  font-weight: 650;
  line-height: 1.35;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-workspace__nav, .sms-page-workspace__nav) a::after { content: none; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-workspace__nav, .sms-page-workspace__nav) a.is-active {
  color: var(--sms-modern-text);
  border-block-end-color: var(--sms-primary);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-group-workspace__header, .sms-page-workspace__header, .sms-group-manage-card, .sms-page-workspace-card, .sms-group-summary__card, .sms-page-feed-sidebar__card) {
  min-inline-size: 0;
  border: 1px solid var(--sms-modern-line);
  border-radius: var(--sms-modern-radius);
  background: var(--sms-modern-surface);
  box-shadow: none;
}

/* The signed-in workspace has its own heading and back navigation. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="settings"]:has(> .sms-profile-settings) > .sms-app-view-heading {
    display: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings {
    --sms-settings-line: var(--sms-border);
    --sms-settings-ink: var(--sms-text);
    --sms-settings-muted: var(--sms-muted-strong, var(--sms-muted));
    --sms-settings-marker: color-mix(in srgb, var(--sms-primary) 72%, var(--sms-text));
    display: block;
    margin: 0;
    padding: 0 0 24px;
    min-inline-size: 0;
    inline-size: 100%;
    max-inline-size: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--sms-settings-ink);
    box-shadow: none;
    overflow: visible;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings__intro {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 0;
    margin: 0 0 16px;
    border: 0;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings__intro h1 {
    margin: 0;
    font-size: clamp(max(29px, 1.81rem), 3vw, max(38px, 2.375rem)) !important;
    line-height: 1.12 !important;
    letter-spacing: -.035em !important;
    color: var(--sms-settings-ink);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings__back {
    margin: 0 0 4px;
    min-height: 40px;
    padding: 4px 0;
    border: none;
    background: transparent;
    font-size: max(14px, .9rem);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-profile-settings__intro > a, .sms-settings-brand > a) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 4px 0;
    color: var(--sms-settings-ink);
    text-decoration: underline;
    text-decoration-color: var(--sms-settings-marker);
    text-underline-offset: .25em;
    font-weight: 650;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings__nav {
    position: static;
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0 clamp(12px, 2.5vw, 26px);
    padding: 0;
    margin: 0 0 20px;
    border: 0;
    border-bottom: 1px solid var(--sms-settings-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings__nav button {
    inline-size: auto;
    min-block-size: 44px;
    margin: 0;
    padding: 7px 1px 9px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--sms-settings-muted);
    text-align: start;
    font-size: max(15px, .96rem);
    font-weight: 650;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings__nav button::after { content: none; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings__nav button[aria-current="page"] {
    border-bottom-color: var(--sms-settings-marker);
    color: var(--sms-settings-ink);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings__panel {
    box-sizing: border-box;
    min-inline-size: 0;
    inline-size: 100%;
    max-inline-size: none;
    margin: 0 0 14px;
    padding: clamp(16px, 3vw, 28px);
    border: 1px solid var(--sms-settings-line);
    border-radius: var(--sms-radius-lg, 18px);
    background: var(--sms-surface);
    box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings [hidden] { display: none !important; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-form { gap: 18px; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-form > label { inline-size: min(100%, 70ch); }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-form > button { justify-self: start; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-about-fields { min-inline-size: 0; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-about-fields__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
    gap: 16px;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings :is(input:not([type="checkbox"]), textarea, select) {
    box-sizing: border-box;
    max-inline-size: 100%;
    border: 1px solid var(--sms-settings-line);
    border-radius: 9px;
    background: var(--sms-surface);
    color: var(--sms-settings-ink);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings :is(a, button, input, select, textarea):focus-visible {
    outline: 2px solid var(--sms-settings-ink);
    outline-offset: 2px;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-appearance h3 {
    margin: 0;
    color: var(--sms-settings-ink);
    font-size: max(19px, 1.18rem);
    line-height: 1.35;
    letter-spacing: -.02em;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-appearance p {
    margin: 5px 0 0;
    color: var(--sms-settings-muted);
    font-size: max(15px, .95rem);
    line-height: 1.5;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(6px, 1.5vw, 12px);
    margin-top: 17px;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-mode {
    display: block;
    min-inline-size: 0;
    padding: 5px;
    border: 1px solid var(--sms-settings-line);
    border-radius: 12px;
    background: var(--sms-surface);
    box-shadow: none;
    color: var(--sms-settings-ink);
    font: inherit;
    text-align: start;
    cursor: pointer;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-mode[aria-pressed="true"] {
    border-color: var(--sms-settings-marker);
    box-shadow: 0 0 0 1px var(--sms-settings-marker);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-mode__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3px;
    padding: 7px 3px 2px;
    font-size: max(14px, .9rem);
    font-weight: 650;
    overflow-wrap: anywhere;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-mode__label > span {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    border: 1px solid var(--sms-settings-muted);
    border-radius: 50%;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] [aria-pressed="true"] > .sms-settings-mode__label > span {
    background: var(--sms-settings-marker);
    border-color: var(--sms-settings-marker);
    box-shadow: inset 0 0 0 3px var(--sms-surface);
}

/* The samples depict the choices, so their neutrals stay light or dark in either mode. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-sample {
    --sample-page: #eff2f6;
    --sample-paper: #fff;
    --sample-rail: var(--sample-paper);
    --sample-line: #a5b1c1;
    position: relative;
    display: block;
    height: clamp(54px, 8vw, 81px);
    border: 1px solid #71809533;
    border-radius: 8px;
    background: var(--sample-page);
    overflow: hidden;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is([data-sms-theme-mode="dark"], [data-sms-theme-mode="system"]) > .sms-settings-sample {
    --sample-page: #242c38;
    --sample-paper: #364253;
    --sample-line: #8b99ad;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-theme-mode="system"] > .sms-settings-sample { --sample-rail: #f6f8fb; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-sample__rail {
    display: block;
    width: 26%;
    height: 100%;
    background: radial-gradient(circle at 27% 25%, var(--sms-primary) 3px, transparent 3.5px),
        linear-gradient(var(--sample-line) 35%, transparent 35%) 30% 47% / 65% 6px repeat-x,
        var(--sample-rail);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-sample__post {
    position: absolute;
    inset: 18% 9% 15% 34%;
    border-top: 4px solid var(--sample-line);
    background: linear-gradient(to bottom, transparent 28%, var(--sample-paper) 28%);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 24px calc(-1 * clamp(16px, 3vw, 28px)) 0;
    padding: 20px clamp(16px, 3vw, 28px) 0;
    border-top: 1px solid var(--sms-settings-line);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-settings-brand svg { width: 16px; height: 16px; }

@media (max-width: 560px) {
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings__nav {
        gap: 0 12px;
        margin-bottom: 14px;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-profile-settings__nav button { font-size: max(14px, .9rem); }
}

/* Keep the reading column centered within the existing desktop grid track. */
@media (min-width: 1280px) {
  body.sms-app-page:not(.sms-article-inline-focus) #smsocial-app.sms-app-root[data-sms-presentation="modern"] > .sms-app-shell > .sms-app-centre > .sms-app-centre__stream[data-sms-router-view][data-sms-route="feed"]:not(.sms-pinned-focus-view) {
    inline-size: min(100%, clamp(660px, 85%, 840px)) !important;
    margin-inline: auto;
  }
}

/* Secondary route surfaces share the appearance selected for this installation. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-guest-auth-dialog {
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    border: 1px solid var(--sms-modern-line);
    border-radius: var(--sms-modern-radius);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] #sms-guest-auth-copy {
    color: var(--sms-modern-muted);
    font-size: max(13px, .8125rem);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-guest-auth-dialog__close {
    width: 44px;
    height: 44px;
    color: var(--sms-modern-text);
    background: var(--sms-modern-quiet);
    border: 0;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-guest-auth-dialog__mark {
    color: var(--sms-modern-accent-text);
    background: var(--sms-modern-soft);
}

/* Sharing opens in a body-level dialog so its mobile keyboard and cinema positions stay independent. */
body.sms-app-page.sms-ui-modern .sms-share-modal.sms-share-sheet {
    --share-accent: var(--sms-link-on-light);
    --share-tint: color-mix(in srgb, var(--sms-primary) 9%, var(--share-bg));
}
body.sms-app-page.sms-ui-modern .sms-share-modal.sms-share-sheet.is-dark {
    --share-accent: var(--sms-link-on-dark);
    --share-tint: color-mix(in srgb, var(--sms-primary) 16%, var(--share-bg));
}
body.sms-app-page.sms-ui-modern .sms-share-sheet .sms-share-sheet__publish {
    border-color: var(--sms-primary);
    background: var(--sms-primary);
    color: var(--sms-on-primary);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-people-search__intro,
    .sms-discover__intro,
    .sms-notifications__toolbar,
    .sms-saved-library__toolbar
) {
    gap: clamp(14px, 2vw, 24px);
    padding: clamp(16px, 2.4vw, 28px);
    border: 1px solid var(--sms-modern-line);
    border-radius: 20px;
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-people-search__copy h2,
    .sms-discover__copy h2,
    .sms-notifications__toolbar h2,
    .sms-saved-library__toolbar h2,
    .sms-marketplace__toolbar h1,
    .sms-newsroom__masthead h2
) {
    margin: 0 0 .32em;
    color: var(--sms-modern-text);
    /* The legacy unified typography sheet fixes several route titles with !important. */
    font-size: clamp(1.25rem, 1.1rem + .7vw, 1.7rem) !important;
    line-height: 1.2 !important;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-people-search__copy p,
    .sms-discover__copy p,
    .sms-notifications__toolbar p,
    .sms-saved-library__toolbar p,
    .sms-marketplace__toolbar p
) {
    max-inline-size: 65ch;
    margin: 0;
    color: var(--sms-modern-muted);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-discover__tabs, .sms-discover__sort, .sms-saved-filters) > a {
    min-block-size: 38px;
    padding-inline: 14px;
    border: 1px solid var(--sms-modern-line);
    border-radius: 999px;
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-discover__tabs, .sms-discover__sort, .sms-saved-filters) > a:is(:hover, .is-active),
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-marketplace .sms-classified-category-card.is-active {
    border-color: var(--sms-primary);
    background: var(--sms-modern-soft);
    color: var(--sms-modern-accent-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-marketplace .sms-classified-category-card.is-active .sms-classified-category-card__icon {
    background: var(--sms-modern-surface);
    color: var(--sms-modern-accent-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-people-results > .sms-person-card,
    .sms-event-grid > .sms-event-card,
    .sms-notifications__list > .sms-notification,
    .sms-marketplace > .sms-classified-filter-bar
) {
    min-inline-size: 0;
    border: 1px solid var(--sms-modern-line);
    border-radius: 16px;
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    box-shadow: none;
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-people-results > .sms-person-card,
    .sms-event-grid > .sms-event-card,
    .sms-notifications__list > .sms-notification
):is(:hover, :focus-within) {
    border-color: var(--sms-modern-accent-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-notifications__list > .sms-notification.is-unread {
    border-inline-start: 3px solid var(--sms-primary);
    background: var(--sms-modern-soft);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-people-search__status,
    .sms-person-card__copy > p,
    .sms-notification__body small,
    .sms-event-card__copy > p,
    .sms-newsroom__masthead .sms-app-kicker
) {
    color: var(--sms-modern-muted);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-newsroom > .sms-newsroom__masthead {
    padding-block: 10px 14px;
    border-block-end: 1px solid var(--sms-modern-line);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-people-search__field {
    border-color: var(--sms-modern-line);
    background: var(--sms-modern-canvas);
    color: var(--sms-modern-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-people-search__field:focus-within {
    outline: 2px solid var(--sms-modern-accent-text);
    outline-offset: 2px;
}

/* The desktop inbox has its own chat palette and keeps its split-pane layout. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages[data-sms-component="messages"] {
    --sms-chat-accent: var(--sms-primary);
    --sms-chat-ink: var(--sms-modern-accent-text);
    --sms-chat-soft: var(--sms-modern-soft);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages .sms-message-conversation.is-active {
    background: var(--sms-modern-soft);
    box-shadow: inset 3px 0 var(--sms-primary);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages :is(.sms-message-search, .sms-message-thread__header) {
    border-color: var(--sms-modern-line);
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages :is(
    .sms-message-conversation__side b,
    .sms-message-empty-start,
    .sms-message-compose .sms-profile-button,
    .sms-message-bubble.is-mine:not(.sms-message-deleted)
) {
    background: var(--sms-primary);
    color: var(--sms-on-primary);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages .sms-message-bubble.is-mine:not(.sms-message-deleted) :is(
    time, .sms-message-edited, .sms-message-seen, .sms-message-reply-context, .sms-message-reply-context strong, .sms-message-reply-context span
) {
    color: var(--sms-on-primary);
}

/* Browse surfaces respond to the space between the navigation rails. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-people-search, .sms-discover, .sms-notifications, .sms-saved-library, .sms-network, .sms-blog-news
) {
    inline-size: 100%;
    max-inline-size: none;
    min-inline-size: 0;
    margin-inline: 0;
    box-sizing: border-box;
    gap: var(--sms-modern-gap);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-people-search, .sms-blog-news, .sms-network, .sms-notifications
) { container: sms-browse / inline-size; }

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-people-search__intro, .sms-discover__intro, .sms-notifications__toolbar,
    .sms-saved-library__toolbar, .sms-network__summary, .sms-network__section,
    .sms-notification-preferences, .sms-discover__signals
) {
    min-inline-size: 0;
    box-shadow: none;
    border: 1px solid var(--sms-modern-line);
    border-radius: var(--sms-modern-radius) !important;
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-people-search__intro, .sms-discover__intro, .sms-notifications__toolbar,
    .sms-saved-library__toolbar, .sms-network__summary, .sms-notification-preferences
) { padding: clamp(16px, 1.6vw, 24px) !important; }

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-network__summary, .sms-notification-preferences, .sms-network__section
) :is(p, small, dt) { color: var(--sms-modern-muted); }

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-people-results {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr));
    gap: 14px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-person-card {
    padding: 14px;
    border-radius: var(--sms-modern-radius);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-person-card__copy > a {
    display: grid;
    gap: 2px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-person-card__copy, .sms-network-card, .sms-notification__body) strong {
    color: var(--sms-modern-text);
    font-size: 15px;
    line-height: 1.35;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-people-search__field input, .sms-blog-news__search-row input) {
    color: var(--sms-modern-text);
    font-size: 16px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-people-search__field button, .sms-blog-news__archive-tools .sms-blog-news__search-row button
) {
    min-height: 40px;
    padding-inline: 16px;
    background: var(--sms-primary);
    color: var(--sms-on-primary);
    font-size: 14px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-network {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 355px), 1fr));
    align-items: start;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-network__summary {
    grid-column: 1 / -1;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-network__section > header,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-network-card {
    border-color: var(--sms-modern-line);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-network__summary dl > div,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-notification-preferences__grid label {
    background: var(--sms-modern-canvas);
    border-color: var(--sms-modern-line);
    color: var(--sms-modern-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-network__empty {
    background: transparent;
    color: var(--sms-modern-muted);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-network-card__actions, .sms-notification__connection-actions) > button,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-notification-preferences__grid label {
    min-height: 44px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-notification-preferences__grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-notifications .sms-notification {
    grid-template-columns: auto minmax(0, 1fr) auto;
    border-radius: var(--sms-modern-radius);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-saved-filters, .sms-discover__tabs) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-saved-filters, .sms-discover__tabs, .sms-discover__sort) a {
    max-inline-size: 100%;
    min-height: 42px;
    box-sizing: border-box;
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-saved-filters a span { overflow-wrap: anywhere; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-discover__signals {
    padding: 12px 16px;
    color: var(--sms-modern-muted);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-blog-news .sms-blog-news__filter {
    border-color: var(--sms-modern-line);
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    min-height: 40px;
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-blog-news .sms-blog-news__filter:is(.is-active, :hover) {
    border-color: var(--sms-modern-accent-text);
    background: var(--sms-modern-soft);
    color: var(--sms-modern-accent-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-blog-news :is(
    .sms-newsroom__top-stories, .sms-newsroom__trending, .sms-blog-news__search, .sms-blog-news-card:not(.sms-blog-news-card--editorial-hero)
) {
    border-color: var(--sms-modern-line);
    background: var(--sms-modern-surface);
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-blog-news-card:not(.sms-blog-news-card--editorial-hero) :is(h3, .sms-blog-news-card__read),
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-newsroom :is(.sms-newsroom__section-heading, .sms-newsroom__trending header) :is(h3, a) {
    color: var(--sms-modern-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-blog-news-card:not(.sms-blog-news-card--editorial-hero)
:is(.sms-blog-news-card__meta, .sms-blog-news-card__meta-category, .sms-blog-news-card__body p) { color: var(--sms-modern-muted); }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-newsroom :is(.sms-newsroom__section-heading, .sms-newsroom__trending header) {
    border-color: var(--sms-modern-line);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-newsroom__section-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-news-home-footer {
    border: 1px solid var(--sms-modern-line);
    border-radius: var(--sms-modern-radius);
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-news-home-footer :is(.sms-news-home-footer__top, .sms-news-home-footer__bottom) { border-color: var(--sms-modern-line); }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-news-home-footer :is(.sms-news-home-footer__top p, .sms-news-home-footer__bottom) { color: var(--sms-modern-muted); }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-news-home-footer :is(.sms-news-home-footer__column h3, .sms-news-home-footer__column a, .sms-news-home-footer__brand) { color: var(--sms-modern-text) !important; }
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-news-home-footer a:is(:hover, :focus-visible) {
    color: var(--sms-modern-accent-text) !important;
    outline-color: var(--sms-modern-accent-text);
}

@container sms-browse (max-width: 820px) {
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-newsroom :is(.sms-newsroom__top-grid, .sms-newsroom__content-grid) {
        grid-template-columns: minmax(0, 1fr);
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-newsroom__sidebar { position: static; }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-newsroom__top-stories { min-height: 0; grid-template-rows: none; }
}
@container sms-browse (max-width: 650px) {
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-people-search__intro { grid-template-columns: minmax(0, 1fr); }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-network__summary dl {
        flex: 1 1 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-notifications__toolbar {
        flex-wrap: wrap;
        align-items: start;
    }
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-global-search {
    border: 1px solid var(--sms-modern-line);
    border-radius: var(--sms-modern-radius);
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-global-search :is(.sms-global-search__close, .sms-global-search__item) {
    min-block-size: 44px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-global-search__item:is(:hover, :focus-visible) {
    background: var(--sms-modern-soft);
    color: var(--sms-modern-accent-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-global-search :is(.sms-global-search__status, .sms-global-search__copy small) {
    color: var(--sms-modern-muted);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-global-search__close {
    inline-size: 44px;
    block-size: 44px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-global-search__copy strong {
    color: var(--sms-modern-text);
    font-size: max(15px, .94rem);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-global-search__copy small {
    font-size: max(13px, .81rem);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-global-search :is(a, button):focus-visible {
    outline: 2px solid var(--sms-modern-accent-text);
    outline-offset: 2px;
}

/* Community services share the centre track. Reading measures belong to text inside a panel. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-events, .sms-event-detail, .sms-event-admin, .sms-marketplace,
    .sms-marketplace-detail, .sms-learn-home, .sms-ads-portal
) {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-inline: 0;
    color: var(--sms-modern-text);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(
    .sms-event-calendar, .sms-event-card, .sms-event-editorial__sidebar,
    .sms-marketplace-card, .sms-marketplace-detail__card, .sms-classified-filter-bar,
    .sms-learn-hero, .sms-learn-course-card, .sms-learn-section, .sms-learn-empty,
    .sms-ads-portal__hero, .sms-ads-portal__state, .sms-ads-portal-request,
    .sms-ads-portal-requests, .sms-ads-portal-campaign-section, .sms-ads-portal-offer,
    .sms-ads-portal-card, .sms-ads-portal-request-card
) {
    min-inline-size: 0;
    border: 1px solid var(--sms-modern-line);
    border-radius: var(--sms-modern-radius);
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    box-shadow: none;
}

/* Auto-fill retains the leading edge of a short final row, including a single upcoming event. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr));
    max-inline-size: none;
    margin-inline: 0;
    gap: var(--sms-modern-gap);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-event-grid > :is(.sms-event-card, .sms-ad-grid-slot) {
    min-inline-size: 0;
    max-inline-size: none;
    margin: 0;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-event-grid > .sms-ad-grid-slot {
    grid-column: auto;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-event-editorial__heading,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-event-editorial__heading h1 {
    text-align: start;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-event-editorial__description, .sms-marketplace-detail__body > p) {
    max-inline-size: 75ch;
    overflow-wrap: anywhere;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-marketplace .sms-marketplace__toolbar h1 {
    margin: 0;
    font-size: clamp(26px, 2.2vw, 36px) !important;
    line-height: 1.15 !important;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-marketplace .sms-marketplace-grid,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-learn-course-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr));
    gap: var(--sms-modern-gap);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-learn-hero {
    padding: clamp(16px, 2vw, 24px);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-learn-hero::after,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-learn-hero::before {
    content: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-learn-hero__mark {
    color: var(--sms-modern-accent-text);
    background: var(--sms-modern-soft);
    border-radius: 12px;
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-learn-course-card, .sms-marketplace-card, .sms-event-card):is(:hover, :focus-within) {
    box-shadow: none;
    border-color: var(--sms-modern-accent-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-event-admin[data-workspace-mode] .sms-event-admin__panel {
    padding: clamp(15px, 2vw, 24px);
    border: 1px solid var(--sms-modern-line);
    border-radius: var(--sms-modern-radius);
    background: var(--sms-modern-surface);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-event-admin__head :is(.sms-event-admin__eyebrow, .sms-event-admin__event-title),
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-event-admin__tabs button:is([aria-current="page"], [aria-selected="true"]) {
    color: var(--sms-modern-accent-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-event-admin__tabs button:is([aria-current="page"], [aria-selected="true"]) {
    background: var(--sms-modern-soft);
}

/* Transport map layers keep their own line colours and fullscreen geometry. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-smsocial-transport-private] :is(.smsocial-transport-favorites__place, .smsocial-transport-hub__card) {
    min-inline-size: 0;
    border: 1px solid var(--sms-modern-line);
    border-radius: var(--sms-modern-radius);
    background-color: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-smsocial-transport-private] .smsocial-transport-journey__submit {
    border-color: var(--sms-primary);
    background: var(--sms-primary);
    color: var(--sms-on-primary);
}

#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal {
    --sms-text-muted: var(--sms-modern-muted);
    --sms-accent: var(--sms-modern-accent-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal__summary article {
    min-inline-size: 0;
    border-color: var(--sms-modern-line);
    border-radius: var(--sms-modern-radius);
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    overflow-wrap: anywhere;
}

/* The offer and campaign forms use the site's configured palette in both colour modes. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-ads-portal-offer__hero, .sms-ads-portal-offer__cta) {
    background: var(--sms-modern-soft);
    color: var(--sms-modern-text);
    border: 1px solid var(--sms-modern-line);
    border-radius: var(--sms-modern-radius);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal-offer__hero::after {
    content: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-ads-portal-offer__hero, .sms-ads-portal-offer__cta) :is(h2, h3, p),
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal-offer__reach {
    color: var(--sms-modern-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-ads-portal__kicker, .sms-ads-portal-package__top > strong, .sms-ads-portal-services__list span),
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal-services summary > span::before {
    color: var(--sms-modern-accent-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-ads-portal-offer__benefits article > .dashicons, .sms-ads-portal-offer__note > .dashicons, .sms-ads-portal__account, .sms-ads-portal-package.is-featured, .sms-ads-portal-offer__note) {
    border-color: var(--sms-modern-accent-text);
    background: var(--sms-modern-soft);
    color: var(--sms-modern-accent-text);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] :is(.sms-ads-portal__button, .sms-ads-portal-card__actions a.is-primary, .sms-ads-portal-package__badge, .sms-ads-portal-package__button, .sms-ads-portal-offer__cta > a) {
    border-color: var(--sms-primary);
    background: var(--sms-primary);
    color: var(--sms-on-primary) !important;
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal :is(button, a, summary):focus-visible {
    outline: 2px solid var(--sms-modern-accent-text);
    outline-offset: 2px;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal-request,
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal-offer {
    padding: clamp(12px, 2vw, 24px);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal :is(input:not([type="checkbox"], [type="radio"]), select, textarea) {
    min-inline-size: 0;
    max-inline-size: 100%;
    background-color: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    border-color: var(--sms-modern-line);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal :is(.sms-ads-portal-card, .sms-ads-portal-request-card, .sms-ads-portal-offer, .sms-ads-portal__hero) {
    overflow-wrap: anywhere;
}
@media (max-width: 600px) {
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-learn-course-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal :is(.sms-ads-portal-form-grid, .sms-ads-portal-zones, .sms-ads-portal-packages, .sms-ads-portal-offer__benefits) {
        grid-template-columns: minmax(0, 1fr);
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-ads-portal :is(.sms-ads-portal-offer__reach, .sms-ads-portal-offer__cta > a) {
        white-space: normal;
    }
}

/* The video library uses the social content track. Fullscreen playback lives outside this grid. */
#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="videos"] > .sms-app-view-heading {
    min-block-size: 0;
    margin: 0 0 var(--sms-modern-gap);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="videos"] > .sms-app-view-heading > div > span {
    display: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] [data-sms-route="videos"] > .sms-app-view-heading h1 {
    margin: 0;
    color: var(--sms-modern-text);
    font-size: clamp(29px, 3vw, 38px);
    font-weight: 740;
    line-height: 1.15;
    letter-spacing: -.045em;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-video-stream .sms-activity-stream {
    gap: clamp(10px, 1.3vw, 18px);
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-video-stream .sms-activity-card:not(.sms-activity-card--immersive) {
    border: 1px solid var(--sms-modern-line);
    border-radius: var(--sms-modern-radius);
    background: var(--sms-modern-surface);
    box-shadow: none;
}
#smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-video-stream .sms-activity-card:focus-within {
    outline: 2px solid var(--sms-modern-accent-text);
    outline-offset: 2px;
}
@media (min-width: 768px) {
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-video-stream .sms-activity-stream {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 238px), 1fr));
    }
}
/* Size the desktop conversation list from available content width, including layouts with both rails. */
@media (min-width: 1024px) {
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages[data-sms-component="messages"] {
        inline-size: 100%;
        min-inline-size: 0;
        max-inline-size: none;
        container-type: inline-size;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages__appbar {
        min-block-size: 68px;
        padding: 12px clamp(16px, 1.6vw, 24px);
        border-color: var(--sms-modern-line);
        border-radius: var(--sms-modern-radius) var(--sms-modern-radius) 0 0;
        background: var(--sms-modern-surface);
        color: var(--sms-modern-text);
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages__layout {
        grid-template-columns: clamp(228px, 29%, 340px) minmax(0, 1fr);
        border-color: var(--sms-modern-line);
        border-radius: 0 0 var(--sms-modern-radius) var(--sms-modern-radius);
        background: var(--sms-modern-surface);
        box-shadow: none;
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages :is(.sms-messages__sidebar, .sms-message-thread__header, .sms-message-compose) {
        border-color: var(--sms-modern-line);
        background: var(--sms-modern-surface);
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages .sms-message-thread {
        min-inline-size: 0;
        background: var(--sms-modern-canvas);
    }
    #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages .sms-message-bubble:not(.is-mine) {
        background: var(--sms-modern-surface);
        color: var(--sms-modern-text);
    }
    @container (max-width: 780px) {
        #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages .sms-message-conversation {
            grid-template-columns: 38px minmax(0, 1fr) auto;
            gap: 8px;
            min-block-size: 70px;
            padding: 10px 8px;
        }
        #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages .sms-message-conversation .sms-message-avatar {
            inline-size: 38px;
            block-size: 38px;
        }
        #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-messages :is(.sms-message-thread__header, .sms-message-thread__messages, .sms-message-compose) {
            padding-inline: 12px;
        }
    }
}

/* The configured desktop navigation and the mobile drawers retain their own layout. */
#smsocial-app .sms-modern-left {
  display: none;
}

@media (min-width: 1280px) {
  #smsocial-app.sms-app-root[data-sms-presentation="modern"] .sms-app-rail--left .sms-app-navigation {
    display: none !important;
  }

  #smsocial-app[data-sms-presentation="modern"] .sms-modern-left {
    display: flex;
    flex-direction: column;
    min-block-size: 100%;
    color: var(--sms-modern-text);
  }

  #smsocial-app[data-sms-presentation="modern"] .sms-app-rail--left:has(.sms-app-rail__footer) .sms-app-rail__scroll {
    padding-block-end: 4px;
  }

  #smsocial-app[data-sms-presentation="modern"] .sms-app-rail--left .sms-app-rail__footer {
    min-block-size: 24px;
    padding: 0 8px 4px;
    border: 0;
    font-size: 11px;
  }

  #smsocial-app[data-sms-presentation="modern"] .sms-app-rail__footer .sms-icon {
    inline-size: 13px;
    block-size: 13px;
  }

  #smsocial-app .sms-modern-left__heading {
    margin: 0 0 10px;
    padding: 0 11px;
    color: var(--sms-modern-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .075em;
    line-height: 24px;
    text-transform: uppercase;
  }

  .sms-modern-left__links {
    display: grid;
    gap: 4px;
  }

  #smsocial-app .sms-modern-left :is(a, summary) {
    box-sizing: border-box;
    color: inherit;
    text-decoration: none;
  }

  #smsocial-app .sms-modern-left__link {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-block-size: 46px;
    padding: 8px 12px;
    border-inline-start: 2px solid transparent;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 550;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .sms-modern-left__link > .sms-icon {
    inline-size: 20px;
    block-size: 20px;
    stroke-width: 1.6;
  }

  #smsocial-app .sms-modern-left :is(a, summary):hover {
    background: var(--sms-modern-quiet);
  }

  #smsocial-app .sms-modern-left__link:is(.is-active, [aria-current="page"]) {
    border-inline-start-color: var(--sms-primary);
    background: var(--sms-modern-soft);
    color: var(--sms-modern-accent-text);
  }

  #smsocial-app .sms-modern-left__more > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: fit-content;
    max-inline-size: 100%;
    min-block-size: 44px;
    margin-inline: auto;
    gap: 5px;
    padding-inline: 12px;
    list-style: none;
    border-radius: 6px;
    color: var(--sms-modern-muted);
    font-size: 13px;
    font-weight: 550;
    cursor: pointer;
  }

  .sms-modern-left__more > summary::-webkit-details-marker {
    display: none;
  }

  .sms-modern-left__more > summary .sms-icon {
    inline-size: 14px;
    block-size: 14px;
    transform: rotate(90deg);
  }

  .sms-modern-left__more[open] > summary .sms-icon {
    transform: rotate(-90deg);
  }

  .sms-modern-left__more[open] > .sms-modern-left__links {
    margin-block-start: 8px;
    border-block-start: 1px solid var(--sms-modern-line);
    padding-block-start: 8px;
  }

  .sms-modern-left__more .sms-modern-left__link {
    min-block-size: 40px;
    font-size: 14px;
  }

  .sms-modern-left__badge {
    padding: 2px 7px;
    border-radius: 12px;
    color: var(--sms-modern-accent-text);
    background: var(--sms-modern-soft);
    font-size: 11px;
  }

  .sms-modern-left__groups {
    margin-block: 24px;
    padding-block-start: 18px;
    border-block-start: 1px solid var(--sms-modern-line);
  }

  .sms-modern-left__nav:has(.sms-modern-left__more:not([open])) + .sms-modern-left__groups {
    margin-block-start: 4px;
  }

  #smsocial-app .sms-modern-left__group {
    display: flex;
    align-items: center;
    gap: 11px;
    min-block-size: 46px;
    border-radius: 9px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .sms-modern-left__thumb, .sms-modern-left__avatar {
    flex: none;
    display: grid;
    place-items: center;
    inline-size: 30px;
    block-size: 30px;
    overflow: hidden;
    border-radius: 7px;
    background: var(--sms-modern-soft);
    color: var(--sms-modern-accent-text);
  }

  .sms-modern-left__thumb .sms-icon {
    inline-size: 17px;
    block-size: 17px;
  }

  .sms-modern-left :is(.sms-modern-left__thumb, .sms-modern-left__avatar) img {
    display: block;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
  }

  #smsocial-app .sms-modern-left__account {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 12px;
    min-block-size: 64px;
    margin-block-start: auto;
    padding: 10px 8px 0;
    border-block-start: 1px solid var(--sms-modern-line);
  }

  .sms-modern-left__avatar {
    inline-size: 38px;
    block-size: 38px;
    border-radius: 50%;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
  }

  .sms-modern-left__identity > * {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .sms-modern-left__identity strong {
    font-size: 13px;
    line-height: 1.5;
  }

  .sms-modern-left__identity small {
    color: var(--sms-modern-muted);
    font-size: 12px;
    line-height: 1.5;
  }

  .sms-modern-left__account > .sms-icon {
    inline-size: 16px;
    block-size: 16px;
  }

  #smsocial-app .sms-modern-left :is(a, summary):focus-visible {
    outline: 2px solid var(--sms-modern-accent-text);
    outline-offset: -2px;
  }
}

/* The wide desktop rail shows the signed-in member's two personal inboxes. */
#smsocial-app .sms-rail-card {
  display: none;
}

#smsocial-app .sms-rail-options {
  min-inline-size: 0;
  margin: 0;
  color: var(--sms-modern-muted);
}
#smsocial-app .sms-rail-options summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--sms-modern-muted);
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
}
#smsocial-app .sms-rail-options summary::-webkit-details-marker {
  display: none;
}
#smsocial-app .sms-rail-options summary .sms-icon {
  inline-size: 15px;
  block-size: 15px;
}
#smsocial-app .sms-rail-options summary .sms-icon:last-child {
  transform: rotate(90deg);
}
#smsocial-app .sms-rail-options[open] summary .sms-icon:last-child {
  transform: rotate(-90deg);
}
#smsocial-app .sms-rail-options summary:hover {
  color: var(--sms-modern-text);
  background: var(--sms-modern-quiet);
}
#smsocial-app .sms-rail-options summary:focus-visible {
  outline: 2px solid var(--sms-modern-accent-text);
  outline-offset: -2px;
}
#smsocial-app .sms-rail-options__content {
  display: grid;
  min-width: 0;
  gap: 10px;
}

@media (max-width: 1279px) {
  #smsocial-app .sms-rail-options[open] > summary { display: none; }
}

@media (min-width: 1280px) {
  #smsocial-app .sms-rail-card {
    display: block;
    min-inline-size: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--sms-modern-line);
    border-radius: var(--sms-modern-radius);
    background: var(--sms-modern-surface);
    color: var(--sms-modern-text);
    text-align: start;
    line-height: 1.4;
  }
  #smsocial-app .sms-rail-card + .sms-rail-card { margin-block-start: 16px; }
  #smsocial-app .sms-rail-card a {
    box-sizing: border-box;
    margin: 0;
    border: 0;
    border-radius: 0;
    color: var(--sms-modern-text);
    background: transparent;
    text-decoration: none;
    box-shadow: none;
  }
  #smsocial-app .sms-rail-card a:hover { background: var(--sms-modern-soft); }
  #smsocial-app .sms-rail-card a:focus-visible {
    outline: 2px solid var(--sms-modern-accent-text);
    outline-offset: -3px;
  }
  #smsocial-app .sms-rail-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 47px;
    padding: 15px 16px 8px;
    font-size: 15px;
  }
  #smsocial-app .sms-rail-card__head strong {
    font: inherit;
    font-weight: 700;
    overflow-wrap: anywhere;
  }
  #smsocial-app .sms-rail-card__head .sms-icon,
  #smsocial-app .sms-rail-card__symbol .sms-icon { width: 17px; height: 17px; }
  #smsocial-app .sms-rail-card__row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-height: 61px;
    padding: 10px 16px 9px;
  }
  #smsocial-app .sms-rail-card__avatar, #smsocial-app .sms-rail-card__symbol {
    display: grid;
    place-items: center;
    flex: none;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--sms-primary) 16%, var(--sms-modern-quiet));
    color: var(--sms-modern-text);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
  }
  #smsocial-app .sms-rail-card__row:nth-child(2) .sms-rail-card__avatar {
    background: color-mix(in srgb, #80a993 26%, var(--sms-modern-quiet));
  }
  #smsocial-app .sms-rail-card__row:nth-child(3) .sms-rail-card__avatar {
    background: color-mix(in srgb, #c89e61 24%, var(--sms-modern-quiet));
  }
  #smsocial-app .sms-rail-card__symbol {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    background: var(--sms-modern-quiet);
  }
  #smsocial-app .sms-rail-card__copy {
    display: grid;
    min-width: 0;
    gap: 2px;
  }
  #smsocial-app .sms-rail-card__copy strong, #smsocial-app .sms-rail-card__copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.5;
  }
  #smsocial-app .sms-rail-card__copy strong { color: var(--sms-modern-text); font-weight: 700; }
  #smsocial-app .sms-rail-card__copy small { color: var(--sms-modern-muted); font-weight: 400; }
  #smsocial-app .sms-rail-card__notice { min-height: 80px; padding-bottom: 16px; }
  #smsocial-app .sms-rail-card__notice small { white-space: normal; overflow-wrap: anywhere; }
  #smsocial-app .sms-rail-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    flex: none;
    padding: 3px 8px;
    border-radius: 9px;
    color: var(--sms-modern-accent-text);
    background: var(--sms-modern-soft);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  #smsocial-app .sms-rail-card__badge:has(b[hidden]), #smsocial-app .sms-rail-card [hidden] { display: none; }
  #smsocial-app .sms-rail-card .sms-rail-card__footer {
    display: flex;
    align-items: center;
    min-height: 41px;
    padding: 6px 16px;
    border-top: 1px solid var(--sms-modern-line);
    color: var(--sms-modern-accent-text);
    font-size: 13px;
    font-weight: 700;
  }
  #smsocial-app .sms-rail-card__empty {
    margin: 0;
    padding: 6px 16px 16px;
    color: var(--sms-modern-muted);
    font-size: 13px;
  }
}
