.wiki-content h2, .ap-reference-section h2 { color: var(--primary-color); }
.sa-term-comment-body:has(> .ap-comment-disclosure) { display: flex; flex-direction: column; }
.ap-comment-disclosure { order: 2; }
.ap-comment-preview { order: 1; max-height: 12em; overflow: hidden; }
.ap-comment-disclosure summary { width: fit-content; cursor: pointer; color: var(--primary-color); font-weight: 600; margin: 8px 0; }
.ap-comment-disclosure summary:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 4px; }
.ap-comment-disclosure .ap-comment-less, .ap-comment-disclosure[open] .ap-comment-more,
.ap-comment-disclosure[open] + .ap-comment-preview { display: none; }
.ap-comment-disclosure[open] .ap-comment-less { display: inline; }
.ap-comment-full { overflow-wrap: anywhere; }
.ap-search-title { margin-bottom: 24px; }
.results-page-form .search-input { padding-left: 48px; padding-right: 58px; min-height: 50px; }
.results-page-form .search-icon-left { left: 16px; width: 18px; height: 18px; pointer-events: none; }
.ap-results-submit { position: absolute; right: 6px; top: 6px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 5px; color: var(--primary-text); background: var(--primary-color); }
.ap-results-submit:hover { background: var(--primary-hover); }
.result-item:has(.ap-result-copy) { align-items: flex-start; justify-content: space-between; flex-direction: row; gap: 20px; }
.ap-result-copy { display: grid; gap: 12px; min-width: 0; }
.ap-result-copy .item-title { white-space: normal; overflow: visible; line-height: 1.4; font-size: 19px; overflow-wrap: anywhere; }
.ap-result-excerpt { color: var(--text-muted); line-height: 1.7; font-size: 14px; overflow-wrap: anywhere; }
.ap-result-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-muted); }
.item-arrow { flex-shrink: 0; color: var(--primary-color); }
.ap-topics-footer { display: inline-block; color: var(--primary-color); margin-bottom: 8px; }
.ap-directory-header { margin: 12px 0 30px; }
.ap-directory-header .entry-title { margin-top: 8px; }
.ap-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 36px; }
.ap-topic-item { border-top: 1px solid var(--border-strong); padding: 22px 0; display: flex; flex-direction: column; gap: 14px; }
.ap-topic-item:hover { border-top-color: var(--primary-color); }
.ap-topic-item h2 { font-size: 23px; line-height: 1.4; font-weight: 600; margin: 0; }
.ap-topic-item p { color: var(--text-muted); font-size: 14px; margin: 0; }
.ap-topic-item > span { color: var(--primary-color); font-size: 13px; display: flex; justify-content: space-between; margin-top: auto; }
.ap-article-topics { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 18px; }
.ap-article-topics a { font-size: 12px; color: var(--primary-color); }
.ap-knowledge-fields { min-width: 0; margin: 28px 0; border: 0; border-top: 1px solid var(--border-color); padding: 20px 0 0; }
.ap-knowledge-fields legend { color: var(--text-heading); font-weight: 650; font-size: 18px; padding-right: 16px; }
.ap-topic-options { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 22px; }
.ap-topic-options label, .ap-review-form label { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.ap-topic-options input, .ap-review-form input { flex-shrink: 0; margin-top: 6px; }
.ap-reference-section { border-top: 1px solid var(--border-color); margin-top: 36px; padding-top: 22px; }
.ap-reference-section h2 { font-size: 25px; margin: 0 0 18px; }
.ap-reference-list { padding-left: 24px; line-height: 1.8; }
.ap-reference-list li { margin-bottom: 10px; overflow-wrap: anywhere; }
.ap-reference-list a { color: var(--primary-color); text-decoration: underline; text-underline-offset: 3px; }
.ap-review-status { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--text-muted); }
.ap-review-form { border-top: 1px solid var(--border-color); padding-top: 20px; margin-top: 20px; }
.ap-review-form .ap-feature-status { display: block; margin-top: 12px; font-size: 13px; color: var(--text-muted); }
.ap-save-term[aria-pressed="true"] { color: var(--primary-color); border-color: var(--primary-color); background: var(--accent-soft); }
.ap-save-term[aria-pressed="true"] svg { fill: currentColor; }
.ap-saved-items { display: grid; }
.ap-saved-item { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--border-color); }
.ap-saved-item > div { min-width: 0; }
.ap-saved-item > div > a { font-size: 18px; font-weight: 600; color: var(--text-heading); overflow-wrap: anywhere; }
.ap-saved-item p { margin: 8px 0 0; font-size: 14px; color: var(--text-muted); overflow-wrap: anywhere; }
.ap-saved-item button { flex-shrink: 0; }
.ap-print-url, .ap-print-origin, .ap-print-technical { display: none; }
@media (max-width: 900px) { .ap-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .ap-topic-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ap-saved-item { flex-direction: column; gap: 12px; }
  .ap-saved-item button { width: auto; }
  .ap-topic-options { flex-direction: column; gap: 6px; }
  .ap-result-copy .item-title { font-size: 18px; }
}
@media print {
  @page { size: A4; margin: 14mm; background: #fff; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  :root, html, html[data-theme], body { color-scheme: only light !important; background: #fff !important; color: #111 !important; margin: 0 !important; padding: 0 !important; }
  body { display: block; font-size: 11pt; }
  .site-header, .site-footer-grok, #wpadminbar, .skip-link, .wiki-sidebar, .wiki-top-bar,
  .wiki-actions, .related-terms-wrapper, .sa-term-comment-entry, .edit-log-wrap,
  .sa-term-comments-modal, .sa-correction-modal, .sa-modal-overlay, #sa-toast-container,
  .ap-sidebar-toggle, .ap-sidebar-backdrop, .ap-reading-progress, .ap-review-form { display: none !important; }
  body .site-main, body:not(.home) .site-main, body.admin-bar:not(.home) .site-main,
  .terim-wrapper-wide, .wiki-main-article, .wiki-layout-grid { display: block; width: 100% !important; max-width: none !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
  .wiki-main-article, .wiki-header, .wiki-content, .wiki-content *, .ap-reference-section,
  .ap-reference-section *, .entry-meta-row, .entry-meta-row *, .wiki-header * { color: #111 !important; background: transparent !important; box-shadow: none !important; text-shadow: none !important; }
  .wiki-content { font-size: 11pt; line-height: 1.6; }
  .entry-title { font-size: 26pt; }
  .wiki-content h2 { font-size: 17pt; }
  .wiki-content h3 { font-size: 14pt; }
  h1, h2, h3, .toc-header { break-after: avoid; }
  p { orphans: 3; widows: 3; }
  .table-scroll, .wiki-content .wp-block-table { overflow: visible !important; width: 100% !important; border: 0; }
  .table-scroll table, .wiki-content table { width: 100% !important; min-width: 0 !important; max-width: 100% !important; table-layout: fixed !important; font-size: 9pt; }
  .wiki-content th, .wiki-content td { padding: 6px; font-size: 9pt; overflow-wrap: anywhere; word-break: normal; border-color: #aaa; }
  thead { display: table-header-group; }
  tr, img, .ap-reference-list li { break-inside: avoid; }
  .wiki-content pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .ap-print-url { display: inline; font-size: 9pt; overflow-wrap: anywhere; }
  .ap-print-technical { display: block; }
  .ap-print-origin { display: block; border-top: 1px solid #aaa; padding-top: 12px; font-size: 9pt; overflow-wrap: anywhere; }
  .ap-reference-section { margin-top: 20px; }
  .ap-article-topics a { color: #111; }
}
