/* Mobile menu: group headings and accessible interaction.
   Keep real links, disclosure buttons and existing navigation logic.
   No fixed heading height: labels must wrap at increased text sizes.
*/
[data-mobile-drilldown] {
  min-width: 0;
  padding: 0.25rem;
}

[data-mobile-drilldown] [hidden] {
  display: none !important;
}

[data-mobile-drilldown] [data-mobile-view] section {
  min-width: 0;
}

[data-mobile-drilldown] [data-mobile-view] section > h3 {
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  margin: 0 0 0.5rem;
  padding: 0 0.5rem 0.4rem;
  border-bottom: 2px solid #0161ef;
  color: #101010;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

[data-mobile-drilldown] a,
[data-mobile-drilldown] button {
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 2px;
  text-decoration-skip-ink: auto;
  scroll-margin-block: 1rem;
}

[data-mobile-drilldown] a > span:not([aria-hidden]),
[data-mobile-drilldown] button > span:not([aria-hidden]) {
  min-width: 0;
}

/* Remove link decorations; preserve opening/back button indicators. */
[data-mobile-drilldown] a > span[aria-hidden="true"] {
  display: none;
}

[data-mobile-drilldown] [data-mobile-view] section:focus-within a {
  background-color: #eff6ff;
  color: #0154cf;
}

[data-mobile-drilldown] a[aria-current="page"] {
  background-color: #eff6ff;
  color: #0154cf;
  font-weight: 700;
  text-decoration-line: underline;
}

[data-mobile-drilldown] a:active,
[data-mobile-drilldown] button:active {
  background-color: #dbeafe;
  color: #0154cf;
}

[data-mobile-drilldown] a:focus-visible,
[data-mobile-drilldown] button:focus-visible {
  outline: 3px solid #0154cf !important;
  outline-offset: 2px !important;
  background-color: #dbeafe;
  color: #0154cf;
  text-decoration-line: underline;
}

@media (hover: hover) and (pointer: fine) {
  [data-mobile-drilldown] [data-mobile-view] section:hover a {
    background-color: #eff6ff;
    color: #0154cf;
  }

  [data-mobile-drilldown] [data-mobile-view] section a:hover {
    background-color: #dbeafe;
    color: #0154cf;
    text-decoration-line: underline;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-mobile-drilldown] a,
  [data-mobile-drilldown] button,
  [data-mobile-drilldown] span {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  [data-mobile-drilldown] [data-mobile-view] section > h3 {
    border-color: CanvasText;
    color: CanvasText;
  }

  [data-mobile-drilldown] a:focus-visible,
  [data-mobile-drilldown] button:focus-visible {
    outline-color: Highlight !important;
  }
}
