/* One palette for login, shared pages and all subscription services. */
:root{--app-page:#f5f6f3;--app-surface:#ffffff;--app-input:#ffffff;--app-text:#19363d;--app-muted:#53676c;--app-line:#dce4e1;--app-control:#95aaac;--app-soft:#eaf1ef;--app-link:#22616d;--app-warning-bg:#fff0e8;--app-warning-text:#773519;--app-error-bg:#fff0ec;--app-error-text:#9c3426;--app-success-bg:#e2efea;--app-success-text:#19363d;--app-focus:#ad552a;--app-ribbon:#19363d;--app-progress:#22616d;--app-on-accent:#18363c;color-scheme:light;background:var(--app-page)}
:root[data-evolve-theme="dark"]{--app-page:#10191d;--app-surface:#18272d;--app-input:#142229;--app-text:#edf3f4;--app-muted:#b8c9ce;--app-line:#48616a;--app-control:#78929a;--app-soft:#233b42;--app-link:#8dd3de;--app-warning-bg:#432b21;--app-warning-text:#ffd3bf;--app-error-bg:#432b21;--app-error-text:#ffd3bf;--app-success-bg:#203b30;--app-success-text:#daf2e4;--app-focus:#ff9b71;--app-ribbon:#0b1215;--app-progress:#8dd3de;--app-on-accent:#18363c;color-scheme:dark}
@media(prefers-color-scheme:dark){:root:not([data-evolve-theme]){--app-page:#10191d;--app-surface:#18272d;--app-input:#142229;--app-text:#edf3f4;--app-muted:#b8c9ce;--app-line:#48616a;--app-control:#78929a;--app-soft:#233b42;--app-link:#8dd3de;--app-warning-bg:#432b21;--app-warning-text:#ffd3bf;--app-error-bg:#432b21;--app-error-text:#ffd3bf;--app-success-bg:#203b30;--app-success-text:#daf2e4;--app-focus:#ff9b71;--app-ribbon:#0b1215;--app-progress:#8dd3de;--app-on-accent:#18363c;color-scheme:dark}}
/* Native controls remain accessible at phone text sizes. */
.evolve-appearance-control{color:var(--app-text);min-width:0}
.evolve-appearance-control label{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:0;font-size:13px;font-weight:600}
.evolve-appearance-control select{width:auto;min-width:112px;max-width:100%;min-height:44px;padding:8px 28px 8px 10px;border:1px solid var(--app-control);border-radius:8px;background:var(--app-input);color:var(--app-text);font:16px system-ui,-apple-system,sans-serif}
.evolve-appearance-control select:focus-visible{outline:3px solid var(--app-focus);outline-offset:2px}
.evolve-appearance-control .evolve-appearance-status{font-size:12px;color:var(--app-muted);margin:8px 0 0;line-height:1.5}
.evolve-appearance-control.is-compact label{gap:6px;font-size:11px}
.evolve-appearance-control.is-compact select{min-width:95px;padding-right:20px}
.login-top{justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.login-top .evolve-appearance-control{margin-right:auto}
@media(max-width:350px){.evolve-appearance-control.is-compact label{gap:4px;font-size:10px}.evolve-appearance-control.is-compact select{min-width:86px}.login-top{padding-left:10px;padding-right:10px}}
/* Brief #492 (Fin, 24 Oct 2026): the apps move focus to a page heading, its main area or a message (tabindex="-1") so
 screen readers announce each new screen. Those are not controls (Tab never reaches them), so the browser's focus ring
 (the orange box around "Training." and "Progress") is never drawn on them. Every real control (buttons, links, fields,
 summaries) keeps its :focus-visible ring. Loaded by every page of every app. */
:is(h1,h2,h3,h4,h5,h6,p,div,section,main,header,footer,article,aside,nav,form,fieldset,legend,span,ul,ol,li,dl,table,figure)[tabindex="-1"]:is(:focus,:focus-visible){outline:none!important}
h1[tabindex="-1"]:focus,h2[tabindex="-1"]:focus,h3[tabindex="-1"]:focus,main[tabindex="-1"]:focus,section[tabindex="-1"]:focus,div[tabindex="-1"]:focus,p[tabindex="-1"]:focus{outline:none!important}
/* Brief #583: routine status messages are never drawn; they stay in the live region for screen readers. */
.evolve-quiet-notice{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}
/* A genuine problem is shown in the error colours (never the success green). */
.evolve-problem-notice{background:var(--app-error-bg)!important;color:var(--app-error-text)!important;border-color:var(--app-error-text)!important}
/* Coach-workspace confirmations (saved, published, copied) are no longer drawn in the success green; failures (.is-error) still are. */
.ccm-note:not(.is-error),.wg-note:not(.is-error),.np-note:not(.is-error),.rl-trial-note{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}
/* Brief #612 (Fin, 25 Oct 2026): on touch screens, pressing and holding or dragging over ordinary interface text must not open the
 browser's selection handles or callout, so the app feels like an app. Touch-only (hover:none + pointer:coarse): a desktop mouse
 and keyboard still select text. Pure CSS: no touch event is intercepted, so scrolling, swiping, drag-and-drop, links, selects and
 screen readers are untouched. Loaded by every page. Opt back in with .allow-select or [data-selectable] on anything meant to be
 copied (links, references, codes); fields, contenteditable, code and pre stay selectable. */
@media (hover:none) and (pointer:coarse){
html{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,[contenteditable]:not([contenteditable="false"]),.allow-select,[data-selectable],code,pre,
:is(.allow-select,[data-selectable],[contenteditable]:not([contenteditable="false"]),code,pre) *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
}
