/* Community typography reset: keep existing hierarchy, replace serif/legacy faces. */
:root {
  --el-community-font: Inter, system-ui, -apple-system, sans-serif;
}

body.cf-body,
body.hc-groups-discover,
body.hc-groups-guest,
body.cr-body {
  font-family: var(--el-community-font) !important;
}

body.cf-body :where(
  h1, h2, h3, h4, h5, h6,
  p, a, span, small, strong, b, em, label,
  button, input, select, textarea,
  .btn, .dropdown-menu, .modal, .popover, .tooltip,
  .cf-community-section-link,
  .cf-community-card,
  .cf-community-hero-v2,
  .cf-community-composer,
  .cf-post-card,
  .cf-post-text,
  .cf-sidebar,
  .lh-page,
  .lh-card,
  .lh-btn-new-module,
  .cm-wrap,
  .cm-member-row,
  .ga-wrap,
  .ga-card,
  .gw,
  .cfe-wrap,
  .cfa-wrap,
  .gos-wrap,
  .gci-page,
  .gci-card,
  .gab-shell,
  .spb-shell,
  .spbm-card,
  .spb-preview-window
),
body.hc-groups-discover :where(
  h1, h2, h3, h4, h5, h6,
  p, a, span, small, strong, b, em, label,
  button, input, select, textarea,
  .hc-logged-explore-head,
  .hc-logged-tab,
  .hc-logged-card,
  .hc-logged-card-title,
  .hc-hb-modern
),
body.hc-groups-guest :where(
  h1, h2, h3, h4, h5, h6,
  p, a, span, small, strong, b, em, label,
  button, input, select, textarea,
  .hc-guest-tab,
  .hc-guest-card,
  .hc-guest-card-title,
  .hc-hb-modern
),
body.cr-body :where(
  h1, h2, h3, h4, h5, h6,
  p, a, span, small, strong, b, em, label,
  button, input, select, textarea,
  .mcr-wrap,
  .mcr-head,
  .mcr-room,
  .mcr-chat-title,
  .cr-signin-note,
  .hc-hb-modern
) {
  font-family: var(--el-community-font) !important;
  letter-spacing: 0 !important;
}

body.cf-body :where(.cf-community-section-link, .hc-view-tab, .spb-tab-btn, .ga-tab) {
  font-weight: 650 !important;
}

body.cf-body :where(h1, h2, h3, .cf-community-card h2, .lh-page h1, .ga-hero h1, .cm-wrap h1, .spb-library-copy h1),
body.hc-groups-discover :where(.hc-logged-explore-head h2, .hc-logged-card-title),
body.hc-groups-guest :where(.hc-guest-card-title),
body.cr-body :where(.mcr-head h1, .mcr-chat-title h2) {
  font-weight: 800 !important;
}

body.cf-body .lh-page h1,
body.cf-body .lh-header-copy h1,
body.cf-body .cm-wrap > .cm-head h1,
body.cf-body .spb-library-copy h1 {
  font-size: 28px !important;
  line-height: 1 !important;
}

body.cf-body .lh-header-copy h1 {
  color: #050505 !important;
}

:root[data-theme="dark"] body.cf-body .lh-header-copy h1 {
  color: #f8fafc !important;
}

body.cf-body .cf-community-hero-nav {
  position: relative !important;
  z-index: 2 !important;
  min-width: 0 !important;
  padding-left: 34px !important;
  padding-right: 34px !important;
}

@media (max-width: 900px) {
  body.cf-body .cf-community-hero-nav {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

@media (max-width: 520px) {
  body.cf-body .cf-community-hero-nav {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

:root[data-theme="dark"] body.cf-body .cf-community-hero.cf-community-hero-v2 {
  background: #070707 !important;
}

:root[data-theme="dark"] body.cf-body .cf-community-hero-v2 .cf-community-hero-cover {
  z-index: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

:root[data-theme="dark"] body.cf-body .cf-community-hero-v2 .cf-community-hero-cover-image {
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
}

:root[data-theme="dark"] body.cf-body .cf-community-hero-v2 .cf-community-hero-cover::after {
  background:
    linear-gradient(90deg, rgba(0,0,0,.58) 0%, rgba(0,0,0,.34) 46%, rgba(0,0,0,.56) 100%),
    linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,.76) 100%) !important;
}

:root[data-theme="dark"] body.cf-body .cf-community-hero-v2 > .cf-hero-inner,
:root[data-theme="dark"] body.cf-body .cf-community-hero-v2 .cf-cib,
:root[data-theme="dark"] body.cf-body .cf-community-hero-nav {
  position: relative !important;
  z-index: 2 !important;
}

:root[data-theme="dark"] body.cf-body .cf-community-hero-v2 .cf-cib {
  background: linear-gradient(180deg, rgba(15,17,21,.58) 0%, rgba(0,0,0,.72) 100%) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] body.cf-body .cf-community-hero-nav,
:root[data-theme="dark"] body.cf-body .cf-community-hero-nav .cf-community-section-nav {
  border-color: transparent !important;
  box-shadow: none !important;
}

:root[data-theme="dark"] body.cf-body .cf-community-hero-nav {
  margin-top: -1px !important;
  overflow: visible !important;
  background: linear-gradient(180deg, rgb(0 0 0) 0%, rgb(0 0 0) 100%) !important;
  box-shadow: 0 -18px 24px rgb(0 0 0) !important;
}

:root[data-theme="dark"] body.cf-body .cf-community-hero-nav .cf-community-section-nav {
  position: relative !important;
  z-index: 2 !important;
  background: transparent !important;
}

:root[data-theme="dark"] body.cf-body .cf-community-hero-nav::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: -22px !important;
  height: 24px !important;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.78) 100%) !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

:root[data-theme="dark"] body.cf-body .cf-community-hero-nav .cf-community-section-link {
  background: transparent !important;
  color: #f8fafc !important;
}

body.cf-body .cf-community-hero-nav .cf-community-section-link:hover::after {
  opacity: 0 !important;
  transform: scaleX(.68) !important;
}

body.cf-body .cf-community-hero-nav .cf-community-section-link.active:hover::after {
  opacity: 1 !important;
  transform: scaleX(1) !important;
}

body.cf-body.cf-view-feed .cf-feed {
  width: 100% !important;
  max-width: 1110px !important;
  margin: 0 auto !important;
}

body.cf-body.cf-view-feed .cf-community-composer,
body.cf-body.cf-view-feed .cf-composer,
body.cf-body.cf-view-feed .cf-post-stream .post,
body.cf-body.cf-view-feed .cf-post-stream .post-wrapper,
body.cf-body.cf-view-feed .cf-post-stream .alert-post {
  border-radius: 6px !important;
}

body.cf-body.cf-view-feed .cf-community-composer-input,
body.cf-body.cf-view-feed .cf-composer-input {
  border-radius: 6px !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post-body,
body.cf-body.cf-view-feed .cf-post-stream .post-footer,
body.cf-body.cf-view-feed .cf-post-stream .post-comments {
  border-radius: 0 !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-author {
  font-size: 12px !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-time {
  font-size: 0 !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-time a.js_moment,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-time a.cf_compact_moment {
  font-size: 11px !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-time > .btn-group,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-time > i.fa-lock,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-time > i.fa-users,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-time > i.fa-globe,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-time > i.fa-cog {
  display: none !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .cf-feed-card-heading {
  font-size: 26px !important;
  font-weight: 800 !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-text,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-text *,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-text-translation,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-text-translation * {
  font-size: 18px !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .pin-icon,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .pin-icon span {
  font-size: 12px !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .cf-poll-vote-cta,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .cf-poll-vote-label {
  font-size: 10px !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .cf-poll-vote-tag {
  font-size: 8px !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .post-actions .action-btn {
  font-size: 12px !important;
}

body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .cf-comment-preview,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .cf-comment-preview-time,
body.cf-body.cf-view-feed .cf-post-stream .post:not(.cf-post-modal-active) .cf-comment-preview-time .js_moment {
  font-size: 11px !important;
}

body.cf-body.cf-view-feed .post.js_posts_loader.done,
body.cf-body.cf-view-feed .js_posts_loader.done,
body.cf-body.cf-view-feed .js_posts_loader:not(.loading),
body.cf-body.cf-view-feed .js_posts_loader {
  display: none !important;
}
