/* webbatch9c (UX-011) visitor HIGH-CONTRAST mode for the player site (all 22 designs).
   Linked by components/portal/Contrast9c.tsx only while the owner switch site.a11y.contrast is on; its `media` applies it
   (visitor chose on = all, chose off = never, no choice = prefers-contrast: more). Every rule is scoped to [data-portal].
   Target: WCAG 2.x AA - text 4.5:1 (large 3:1), focus indicators and form-field boundaries 3:1. Each design keeps its own
   colours: secondary text and accents move toward the design's OWN main ink, text on artwork gets a solid plate in the
   design's own page colour, focus rings are yellow + black on dark designs and navy + white on light ones.
   Layers: 1 tokens per design (generated by preview\webbatch9c\gen-tokens-9c.cjs) - 2 every design - 3 per design. */

/* ---------- 1. tokens per design ---------- */
/* empyrean (classic, dark): muted #8d95bd->#bdbfde silver #b6bddb->#cfd1ec */
[data-portal][data-theme][data-template="classic"] { --color-muted: #bdbfde !important; --color-silver: #cfd1ec !important; --color-haze: #aa9eff !important;
  --hc9c-ink: #ece9ff; --hc9c-soft: #cfd1ec; --hc9c-page: #060819; --hc9c-panel: #121a4a; --hc9c-plate: color-mix(in srgb, #060819 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #6c70a1; }
/* crimson (warroom, dark): muted #a88f87->#c7b2a9 silver #d2bcb2->#d8c4ba */
[data-portal][data-theme][data-template="warroom"] { --color-muted: #c7b2a9 !important; --color-silver: #d8c4ba !important; --color-haze: #e88a78 !important;
  --hc9c-ink: #f6e7dc; --hc9c-soft: #d8c4ba; --hc9c-page: #0d0506; --hc9c-panel: #240c0f; --hc9c-plate: color-mix(in srgb, #0d0506 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #886461; }
/* kalima (abyss, dark): muted #7aa29b->#9cbeb8 silver #a6c9c2->#afd0c9 */
[data-portal][data-theme][data-template="abyss"] { --color-muted: #9cbeb8 !important; --color-silver: #afd0c9 !important; --color-haze: #7fe6d2 !important;
  --hc9c-ink: #e4fbf6; --hc9c-soft: #afd0c9; --hc9c-page: #020607; --hc9c-panel: #081719; --hc9c-plate: color-mix(in srgb, #020607 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #55716f; }
/* icarus (icarus, light): muted #50668a->#273c5c silver #2f4568->#1b2f4f crystal #0a659f->#0b5081 gold #8a5600->#654613 */
[data-portal][data-theme][data-template="icarus"] { --color-muted: #273c5c !important; --color-silver: #1b2f4f !important; --color-crystal: #0b5081 !important; --color-gold: #654613 !important; --color-haze: #2e4987 !important;
  --hc9c-ink: #0e2240; --hc9c-soft: #1b2f4f; --hc9c-page: #e9f3fb; --hc9c-panel: #dcebf8; --hc9c-plate: rgb(255 255 255 / .94);
  --hc9c-ring: #10203f; --hc9c-ring-in: #ffffff; --hc9c-line: #697e99; }
/* elven (sanctuary, light): muted #55604f->#243427 silver #34483a->#1d2e22 crystal #2f5e3d->#274831 gold #7a5a1c->#46411f */
[data-portal][data-theme][data-template="sanctuary"] { --color-muted: #243427 !important; --color-silver: #1d2e22 !important; --color-crystal: #274831 !important; --color-gold: #46411f !important; --color-haze: #46411f !important;
  --sa-ink-2: #1d2e22 !important; --sa-ink-3: #2a3a2c !important; --sa-gold-ink: #5a4214 !important;
  --hc9c-ink: #1d2e22; --hc9c-soft: #1d2e22; --hc9c-page: #f4ecd8; --hc9c-panel: #e3d5b4; --hc9c-plate: rgb(255 255 255 / .94);
  --hc9c-ring: #10203f; --hc9c-ring-in: #ffffff; --hc9c-line: #716f54; }
/* classic (legacy, dark): muted #9d8d6c->#c7b891 silver #cbbd9f->#d7c9a6 */
[data-portal][data-theme][data-template="legacy"] { --color-muted: #c7b891 !important; --color-silver: #d7c9a6 !important; --color-haze: #e0c890 !important;
  --hc9c-ink: #f1e2b6; --hc9c-soft: #d7c9a6; --hc9c-page: #0b0806; --hc9c-panel: #1c150d; --hc9c-plate: color-mix(in srgb, #0b0806 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #786a4e; }
/* arena (arena, dark): muted #a7a1c2->#bab5d1 silver #cbc6e0->#ccc7e1 */
[data-portal][data-theme][data-template="arena"] { --color-muted: #bab5d1 !important; --color-silver: #ccc7e1 !important; --color-haze: #d0b3ff !important;
  --hc9c-ink: #f6f3ff; --hc9c-soft: #ccc7e1; --hc9c-page: #07060f; --hc9c-panel: #161327; --hc9c-plate: color-mix(in srgb, #07060f 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #6e6983; }
/* skyforge (hud, dark): muted #8aa0b8->#b4c4d6 silver #b4c6db->#c8d6e7 */
[data-portal][data-theme][data-template="hud"] { --color-muted: #b4c4d6 !important; --color-silver: #c8d6e7 !important; --color-haze: #9fd2ff !important;
  --hc9c-ink: #eef6ff; --hc9c-soft: #c8d6e7; --hc9c-page: #060b15; --hc9c-panel: #12203a; --hc9c-plate: color-mix(in srgb, #060b15 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #617691; }
/* chaoscastle (ring, dark): muted #c49a80->#d3b19b */
[data-portal][data-theme][data-template="ring"] { --color-muted: #d3b19b !important; --color-silver: #e2c4ad !important; --color-haze: #ffc9a3 !important;
  --hc9c-ink: #fff3e6; --hc9c-soft: #e2c4ad; --hc9c-page: #0d0403; --hc9c-panel: #24100b; --hc9c-plate: color-mix(in srgb, #0d0403 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #886253; }
/* devias (citadel, dark): muted #9cbdd3->#adc9dc */
[data-portal][data-theme][data-template="citadel"] { --color-muted: #adc9dc !important; --color-silver: #c3dcec !important; --color-haze: #bfeaff !important;
  --hc9c-ink: #f2fbff; --hc9c-soft: #c3dcec; --hc9c-page: #04101f; --hc9c-panel: #0c2440; --hc9c-plate: color-mix(in srgb, #04101f 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #567a99; }
/* teleport (portal, dark): muted #8fa9c2->#a7bed2 silver #b7cde0->#bcd1e3 */
[data-portal][data-theme][data-template="portal"] { --color-muted: #a7bed2 !important; --color-silver: #bcd1e3 !important; --color-haze: #b9e9ff !important;
  --hc9c-ink: #eaf8ff; --hc9c-soft: #bcd1e3; --hc9c-page: #030712; --hc9c-panel: #0e1a30; --hc9c-plate: color-mix(in srgb, #030712 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #577091; }
/* grimoire (tome, dark): muted #a8977a->#ccbda1 silver #d4c3a0->#decfaf */
[data-portal][data-theme][data-template="tome"] { --color-muted: #ccbda1 !important; --color-silver: #decfaf !important; --color-haze: #9fe6dc !important;
  --hc9c-ink: #efe3c8; --hc9c-soft: #decfaf; --hc9c-page: #120d09; --hc9c-panel: #241b14; --hc9c-plate: color-mix(in srgb, #120d09 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #816d52; }
/* bloodcastle (altar, dark): muted #b18f8a->#c9aea9 silver #dcbcb6->#debfb9 */
[data-portal][data-theme][data-template="altar"] { --color-muted: #c9aea9 !important; --color-silver: #debfb9 !important; --color-haze: #f3b7b7 !important;
  --hc9c-ink: #f7e9e4; --hc9c-soft: #debfb9; --hc9c-page: #0b0204; --hc9c-panel: #22080d; --hc9c-plate: color-mix(in srgb, #0b0204 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #8f5c60; }
/* warehouse (chest, dark): muted #b29d80->#d0bfa6 silver #d6c3a4->#e2d2b8 */
[data-portal][data-theme][data-template="chest"] { --color-muted: #d0bfa6 !important; --color-silver: #e2d2b8 !important; --color-haze: #f0d9b0 !important;
  --hc9c-ink: #f3e7d3; --hc9c-soft: #e2d2b8; --hc9c-page: #0e0905; --hc9c-panel: #2a1d14; --hc9c-plate: color-mix(in srgb, #0e0905 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #89704f; }
/* chaosmachine (forge, dark): muted #a99fc4->#bcb3d3 */
[data-portal][data-theme][data-template="forge"] { --color-muted: #bcb3d3 !important; --color-silver: #cec6e7 !important; --color-haze: #cfc2ff !important;
  --hc9c-ink: #f1ecff; --hc9c-soft: #cec6e7; --hc9c-page: #07050d; --hc9c-panel: #1a1030; --hc9c-plate: color-mix(in srgb, #07050d 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #756597; }
/* elbeland (grove, light): muted #4d6657->#274233 silver #2f4a3a->#1a3626 crystal #24683f->#205736 gold #7a5a0c->#584d14 */
[data-portal][data-theme][data-template="grove"] { --color-muted: #274233 !important; --color-silver: #1a3626 !important; --color-crystal: #205736 !important; --color-gold: #584d14 !important; --color-haze: #2d553d !important;
  --hc9c-ink: #173323; --hc9c-soft: #1a3626; --hc9c-page: #eef6e6; --hc9c-panel: #e2efd6; --hc9c-plate: rgb(255 255 255 / .94);
  --hc9c-ring: #10203f; --hc9c-ring-in: #ffffff; --hc9c-line: #688368; }
/* tradingpost (bazaar, light): muted #6b5236->#4a3520 silver #4a3220->#3c2717 crystal #a8321b->#832b17 gold #7a5200->#644203 */
[data-portal][data-theme][data-template="bazaar"] { --color-muted: #4a3520 !important; --color-silver: #3c2717 !important; --color-crystal: #832b17 !important; --color-gold: #644203 !important; --color-haze: #6e3c17 !important;
  --hc9c-ink: #2b1a0c; --hc9c-soft: #3c2717; --hc9c-page: #fbf0d9; --hc9c-panel: #f4e2b8; --hc9c-plate: rgb(255 255 255 / .94);
  --hc9c-ring: #10203f; --hc9c-ring-in: #ffffff; --hc9c-line: #897350; }
/* guildwar (wartable, dark): muted #b5a07c->#cfbfa2 silver #d8c6a4->#e3d4b7 */
[data-portal][data-theme][data-template="wartable"] { --color-muted: #cfbfa2 !important; --color-silver: #e3d4b7 !important; --color-haze: #e8d2a6 !important;
  --hc9c-ink: #f4ead6; --hc9c-soft: #e3d4b7; --hc9c-page: #120d08; --hc9c-panel: #2a1e13; --hc9c-plate: color-mix(in srgb, #120d08 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #877257; }
/* pearl (pearl, light): muted #6c678f->#3b3660 silver #4b4673->#2e2954 crystal #0e8c9a->#15516d gold #8a6b25->#5e4930 */
[data-portal][data-theme][data-template="pearl"] { --color-muted: #3b3660 !important; --color-silver: #2e2954 !important; --color-crystal: #15516d !important; --color-crystal-deep: #15516d !important; --color-gold: #5e4930 !important; --color-haze: #4a3d9f !important;
  --hc9c-ink: #1b1640; --hc9c-soft: #2e2954; --hc9c-page: #f4f1fa; --hc9c-panel: #ece7f6; --hc9c-plate: rgb(255 255 255 / .94);
  --hc9c-ring: #10203f; --hc9c-ring-in: #ffffff; --hc9c-line: #7e7898; }
/* broadcast (broadcast, dark): muted #8593a3->#adb8c3 */
[data-portal][data-theme][data-template="broadcast"] { --color-muted: #adb8c3 !important; --color-silver: #c3cdd6 !important; --color-haze: #b4bfca !important;
  --hc9c-ink: #eef4f7; --hc9c-soft: #c3cdd6; --hc9c-page: #05070c; --hc9c-panel: #0e1420; --hc9c-plate: color-mix(in srgb, #05070c 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #636f76; }
/* codex (codex, dark): muted #8b91c6->#bbbfe4 silver #c3c7ec->#d0d3f2 */
[data-portal][data-theme][data-template="codex"] { --color-muted: #bbbfe4 !important; --color-silver: #d0d3f2 !important; --color-haze: #b9b0ff !important;
  --cx-ink2: #d0d3f2 !important; --cx-mute: #bbbfe4 !important;
  --hc9c-ink: #e8eaff; --hc9c-soft: #d0d3f2; --hc9c-page: #080a22; --hc9c-panel: #151a4f; --hc9c-plate: color-mix(in srgb, #080a22 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #6c70a5; }
/* dragonstage (stage, dark): muted #8d8ca8->#bbbace; stage ink-2 #b9b8d0->#dddcea, mute #8d8ca8->#bbbace */
[data-portal][data-theme][data-template="stage"] { --color-muted: #bbbace !important; --color-silver: #cdccdf !important; --color-haze: #c9c1ff !important;
  --e1-ink-2: #dddcea !important; --e1-mute: #bbbace !important;
  --hc9c-ink: #f2f0fa; --hc9c-soft: #dddcea; --hc9c-page: #070814; --hc9c-panel: #15182f; --hc9c-plate: color-mix(in srgb, #070814 90%, transparent);
  --hc9c-ring: #ffd84d; --hc9c-ring-in: #000000; --hc9c-line: #6b6d85; }

/* ---------- 2. every design ---------- */
/* form fields: solid fill + 2px boundary in the design's own line colour lifted to 3:1 */
[data-portal] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=color]), select, textarea) {
  background-color: var(--hc9c-page) !important; background-image: none !important; border: 2px solid var(--hc9c-line) !important; color: var(--hc9c-ink) !important; }
[data-portal] ::placeholder { color: var(--hc9c-soft) !important; opacity: 1 !important; }
/* side tabs (THEMES drawer tab, CONTRAST tab): solid in the design's panel colour */
[data-portal] :is(.ts-side, .hc9c-tab) button.portal-box-title { background-color: var(--hc9c-panel) !important; opacity: 1 !important; }
[data-portal] :is(.ts-side, .hc9c-tab) button.portal-box-title span { color: var(--hc9c-ink) !important; }
/* plates: text that sits on artwork gets a solid backing in the design's own page colour (box-shadow: no layout change).
   Light designs: the podium cards on /rankings carry names over the hero art. */
[data-portal]:is([data-template="icarus"], [data-template="sanctuary"], [data-template="grove"], [data-template="bazaar"], [data-template="pearl"]) .dl-hash,
[data-portal] :is(.hud-hero-eyebrow, .hud-hero-title, .hud-hero-lede, .hud-chat-line, .ring-eyebrow, #ring-h1, .cit-eyebrow, .cit-lede, .cit-shard > span, .cit-pillar-ice > :is(.cit-num, small),
  .pt-gate > :is(b, small), .ab-num, .ab-sub, .ab-tagline, .ab-cue, .ab-rank, .lg-logo-name, .nw-read, .tm-hall-who > small, .ch-foot-legal, .ch-eq, .gv-leaf > span,
  .wt-council, .wt-eyebrow, .bc-hero-meta, .bc-bdg, .mythic, .cx-dropcap, .ds-nav > a, .ds-live, .ds-lead, .ds-gate-sub, .ds-k, .ds-more-b, #ds-rk-h, .ds-src, .ds-inl, .mn-dc, .pf-social,
  .hud-chat-tag, #gv-path-h > a) {
  box-shadow: 0 0 0 .22em var(--hc9c-plate), inset 0 0 0 100vmax var(--hc9c-plate) !important; border-radius: 3px; text-shadow: none !important; }
/* shared rankings / news widgets */
[data-portal] .rkc-all > small, [data-portal] .rkc-ico { color: var(--hc9c-ink) !important; }
/* news category labels keep their colour family, lifted for dark designs and deepened for light ones (Neon Arena and
   Abyss Broadcast draw them as filled pills with dark text: unchanged there) */
[data-portal]:not([data-template="arena"]):not([data-template="broadcast"]) .nw-cat-live { color: #7ef0ad !important; }
[data-portal]:not([data-template="arena"]):not([data-template="broadcast"]) .nw-cat-event { color: #ff9aa6 !important; }
[data-portal]:not([data-template="arena"]):not([data-template="broadcast"]) .nw-cat-fix { color: #ffc46b !important; }
[data-portal]:not([data-template="arena"]):not([data-template="broadcast"]) .nw-cat-update { color: #9fd0ff !important; }
[data-portal]:not([data-template="arena"]):not([data-template="broadcast"]) .nw-cat-news { color: #8ff0f5 !important; }
[data-portal][data-theme][data-template]:is([data-template="icarus"], [data-template="sanctuary"], [data-template="grove"], [data-template="bazaar"], [data-template="pearl"]) .nw-cat-live { color: #0a5a37 !important; }
[data-portal][data-theme][data-template]:is([data-template="icarus"], [data-template="sanctuary"], [data-template="grove"], [data-template="bazaar"], [data-template="pearl"]) .nw-cat-event { color: #8a1830 !important; }
[data-portal][data-theme][data-template]:is([data-template="icarus"], [data-template="sanctuary"], [data-template="grove"], [data-template="bazaar"], [data-template="pearl"]) .nw-cat-fix { color: #6b3d00 !important; }
[data-portal][data-theme][data-template]:is([data-template="icarus"], [data-template="sanctuary"], [data-template="grove"], [data-template="bazaar"], [data-template="pearl"]) .nw-cat-update { color: #0b4572 !important; }
[data-portal][data-theme][data-template]:is([data-template="icarus"], [data-template="sanctuary"], [data-template="grove"], [data-template="bazaar"], [data-template="pearl"]) .nw-cat-news { color: #0b4f58 !important; }
/* buttons with light text on a bright fill: the fill is deepened from inside (inset shadow sits under the text) */
[data-portal] :is(.wr-btn-primary, .bc-tag),
[data-portal]:is([data-template="warroom"], [data-template="altar"]) .btn-crystal,
[data-portal][data-template="pearl"] .rkf-go { box-shadow: inset 0 0 0 100vmax rgb(0 0 0 / .32) !important; text-shadow: none !important; }

/* ---------- 3. per design ---------- */
/* empyrean (classic): sidebar module labels were a fixed #7c84b3; eyebrows per accent colour */
[data-portal][data-template="classic"] :is(.px-sub, .px-lbl, .px-num, .px-num small, .px-sub small, span[role="columnheader"]) { color: var(--color-muted) !important; }
[data-portal][data-template="classic"] section[data-mu="blurple"] .mu-eb { color: #c3c8ff !important; }
[data-portal][data-template="classic"] section[data-mu="royal"] .mu-eb { color: #dcc8ff !important; }
[data-portal][data-template="classic"] section[data-mu="sapphire"] .mu-eb { color: #b4d2ff !important; }
[data-portal][data-template="classic"] section[data-mu="jade"] .mu-eb { color: #9df3d4 !important; }
[data-portal][data-template="classic"] p[class*="_tag"] { box-shadow: 0 0 0 .3em var(--hc9c-plate), inset 0 0 0 100vmax var(--hc9c-plate) !important; border-radius: 3px; }
[data-portal][data-template="classic"] .hc-dl-main small { color: rgb(29 20 5) !important; }
/* icarus: kicker gold, phone footer sits on the night horizon */
[data-portal][data-template="icarus"] .icx-kicker b { color: var(--color-gold) !important; }
[data-portal][data-template="icarus"] footer :is(nav, p) { box-shadow: 0 0 0 .4em var(--hc9c-plate), inset 0 0 0 100vmax var(--hc9c-plate) !important; border-radius: 4px; }
/* crimson (warroom): footer on art */
[data-portal][data-template="warroom"] footer { background-color: var(--hc9c-page) !important; }
/* skyforge (hud): HP / MP / online meters carry white numbers on bright fills */
[data-portal][data-template="hud"] :is(.hud-bar-meter > span, div[aria-label$="online"] > span) { box-shadow: 0 0 0 2px rgb(4 10 20 / .88), inset 0 0 0 100vmax rgb(4 10 20 / .88) !important; border-radius: 2px; text-shadow: none !important; }
/* chaoscastle (ring) */
[data-portal][data-template="ring"] .dl-hash-v { color: var(--hc9c-ink) !important; }
/* elbeland (grove) */
[data-portal][data-template="grove"] .gv-eyebrow { color: #7d1f49 !important; }
/* guildwar (wartable): home item of the banner menu */
[data-portal][data-template="wartable"] nav a[href="/"] > span { box-shadow: 0 0 0 .22em var(--hc9c-plate), inset 0 0 0 100vmax var(--hc9c-plate) !important; border-radius: 3px; }
[data-portal][data-template="wartable"] .wt-council { color: var(--hc9c-ink) !important; }
[data-portal][data-template="wartable"] .wt-council b { color: var(--hc9c-ink) !important; }
/* pearl: register result, live dot label, kickers */
[data-portal][data-template="pearl"] .rg-result { color: #8a1030 !important; }
[data-portal][data-template="pearl"] .pl-on { color: #0a5a45 !important; }
[data-portal][data-template="pearl"] .pl-kick { color: var(--color-crystal) !important; }
[data-portal][data-template="pearl"] .pl-siege .pl-kick { color: #a6eef5 !important; }
[data-portal][data-template="pearl"] :is(.nw-eyebrow) { color: var(--color-crystal) !important; }
[data-portal][data-template="pearl"] :is(button[role="tab"], button[role="tab"] > span, time) { color: var(--color-muted) !important; }
[data-portal][data-template="pearl"] button[role="tab"][aria-selected="true"], [data-portal][data-template="pearl"] button[role="tab"][aria-selected="true"] > span { color: var(--hc9c-ink) !important; }
[data-portal][data-template="pearl"] .btn-crystal { background: #15516d !important; color: #ffffff !important; }
/* empyrean (classic): zero values in the rankings were dimmed to #4e5687 (Portal look > dim zeros); "All" on the gold crest */
[data-portal][data-theme][data-template="classic"] .rkx-num.is-zero { color: var(--color-muted) !important; }
[data-portal][data-template="classic"] .rkx-crest-all { color: #fff3cf !important; box-shadow: inset 0 0 0 100vmax rgb(20 12 2 / .72) !important; }
/* icarus: hard-coded slate / blue text */
[data-portal][data-template="icarus"] :is(.icx-hint, .icx-census-big small, .icx-census-big + * span, .gap-2 > span) { color: var(--color-muted) !important; }
[data-portal][data-template="icarus"] :is(.icx-bubble-stat, .icx-link) { color: var(--color-crystal) !important; }
[data-portal][data-template="icarus"] .cs-num { color: var(--hc9c-ink) !important; }
/* classic (legacy): news rows on the gold-lit board */
[data-portal][data-template="legacy"] .nw-meta { box-shadow: 0 0 0 .22em var(--hc9c-plate), inset 0 0 0 100vmax var(--hc9c-plate) !important; border-radius: 3px; }
[data-portal][data-template="legacy"] :is(.nw-meta time, time) { color: var(--color-muted) !important; }
/* kalima (abyss): the active news chip had dark text on the dark glass */
[data-portal][data-template="abyss"] .nw-chip[aria-current="page"] { background: var(--color-crystal) !important; color: var(--hc9c-page) !important; }
[data-portal][data-template="abyss"] .nw-chip[aria-current="page"] .nw-chip-n { color: var(--hc9c-page) !important; }
/* crimson (warroom) / tradingpost (bazaar): count bubble inside the active news chip */
/* news filter chips: the count was drawn at 75% opacity */
[data-portal] .nw-chip-n { opacity: 1 !important; }
/* empyrean (classic, sapphire news cards look): category chips carry light text on bright category fills */
[data-portal][data-theme][data-template="classic"] .nw-chip:not([aria-current]) { color: var(--hc9c-ink) !important; box-shadow: inset 0 0 0 100vmax rgb(0 0 0 / .5) !important; }
[data-portal][data-template="classic"] .nw-room-live small { color: var(--hc9c-ink) !important; }
/* light designs: the rankings podium stands on the shared dark-navy panel, but its labels used the design's dark ink.
   In this mode they are light on a navy plate (name, class, score; the white pedestal blocks are untouched). Pearl
   Ascension draws its podium on white: unchanged there. */
[data-portal][data-theme][data-template]:is([data-template="icarus"], [data-template="sanctuary"], [data-template="grove"], [data-template="bazaar"]) div[data-hero] > :is(p, .mt-1, [class*="text-[10px]"]) {
  color: #f4f6ff !important; -webkit-text-fill-color: #f4f6ff !important; box-shadow: 0 0 0 .3em rgb(12 16 44 / .94), inset 0 0 0 100vmax rgb(12 16 44 / .94) !important; border-radius: 3px; }
[data-portal][data-theme][data-template]:is([data-template="icarus"], [data-template="sanctuary"], [data-template="grove"], [data-template="bazaar"]) div[data-hero] > p :is(bdi, span) { color: #f4f6ff !important; -webkit-text-fill-color: #f4f6ff !important; }
[data-portal][data-theme][data-template="warroom"] .nw-chip[aria-current="page"] .nw-chip-n { color: #1e0607 !important; }
[data-portal][data-theme][data-template="bazaar"] .nw-chip[aria-current="page"] .nw-chip-n { color: #ffffff !important; box-shadow: inset 0 0 0 100vmax rgb(0 0 0 / .3) !important; }
/* devias (citadel) / teleport (portal) / grimoire (tome): the glass and gate art is painted over the text box; text above it */
[data-portal] :is(.cit-shard > span, .pt-gate > b, .pt-gate > small, .tm-hall-who > small, .cit-pillar-ice > .cit-num, .cit-pillar-ice > small, .is-glass) { position: relative; z-index: 2; }

/* webbatch9h: dragonstage (stage) hero - the CONTRAST side tab (fixed, x 0-43 px, centred vertically from 768 px) covered
   the first letters of the hero lead / CTAs (content started at x 32): the hero block starts after the tab instead */
@media (min-width: 768px) { [data-portal][data-template="stage"] .ds-stage-in { margin-left: max(60px, calc((100% - 1520px) / 2)) !important; } }
/* webbatch9h: premium header (8z) - the Vote item's jewel is its background image; the text plate's inset shadow painted
   over it (jewel went dark). On the Vote link the plate is a background colour under the jewel instead */
[data-portal] :is(#hc9h-vote, .ds-nav) > a[href="/vote"] { box-shadow: 0 0 0 .22em var(--hc9c-plate) !important; background-color: var(--hc9c-plate) !important; }
/* webbatch9h: the CURRENT-page Vote item: header-8z.css (v=6) now keeps each design's own active fill under the jewel
   (Warehouse / Season 6 Legacy / Icarus), so those designs' own active text colours pass here; no extra rule needed. */
/* the Empyrean Portal bar (8z look B): the Vote slot's text on its own dark slot, the count bubble kept off the label */
[data-portal][data-hdr8z] .mn-l[href="/vote"] { color: #f2fff9 !important; text-shadow: none !important; }
/* webbatch9h: the 8z /vote page is a dark surface in EVERY design (light designs too): its texts keep light ink here.
   Hero title: solid light fill (the shared gradient-heading rule would give light designs their dark ink on the dark hero) */
[data-portal][data-theme] :is(#hc9h-v8, .v8-hero) :is(h1, h1 :is(span, em, i, b)) { -webkit-text-fill-color: #fff6e6 !important; color: #fff6e6 !important; text-shadow: none !important; }
/* summary pill: a solid dark plate (its light-to-dark glass let the page colour through behind the white text) */
[data-portal] .v8 .v8-sum { background: #08110e !important; }
[data-portal] .v8 :is(.v8-sum-n, .v8-sum-t) { color: #effff8 !important; text-shadow: none !important; }

/* gradient-filled headings (background-clip: text) become solid in the design's own ink: the gradient stays clipped to the
   glyphs and is simply covered by the solid fill, so no box appears; measurable 3:1+ large text instead of a gradient */
[data-portal][data-theme] :is(h1, h1 :is(span, em, i, b), .pb-hero-h, .pb-hero-h :is(span, em, i, b), .pl-iri-text, .cx-foot-h, .ab-band-title, .ab-band-title em, .cx-alm-t,
  .metal-text, .nw-lead-h, .nw-lead-h :is(span, em, i, b), .ab-giant, .ab-glass > em, [id^="ch"][id$="-t"], .cx-chrome:not([aria-hidden="true"]), #cx-asc-h, #cx-chr-h) {
  -webkit-text-fill-color: var(--hc9c-ink) !important; }
/* light designs: the download title stands on the shared dark hero and the Trading Post title on the dark signboard */
[data-portal]:is([data-template="icarus"], [data-template="sanctuary"], [data-template="grove"], [data-template="bazaar"], [data-template="pearl"]) :is(#dl-title, #dl-title *, #bz-h1, #bz-h1 *) {
  -webkit-text-fill-color: #fff8ec !important; color: #fff8ec !important; }

/* ---------- focus (last, so it wins over the plates and button fills while focused) ----------
   3px ring + 2px inner halo in the opposite colour = 3:1 against any background */
[data-portal][data-theme] :focus-visible { outline: 3px solid var(--hc9c-ring, #ffd84d) !important; outline-offset: 2px !important; box-shadow: 0 0 0 2px var(--hc9c-ring-in, #000) !important; }
