/*
 * Javadoc Dark Mode
 * Supports three formats:
 * - Modern (11.2+ / Java 21): CSS variables
 * - Intermediate (10.2-11.1 / Java 17): Hyphenated class names
 * - Legacy (9.x-10.1 / Java 11): camelCase class names
 * Color scheme matches the site homepage
 */

/* ============================================
   COLOR PALETTE (CSS Custom Properties)
   ============================================ */
html.dark-mode {
  /* Backgrounds */
  --dark-bg-deepest: #0f1419;
  --dark-bg-section: #1a1f26;
  --dark-bg-header: #252b33;
  --dark-bg-row-alt: #1f252c;

  /* Text */
  --dark-text-primary: #e7e9ea;
  --dark-text-soft: #c9d1d9;
  --dark-text-muted: #bdc4cc;
  --dark-text-placeholder: #8b949e;

  /* Accents */
  --dark-link: #58a6ff;
  --dark-link-hover: #79b8ff;
  --dark-accent-orange: #b35900;  /* Darker orange for better contrast with light text */
  --dark-accent-red: #ff8080;
  --dark-accent-red-bg: #3d1515;
  --dark-accent-red-border: #5c2020;

  /* Borders */
  --dark-border: #2f3640;

  /* === MODERN FORMAT (11.2+) CSS VARIABLE OVERRIDES === */
  --body-background-color: var(--dark-bg-deepest);
  --section-background-color: var(--dark-bg-deepest);
  --detail-background-color: var(--dark-bg-section);
  --body-text-color: var(--dark-text-soft);
  --block-text-color: var(--dark-text-muted);
  --title-color: var(--dark-text-soft);
  --navbar-background-color: var(--dark-bg-section);
  --navbar-text-color: var(--dark-text-soft);
  --subnav-background-color: var(--dark-bg-header);
  --selected-background-color: var(--dark-accent-orange);
  --selected-text-color: var(--dark-text-primary);
  --selected-link-color: var(--dark-text-primary);
  --even-row-color: var(--dark-bg-section);
  --odd-row-color: var(--dark-bg-row-alt);
  --link-color: var(--dark-link);
  --link-color-active: var(--dark-link-hover);
  --snippet-background-color: transparent;
  --snippet-highlight-color: var(--dark-accent-orange);
  --border-color: var(--dark-border);
  --table-border-color: var(--dark-border);
  --search-input-background-color: var(--dark-bg-section);
  --search-input-text-color: var(--dark-text-primary);
  --search-input-placeholder-color: var(--dark-text-placeholder);
  --search-tag-highlight-color: var(--dark-accent-orange);
  --copy-icon-brightness: 200%;
  --copy-button-background-color-active: rgba(88, 166, 255, 0.3);
  --invalid-tag-background-color: var(--dark-accent-red-bg);
  --invalid-tag-text-color: var(--dark-accent-red);
}


/* ============================================
   COMMON STYLES (All Formats)
   ============================================ */

/* Body */
html.dark-mode body {
  background-color: var(--dark-bg-deepest) !important;
  color: var(--dark-text-muted) !important;
}

/* Headings */
html.dark-mode h1, html.dark-mode h2, html.dark-mode h3,
html.dark-mode h4, html.dark-mode h5, html.dark-mode h6,
html.dark-mode .header, html.dark-mode .title,
html.dark-mode h1.title, html.dark-mode h2.title {
  color: var(--dark-text-soft) !important;
  border-bottom-color: var(--dark-border) !important;
}
html.dark-mode .subTitle, html.dark-mode .sub-title {
  color: var(--dark-text-muted) !important;
}

/* Body text */
html.dark-mode p, html.dark-mode li, html.dark-mode td,
html.dark-mode th, html.dark-mode dd, html.dark-mode dt {
  color: var(--dark-text-muted) !important;
}
html.dark-mode strong, html.dark-mode b {
  color: var(--dark-text-primary) !important;
}
html.dark-mode em, html.dark-mode i {
  color: var(--dark-text-muted) !important;
}

/* Links */
html.dark-mode a:link, html.dark-mode a:visited {
  color: var(--dark-link) !important;
}
html.dark-mode a[href]:hover, html.dark-mode a[href]:focus {
  color: var(--dark-link-hover) !important;
}

/* Preserve banner title color */
html.dark-mode .ghidra-banner a,
html.dark-mode .ghidra-banner a:link,
html.dark-mode .ghidra-banner a:visited,
html.dark-mode a.ghidra-banner__title,
html.dark-mode a.ghidra-banner__title:link,
html.dark-mode a.ghidra-banner__title:visited {
  color: #fff !important;
}
html.dark-mode .ghidra-banner a:hover,
html.dark-mode a.ghidra-banner__title:hover {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Code blocks - no background to match light mode */
html.dark-mode pre, html.dark-mode pre.methodSignature {
  background: transparent !important;
  color: var(--dark-text-primary) !important;
  border: none !important;
}
html.dark-mode code, html.dark-mode tt, html.dark-mode pre code {
  background: transparent !important;
  color: var(--dark-text-primary) !important;
}
html.dark-mode .type-signature, html.dark-mode .member-signature {
  background: transparent !important;
  color: var(--dark-text-primary) !important;
}
html.dark-mode .member-signature span {
  color: var(--dark-text-primary) !important;
}
html.dark-mode .member-signature .return-type,
html.dark-mode .member-signature .parameters,
html.dark-mode .member-signature .exceptions {
  color: var(--dark-text-muted) !important;
}
html.dark-mode .member-signature .element-name {
  color: var(--dark-link) !important;
}

/* Description blocks */
html.dark-mode .description, html.dark-mode .block {
  color: var(--dark-text-muted) !important;
}

/* Deprecated items */
html.dark-mode .deprecatedLabel,
html.dark-mode .deprecated-label,
html.dark-mode .deprecationComment {
  color: var(--dark-accent-red) !important;
}
html.dark-mode .deprecationBlock, html.dark-mode .deprecation-block {
  background-color: var(--dark-accent-red-bg) !important;
  border-color: var(--dark-accent-red-border) !important;
}

/* Horizontal rules */
html.dark-mode hr {
  border-color: var(--dark-border) !important;
}

/* Inheritance */
html.dark-mode .inheritance {
  color: var(--dark-text-muted) !important;
}
html.dark-mode ul.inheritance li, html.dark-mode div.inheritance {
  color: var(--dark-text-soft) !important;
}

/* Member details */
html.dark-mode .memberNameLink a,
html.dark-mode .member-name-link a,
html.dark-mode .memberNameLabel {
  color: var(--dark-link) !important;
}

/* Help notes */
html.dark-mode .helpNote, html.dark-mode .help-note {
  background-color: var(--dark-bg-section) !important;
  border-color: var(--dark-border) !important;
}

/* Tables - general */
html.dark-mode table {
  border-color: var(--dark-border) !important;
}

/* Notes/info sections */
html.dark-mode dl.notes {
  color: var(--dark-text-muted) !important;
}
html.dark-mode dl.notes dt {
  color: var(--dark-text-soft) !important;
}
html.dark-mode dl.notes dd {
  color: var(--dark-text-muted) !important;
}

/* Package label */
html.dark-mode .package-label-in-type {
  color: var(--dark-text-muted) !important;
}


/* ============================================
   NAVIGATION (Intermediate + Legacy)
   ============================================ */

/* Top nav - hyphenated (intermediate) and camelCase (legacy) */
html.dark-mode .top-nav, html.dark-mode .bar,
html.dark-mode .topNav, html.dark-mode .bottomNav {
  background-color: var(--dark-bg-section) !important;
  color: var(--dark-text-soft) !important;
}
html.dark-mode .top-nav a, html.dark-mode .top-nav a:link, html.dark-mode .top-nav a:visited,
html.dark-mode .bar a, html.dark-mode .bar a:link, html.dark-mode .bar a:visited,
html.dark-mode .topNav a, html.dark-mode .topNav a:link, html.dark-mode .topNav a:visited,
html.dark-mode .bottomNav a, html.dark-mode .bottomNav a:link, html.dark-mode .bottomNav a:visited {
  color: var(--dark-text-soft) !important;
}
html.dark-mode .top-nav a:hover, html.dark-mode .top-nav a:focus,
html.dark-mode .bar a:hover, html.dark-mode .bar a:focus,
html.dark-mode .topNav a:hover, html.dark-mode .topNav a:focus,
html.dark-mode .bottomNav a:hover, html.dark-mode .bottomNav a:focus {
  color: var(--dark-link) !important;
}

/* Sub nav */
html.dark-mode .sub-nav, html.dark-mode .subNav {
  background-color: var(--dark-bg-header) !important;
  color: var(--dark-text-soft) !important;
}
html.dark-mode .sub-nav a, html.dark-mode .sub-nav a:link, html.dark-mode .sub-nav a:visited,
html.dark-mode .subNav a, html.dark-mode .subNav a:link, html.dark-mode .subNav a:visited {
  color: var(--dark-text-soft) !important;
}
html.dark-mode .sub-nav a:hover, html.dark-mode .subNav a:hover {
  color: var(--dark-link) !important;
}

/* Nav lists */
html.dark-mode ul.nav-list, html.dark-mode ul.nav-list li,
html.dark-mode ul.navList, html.dark-mode ul.navList li {
  color: var(--dark-text-soft) !important;
}
html.dark-mode ul.sub-nav-list, html.dark-mode ul.sub-nav-list li,
html.dark-mode ul.subNavList, html.dark-mode ul.subNavList li {
  color: var(--dark-text-muted) !important;
}
html.dark-mode ul.sub-nav-list a, html.dark-mode ul.subNavList a {
  color: var(--dark-link) !important;
}

/* Fixed nav */
html.dark-mode .fixedNav {
  background-color: var(--dark-bg-deepest) !important;
}

/* Flex containers (intermediate) */
html.dark-mode .flex-box, html.dark-mode .flex-content {
  background-color: var(--dark-bg-deepest) !important;
}


/* ============================================
   SUMMARY SECTIONS (Intermediate + Legacy)
   ============================================ */

/* Section backgrounds */
html.dark-mode section.summary, html.dark-mode section.details,
html.dark-mode section.class-description,
html.dark-mode section.field-summary, html.dark-mode section.constructor-summary,
html.dark-mode section.method-summary,
html.dark-mode section.field-details, html.dark-mode section.constructor-details,
html.dark-mode section.method-details {
  background-color: var(--dark-bg-deepest) !important;
}

/* Section headers */
html.dark-mode section h2, html.dark-mode .summary-list h2 {
  color: var(--dark-text-soft) !important;
}

/* Parent wrapper sections with bounding boxes */
html.dark-mode .details section[class$="-details"],
html.dark-mode .summary section[class$="-summary"],
html.dark-mode section.method-details,
html.dark-mode section.field-details,
html.dark-mode section.constructor-details {
  background-color: var(--dark-bg-section) !important;
  border: 1px solid var(--dark-border) !important;
}

/* Individual detail blocks */
html.dark-mode section.detail,
html.dark-mode section[class$="-details"] .detail,
html.dark-mode .class-uses .detail,
html.dark-mode .serialized-class-details,
html.dark-mode .inherited-list {
  background-color: var(--dark-bg-section) !important;
  border-radius: 4px !important;
  border: 1px solid var(--dark-border) !important;
}

/* Method name headers in detail sections */
html.dark-mode section.detail h3,
html.dark-mode body.class-declaration-page .details h3,
html.dark-mode body.class-declaration-page .summary h3,
html.dark-mode body.class-declaration-page .summary .inherited-list h2 {
  color: var(--dark-text-soft) !important;
  background-color: var(--dark-bg-header) !important;
  padding: 8px 12px !important;
  margin: 0 0 6px -8px !important;
  border-radius: 4px !important;
  border: 1px solid var(--dark-border) !important;
}


/* ============================================
   TABLES (Intermediate + Legacy)
   ============================================ */

/* Div-based tables (intermediate) */
html.dark-mode .summary-table {
  background-color: var(--dark-bg-section) !important;
  border-color: var(--dark-border) !important;
}
html.dark-mode .summary-table .table-header {
  background-color: var(--dark-bg-header) !important;
  color: var(--dark-text-soft) !important;
  border-color: var(--dark-border) !important;
}

/* Table-based tables (legacy) */
html.dark-mode .overviewSummary, html.dark-mode .memberSummary,
html.dark-mode .typeSummary, html.dark-mode .useSummary,
html.dark-mode .constantsSummary, html.dark-mode .deprecatedSummary,
html.dark-mode .requiresSummary, html.dark-mode .packagesSummary,
html.dark-mode .providesSummary, html.dark-mode .usesSummary {
  background-color: var(--dark-bg-section) !important;
  border-color: var(--dark-border) !important;
}

/* Table headers (legacy) */
html.dark-mode th.colFirst, html.dark-mode th.colSecond,
html.dark-mode th.colLast, html.dark-mode th.colOne,
html.dark-mode th.colConstructorName, html.dark-mode th {
  background-color: var(--dark-bg-header) !important;
  color: var(--dark-text-soft) !important;
  border-color: var(--dark-border) !important;
}

/* Table cells */
html.dark-mode .col-first, html.dark-mode .col-second,
html.dark-mode .col-last, html.dark-mode .col-constructor-name,
html.dark-mode td.colFirst, html.dark-mode td.colSecond,
html.dark-mode td.colLast, html.dark-mode td.colOne, html.dark-mode td {
  color: var(--dark-text-primary) !important;
  border-color: var(--dark-border) !important;
  background-color: var(--dark-bg-section) !important;
}

/* Table row striping - hyphenated (intermediate) */
html.dark-mode .even-row-color {
  background-color: var(--dark-bg-section) !important;
}
html.dark-mode .odd-row-color {
  background-color: var(--dark-bg-row-alt) !important;
}

/* Table row striping - camelCase (legacy) */
html.dark-mode .altColor, html.dark-mode tr.altColor,
html.dark-mode tr.altColor td, html.dark-mode tr.altColor th {
  background-color: var(--dark-bg-row-alt) !important;
}
html.dark-mode .rowColor, html.dark-mode tr.rowColor,
html.dark-mode tr.rowColor td, html.dark-mode tr.rowColor th {
  background-color: var(--dark-bg-section) !important;
}

/* Caption/title area (the caption row itself, not the tab spans) */
html.dark-mode .caption,
html.dark-mode .overviewSummary caption, html.dark-mode .memberSummary caption,
html.dark-mode .typeSummary caption, html.dark-mode .useSummary caption,
html.dark-mode .constantsSummary caption, html.dark-mode .deprecatedSummary caption,
html.dark-mode .requiresSummary caption, html.dark-mode .packagesSummary caption,
html.dark-mode .providesSummary caption, html.dark-mode .usesSummary caption {
  background-color: var(--dark-bg-section) !important;
  color: var(--dark-text-soft) !important;
}

/* Inactive table tabs */
html.dark-mode .table-tabs {
  background-color: var(--dark-bg-section) !important;
}
html.dark-mode .table-tab, html.dark-mode button.table-tab,
html.dark-mode .tableTab, html.dark-mode .tableTab span,
html.dark-mode .overviewSummary caption span.tableTab,
html.dark-mode .overviewSummary caption span.tableTab span,
html.dark-mode .memberSummary caption span.tableTab,
html.dark-mode .memberSummary caption span.tableTab span,
html.dark-mode .typeSummary caption span.tableTab,
html.dark-mode .typeSummary caption span.tableTab span,
html.dark-mode .packagesSummary caption span.tableTab,
html.dark-mode .packagesSummary caption span.tableTab span {
  background-color: var(--dark-bg-section) !important;
  color: var(--dark-text-soft) !important;
  border-color: var(--dark-border) !important;
}
html.dark-mode .table-tab:hover, html.dark-mode button.table-tab:hover {
  background-color: var(--dark-bg-header) !important;
}

/* Tab end pieces (legacy) */
html.dark-mode .tabEnd, html.dark-mode .overviewSummary .tabEnd,
html.dark-mode .memberSummary .tabEnd, html.dark-mode .typeSummary .tabEnd,
html.dark-mode .activeTableTab .tabEnd, html.dark-mode .tableTab .tabEnd {
  background-color: transparent !important;
}

/* Summary tables title rows */
html.dark-mode .tableSubHeadingColor {
  background-color: var(--dark-bg-header) !important;
}


/* ============================================
   SEARCH (Intermediate + Legacy)
   ============================================ */

/* Search input - hyphenated (intermediate) */
html.dark-mode #search-input {
  background-color: var(--dark-bg-section) !important;
  color: var(--dark-text-primary) !important;
  border-color: var(--dark-border) !important;
}
html.dark-mode #search-input::placeholder {
  color: var(--dark-text-placeholder) !important;
}
html.dark-mode #reset-button {
  background-color: var(--dark-bg-header) !important;
  color: var(--dark-text-soft) !important;
  border: 1px solid var(--dark-border) !important;
}
html.dark-mode .nav-list-search label {
  color: var(--dark-text-muted) !important;
}

/* Search input - camelCase (legacy) */
html.dark-mode #search {
  background-color: var(--dark-bg-section) !important;
  color: var(--dark-text-primary) !important;
  border-color: var(--dark-border) !important;
}
html.dark-mode #search::placeholder {
  color: var(--dark-text-placeholder) !important;
}
html.dark-mode #reset {
  background-color: var(--dark-bg-header) !important;
  color: var(--dark-text-soft) !important;
  border: 1px solid var(--dark-border) !important;
}
html.dark-mode ul.navListSearch li label {
  color: var(--dark-text-muted) !important;
}

/* Index container */
html.dark-mode .indexContainer {
  background-color: var(--dark-bg-section) !important;
}


/* ============================================
   LEGACY FORMAT SPECIFIC (9.x-10.1)
   Block list structure
   ============================================ */

/* Content containers */
html.dark-mode .contentContainer, html.dark-mode .sourceContainer,
html.dark-mode .classUseContainer, html.dark-mode .serializedFormContainer,
html.dark-mode .constantValuesContainer {
  background-color: var(--dark-bg-deepest) !important;
}

/* Block list sections */
html.dark-mode ul.blockList, html.dark-mode ul.blockListLast {
  background-color: var(--dark-bg-deepest) !important;
}
html.dark-mode ul.blockList li.blockList,
html.dark-mode ul.blockListLast li.blockList {
  background-color: var(--dark-bg-deepest) !important;
  border-color: var(--dark-border) !important;
}

/* Nested blockList - section containers */
html.dark-mode ul.blockList ul.blockList li.blockList,
html.dark-mode ul.blockList ul.blockListLast li.blockList {
  background-color: var(--dark-bg-section) !important;
  border: 1px solid var(--dark-border) !important;
}

/* Deeply nested - individual method/field items */
html.dark-mode ul.blockList ul.blockList ul.blockList li.blockList,
html.dark-mode ul.blockList ul.blockList ul.blockListLast li.blockList {
  background-color: var(--dark-bg-section) !important;
  border: 1px solid var(--dark-border) !important;
  border-radius: 4px !important;
  padding: 15px !important;
  margin-bottom: 15px !important;
}

/* Most deeply nested */
html.dark-mode ul.blockList ul.blockList ul.blockList ul.blockList li.blockList,
html.dark-mode ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
  background-color: var(--dark-bg-deepest) !important;
  border: none !important;
}

/* Section titles - NO background */
html.dark-mode ul.blockList li.blockList h2,
html.dark-mode ul.blockList ul.blockList li.blockList h3,
html.dark-mode div.contentContainer ul.blockList li.blockList h2 {
  background: transparent !important;
  color: var(--dark-text-soft) !important;
  border: none !important;
}

/* Method/field name headers - DO have backgrounds */
html.dark-mode ul.blockList ul.blockList ul.blockList li.blockList h3,
html.dark-mode ul.blockList ul.blockList ul.blockList li.blockList h4,
html.dark-mode ul.blockList ul.blockList ul.blockListLast li.blockList h3,
html.dark-mode ul.blockList ul.blockList ul.blockListLast li.blockList h4,
html.dark-mode div.details ul.blockList ul.blockList ul.blockList li.blockList h4,
html.dark-mode div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
  background-color: var(--dark-bg-header) !important;
  color: var(--dark-text-soft) !important;
  padding: 8px 12px !important;
  border-radius: 4px !important;
  border: 1px solid var(--dark-border) !important;
  margin-bottom: 10px !important;
}


/* ============================================
   JQUERY UI AUTOCOMPLETE (Search Popup)
   ============================================ */

html.dark-mode .ui-autocomplete, html.dark-mode ul.ui-autocomplete,
html.dark-mode .ui-menu, html.dark-mode .ui-menu .ui-menu-item,
html.dark-mode .ui-menu .ui-menu-item-wrapper,
html.dark-mode ul.ui-autocomplete li {
  background-color: var(--dark-bg-section) !important;
  background-image: none !important;
  color: var(--dark-text-primary) !important;
  border-color: var(--dark-border) !important;
}

html.dark-mode ul.ui-autocomplete {
  border: 1px solid var(--dark-border) !important;
}

/* Hover/focus states - gray, never yellow/orange */
html.dark-mode .ui-state-hover, html.dark-mode .ui-state-focus,
html.dark-mode .ui-widget-content .ui-state-hover,
html.dark-mode .ui-widget-content .ui-state-focus,
html.dark-mode .ui-widget-header .ui-state-hover,
html.dark-mode .ui-widget-header .ui-state-focus,
html.dark-mode .ui-menu .ui-menu-item:hover,
html.dark-mode .ui-menu .ui-menu-item-wrapper:hover,
html.dark-mode .ui-menu .ui-state-focus,
html.dark-mode .ui-menu .ui-menu-item.ui-state-focus,
html.dark-mode .ui-menu .ui-menu-item-wrapper.ui-state-focus,
html.dark-mode ul.ui-autocomplete li:hover,
html.dark-mode ul.ui-autocomplete li.ui-state-hover,
html.dark-mode ul.ui-autocomplete li.ui-state-focus,
html.dark-mode ul.ui-autocomplete .ui-menu-item.ui-state-focus,
html.dark-mode ul.ui-autocomplete .ui-state-hover,
html.dark-mode ul.ui-autocomplete .ui-state-focus {
  background: var(--dark-bg-header) !important;
  background-color: var(--dark-bg-header) !important;
  background-image: none !important;
  color: var(--dark-text-primary) !important;
  border-color: var(--dark-border) !important;
}

/* Default state */
html.dark-mode .ui-state-default,
html.dark-mode .ui-widget-content .ui-state-default,
html.dark-mode .ui-widget-header .ui-state-default {
  background: var(--dark-bg-section) !important;
  background-image: none !important;
  color: var(--dark-text-primary) !important;
  border-color: var(--dark-border) !important;
}

/* Category headers */
html.dark-mode .ui-autocomplete-category {
  background-color: var(--dark-bg-header) !important;
  background-image: none !important;
  color: var(--dark-text-muted) !important;
  border-color: var(--dark-border) !important;
  font-weight: bold !important;
}

/* Widget general */
html.dark-mode .ui-widget-content {
  background-color: var(--dark-bg-section) !important;
  background-image: none !important;
  color: var(--dark-text-primary) !important;
  border-color: var(--dark-border) !important;
}
html.dark-mode .ui-widget-header {
  background-color: var(--dark-bg-header) !important;
  background-image: none !important;
  color: var(--dark-text-primary) !important;
  border-color: var(--dark-border) !important;
}


/* ============================================
   SELECTED/ACTIVE STATE OVERRIDES
   ============================================
   IMPORTANT: This section must remain at the END
   of the file. These styles override generic element
   styles (td, span, a, etc.) defined above. With
   !important on both, cascade order determines
   the winner - last rule wins.
   ============================================ */

/* Current page indicator in nav bar */
html.dark-mode .nav-bar-cell1-rev,
html.dark-mode .navBarCell1Rev {
  background-color: var(--dark-accent-orange) !important;
  color: var(--dark-text-primary) !important;
}
html.dark-mode .nav-bar-cell1-rev a,
html.dark-mode .nav-bar-cell1-rev a:link,
html.dark-mode .nav-bar-cell1-rev a:visited,
html.dark-mode .navBarCell1Rev a,
html.dark-mode .navBarCell1Rev a:link,
html.dark-mode .navBarCell1Rev a:visited {
  color: var(--dark-text-primary) !important;
}

/* Caption spans (intermediate + legacy tables) */
/* Intermediate uses simple .caption span, legacy uses .memberSummary caption span */
html.dark-mode .caption span,
html.dark-mode .overviewSummary caption span,
html.dark-mode .memberSummary caption span,
html.dark-mode .typeSummary caption span,
html.dark-mode .useSummary caption span,
html.dark-mode .constantsSummary caption span,
html.dark-mode .deprecatedSummary caption span,
html.dark-mode .requiresSummary caption span,
html.dark-mode .packagesSummary caption span,
html.dark-mode .providesSummary caption span,
html.dark-mode .usesSummary caption span {
  background-color: var(--dark-accent-orange) !important;
  color: var(--dark-text-primary) !important;
}

/* Active table tabs (method type filters, etc.) */
html.dark-mode .active-table-tab,
html.dark-mode .active-table-tab a,
html.dark-mode .active-table-tab span,
html.dark-mode button.active-table-tab,
html.dark-mode .activeTableTab,
html.dark-mode .activeTableTab a,
html.dark-mode .activeTableTab span,
html.dark-mode .overviewSummary caption span.activeTableTab,
html.dark-mode .overviewSummary caption span.activeTableTab span,
html.dark-mode .overviewSummary caption span.activeTableTab a,
html.dark-mode .memberSummary caption span.activeTableTab,
html.dark-mode .memberSummary caption span.activeTableTab span,
html.dark-mode .memberSummary caption span.activeTableTab a,
html.dark-mode .typeSummary caption span.activeTableTab,
html.dark-mode .typeSummary caption span.activeTableTab span,
html.dark-mode .typeSummary caption span.activeTableTab a,
html.dark-mode .packagesSummary caption span.activeTableTab,
html.dark-mode .packagesSummary caption span.activeTableTab span,
html.dark-mode .packagesSummary caption span.activeTableTab a {
  background-color: var(--dark-accent-orange) !important;
  color: var(--dark-text-primary) !important;
  border-color: var(--dark-accent-orange) !important;
}

/* Tab end pieces (legacy format) */
html.dark-mode .tabEnd,
html.dark-mode .activeTableTab .tabEnd,
html.dark-mode .memberSummary .activeTableTab .tabEnd,
html.dark-mode .overviewSummary .activeTableTab .tabEnd,
html.dark-mode .typeSummary .activeTableTab .tabEnd,
html.dark-mode .packagesSummary .activeTableTab .tabEnd {
  background-color: var(--dark-accent-orange) !important;
}

/* Search result highlight (intermediate format - when navigating to a search tag) */
html.dark-mode .search-tag-result:target {
  background-color: var(--dark-accent-orange) !important;
  color: var(--dark-text-primary) !important;
}

/* Inactive table tabs - MUST come after generic caption span rules */
/* These override the orange background for inactive tabs */
html.dark-mode .table-tab, html.dark-mode button.table-tab,
html.dark-mode .tableTab, html.dark-mode .tableTab span,
html.dark-mode .overviewSummary caption span.tableTab,
html.dark-mode .overviewSummary caption span.tableTab span,
html.dark-mode .memberSummary caption span.tableTab,
html.dark-mode .memberSummary caption span.tableTab span,
html.dark-mode .typeSummary caption span.tableTab,
html.dark-mode .typeSummary caption span.tableTab span,
html.dark-mode .packagesSummary caption span.tableTab,
html.dark-mode .packagesSummary caption span.tableTab span,
html.dark-mode .tableTab .tabEnd {
  background-color: var(--dark-bg-section) !important;
  color: var(--dark-text-soft) !important;
}
