/* AUTO-COPIED from extension/content/guard.css by tools/build_extension.py.
   Do not edit this file — edit the original and re-run the build.
   source sha256: ac19f6020e67a56d */
/* Prism Lens — the guard.

   Injected at document_start, before the page paints. Everything the adapters
   might treat as content starts hidden; content/lens.js reveals each block the
   moment it has an edited version to show. That ordering is the entire point
   of the add-in — the original is never painted, not even for one frame.

   Kept in step with LENS_FEED_SELECTOR / LENS_ARTICLE_SELECTOR in
   adapters/adapters.js. Change one, change the other.

   visibility (not display) so the page keeps its layout and nothing jumps when
   a block is revealed. Fail-closed by design: if the script never runs, the
   content stays hidden rather than appearing unedited. */

article,
[role="article"],
[data-testid="tweet"],
.post,
.feed-item,
.timeline-item,
article p,
main p,
[itemprop="articleBody"] p,
.post-content p,
.entry-content p,
.article-body p {
  visibility: hidden !important;
}

/* Revealed by lens.js once the block carries edited (or at minimum locally
   cleaned) text. Higher specificity than the rules above, so it always wins. */
[data-prism-lens="ready"],
[data-prism-lens="ready"] * {
  visibility: visible !important;
}

/* A block being held back entirely still needs to be visible — what shows is
   the placeholder card lens.js puts there, never the original words. */
[data-prism-lens="held"],
[data-prism-lens="held"] * {
  visibility: visible !important;
}

/* The reader's own UI: a small marker on each edited block plus the
   ask-for-the-original control. Namespaced hard, and lens.js additionally
   renders them inside a shadow root so the host page cannot restyle them. */
.prism-lens-chip {
  visibility: visible !important;
  all: initial;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(217, 142, 31, 0.45);
  background: rgba(217, 142, 31, 0.12);
  color: #8a5a06;
  font: 500 12px/1.4 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  cursor: pointer;
}

/* Once a guardian has approved, the reader can switch between the edition and
   the original. Mark the original clearly, so there is never any doubt about
   which version is on screen. */
[data-prism-lens-view="original"] {
  border-left: 3px solid rgba(156, 33, 48, 0.5);
  padding-left: 11px;
}

.prism-lens-held {
  visibility: visible !important;
  display: block;
  margin: 2px 0;
  padding: 13px 15px;
  border: 1px dashed rgba(156, 33, 48, 0.4);
  border-radius: 11px;
  background: rgba(156, 33, 48, 0.06);
  color: #7a2733;
  font: 400 14px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  .prism-lens-chip { color: #e7b45f; border-color: rgba(217, 142, 31, 0.5); }
  .prism-lens-held { color: #e79aa5; border-color: rgba(226, 122, 138, 0.45); background: rgba(226, 122, 138, 0.08); }
}
