/* Readable forum surfaces over the site background. */
body.nmf116-body .nmf116-main {
  --forum-ink: #f5f7fc;
  --forum-muted: #c4cfdf;
  --forum-border: #41506a;
  --forum-surface: #162135;
  --forum-accent: #ffd18a;
}

html body.nmf116-body .nmf116-main > .crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 8px 13px;
  border: 1px solid var(--forum-border);
  border-radius: 12px;
  background: #131d2e !important;
  color: var(--forum-muted) !important;
  font-size: 13px !important;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
html body.nmf116-body .nmf116-main > .crumbs :is(a, strong, span) {
  color: inherit !important;
}
html body.nmf116-body .nmf116-main > .crumbs a {
  color: var(--forum-accent) !important;
  text-decoration: underline;
  text-underline-offset: .16em;
}
html body.nmf116-body .nmf116-main > .crumbs strong {
  color: var(--forum-ink) !important;
}

html body.nmf116-body .nmf116-main > :is(.nmf116-pagehead, .topic-head) {
  align-items: flex-start;
  gap: 16px;
  padding: clamp(18px, 3.2vw, 36px) !important;
  border: 1px solid var(--forum-border) !important;
  border-radius: 20px !important;
  background: linear-gradient(115deg, #121c2d, #22324b) !important;
  color: var(--forum-ink) !important;
  box-shadow: 0 10px 24px #080f2333 !important;
}
html body.nmf116-body .nmf116-main > :is(.nmf116-pagehead, .topic-head) h1 {
  margin-block: 4px 0 !important;
  color: var(--forum-ink) !important;
  font-size: clamp(23px, 3vw, 37px) !important;
  line-height: 1.18 !important;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
html body.nmf116-body .nmf116-main > :is(.nmf116-pagehead, .topic-head) p {
  max-width: 72ch;
  color: var(--forum-muted) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}
html body.nmf116-body .nmf116-main > .nmf116-pagehead .eyebrow {
  color: var(--forum-accent) !important;
}
html body.nmf116-body .nmf116-main > .nmf116-pagehead p:empty {
  display: none;
}

html body.nmf116-body .nmf116-main :is(.nmf116-group > header, .nmf116-subnodes > header, .thread-list-head, .nmf116-empty) {
  border-color: var(--forum-border) !important;
  background: var(--forum-surface) !important;
  color: var(--forum-ink) !important;
}
html body.nmf116-body .nmf116-main :is(.nmf116-group > header, .nmf116-subnodes > header, .thread-list-head, .nmf116-empty) :is(h2, strong) {
  color: var(--forum-ink) !important;
}
html body.nmf116-body .nmf116-main :is(.nmf116-group > header, .nmf116-subnodes > header, .thread-list-head, .nmf116-empty) p,
html body.nmf116-body .nmf116-main .thread-list-head h2 + span {
  color: var(--forum-muted) !important;
}
html body.nmf116-body .nmf116-main .thread-row:hover {
  box-shadow: inset 3px 0 #b97927;
}
html body.nmf116-body .nmf116-main :is(.crumbs, .thread-list, .nmf116-head-actions) :is(a, button, summary, input):focus-visible {
  outline: 3px solid #e6a544;
  outline-offset: -3px;
}
@media (max-width: 600px) {
  html body.nmf116-body .nmf116-main > :is(.nmf116-pagehead, .topic-head) {
    border-radius: 15px !important;
  }
}
/* Forum surfaces must override the site's intentional transparent sections. */
@layer forum-surfaces {
  body.nmf116-body .nmf116-main > :is(.nmf116-pagehead, .topic-head) {
    background: linear-gradient(115deg, #121c2d, #22324b) !important;
  }
  body.nmf116-body .nmf116-main :is(.nmf116-group > header, .nmf116-subnodes > header, .thread-list-head, .nmf116-empty) {
    background: #162135 !important;
  }
}
body.nmf116-body .nmf116-main > .nmf116-empty {
  padding: clamp(18px, 3vw, 28px) !important;
  border: 1px solid var(--forum-border);
  border-radius: 15px;
}
@layer forum-surfaces {
  body.nmf116-body .nmf116-main :is(.thread-list, .thread-row, .nmf116-group, .nmf116-subnodes, .post-card, .post-author, .post-main) {
    background: #19263b !important;
  }
  body.nmf116-body .nmf116-main :is(.thread-row:hover, .thread-row:focus-within) {
    background: #253953 !important;
  }
  body.nmf116-body .nmf116-main :is(.thread-title strong, .thread-last strong, .thread-num b, .post-body) {
    color: #f5f7fc !important;
  }
  body.nmf116-body .nmf116-main :is(.thread-copy small, .thread-last small, .thread-num small) {
    color: #c4cfdf !important;
  }
  body.nmf116-body .nmf116-main .thread-list-head button {
    background: #364d70 !important;
    color: #f5f7fc !important;
  }
  body.nmf116-body .nmf116-main .thread-list-head input::placeholder {
    color: #c4cfdf !important;
  }
}
/* The forum content keeps a readable surface even when site-wide styles clear individual cards. */
@layer forum-surfaces {
  body.nmf116-body .nmf116-main {
    box-sizing: border-box;
    padding: clamp(14px, 2.8vw, 30px) !important;
    border: 1px solid #41506a !important;
    border-radius: clamp(16px, 2vw, 24px) !important;
    background: #111b2d !important;
    color: #f5f7fc !important;
    color-scheme: dark;
    box-shadow: 0 16px 42px #050a1680 !important;
  }
  body.nmf116-body .nmf116-main > .nm800-fhead {
    background: linear-gradient(115deg, #1d2b42, #283c58) !important;
    color: #f5f7fc !important;
    border: 1px solid #4d607d !important;
    padding: clamp(18px, 3.2vw, 36px) !important;
    border-radius: 18px !important;
  }
  body.nmf116-body .nmf116-main > .nm800-fhead h1 {
    color: #f5f7fc !important;
    font-size: clamp(28px, 4vw, 44px) !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere;
  }
  body.nmf116-body .nmf116-main .nm800-fkicker {
    color: #ffd18a !important;
  }
  body.nmf116-body .nmf116-main :is(.nm800-fhead, .nmf137-login-card, .nmf137-empty, .nmf137-compose > header, .nmf152-case-head, .nm805-idea-head) p {
    color: #c4cfdf !important;
  }
  body.nmf116-body .nmf116-main :is(
    .nm800-ftabs, .nmf137-login-card, .nmf137-compose, .nmf137-empty,
    .nmf137-rules, .nmf137-idea, .nmf137-complaint, .nm805-idea-page,
    .nm805-idea-comments-card, .nmf152-case-head, .nmf152-case-chat,
    .nmf152-original, .nmf152-participants, .nmf152-resolution,
    .nmf165-panel, .nmf165-search-form, .nmf165-search-groups > section,
    .nmf165-notification-page, .nmf116-compose-card, .reply-card,
    .nmfpm-sidebar, .nmfpm-stream, .nmfpm-new-card, .profile-card, .side-card
  ) {
    background: #1b2940 !important;
    border-color: #41506a !important;
    color: #f5f7fc !important;
  }
  body.nmf116-body .nmf116-main :is(.nmf137-login-card, .nmf137-empty) strong {
    color: #f5f7fc !important;
  }
  body.nmf116-body .nmf116-main .nm800-ftabs a {
    color: #e4ecfa !important;
  }
  body.nmf116-body .nmf116-main .nm800-ftabs a:is(.active, :hover, :focus-visible) {
    background: #344967 !important;
    border-color: #617695 !important;
    color: #fff0d3 !important;
  }
  body.nmf116-body .nmf116-main :is(input:not([type]), input:is([type="text"], [type="search"], [type="url"], [type="number"]), textarea, select, [contenteditable="true"]) {
    color: #f5f7fc !important;
    background: #131e31 !important;
    border-color: #516582 !important;
  }
  body.nmf116-body .nmf116-main :is(input, textarea)::placeholder {
    color: #b6c4da !important;
  }
  body.nmf116-body .nmf116-main :is(a, button, summary, input, textarea, select, [contenteditable="true"]):focus-visible {
    outline: 2px solid #ffd18a !important;
    outline-offset: 2px;
  }
}
@media (max-width: 640px) {
  @layer forum-surfaces {
    body.nmf116-body .nmf116-main > .nm800-fhead {
      flex-wrap: wrap;
      gap: 14px;
    }
  }
}
