/* -- MERA's typefaces, self-hosted (18 Sep 2026). Figtree carries 85.7% of what a visitor to
   meragaming.com reads; Syne is the display face; Caveat the handwriting. The files sit in
   fonts/ beside whichever copy of this sheet is loading -- /static/fonts in the back office,
   <pack>/fonts in a deployed pack -- so one declaration serves both. */
@font-face{font-family:"Caveat";font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/caveat-normal-400-700-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Caveat";font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/caveat-normal-400-700-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Figtree";font-style:italic;font-weight:300 900;font-display:swap;src:url(fonts/figtree-italic-300-900-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Figtree";font-style:italic;font-weight:300 900;font-display:swap;src:url(fonts/figtree-italic-300-900-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Figtree";font-style:normal;font-weight:300 900;font-display:swap;src:url(fonts/figtree-normal-300-900-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Figtree";font-style:normal;font-weight:300 900;font-display:swap;src:url(fonts/figtree-normal-300-900-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Syne";font-style:normal;font-weight:400 800;font-display:swap;src:url(fonts/syne-normal-400-800-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Syne";font-style:normal;font-weight:400 800;font-display:swap;src:url(fonts/syne-normal-400-800-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
:root{
  --font:"Figtree",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --font-display:"Syne","Figtree",system-ui,sans-serif;
  --font-hand:"Caveat","Segoe Script",cursive;
  /* motion: two easings and one duration ladder, from the site's own stylesheet. Nothing a
     user triggers exceeds 350ms; the site's 550-850ms is for a page read once. */
  --ease-brand:cubic-bezier(.22,1,.36,1);
  --dur-hover:180ms; --dur-state:220ms; --dur-row:280ms; --dur-expand:350ms;
}
/* the base face for every page that inlines this sheet. The dashboard templates never set one
   and rode the browser default; the back office sets body itself and simply agrees. */
html{font-family:var(--font);background:var(--bg)}

/* period strip — every dashboard states its time frame in words, directly under the header */
.period{position:sticky;top:var(--hdrh,0px);z-index:39;display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:7px 28px;background:var(--surface);border-bottom:1px solid var(--line);font-size:12.5px;color:var(--mut)}
.period b{color:var(--tx)} .period .k{font-family:var(--mono);font-size:11px;color:var(--dim);letter-spacing:.3px;text-transform:uppercase;margin-right:2px}
.period .sep{color:var(--dim)}

/* period box — preset/from/to + Apply, appended to every .period strip */
.period-box{display:flex;align-items:center;gap:6px;margin-left:auto}
.period-box select{background:var(--surface2);border:1px solid var(--line);color:var(--tx);
  border-radius:6px;padding:4px 8px;font-size:12px;font-family:inherit;cursor:pointer}
.period-box select:hover{border-color:var(--line2)}
.period-box .pb-lab{font-family:var(--mono);font-size:11px;color:var(--dim);letter-spacing:.3px;text-transform:uppercase}

/* MERA — one theme system for the back office and every dashboard.
   Seven palettes, each built on the 60 / 30 / 10 rule:
     60%  --bg        the page ground (what most of the screen is)
     30%  --surface   cards, tables, the rail, the header (the working layer)
     10%  --acc       the one accent: active pill, primary button, key highlight
   Series colours (--s1 blue-ish, --s2 green-ish, --bad, --warn) are validated per palette
   against that palette's --surface (adjacent-pair colour-vision separation ≥ 8, contrast ≥ 3:1).
   The choice is stored in localStorage['mera-theme'] and applied as data-theme on <html>. */

:root, :root[data-theme="midnight"] {
  --bg:#0f1216; --surface:#161a20; --surface2:#1c2129; --line:#262d37; --line2:#333c48;
  --tx:#e4e8ee; --mut:#98a2b1; --dim:#828c9c; --acc:#4dd0c4; --acc-dim:#2a6f6a;
  --s1:#3987e5; --s2:#199e70; --bad:#e66767; --warn:#c98500;
  --hdr-bg:rgba(15,18,22,.94); --detail-bg:#12161b; --hover:#5b9cea;
  --tag-ok-bg:#14352a; --tag-ok:#5fd3a4; --tag-bad-bg:#3d2226; --tag-bad:#f0908f;
  --tag-warn-bg:#3a2f1a; --tag-warn:#e0b45f; --tag-neu-bg:#22303f; --tag-neu:#8ab8ec;
  --violet:#9085e9; --violet-soft:#2a2640;
  --rail:#0b0e12; --rail-ink:#98a2b1; --rail-brand:#e4e8ee; --rail-hover:rgba(255,255,255,.06); --rail-on:rgba(255,255,255,.12);
  --on-ink:#0f1216;
  --on-solid:#0f1216;
  /* computed: text that reads on a solid --action / --amber fill. #fff is only
     correct on a dark fill, and a dark theme's series colours are pale. */
  --on-action:#0b0e12; --on-amber:#0b0e12;
}
:root[data-theme="paper"] {
  --bg:#f5f3ee; --surface:#fffdf9; --surface2:#efeade; --line:#e3ded3; --line2:#cfc7b6;
  --tx:#1c1b18; --mut:#5b574e; --dim:#6e6a5f; --acc:#0f766e; --acc-dim:#0f766e;
  --s1:#2a78d6; --s2:#0b8a5a; --bad:#d63b3a; --warn:#b76e00;
  --hdr-bg:rgba(245,243,238,.94); --detail-bg:#f8f6f1; --hover:#4b8fe0;
  --tag-ok-bg:#dcf3e8; --tag-ok:#0b6b47; --tag-bad-bg:#fbe1e1; --tag-bad:#a12a2a;
  --tag-warn-bg:#fbeccd; --tag-warn:#8a5200; --tag-neu-bg:#dfe9f7; --tag-neu:#1f4f8f;
  --violet:#5b3fb0; --violet-soft:#eee9fb;
  --rail:#eae6dc; --rail-ink:#5b574e; --rail-brand:#1c1b18; --rail-hover:rgba(0,0,0,.05); --rail-on:rgba(0,0,0,.09);
  --on-ink:#fffdf9;
  --on-solid:#fffdf9;
  /* computed: text that reads on a solid --action / --amber fill. #fff is only
     correct on a dark fill, and a dark theme's series colours are pale. */
  --on-action:#FFFFFF; --on-amber:#1c1b18;
}
:root[data-theme="slate"] {
  --bg:#1b1f26; --surface:#232831; --surface2:#2b313b; --line:#353c47; --line2:#454d5a;
  --tx:#e8ecf2; --mut:#a4aebb; --dim:#8b95a5; --acc:#8ab4f8; --acc-dim:#3b5bdb;
  --s1:#3987e5; --s2:#199e70; --bad:#e66767; --warn:#c98500;
  --hdr-bg:rgba(27,31,38,.94); --detail-bg:#1f242c; --hover:#5b9cea;
  --tag-ok-bg:#173a2e; --tag-ok:#5ee3a6; --tag-bad-bg:#43262b; --tag-bad:#ff9a9a;
  --tag-warn-bg:#3f3218; --tag-warn:#ffc86b; --tag-neu-bg:#25344a; --tag-neu:#9cc3ff;
  --violet:#b3a7ff; --violet-soft:#2e2a4a;
  --rail:#161a20; --rail-ink:#a4aebb; --rail-brand:#e8ecf2; --rail-hover:rgba(255,255,255,.06); --rail-on:rgba(255,255,255,.12);
  --on-ink:#1b1f26;
  --on-solid:#1b1f26;
  /* computed: text that reads on a solid --action / --amber fill. #fff is only
     correct on a dark fill, and a dark theme's series colours are pale. */
  --on-action:#161a20; --on-amber:#161a20;
}
:root[data-theme="forest"] {
  --bg:#0e1512; --surface:#152019; --surface2:#1b2a22; --line:#24382d; --line2:#2f4a3b;
  --tx:#e6efe9; --mut:#9db3a6; --dim:#86998f; --acc:#f0b429; --acc-dim:#8a6a12;
  --s1:#3987e5; --s2:#199e70; --bad:#e66767; --warn:#c98500;
  --hdr-bg:rgba(14,21,18,.94); --detail-bg:#111a15; --hover:#5b9cea;
  --tag-ok-bg:#163d2c; --tag-ok:#6fe0ad; --tag-bad-bg:#3f2323; --tag-bad:#f5a0a0;
  --tag-warn-bg:#3d3116; --tag-warn:#f2c766; --tag-neu-bg:#1d3546; --tag-neu:#93c4f0;
  --violet:#b6a8ff; --violet-soft:#2a2646;
  --rail:#0a100d; --rail-ink:#9db3a6; --rail-brand:#e6efe9; --rail-hover:rgba(255,255,255,.06); --rail-on:rgba(255,255,255,.12);
  --on-ink:#0e1512;
  --on-solid:#0e1512;
  /* computed: text that reads on a solid --action / --amber fill. #fff is only
     correct on a dark fill, and a dark theme's series colours are pale. */
  --on-action:#0a100d; --on-amber:#0a100d;
}
:root[data-theme="sand"] {
  --bg:#f4efe6; --surface:#fffaf2; --surface2:#ece4d6; --line:#e0d6c4; --line2:#c9bca3;
  --tx:#2a241c; --mut:#6a5f4e; --dim:#6a6050; --acc:#c2410c; --acc-dim:#c2410c;
  --s1:#2563eb; --s2:#15803d; --bad:#dc2626; --warn:#b45309;
  --hdr-bg:rgba(244,239,230,.94); --detail-bg:#f7f1e8; --hover:#3b82f6;
  --tag-ok-bg:#dcefe0; --tag-ok:#166534; --tag-bad-bg:#fde2e2; --tag-bad:#991b1b;
  --tag-warn-bg:#fbe8c8; --tag-warn:#92400e; --tag-neu-bg:#dbe6f8; --tag-neu:#1e40af;
  --violet:#6d28d9; --violet-soft:#ede9fe;
  --rail:#e8dfcf; --rail-ink:#6a5f4e; --rail-brand:#2a241c; --rail-hover:rgba(0,0,0,.05); --rail-on:rgba(0,0,0,.09);
  --on-ink:#fffaf2;
  --on-solid:#fffaf2;
  /* computed: text that reads on a solid --action / --amber fill. #fff is only
     correct on a dark fill, and a dark theme's series colours are pale. */
  --on-action:#FFFFFF; --on-amber:#FFFFFF;
}
:root[data-theme="coral"] {
  --bg:#0d1220; --surface:#141b2e; --surface2:#1b2440; --line:#273356; --line2:#35446e;
  --tx:#e8ecf7; --mut:#a2acc6; --dim:#8a94ae; --acc:#ff7a59; --acc-dim:#a8412a;
  --s1:#3987e5; --s2:#199e70; --bad:#e66767; --warn:#c98500;
  --hdr-bg:rgba(13,18,32,.94); --detail-bg:#10162a; --hover:#5b9cea;
  --tag-ok-bg:#163a33; --tag-ok:#6fe3bd; --tag-bad-bg:#432430; --tag-bad:#ff9a9a;
  --tag-warn-bg:#3f3218; --tag-warn:#ffc86b; --tag-neu-bg:#22304f; --tag-neu:#9cc3ff;
  --violet:#b3a7ff; --violet-soft:#2e2a4a;
  --rail:#0a0e1a; --rail-ink:#a2acc6; --rail-brand:#e8ecf7; --rail-hover:rgba(255,255,255,.06); --rail-on:rgba(255,255,255,.12);
  --on-ink:#0d1220;
  --on-solid:#0d1220;
  /* computed: text that reads on a solid --action / --amber fill. #fff is only
     correct on a dark fill, and a dark theme's series colours are pale. */
  --on-action:#0a0e1a; --on-amber:#0a0e1a;
}
:root[data-theme="arctic"] {
  --bg:#eef2f6; --surface:#ffffff; --surface2:#e3e9f0; --line:#d5dde7; --line2:#b9c5d4;
  --tx:#101828; --mut:#475467; --dim:#5b6678; --acc:#1d4ed8; --acc-dim:#1d4ed8;
  --s1:#2a78d6; --s2:#0b8a5a; --bad:#d63b3a; --warn:#b76e00;
  --hdr-bg:rgba(238,242,246,.94); --detail-bg:#f5f7fa; --hover:#4b8fe0;
  --tag-ok-bg:#dcf3e8; --tag-ok:#0b6b47; --tag-bad-bg:#fbe1e1; --tag-bad:#a12a2a;
  --tag-warn-bg:#fbeccd; --tag-warn:#8a5200; --tag-neu-bg:#dfe9f7; --tag-neu:#1f4f8f;
  --violet:#5b3fb0; --violet-soft:#eee9fb;
  --rail:#e3e9f0; --rail-ink:#475467; --rail-brand:#101828; --rail-hover:rgba(0,0,0,.05); --rail-on:rgba(0,0,0,.09);
  --on-ink:#ffffff;
  --on-solid:#ffffff;
  /* computed: text that reads on a solid --action / --amber fill. #fff is only
     correct on a dark fill, and a dark theme's series colours are pale. */
  --on-action:#FFFFFF; --on-amber:#101828;
}

/* The back office's own token names, aliased onto the same palette so both vocabularies agree. */
:root {
  --ground:var(--bg); --ink:var(--tx); --on-solid:var(--on-solid); --muted:var(--mut); --rule:var(--line); --rule-soft:var(--surface2);
  --seal:var(--s2); --seal-soft:var(--tag-ok-bg); --amber:var(--warn); --amber-soft:var(--tag-warn-bg);
  --red:var(--bad); --red-soft:var(--tag-bad-bg); --action:var(--s1); --action-soft:var(--tag-neu-bg);
  --mono:ui-monospace,"Cascadia Code",Consolas,monospace;
}

/* ═══ page frame (dashboards only — the guide and the palette sheet keep their prose width) ═══
   One column width for every dashboard, and the header + period strip share it, so the page
   title, the nav and the content below line up on the same two edges instead of the title
   hugging the window while the content floats in the middle. Wider than the old 1240/1320,
   which is what stopped the big tables fitting. */
body:has(.period){--col:1800px}   /* 1600 fitted the People table until it grew three money columns */
body:has(.period) .wrap{max-width:var(--col)}
body:has(.period) > header,.period{padding-inline:max(28px,calc((100% - var(--col))/2 + 28px))}
body:has(.period) .wrap > p.sub2,body:has(.period) .wrap > .note{max-width:104ch}

/* ═══ the nav reads in two tiers ═══
   Round + accent  = sections OF THIS PAGE (they swap the view under you).
   Square + blue ↗ = OTHER PAGES (they navigate away).  Grey = leaving the dashboards.
   Colour and shape both differ, so the two tiers survive a colour-blind reader.
   The colour lives in the FILL and the BORDER, never in the label: an accent light enough to read
   on a dark ground (Plum's gold) is unreadable as text on a light one, and ten palettes shift it.
   Text stays --tx; the active pill takes the solid accent with --on-ink, which palette.js computes
   as whichever of black/white actually contrasts with that accent. */
.pills .pill[data-view]{border-radius:999px;color:var(--tx);
  background:color-mix(in srgb,var(--acc) 10%,transparent);
  border-color:color-mix(in srgb,var(--acc) 45%,transparent)}
.pills .pill[data-view]:hover{background:color-mix(in srgb,var(--acc) 22%,transparent);border-color:var(--acc)}
.pills .pill[data-view].on{background:var(--acc);border-color:var(--acc);color:var(--on-ink);font-weight:600}
.pills a.pill{border-radius:6px;color:var(--tx);background:color-mix(in srgb,var(--s1) 10%,transparent);
  border-color:color-mix(in srgb,var(--s1) 45%,transparent)}
.pills a.pill:hover{border-color:var(--s1);background:color-mix(in srgb,var(--s1) 22%,transparent)}
.pills .navlab{font-family:var(--mono);font-size:9.5px;letter-spacing:.6px;text-transform:uppercase;
  color:var(--dim);align-self:center;margin:0 2px 0 6px;white-space:nowrap}
.pills{flex-wrap:wrap}
.pills .pill{white-space:nowrap}          /* "Money & Risk ↗" must never break across two lines */
@media (max-width:1400px){.pills .navlab{display:none}}   /* tight bar: colour and shape still say it */

/* Inside a shell (back office, or the shared pack's own rail) the rail already lists every page,
   so the header keeps only this page's own sections. Opened as a loose file there is no rail,
   the class is never set, and the cross-page pills stay as the only way out. */
body.framed [data-x]{display:none}
/* Same reasoning for the time frame: framed by the back office shell, THE date range lives in the
   shell header and reaches every page, so the in-page month box would be a second, month-only
   answer to the same question. The strip still states the frame in words — it just stops offering
   its own way to change it. Loose or in the share pack the class is never set and the box stays. */
body.framed #period-box{display:none}

/* ═══ MERA — his own brand, made safe for a table read for hours ═══════════════════════
   Built from meragaming.com's own :root tokens, not sampled from screenshots.
   Cream is the ground, teal is the chrome — which is what his blog and article pages
   already do (73.6% cream / 0.4% teal). His marketing fold inverts that; a dense table
   is a reading page, not a fold.
   Ratios below are WCAG 2.x, measured, not estimated. Floors: 4.5 body, 3.0 large + UI edge.
   Verified by scratchpad/mera_theme_check.py — 82 pairings, 0 failures. */

:root[data-theme="mera"] {
  /* Grounds — all three are his literal hexes, nothing moved.
     --bg #EEE0CB is --mera-cream · --surface #FAF6EF and --surface2 #F3E9D7 are his own
     input/panel gradient stops. surface 1.21:1 over bg, surface2 1.12:1 over surface —
     enough to separate a card and a header row without a border doing the work. */
  /* 22 Sep 2026, Jon: "change the page background to a white background, keep the mera colour for
     the mera palette". The ground is white; his cream stays as the soft second surface (table
     headers, detail panels) and the rail, accent, chips and rules keep his colours. */
  --bg:#FFFFFF; --surface:#FFFFFF; --surface2:#F7F1E4;
  /* --line is his hairline #D9C9AD (1.25:1 — decorative row rule, correct at that weight).
     --line2 MOVED: he uses #D9C9AD as a control border too, at 1.25:1, which fails 1.4.11.
     #8C7A5E is 3.19:1 on bg / 3.85 surface / 3.45 surface2 — an input edge you can find. */
  --line:#D9C9AD; --line2:#8C7A5E;
  /* Text. tx = his --mera-ink 13.82:1 · mut = his --mera-on-cream-soft 9.48:1.
     --dim MOVED: his blog meta #5A6A73 is 4.32:1 and just misses; #4C5C65 is 5.34:1. */
  --tx:#0B1823; --mut:#243744; --dim:#4C5C65;
  /* Accent MOVED: his aqua #25A5B2 is 2.27:1 as text on cream. #1A6A73 is the end stop of
     his own pillar gradient (color-mix aqua 58% + ink) — 4.82:1 on bg, 5.81 on surface,
     and cream on it is the same 4.82:1, so his cream-on-teal rule survives the darkening. */
  --acc:#1A6A73; --acc-dim:#1A6A73;
  /* Series. --s1 is the cross-page/nav blue, deliberately NOT his teal so a link cannot be
     mistaken for the accent. --bad is #C41F2F, the dark stop of his own button gradient:
     his #DB2B3A is 3.66:1 on cream and fails body. 4.51 / 5.44 / 4.87 across the grounds.
     --warn MOVED hard: his #FF9100 is 1.74:1 on cream. #955500 is 4.52:1. */
  --s1:#1F5FA8; --s2:#1F724C; --bad:#C41F2F; --warn:#955500;
  --hdr-bg:rgba(255,255,255,.94); --detail-bg:#FAF6EF; --hover:#1F5FA8;
  /* Chips. ok and bad are his contact-form status colours verbatim (.mera-contact-status);
     warn and neu are built in the same idiom — tinted fill, dark ink. */
  --tag-ok-bg:#D7F4C8; --tag-ok:#174932; --tag-bad-bg:#FFD8CF; --tag-bad:#8A1C12;
  --tag-warn-bg:#FFE6BF; --tag-warn:#5A3A00; --tag-neu-bg:#D7E7EC; --tag-neu:#17434E;
  /* No purple exists anywhere on meragaming.com. This is the theme system's own violet,
     on a cream-warmed tint so it does not read as a hole in the page. 6.03:1. */
  --violet:#5B3FB0; --violet-soft:#E9E3F6;
  /* The rail is his aqua at full strength — the one place teal belongs, and the one place
     his site already proves it works: .mera-header forces nav to var(--mera-ink), 6.08:1.
     Note the inversion: on his site the logo on teal is cream (2.27:1). Here it is ink. */
  --rail:#25A5B2; --rail-ink:#0B1823; --rail-brand:#0B1823;
  --rail-hover:rgba(11,24,35,.10); --rail-on:rgba(11,24,35,.18);
  --on-ink:#EEE0CB;     /* text on an --acc fill (the active pill): 4.82:1 on #1A6A73 */
  --on-solid:#EEE0CB;   /* text on a solid --tx button:            13.82:1 on #0B1823 */
  /* computed: text that reads on a solid --action / --amber fill. #fff is only
     correct on a dark fill, and a dark theme's series colours are pale. */
  --on-action:#FFFFFF; --on-amber:#FFFFFF;
}

/* Light set, measured (fg on bg / surface / surface2):
   --tx      13.82 / 16.67 / 14.92      --mut    9.48 / 11.43 / 10.23
   --dim      5.34 /  6.44 /  5.77      --acc    4.82 /  5.81 /  5.20 (fill edge 4.82)
   --s1       4.96 /  5.98 /  5.35      --s2     4.53 /  5.46 /  4.89
   --bad      4.51 /  5.44 /  4.87      --warn   4.52 /  5.45 /  4.88
   --line2    3.19 /  3.85 /  3.45  (WCAG 1.4.11 UI edge, floor 3.0)
   --on-ink on --acc 4.82 · --on-solid on --tx 13.82 · --rail-ink on --rail 6.08
   chips: ok 8.68 · bad 7.08 · warn 8.49 · neu 8.48 · violet 6.03 */

:root[data-theme="mera-dark"] {
  /* He has no dark mode — zero prefers-color-scheme rules in 250KB of his CSS. So this is
     ours, but built only from values he owns: the ink band. --bg is his --mera-ink and
     --surface derives from his --mera-muted #1A2C38; surface2 is one step above it. */
  --bg:#0B1823; --surface:#152A33; --surface2:#1D3742;
  --line:#2A4A57; --line2:#6A8C99;   /* line2 4.98 / 4.13 / 3.47 — meets 1.4.11 on all three */
  /* tx is his --mera-on-ink verbatim; mut is his --mera-on-ink-soft flattened to opaque. */
  --tx:#EEE0CB; --mut:#CEC4B3; --dim:#9CAEB5;
  /* Dark is where his aqua works untouched: #25A5B2 is 6.08:1 on his ink, both ways —
     so the accent is his exact brand hex and the text on it is his exact ink hex. */
  --acc:#27ADBA; --acc-dim:#18646D;
  /* --bad MOVED furthest of anything here: #DB2B3A is 3.78:1 on ink and fails body.
     #FF6572 is 6.29:1 — same hue, lightness 51% → 70%, saturation pushed to 100% so it
     still reads as his red rather than a salmon. This is the one visible departure.
     --warn is his #FF9100 untouched: 7.96:1 on ink, and the only place that colour works. */
  --s1:#6FA8E8; --s2:#4FC08D; --bad:#FF6D79; --warn:#FF9100;
  --hdr-bg:rgba(11,24,35,.94); --detail-bg:#102029; --hover:#6FA8E8;
  --tag-ok-bg:#123A2A; --tag-ok:#8CE8BB; --tag-bad-bg:#4A1620; --tag-bad:#FFB2B8;
  --tag-warn-bg:#3D2A08; --tag-warn:#FFCA7A; --tag-neu-bg:#123641; --tag-neu:#8FD8E2;
  --violet:#C9A9E8; --violet-soft:#2E2440;
  /* Dark rail goes below the ground rather than teal: a saturated teal column beside a dark
     table is the band problem again. Teal stays on the active item, where --acc carries it. */
  --rail:#071018; --rail-ink:#CEC4B3; --rail-brand:#EEE0CB;
  --rail-hover:rgba(255,255,255,.06); --rail-on:rgba(255,255,255,.12);
  --on-ink:#0B1823;     /* text on an --acc fill: 6.08:1 on #25A5B2 — both his own hexes */
  --on-solid:#0B1823;   /* text on a solid --tx button: 13.82:1 on #EEE0CB */
  /* computed: text that reads on a solid --action / --amber fill. #fff is only
     correct on a dark fill, and a dark theme's series colours are pale. */
  --on-action:#071018; --on-amber:#071018;
}

/* Dark set, measured (fg on bg / surface / surface2):
   --tx      13.82 / 11.45 /  9.63      --mut   10.41 / 8.63 / 7.26
   --dim      7.81 /  6.47 /  5.45      --acc    6.08 /  5.03 /  4.23 (fill edge 6.08)
   --s1       7.22 /  5.98 /  5.03      --s2     7.92 / 6.56 / 5.52
   --bad      6.29 /  5.21 /  4.39      --warn   7.96 / 6.59 / 5.55
   --line2    4.98 /  4.13 /  3.47
   --on-ink on --acc 6.08 · --on-solid on --tx 13.82 · --rail-ink on --rail 11.10
   chips: ok 8.64 · bad 8.63 · warn 9.12 · neu 8.03 · violet 7.16 */

/* ═══ Two product rules the palette cannot fix on its own ═══
   Both are hard-coded #fff in backoffice/static/style.css and both go unreadable on a
   brand-coloured fill. The fix is token-side and safe in every existing theme too: */
/*  button.primary { background:var(--acc); border-color:var(--acc); color:var(--on-ink); }  */
/*  .badge         { background:var(--warn); color:var(--on-solid); }                        */
/* Before: #fff on #FF9100 = 2.26:1. After: #0B1823 on #FF9100 = 7.96:1.
   In a dark theme no orange can both take white text AND sit 4.5:1 above the ground —
   the two requirements are mathematically opposed, so the token cannot be the fix. */

/* Two values lifted after an independent contrast pass: --acc #25A5B2 -> #27ADBA and
   --bad #FF6572 -> #FF6D79, each about two points of lightness. Both cleared 4.5:1 on
   --bg and --surface but landed at 4.23 and 4.39 on --surface2, i.e. AA-large only. The
   synthesis handled that with a rule ('never set --acc as small text on --surface2'); a
   rule somebody has to remember is a worse fix than a colour nobody can misuse. */

/* A figure that is NOT the client's own has to say so where the figure is, not in a footnote.
   24 Sep 2026: invented bank balances were shown to Eduardo as MERA's, because nothing on the page
   said otherwise. Red border, red heading, full width, directly under the page's own strip. */
.notreal{margin:0 0 14px;padding:11px 15px;border-left:4px solid #C41F2F;
 background:rgba(196,31,47,.07);border-radius:0 10px 10px 0;font-size:13.5px;line-height:1.5;
 color:var(--tx)}
.notreal b{color:#C41F2F}

/* Explanations switched off in Settings (palette.js meraHelp): the prose goes, the figures stay. */
html.nohelp .lede, html.nohelp .sub2, html.nohelp details.why, html.nohelp .help { display: none !important; }
