/* ---------------------------------------------------------------------------
   Reader highlight painting — kept OUT of the build pipeline on purpose.

   These rules style ranges painted with the CSS Custom Highlight API
   (see src/lib/highlight-paint.ts). They live here, as a plain static file
   served from /public, rather than in globals.css, because Turbopack parses CSS
   with Lightning CSS and Lightning does not recognise the `::highlight()`
   pseudo-element:

       'highlight' is not recognized as a valid pseudo-element.
       Did you mean ':highlight' (pseudo-class) or is this a typo?

   The rules were always *served* correctly — browsers apply all nine — but the
   file they lived in never compiled cleanly, so Turbopack re-ran the PostCSS
   transform on every single request instead of caching a successful build, and
   printed that error each time. In dev that is a per-request cost and pages of
   noise in the terminal; a static file has neither, and needs no parser to
   understand a selector it will happily hand to the browser.

   Nothing here uses a theme token or an @apply, which is what makes moving it
   out lossless. If a rule ever needs one, it belongs back in globals.css and
   this whole file should go — with the Lightning limitation re-checked first.

   Loaded from src/app/layout.tsx.
--------------------------------------------------------------------------- */

/* Annotation highlights. Each palette colour is a named highlight; notes get a
   distinct underlined style so an annotated passage reads clearly. */
::highlight(nibig-hl-0) {
  background-color: #fde9a8;
  color: #1a1a18;
}
::highlight(nibig-hl-1) {
  background-color: #bfe3cf;
  color: #1a1a18;
}
::highlight(nibig-hl-2) {
  background-color: #cfe0f5;
  color: #1a1a18;
}
::highlight(nibig-hl-3) {
  background-color: #f5cfd6;
  color: #1a1a18;
}
::highlight(nibig-note) {
  background-color: #fff3c4;
  color: #1a1a18;
  text-decoration: underline;
  text-decoration-color: #b06a1a;
  text-decoration-style: wavy;
}

/* In-content highlight for the current search term (find-in-page): every other
   occurrence gets the soft fill; the active one (up/down navigation, tick click)
   gets a stronger fill so it stands out among the rest. */
::highlight(nibig-search) {
  background-color: #ffe082;
  color: #1a1a18;
}
::highlight(nibig-search-active) {
  background-color: #ff9800;
  color: #1a1a18;
}

/* Custom text-selection highlight (native selection is disabled in the readers,
   so we paint our own to suppress the browser's selection popups). Kept in the
   same green as the site's native ::selection, and translucent so it reads on
   the day and night reading themes alike. */
::highlight(nibig-select) {
  background-color: rgba(80, 170, 130, 0.4);
}

/* The sentence currently being narrated. Translucent rather than opaque, and
   without a colour override, so it reads over a user's own highlight instead of
   hiding it — a narrated passage is very often also an annotated one. It also
   has to work on all three reading themes, which a flat fill would not. */
::highlight(nibig-narration) {
  background-color: rgba(31, 107, 79, 0.22);
}
