/* LAR Phase 2 colour options (2026-10-23). Three themes, each switched on by a class on <html>:
   theme-crisp, theme-night, theme-grey. Load after lar.css; lar.css and the page markup are untouched.
   Legacy <font color>, inline style colours and the old per-page <style> colours are remapped here, keeping
   each colour's role (green stays green, purple purple, red red) at WCAG AA 4.5:1 or better against the
   background it actually sits on. Ratios: refresh/docs/COLOR-REVIEW.md.
   Generated by refresh/docs/gen_themes.py (palette lives there); edit the generator, not this file. */

/* ---------- theme-night: dark naval: deep sea navy page, light ink (in the spirit of the BPO dark site) ---------- */
html.theme-night {
  --t-outer: #060d14; --t-header: #0a1622; --t-headrule: #26394d; --t-page: #0f1d2b; --t-menu: #142638; --t-menurule: #26394d;
  --t-ink: #e3eaf1; --t-head: #f3eee8; --t-strong: #ffffff; --t-muted: #9fb0c0; --t-link: #6cc4f7; --t-menulink: #8fd0f7;
  --t-linkv: #b9a6f2; --t-linkh: #ffb27a; --t-strip: #1f3a56; --t-stripink: #e8eef3; --t-striplink: #9cd0ff; --t-after: #081320;
  --t-afterink: #b8c6d3; --t-afterlink: #9cd0ff; --t-green: #5fd17a; --t-purple: #d99be8; --t-red: #ff7d72; --t-wine: #f08cad;
  --t-darkred: #ff8a80; --t-grey: #a9b5c1; --t-blue: #8cc0ff; --t-pale: #c3cdd7; --t-black: #e3eaf1; --t-white: #ffffff;
  --t-yellow: #ffe066; --t-lime: #7cf08f;
  color-scheme: dark;
}

/* ---------- shared structure: every theme reads its own --t-* values ---------- */
html[class*="theme-"] body { background: var(--t-outer); color: var(--t-ink); -webkit-font-smoothing: antialiased; }
html[class*="theme-"] .top { background: var(--t-header); border-bottom-color: var(--t-headrule); }
html[class*="theme-"] .frame { background: var(--t-page); }
html[class*="theme-"] .side-nav { background: var(--t-menu); border-right-color: var(--t-menurule); }
html[class*="theme-"] .side-nav .nav-h { color: var(--t-muted); }
html[class*="theme-"] .side-nav .nav-h a,
html[class*="theme-"] .side-nav li a { color: var(--t-menulink); }
html[class*="theme-"] .side-nav li a:hover { color: var(--t-linkh); }
html.theme-night .menu-btn { border-color: #3d5670; }

/* normal pages: text, headings, links. The old per-page <style> blocks set a {color:#333366} and
   a:hover {color:#660033}; these selectors outrank them. */
html[class*="theme-"] body:not(.k-manual) .content { color: var(--t-ink); }
html[class*="theme-"] body:not(.k-manual) .content h1, html[class*="theme-"] body:not(.k-manual) .content h2, html[class*="theme-"] body:not(.k-manual) .content h3, html[class*="theme-"] body:not(.k-manual) .content h4 { color: var(--t-head); }
html[class*="theme-"] body:not(.k-manual) .content b:not(span.fc b), html[class*="theme-"] body:not(.k-manual) .content strong:not(span.fc strong) { color: var(--t-strong); }
html[class*="theme-"] body:not(.k-manual) .content a { color: var(--t-link); }
html[class*="theme-"] body:not(.k-manual) .content .lar-main a:visited { color: var(--t-linkv); }
html[class*="theme-"] body:not(.k-manual) .content a:hover, html[class*="theme-"] body:not(.k-manual) .content .lar-main a:visited:hover { color: var(--t-linkh); }
html[class*="theme-"] body:not(.k-manual) .content .style8 { color: var(--t-red); }
html[class*="theme-"] body:not(.k-manual) .content .style1 { color: var(--t-black); }

/* legacy <font color> on normal pages */
html[class*="theme-"] body:not(.k-manual) .content span.c-008000,
html[class*="theme-"] body:not(.k-manual) .content span.c-008000 { color: var(--t-green); }
html[class*="theme-"] body:not(.k-manual) .content span.c-009300,
html[class*="theme-"] body:not(.k-manual) .content span.c-009300 { color: var(--t-green); }
html[class*="theme-"] body:not(.k-manual) .content span.c-008000 { color: var(--t-green); }
html[class*="theme-"] body:not(.k-manual) .content span.c-00ff00,
html[class*="theme-"] body:not(.k-manual) .content span.c-00ff00 { color: var(--t-lime); }
html[class*="theme-"] body:not(.k-manual) .content span.c-00ff00 { color: var(--t-lime); }
html[class*="theme-"] body:not(.k-manual) .content span.c-800080,
html[class*="theme-"] body:not(.k-manual) .content span.c-800080 { color: var(--t-purple); }
html[class*="theme-"] body:not(.k-manual) .content span.c-800080 { color: var(--t-purple); }
html[class*="theme-"] body:not(.k-manual) .content span.c-ff0000,
html[class*="theme-"] body:not(.k-manual) .content span.c-ff0000 { color: var(--t-red); }
html[class*="theme-"] body:not(.k-manual) .content span.c-ff0000 { color: var(--t-red); }
html[class*="theme-"] body:not(.k-manual) .content span.c-660033,
html[class*="theme-"] body:not(.k-manual) .content span.c-660033 { color: var(--t-wine); }
html[class*="theme-"] body:not(.k-manual) .content span.c-990000,
html[class*="theme-"] body:not(.k-manual) .content span.c-990000 { color: var(--t-darkred); }
html[class*="theme-"] body:not(.k-manual) .content span.c-333366,
html[class*="theme-"] body:not(.k-manual) .content span.c-333366 { color: var(--t-link); }
html[class*="theme-"] body:not(.k-manual) .content span.c-004080,
html[class*="theme-"] body:not(.k-manual) .content span.c-004080 { color: var(--t-blue); }
html[class*="theme-"] body:not(.k-manual) .content span.c-0000ff { color: var(--t-link); }
html[class*="theme-"] body:not(.k-manual) .content span.c-0000ff,
html[class*="theme-"] body:not(.k-manual) .content span.c-0000ff { color: var(--t-link); }
html[class*="theme-"] body:not(.k-manual) .content span.c-000080,
html[class*="theme-"] body:not(.k-manual) .content span.c-000080 { color: var(--t-link); }
html[class*="theme-"] body:not(.k-manual) .content span.c-000080 { color: var(--t-link); }
html[class*="theme-"] body:not(.k-manual) .content span.c-666666,
html[class*="theme-"] body:not(.k-manual) .content span.c-666666 { color: var(--t-grey); }
html[class*="theme-"] body:not(.k-manual) .content span.c-808080 { color: var(--t-grey); }
html[class*="theme-"] body:not(.k-manual) .content span.c-808080 { color: var(--t-grey); }
html[class*="theme-"] body:not(.k-manual) .content span.c-cccccc,
html[class*="theme-"] body:not(.k-manual) .content span.c-cccccc { color: var(--t-pale); }
html[class*="theme-"] body:not(.k-manual) .content span.c-c0c0c0,
html[class*="theme-"] body:not(.k-manual) .content span.c-c0c0c0 { color: var(--t-pale); }
html[class*="theme-"] body:not(.k-manual) .content span.c-c0c0c0 { color: var(--t-pale); }
html[class*="theme-"] body:not(.k-manual) .content span.c-999999,
html[class*="theme-"] body:not(.k-manual) .content span.c-999999 { color: var(--t-pale); }
html[class*="theme-"] body:not(.k-manual) .content span.c-000000,
html[class*="theme-"] body:not(.k-manual) .content span.c-000000 { color: var(--t-black); }
html[class*="theme-"] body:not(.k-manual) .content span.c-000000 { color: var(--t-black); }
html[class*="theme-"] body:not(.k-manual) .content span.c-ffffff,
html[class*="theme-"] body:not(.k-manual) .content span.c-ffffff { color: var(--t-white); }
html[class*="theme-"] body:not(.k-manual) .content span.c-ffffff { color: var(--t-white); }
html[class*="theme-"] body:not(.k-manual) .content span.c-ffff00,
html[class*="theme-"] body:not(.k-manual) .content span.c-ffff00 { color: var(--t-yellow); }
html[class*="theme-"] body:not(.k-manual) .content span.c-ffff00 { color: var(--t-yellow); }

/* legacy inline style colours (style="color: ...") need !important to beat the attribute */
html[class*="theme-"] body:not(.k-manual) .content [style*="#333366" i], html[class*="theme-"] body:not(.k-manual) .content [style*="color: blue" i], html[class*="theme-"] body:not(.k-manual) .content [style*="color:blue" i] { color: var(--t-link) !important; }
html[class*="theme-"] body:not(.k-manual) .content [style*="color: black" i], html[class*="theme-"] body:not(.k-manual) .content [style*="color: #000000" i], html[class*="theme-"] body:not(.k-manual) .content [style*="color:#000000" i] { color: var(--t-black) !important; }
html[class*="theme-"] body:not(.k-manual) .content [style*="color: green" i], html[class*="theme-"] body:not(.k-manual) .content [style*="color:#008000" i], html[class*="theme-"] body:not(.k-manual) .content [style*="color: #008000" i] { color: var(--t-green) !important; }

/* grey header strips inside content (bgcolor #666666 / #999999): now a navy strip with light text */
html[class*="theme-"] body:not(.k-manual) .content [bgcolor="#666666" i], html[class*="theme-"] body:not(.k-manual) .content [bgcolor="666666" i], html[class*="theme-"] body:not(.k-manual) .content [bgcolor="#999999" i] { background-color: var(--t-strip); color: var(--t-stripink); }
html[class*="theme-"] body:not(.k-manual) .content [bgcolor="#666666" i] span.fc, html[class*="theme-"] body:not(.k-manual) .content [bgcolor="#999999" i] span.fc { color: var(--t-stripink); }
html[class*="theme-"] body:not(.k-manual) .content [bgcolor="#666666" i] a, html[class*="theme-"] body:not(.k-manual) .content [bgcolor="#999999" i] a,
html[class*="theme-"] body:not(.k-manual) .content [bgcolor="#666666" i] a span.fc, html[class*="theme-"] body:not(.k-manual) .content [bgcolor="#999999" i] a span.fc { color: var(--t-striplink); }
html[class*="theme-"] body:not(.k-manual) .content [bgcolor="#666666" i] a:hover { color: #ffffff; }

/* the copyright strip under each page stays dark in every theme; its old #cccccc text was made for that */
html[class*="theme-"] body:not(.k-manual) .lar-after { background: var(--t-after); color: var(--t-afterink); }
html[class*="theme-"] body:not(.k-manual) .content .lar-after span.fc { color: var(--t-afterink); }
html[class*="theme-"] body:not(.k-manual) .content .lar-after a, html[class*="theme-"] body:not(.k-manual) .content .lar-after a span.fc { color: var(--t-afterlink); }

/* ---------- manual pages: black in every theme; colours too dark for black are lifted.
   Damage chart: green #008000 -> #4cc76a; yellow #ffff00 and red #ff0000 kept (19.6:1, 5.3:1). ---------- */
html[class*="theme-"] body.k-manual .frame { background: #000; }
html[class*="theme-"] body.k-manual .content { color: #f2f4f6; }
html[class*="theme-"] body.k-manual .content a { color: #9cc8ee; }
html[class*="theme-"] body.k-manual .content a:hover { color: #ffb27a; }
/* legacy inline color: blue (manual Privacy footer links) would be 2.4:1 on black */
html[class*="theme-"] body.k-manual .content a[style*="color: blue" i], html[class*="theme-"] body.k-manual .content a[style*="color:blue" i] { color: #9cc8ee !important; }
html[class*="theme-"] body.k-manual .content span.c-008000,
html[class*="theme-"] body.k-manual .content span.c-008000 { color: #4cc76a; }
html[class*="theme-"] body.k-manual .content span.c-009300,
html[class*="theme-"] body.k-manual .content span.c-009300 { color: #4cc76a; }
html[class*="theme-"] body.k-manual .content span.c-008000 { color: #4cc76a; }
html[class*="theme-"] body.k-manual .content span.c-800080,
html[class*="theme-"] body.k-manual .content span.c-800080 { color: #d58ce0; }
html[class*="theme-"] body.k-manual .content span.c-990000,
html[class*="theme-"] body.k-manual .content span.c-990000 { color: #ff7070; }
html[class*="theme-"] body.k-manual .content span.c-333366,
html[class*="theme-"] body.k-manual .content span.c-333366 { color: #9cc8ee; }
html[class*="theme-"] body.k-manual .content span.c-004080,
html[class*="theme-"] body.k-manual .content span.c-004080 { color: #8cc0ff; }
html[class*="theme-"] body.k-manual .content span.c-666666,
html[class*="theme-"] body.k-manual .content span.c-666666 { color: #a8b0b8; }
html[class*="theme-"] body.k-manual .content span.c-000000,
html[class*="theme-"] body.k-manual .content span.c-000000 { color: #f2f4f6; }
html[class*="theme-"] body.k-manual .content [bgcolor="#009300" i] { background-color: #1d6b33; color: #ffffff; }
html[class*="theme-"] body.k-manual .content [bgcolor="#009300" i] span.fc { color: #ffffff; }
html[class*="theme-"] body.k-manual .content [bgcolor="#666666" i], html[class*="theme-"] body.k-manual .content [bgcolor="#999999" i] { background-color: #1f3a56; color: #e8eef3; }
html[class*="theme-"] body.k-manual .content [bgcolor="#666666" i] span.c-990000 { color: #ff9a90; }
html[class*="theme-"] body.k-manual .content [bgcolor="#c0c0c0" i], html[class*="theme-"] body.k-manual .content [bgcolor="#bbbbbb" i] { color: #0b131c; }
html[class*="theme-"] body.k-manual .content [bgcolor="#c0c0c0" i] span.c-008000, html[class*="theme-"] body.k-manual .content [bgcolor="#c0c0c0" i] span.c-009300,
html[class*="theme-"] body.k-manual .content [bgcolor="#bbbbbb" i] span.c-008000, html[class*="theme-"] body.k-manual .content [bgcolor="#bbbbbb" i] span.c-009300 { color: #00501a; }
html[class*="theme-"] body.k-manual .content [bgcolor="#c0c0c0" i] span.c-000000, html[class*="theme-"] body.k-manual .content [bgcolor="#c0c0c0" i] .style1 { color: #0b131c; }
html[class*="theme-"] body.k-manual .content [bgcolor="#c0c0c0" i] a, html[class*="theme-"] body.k-manual .content [bgcolor="#bbbbbb" i] a { color: #0a3866; }
html[class*="theme-"] body.k-manual .lar-after { background: transparent; color: #c3cdd7; }
