/* XMPP-HOM IT production stability fixes, 2026-08-03. */

/* Keep the sticky header consistent with the selected site theme. */
.it-static-site-header-v102 {
  background:
    color-mix(
      in srgb,
      var(--color-bg) 94%,
      transparent
    ) !important;
  border-bottom-color: var(--color-border) !important;
}

/* The glyph is supplied by CSS, so the legacy placeholder never flashes. */
.it-static-theme-control-v102 > [aria-hidden="true"] {
  font-size: 0 !important;
}

.it-static-theme-control-v102
  > [aria-hidden="true"]::before {
  content: "☀";
  font-size: 20px;
  line-height: 1;
}

:root[data-theme="dark"]
  .it-static-theme-control-v102
  > [aria-hidden="true"]::before {
  content: "☾";
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])
    .it-static-theme-control-v102
    > [aria-hidden="true"]::before {
    content: "☾";
  }
}

/* Do not expose controls that cannot work when JavaScript is unavailable. */
html.no-js .it-static-theme-control-v102,
html.no-js .it-static-menu-control-v102 {
  display: none !important;
}

/* The hamburger is a mobile control. On desktop it opened an invisible menu. */
@media (min-width: 981px) {
  html.js .it-static-menu-control-v102 {
    display: none !important;
  }
}

@media (max-width: 980px) {
  html.js .it-static-menu-control-v102 {
    display: inline-grid !important;
    place-items: center;
  }
}

/* The inner wrap already owns safe horizontal spacing. */
@media (max-width: 720px) {
  .it-static-site-header-v102 {
    padding-inline: 0 !important;
  }
}

/* Do not discard the third case card on tablet-sized screens. */
@media (min-width: 681px) and (max-width: 980px) {
  .case-grid .case-card:last-child {
    display: block;
  }
}

/* Preserve whole words normally, but allow an emergency wrap on tiny screens. */
body :where(
  h1, h2, h3, h4, h5, h6,
  p, li, dt, dd,
  a, span, strong, em, small,
  label, legend, button, summary,
  blockquote, figcaption
) {
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
}
