/* Reading tools are separate from the main wiki layout and its ongoing motion work. */
.wiki-document-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: -12px 0 28px; color: var(--ds-text-3); font-size: 12px; line-height: 1.6; }
.wiki-document-meta a { color: var(--ds-text-2); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; }
.wiki-document-meta a:hover { text-decoration: underline; text-underline-offset: 4px; }
.wiki-copy-document { min-height: 36px; padding: 6px 11px; border: 1px solid var(--ds-line); border-radius: var(--r-xs); background: var(--ds-bg); color: var(--ds-text-2); font: inherit; }
.wiki-copy-document[hidden] { display: none; }
.wiki-copy-document:hover, .wiki-copy-document[data-copy-state='success'] { background: var(--ds-brand-bg); color: var(--ds-text); }
.wiki-heading-copy { display: inline-grid; place-items: center; vertical-align: middle; width: 30px; height: 30px; padding: 0; margin-left: 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ds-text-3); font: 16px var(--font-mono); opacity: .6; cursor: pointer; }
.wiki-heading-copy:hover, .wiki-heading-copy:focus-visible, .wiki-heading-copy[data-copy-state='success'] { opacity: 1; background: var(--ds-brand-bg); border-color: var(--ds-line); color: var(--ds-text); }
.wiki-copy-status { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 260; max-width: calc(100vw - 32px); width: max-content; padding: 12px 18px; margin: 0; border-radius: var(--r-sm); background: var(--ds-text); color: var(--ds-bg); box-shadow: var(--sh-overlay); font-size: 13px; line-height: 1.6; pointer-events: none; }
.wiki-copy-status:empty { display: none; }
.wiki-title-anchor { display: block; height: 0; scroll-margin-top: calc(var(--header-h) + var(--wiki-bar-h) + 24px); }
.wiki-doc__body :is(h4, h5, h6) { scroll-margin-top: calc(var(--header-h) + var(--wiki-bar-h) + 24px); }
.wiki-related-documents { margin: 44px 0 12px; padding-top: 24px; border-top: 1px solid var(--ds-line); }
.wiki-related-documents h2 { margin: 0 0 16px; font-size: 18px; }
.wiki-related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wiki-related-grid a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; border: 1px solid var(--ds-line); border-radius: var(--r-sm); font-size: 14px; line-height: 1.5; color: var(--ds-text-2); text-decoration: none; overflow-wrap: anywhere; }
.wiki-related-grid a:hover { background: var(--ds-brand-bg); color: var(--ds-text); }
.wiki-doc__body details { border: 1px solid var(--ds-line); border-radius: var(--r-sm); padding: 12px 16px; margin: 20px 0; }
.wiki-doc__body summary { cursor: pointer; font-weight: 600; }
.wiki-doc__body input[type='checkbox'] { accent-color: var(--ds-text); }
@media (max-width: 640px) {
  .wiki-document-meta { gap: 8px 12px; }
  .wiki-related-grid { grid-template-columns: minmax(0, 1fr); }
  .wiki-heading-copy { width: 36px; height: 36px; }
}
