/* A trial in greys (19 November 2026, the owner: the dotted cover of a doctor's page takes away seriousness, and so do
   the bluish tones; try the whole app in a grey scale, the field behind the pages and the buttons too, and make the
   covers more serious). Loaded last (index.html). It changes colours only: every size, place and motion stays.

   - The accent that was a blue-leaning lilac (#8B7CFF) becomes a quiet grey: the points, rings, plates, the line around
     Back to top, focus rings and the Verified seal all take it through --cl-lilac, so one token carries the change.
   - The field behind Home and the inner places draws in greys (its five colours are tokens read by assets/ds/field.js).
   - A doctor's cover and the colleague cards' bands are flat, with no dots and no glow: a plain warm grey with a
     hairline, the way a letterhead is plain.
   - Red (urgent, a count on the bell), green (saved) and amber (a warning) keep their meaning and their colour.
   To go back, remove this file's link from index.html. */

/* ── 1. The accent ─────────────────────────────────────────────────────────────────────────────────────────────── */
html.light:root:root { --cl-lilac: #6F6F6C; --cl-lilac-soft: #ECECE9; }
html:root:root:not(.light) { --cl-lilac: #A3A3A0; --cl-lilac-soft: #2C2C2B; }

/* ── 2. The field behind the pages ─────────────────────────────────────────────────────────────────────────────── */
html.light:root:root { --ds-field-1: #FFFFFF; --ds-field-2: #E6E6E3; --ds-field-3: #CDCDC9; --ds-field-4: #EDEDEA; --ds-field-5: #FFFFFF; }
html:root:root:not(.light) { --ds-field-1: #1F1F1F; --ds-field-2: #2C2C2C; --ds-field-3: #424242; --ds-field-4: #282828; --ds-field-5: #1F1F1F; }
/* the field's flat fallback and its soft wash at the top of a page */
html .cl-field.is-flat { background: linear-gradient(to bottom, var(--cl-lilac-soft), transparent); }

/* ── 3. A doctor's cover: flat and plain ───────────────────────────────────────────────────────────────────────── */
html .pf, html .pf-mini { --pf-l1: #EDEDEA; --pf-l2: #E3E3E0; --pf-l3: #F0F0EE; --pf-l4: rgba(26, 26, 26, .12); --pf-base: #FAFAF8; }
html:not(.light) .pf, html:not(.light) .pf-mini { --pf-l1: #262626; --pf-l2: #2E2E2E; --pf-l3: #242424; --pf-l4: rgba(255, 255, 255, .1); --pf-base: #1F1F1F; }
html body .pf-band { background: #EDEDEA !important; box-shadow: inset 0 -1px 0 var(--cl-line); }
html:not(.light) body .pf-band { background: #262626 !important; }
html body .pf-band--photo { background: var(--cl-surface-2) !important; }

/* ── 4. The colleague cards' bands, the same plain grey ────────────────────────────────────────────────────────── */
html .cl .cl-band { background: #EDEDEA !important; box-shadow: inset 0 0 0 1px var(--cl-line) !important; }
html:not(.light) .cl .cl-band { background: #262626 !important; }

/* ── 5. The video player's own accent ──────────────────────────────────────────────────────────────────────────── */
.bsp { --bsp-lilac: #D9D9D6; --bsp-lilac-glass: rgba(255, 255, 255, .22); --bsp-lilac-line: rgba(255, 255, 255, .7); }

/* ── 6. Page tones, as Reader has them (views/page-tones.js puts data-tone-light and data-tone-dark on the page) ────────────
   White is cool and clean; Paper is warm, a little beige; Grey is a soft dark; Black is the darkest. Every tone keeps the
   grey accent of its own family, so nothing turns blue. */
html.light:root:root[data-tone-light="white"] {
  --cl-page: #F4F5F6; --cl-surface: #FFFFFF; --cl-surface-2: #EEF0F2;
  --cl-ink: #16181B; --cl-ink-2: #272A2E; --cl-ink-3: #44484E; --cl-ink-4: #4E535A;
  --cl-line: rgba(22,24,27,.08); --cl-line-2: rgba(22,24,27,.12); --cl-line-3: rgba(22,24,27,.22);
  --cl-hover: rgba(22,24,27,.05); --cl-press: rgba(22,24,27,.09);
  --cl-lilac: #6E737A; --cl-lilac-soft: #E9ECEF;
  --ds-field-1: #FFFFFF; --ds-field-2: #E3E6EA; --ds-field-3: #C9CED5; --ds-field-4: #EBEEF1; --ds-field-5: #FFFFFF;
  --gp-band: #ECEEF0; --color-primary-foreground: #FFFFFF; --color-brand-hover: #000000; --frost-ink: rgba(22,24,27,.94);
}
html.light:root:root[data-tone-light="paper"] {
  --cl-page: #F4EEE2; --cl-surface: #FBF7EF; --cl-surface-2: #EFE7D8;
  --cl-ink: #2B2620; --cl-ink-2: #3A332A; --cl-ink-3: #574E42; --cl-ink-4: #61574A;
  --cl-line: rgba(70,52,28,.10); --cl-line-2: rgba(70,52,28,.15); --cl-line-3: rgba(70,52,28,.26);
  --cl-hover: rgba(70,52,28,.05); --cl-press: rgba(70,52,28,.09);
  --cl-lilac: #857865; --cl-lilac-soft: #EAE0CE;
  --ds-field-1: #FBF8F2; --ds-field-2: #ECE8E0; --ds-field-3: #DAD5CB; --ds-field-4: #F2EFE9; --ds-field-5: #FBF8F2;
  --gp-band: #ECE3D3; --color-primary-foreground: #FBF7EF; --color-brand-hover: #1F1B16; --frost-ink: rgba(43,38,32,.94);
}
html:root:root:not(.light)[data-tone-dark="grey"] {
  --cl-page: #1C1C1E; --cl-surface: #262628; --cl-surface-2: #313134;
  --cl-ink: #F2F2F3; --cl-ink-2: #DADADC; --cl-ink-3: #B3B3B7; --cl-ink-4: #A9A9AD;
  --cl-line: rgba(255,255,255,.09); --cl-line-2: rgba(255,255,255,.14); --cl-line-3: rgba(255,255,255,.25);
  --cl-hover: rgba(255,255,255,.05); --cl-press: rgba(255,255,255,.09);
  --cl-lilac: #A4A6AB; --cl-lilac-soft: #303033;
  --ds-field-1: #262628; --ds-field-2: #333336; --ds-field-3: #48484D; --ds-field-4: #2E2E31; --ds-field-5: #262628;
  --gp-band: #2C2C2F; --color-primary-foreground: #1C1C1E;
}
html:root:root:not(.light)[data-tone-dark="black"] {
  --cl-page: #000000; --cl-surface: #121213; --cl-surface-2: #1C1C1E;
  --cl-ink: #EDEDED; --cl-ink-2: #D4D4D4; --cl-ink-3: #ABABAB; --cl-ink-4: #A0A0A0;
  --cl-line: rgba(255,255,255,.08); --cl-line-2: rgba(255,255,255,.13); --cl-line-3: rgba(255,255,255,.22);
  --cl-hover: rgba(255,255,255,.05); --cl-press: rgba(255,255,255,.09);
  --cl-lilac: #9A9A9A; --cl-lilac-soft: #232325;
  --ds-field-1: #121213; --ds-field-2: #1E1E20; --ds-field-3: #333336; --ds-field-4: #19191B; --ds-field-5: #121213;
  --gp-band: #1A1A1B; --color-primary-foreground: #000000;
}
/* the covers and the colleague bands take the tone's band */
html body .pf-band:not(.pf-band--photo), html:not(.light) body .pf-band:not(.pf-band--photo) { background: var(--gp-band, #EDEDEA) !important; }
html .cl .cl-band, html:not(.light) .cl .cl-band { background: var(--gp-band, #EDEDEA) !important; }

/* the page tone in Settings, Display and accessibility (index.html #toneSeg, views/page-tones.js): one more row of Settings' own
   segmented control, under Appearance; each word with a small dot of its tone, ringed so White shows on a white page */
.tn-field { margin-top: 14px; }
.tn-field__w { margin: 0 0 8px; font-size: 13px; color: var(--cl-ink-3); }
.tn-seg .seg { display: inline-flex; align-items: center; gap: 7px; }
.tn-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
html:not(.light) .tn-dot { box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
@media (max-width: 639.98px) { #toneSeg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } #toneSeg > .seg { justify-content: center; } }

/* the field behind the pages turned off in Settings, Background texture (views/page-tones.js): a plain page; a field not shown does not draw */
html.no-field .cl-field, html.no-field .cl-side-field { display: none !important; }

/* More contrast in every tone (19 November 2026): the tones set the lines and the greys, so the firmer ones of
   html.more-contrast (family.js; Settings, Higher contrast, or the system's setting) are restated here, after them */
html.more-contrast.light:root:root[data-tone-light="white"] { --cl-line: rgba(22,24,27,.22); --cl-line-2: rgba(22,24,27,.34); --cl-line-3: rgba(22,24,27,.52); --cl-ink-4: #3A3E44; --cl-ink-3: #33363B; --cl-ink-2: #1D1F22; --cl-lilac: #4A4E54; }
html.more-contrast.light:root:root[data-tone-light="paper"] { --cl-line: rgba(60,45,25,.24); --cl-line-2: rgba(60,45,25,.36); --cl-line-3: rgba(60,45,25,.54); --cl-ink-4: #463E33; --cl-ink-3: #3E372D; --cl-ink-2: #2A2520; --cl-lilac: #5E5446; }
html.more-contrast:root:root:not(.light)[data-tone-dark="grey"] { --cl-line: rgba(255,255,255,.22); --cl-line-2: rgba(255,255,255,.32); --cl-line-3: rgba(255,255,255,.52); --cl-ink-4: #C4C4C8; --cl-ink-3: #D0D0D4; --cl-ink-2: #EBEBED; --cl-lilac: #C8CACE; }
html.more-contrast:root:root:not(.light)[data-tone-dark="black"] { --cl-line: rgba(255,255,255,.22); --cl-line-2: rgba(255,255,255,.32); --cl-line-3: rgba(255,255,255,.52); --cl-ink-4: #BDBDBD; --cl-ink-3: #CCCCCC; --cl-ink-2: #E6E6E6; --cl-lilac: #C2C2C2; }
/* Always underline links: the brand's own word beside the mark is the way home, not a link in a text */
html.a11y-underline a.top-brand, html.a11y-underline a.top-brand * { text-decoration: none; }
