/* The Emovis look shared by every RTM page (taken from emovis.com, 15 Oct 2026), and the global footer.
   Loaded after each page's own styles, so these colours replace the page's accent. */
:root{--emv-magenta:#ce0058;--emv-cyan:#00b5e2;--emv-slate:#5a6e74;--emv-mist:#eef0f1;--emv-navy:#151f6d;
  --accent:var(--emv-magenta);--accent-ink:#fff}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--accent:#ff5c9d;--accent-ink:#1a0610}}
:root[data-theme="dark"]{--accent:#ff5c9d;--accent-ink:#1a0610}
body{font-family:segoe-ui,"Segoe UI",system-ui,-apple-system,Helvetica,Roboto,sans-serif}

/* A link takes the theme's accent, in the light and the dark theme, wherever nothing else styles it (Richard, 1 Dec 2026:
   links on dark cards were the browser's dark blue). :where() weighs nothing, so every rule that styles its own links,
   on any page, still wins. */
:where(a:any-link){color:var(--accent)}

/* The Emovis logo, put at the start of each page's header by footer.js */
.emv-logo{display:inline-flex;align-items:center;margin-right:4px}
.emv-logo img{display:block;height:28px;width:auto}

/* The breadcrumb trail on the pages outside the RTM page (the RTM page has its own, #crumbs) */
.site-crumbs{max-width:1280px;margin:12px auto 0;padding:0 20px;font-size:calc(14px * var(--fs, 1));color:var(--muted)}
.site-crumbs a{color:var(--accent);text-decoration:none}

/* The global footer */
/* Fixed to the bottom of the window (Lee, 17 Oct 2026); footer.js pads the page by its height so nothing hides behind it. */
.emv-footer{position:fixed;left:0;right:0;bottom:0;z-index:40;background:var(--emv-slate);color:#fff;padding:10px 20px;font-size:calc(13px * var(--fs, 1))}
.emv-footer .in{max-width:1280px;margin:0 auto;display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.emv-footer img{height:24px;width:auto;display:block}
.emv-footer .sp{flex:1}
.emv-footer a{color:#fff;text-decoration:underline;text-underline-offset:2px}
.emv-footer a:hover,.emv-footer a:focus-visible{color:var(--emv-mist)}
.emv-footer .emv-badge{display:inline-block;padding:2px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.12);color:#fff;text-decoration:none;font-size:calc(12px * var(--fs, 1));white-space:nowrap;font-variant-numeric:tabular-nums}
.emv-footer .emv-badge:hover,.emv-footer .emv-badge:focus-visible{background:rgba(255,255,255,.24);color:#fff;text-decoration:none}

/* This browser's view: the Light / Dark switch and the text size (footer.js, prefs.js) — in the User menu where
   the page has one, else in the footer */
.emv-prefs{display:inline-flex;align-items:center;gap:14px;flex-wrap:wrap}
.emv-prefs .row{display:inline-flex;align-items:center;gap:6px}
.emv-prefs .lbl{display:none}
.emv-mode{opacity:.85;white-space:nowrap}
.emv-switch{position:relative;width:38px;height:20px;border-radius:10px;border:1px solid rgba(255,255,255,.7);background:rgba(0,0,0,.25);
  padding:0;cursor:pointer;flex:none}
.emv-switch .knob{position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;transition:left .15s}
.emv-switch[aria-checked="true"]{background:var(--emv-cyan)}
.emv-switch[aria-checked="true"] .knob{left:20px}
.emv-size{font:inherit;font-weight:700;min-width:30px;color:#fff;background:transparent;border:1px solid rgba(255,255,255,.6);border-radius:5px;padding:1px 7px;cursor:pointer}
.emv-size:disabled{opacity:.4;cursor:default}
/* In the User menu: stacked, labelled, in the page's own colours */
.menu .emv-prefs{display:flex;flex-direction:column;align-items:stretch;gap:6px;padding:8px 10px;border-bottom:1px solid var(--line);margin-bottom:4px}
.menu .emv-prefs .row{display:flex;gap:6px}
.menu .emv-prefs .lbl{display:inline;min-width:68px;color:var(--muted);font-size:calc(12px * var(--fs, 1))}
.menu .emv-mode{font-size:calc(12px * var(--fs, 1))}
/* The menu makes its buttons full-width blocks; these keep their own size */
.menu .dd .emv-prefs .emv-switch{display:inline-block;width:38px;height:20px;padding:0;border:1px solid var(--line);border-radius:10px;
  background:var(--chip);position:relative}
.menu .dd .emv-prefs .emv-switch[aria-checked="true"]{background:var(--emv-cyan)}
.menu .dd .emv-prefs .emv-switch .knob{background:var(--muted)}
.menu .dd .emv-prefs .emv-switch[aria-checked="true"] .knob{background:#fff}
.menu .dd .emv-prefs .emv-size{display:inline-block;width:auto;padding:1px 8px;color:var(--ink);border:1px solid var(--line);
  border-radius:5px;background:var(--panel);font-weight:700;min-width:30px;text-align:center}
.menu .dd .emv-prefs .emv-size

/* Every button is Emovis red with white text, in light and dark mode (Lee, 17 Oct 2026). Controls that are not
   buttons to look at keep their own style: the edit pencil (.ed), chip and tree toggles (.x, .chip, .tog), the
   light/dark switch, menu entries and the chat panel. A selected toggle (.on) is a darker red with a white ring. */
:is(button,.btn,input[type=submit],input[type=button]):not(.ed,.x,.chip,.tog,.emv-switch,.menu .dd *,#rtmchat-panel *,#msgpop *){
  background:var(--emv-magenta);color:#fff;border-color:var(--emv-magenta)}
:is(button,.btn,input[type=submit],input[type=button]):not(.ed,.x,.chip,.tog,.emv-switch,.menu .dd *,#rtmchat-panel *,#msgpop *):is(:hover,:focus-visible):not(:disabled){
  background:#a8004a;border-color:#a8004a;color:#fff}
:is(button,.btn,input[type=submit],input[type=button]):not(.ed,.x,.chip,.tog,.emv-switch,.menu .dd *,#rtmchat-panel *,#msgpop *).on{
  background:#7a0034;border-color:#7a0034;color:#fff;box-shadow:inset 0 0 0 2px #fff}
