/* §Y6 highlighter (owner, 24 Oct 2026: "add a highlighter into list, all over site… light green and light red").
   Loaded only while OA_HIGHLIGHT is on (base.html), and every rule waits for html[data-hl]: off, no page changes.
   Driven by the polarity the pages already carry (the engine's good / care; a plain fact gets no tint), two tints only,
   never a third "mixed" one (§U). Each tinted item also carries a mark, so colour is never the only signal: a ✓ on
   good, an ! on care, or the item's own icon and heading (the muhurat lists). The care word is "ध्यान", never
   "बुरा" or "खतरा". Text on both tints keeps at least 7:1 (#2c2b31 on #E7F3EA / #FBEAE6). */

html[data-hl] {
  --hl-good-bg: #E7F3EA; --hl-good-mark: #2F7A4F;
  --hl-care-bg: #FBEAE6; --hl-care-mark: #A4472A;
}
html[data-hl] .on-night { --hl-good-bg: rgba(91, 178, 128, .18); --hl-care-bg: rgba(214, 120, 92, .2); }

/* the shared classes, and the pages' own polarity classes mapped onto them */
html[data-hl] :is(.hl-good, .rf-line.pol-good, .pj-win.good li, .mr-koota.hl-good),
html[data-hl] :is(.hl-care, .rf-line.pol-care, .pj-win.skip li, .mr-koota.hl-care) {
  position: relative; border-radius: 8px; padding-left: 34px;
}
html[data-hl] :is(.hl-good, .rf-line.pol-good, .pj-win.good li, .mr-koota.hl-good) { background: var(--hl-good-bg); }
html[data-hl] :is(.hl-care, .rf-line.pol-care, .pj-win.skip li, .mr-koota.hl-care) { background: var(--hl-care-bg); }
html[data-hl] :is(.hl-good, .rf-line.pol-good, .pj-win.good li, .mr-koota.hl-good)::after,
html[data-hl] :is(.hl-care, .rf-line.pol-care, .pj-win.skip li, .mr-koota.hl-care)::after {
  position: absolute; left: 10px; top: 12px; width: 16px; height: 16px; border-radius: 50%;
  font: 700 11px/16px system-ui, sans-serif; text-align: center; color: #fff;
}
html[data-hl] :is(.hl-good, .rf-line.pol-good, .pj-win.good li, .mr-koota.hl-good)::after { content: "✓" / ""; background: var(--hl-good-mark); }
html[data-hl] :is(.hl-care, .rf-line.pol-care, .pj-win.skip li, .mr-koota.hl-care)::after { content: "!" / ""; background: var(--hl-care-mark); }

/* rashifal: a line about two stretches of the day is never one colour: each part is marked, like a highlighter pen */
html[data-hl] .rf-line:has(> span[class^="pol-"]) { background: none; padding-left: 0; }
html[data-hl] .rf-line:has(> span[class^="pol-"])::after { content: none; }
html[data-hl] .rf-line > span.pol-good { background: var(--hl-good-bg); border-radius: 4px; padding: 1px 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
html[data-hl] .rf-line > span.pol-care { background: var(--hl-care-bg); border-radius: 4px; padding: 1px 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* panchang: the windows lists lose their thin bar for the tint and mark; the whole-day key matches */
html[data-hl] .pj-win :is(li)::before { content: none; }
html[data-hl] .pj-win li { margin: 6px 0; border-bottom: 0; padding-right: 12px; }
html[data-hl] .pj-key :is(.good, .skip) { border-radius: 999px; padding: 2px 10px 2px 6px; }
html[data-hl] .pj-key .good { background: var(--hl-good-bg); }
html[data-hl] .pj-key .skip { background: var(--hl-care-bg); }

/* muhurat: each condition keeps its own icon; a met condition (✓, +) is good, a time left out (⊘) is care, and a note
   that only shows a band (=) or adds a fact stays plain */
html[data-hl] .mh-ilist.hl-list-good > li:is(.i-check, .i-plus) { background: var(--hl-good-bg); border-radius: 8px; padding: 6px 10px; }
html[data-hl] .mh-ilist.hl-list-care > li.i-cut { background: var(--hl-care-bg); border-radius: 8px; padding: 6px 10px; }

/* an under-18 edition (Child Engine C25, when it exists) shows no care tint */
html[data-hl] [data-child] :is(.hl-care, .rf-line.pol-care, .pj-win.skip li, .mr-koota.hl-care) { background: none; padding-left: 0; }
html[data-hl] [data-child] :is(.hl-care, .rf-line.pol-care, .pj-win.skip li, .mr-koota.hl-care)::after { content: none; }

/* the rashifal hub's Moon table (lab-* cells, tinted on the live site): the same ✓ / ! so colour is never the only sign
   (owner's rule, seen on the hub 25 Oct 2026). The cell keeps its own tint; only the mark and its room are added. */
html[data-hl] .rf-moon-grid td:is(.lab-supportive, .lab-patience, .lab-chandrashtama) { position: relative; padding-left: 36px; }
html[data-hl] .rf-moon-grid td:is(.lab-supportive, .lab-patience, .lab-chandrashtama)::after {
  position: absolute; left: 10px; top: 13px; width: 16px; height: 16px; border-radius: 50%;
  font: 700 11px/16px system-ui, sans-serif; text-align: center; color: #fff; }
html[data-hl] .rf-moon-grid td.lab-supportive::after { content: "✓" / ""; background: var(--hl-good-mark); }
html[data-hl] .rf-moon-grid td:is(.lab-patience, .lab-chandrashtama)::after { content: "!" / ""; background: var(--hl-care-mark); }
