/* Confirmed R2 + R3 Mobile-only corrections; no data or shared-layout changes. */
html body.mobile-page[data-page="forum"] .community-navigation-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
html body.mobile-page[data-page="forum"] .community-navigation-row .community-types {
  min-width: 0;
  max-width: 100%;
  touch-action: auto;
  cursor: auto;
}
html body.mobile-page[data-page="forum"] .community-sort-picker {
  min-width: 44px;
  flex-shrink: 0;
}

/* Standard title content starts 1px border + 14px inset from the page column.
   Only left padding changes; every existing right edge/padding is retained. */
html body.mobile-page.kb-detail-page:has(.kbd-toolbar .mobile-more-fab--inline)
  :is(#kbd-title, #kbd-body > h2, #kbd-body > p, #kbd-body > .term-provenance, #kbd-related > h2, #kbd-related-list) {
  padding-left: 15px !important;
}

/* R3-01: one shared Mobile detail citation component, no fact changes. */
html body.mobile-page.kb-detail-page #kbd-body .term-standards-list {
  padding-left: 0 !important;
  margin-left: 0 !important;
  list-style: none;
}
html body.mobile-page.kb-detail-page #kbd-body .term-standards-list > li {
  padding-left: 0 !important;
  margin-left: 0 !important;
  list-style: none;
}

/* R3-03: the attribute is supplied from the actual API isPinned boolean. */
html body.mobile-page[data-page="forum"] #community-feed > .community-post h3 {
  color: #263e4f;
}
html body.mobile-page[data-page="forum"] #community-feed > .community-post[data-community-pinned="true"] h3,
html body.mobile-page[data-page="forum"] #community-feed[data-community-rules-pinned="true"] > .community-rule-post h3 {
  color: #874a28;
}
html body.mobile-page[data-page="forum"] #community-feed .community-post-body:visited h3 { color: #45505f; }
html body.mobile-page[data-page="forum"] #community-feed > [data-community-pinned="true"] .community-post-body:visited h3,
html body.mobile-page[data-page="forum"] #community-feed[data-community-rules-pinned="true"] > .community-rule-post .community-post-body:visited h3 { color: #765540; }
html body.mobile-page[data-page="forum"] #community-feed .community-post-body:is(:hover,:focus-visible) h3 {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* R3-04: keep the existing row and full 48px More; bound both flex items. */
html body.mobile-page.kb-detail-page .kbd-toolbar {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-left: max(0px, calc(env(safe-area-inset-left, 0px) - 20px));
  padding-right: max(0px, calc(env(safe-area-inset-right, 0px) - 20px));
}
html body.mobile-page.kb-detail-page .kbd-toolbar .kbd-back {
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100% - 60px);
  white-space: normal;
  overflow-wrap: anywhere;
}
html body.mobile-page.kb-detail-page [data-kbd-more-slot] {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  height: 48px;
  flex: 0 0 48px;
}
html body.mobile-page.kb-detail-page .kbd-toolbar .mobile-more-fab--inline {
  box-sizing: border-box;
  flex: 0 0 48px;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  margin: 0 !important;
}
