/* WEAVIST demo sites: what a version's wiki.json adds (src/sites-host/wiki-overlay.ts; from
   PR #182's facts overlay).
   Served by the host from this image, like chat.js, so every live version gets the same rules.
   - The image text block (.wv-image-text) sits inside the prospect's mirrored page: its rules
     first revert every page style reaching it and carry three ID-level :not() so the page's own
     selectors lose to them; they select nothing of the page's.
   - The facts page (html.wv-own .wv-facts) is our own page, next to site.css's rules. */

.wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z),
.wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z) * {
  all: revert;
  box-sizing: border-box;
}
.wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z) {
  display: block;
  position: relative;
  clear: both;
  width: auto;
  max-width: 100%;
  margin: 12px 0;
  padding: 10px 14px;
  border: 1px solid #d8d8d2;
  border-left: 4px solid #1f4f7a;
  border-radius: 8px;
  background: #f6f6f3;
  color: #1d1d1f;
  font: 14px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Noto Sans TC", "Noto Sans JP", sans-serif;
  text-align: left;
  overflow-wrap: anywhere;
}
.wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z) summary {
  display: list-item;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: #5d6066;
}
.wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z) p { margin: 4px 0; }
.wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z) table { border-collapse: collapse; margin: 8px 0; max-width: 100%; }
.wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z) td { border: 1px solid #d8d8d2; padding: 3px 8px; vertical-align: top; }
.wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z) .wv-image-text-note { margin-top: 8px; font-size: 12px; color: #5d6066; }

@media (prefers-color-scheme: dark) {
  .wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z) { background: #1d1d20; color: #f3f3f0; border-color: #3a3a3f; border-left-color: #6fa3d6; }
  .wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z) summary,
  .wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z) .wv-image-text-note { color: #b5b7bd; }
  .wv-image-text:not(#wv-x):not(#wv-y):not(#wv-z) td { border-color: #3a3a3f; }
}

/* The facts page: whole units of the site wiki. */
.wv-own .wv-facts-unreviewed { padding: 8px 12px; border-left: 4px solid #b8860b; background: #fff8e6; color: #5c4400; }
.wv-own .wv-facts-unit { padding: 10px 0; border-bottom: 1px solid var(--wv-border, #e2e2dd); }
.wv-own .wv-unit p { margin: 0 0 4px; }
.wv-own .wv-unit .wv-unit-path { font-size: 13px; color: var(--wv-muted, #5d6066); }
.wv-own .wv-unit ul { margin: 4px 0 4px 20px; }
.wv-own .wv-facts-external { opacity: 0.92; }
.wv-own .wv-facts-label { display: inline-block; margin: 0 0 4px; padding: 1px 8px; border-radius: 999px; background: var(--wv-border, #e2e2dd); font-size: 12px; color: var(--wv-muted, #5d6066); }
.wv-own main.wv-facts { padding-bottom: 140px; }
.wv-own .wv-facts-intro { color: var(--wv-muted, #5d6066); }
.wv-own .wv-facts table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 15px; }
.wv-own .wv-facts th,
.wv-own .wv-facts td { padding: 8px 10px; border-bottom: 1px solid var(--wv-border, #e2e2dd); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.wv-own .wv-facts thead th { font-size: 13px; color: var(--wv-muted, #5d6066); font-weight: 600; }
.wv-own .wv-facts tbody th { width: 28%; font-weight: 600; }
.wv-own .wv-facts .wv-facts-source { font-size: 13px; color: var(--wv-muted, #5d6066); }
.wv-own .wv-faq-item { padding: 12px 0; border-bottom: 1px solid var(--wv-border, #e2e2dd); }
.wv-own .wv-faq-item h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.4; }
.wv-own .wv-faq-item p { margin: 0 0 6px; }

/* A table keeps its header row on every screen (it governs the rows): a narrow screen scrolls
   the table sideways instead of stacking cells without their header. */
.wv-own .wv-unit-table { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.wv-own .wv-unit-table table { width: auto; min-width: 100%; }
.wv-own .wv-unit-table th,
.wv-own .wv-unit-table td { white-space: nowrap; }
}
