/* THIS FILE IS TOKENS ONLY. Structure lives in App_Themes/Shared/site.css,
   the one engine stylesheet every atlas links first (ruling 864, lane
   w-onetheme-0915, 2026-09-15, owner: "DIVINITY is not a special site").
   Divinity used to carry the full structural sheet in this folder, with
   every other atlas linking straight to Divinity's own file by a hardcoded
   path; that hardcoding is what the owner found and called out. Now Divinity
   is one sibling among 33: the structural rules moved to Shared verbatim,
   and this file keeps only the token blocks that were always Divinity's
   own, unchanged in value, in exactly the shape sites\Unified\Assets\
   Surfaces\Atlas\App_Themes\Language\site.css and Science\site.css already
   carry.

   Tokens below are copied verbatim from this file's own prior four token
   blocks (design tokens, prefers-color-scheme: light, data-theme="dark",
   data-theme="light"), scrollthumb tokens included, with every accessibility
   contrast note kept intact since the values and their history are
   unchanged by this move. */

/* ---- design tokens ---- */
:root{
  --ground:#0b0d1a; --panel:#141731; --panel2:#1b1f3d; --edge:#2b2f55; --edge2:#3a3f6b;
  /* --faint WAS #726f98 and FAILED WCAG 1.4.3 on every surface it is used against:
     3.39:1 on --panel2, 3.71 on --panel, 4.09 on --ground, where small text needs 4.5.
     It is a pure text token (3,609 of its 3,663 uses across the .aspx files are
     `color:`, and every one in this file is too), and it is used ONLY for small
     secondary text -- meta labels, table column heads, the Compare row labels, the
     uppercase .68rem captions -- i.e. exactly the text the 4.5 bar is written for.
     #8785a7 is the least lightening that clears it: 4.54 on --panel2, 4.97 on
     --panel, 5.47 on --ground, hue and character preserved. w18-a11y-audit,
     2026-07-31. Reversible: restore #726f98 here and in [data-theme="dark"] below. */
  --ink:#eae7f3; --muted:#a7a5c4; --faint:#8785a7; --gold:#d8b45f; --gold-soft:#e6cd8f;
  /* --gold-bg is the accent used as a SOLID BACKGROUND FILL behind hardcoded dark
     text (#1a1508), on the primary button, active pager states and active tab
     states, roughly 60 rules across this file. --gold itself is fine there in
     THIS theme: #1a1508 on #d8b45f measures 9.19:1, comfortably over the 4.5 bar,
     so --gold-bg is simply --gold's own value here, no change needed.
     The failure is LIGHT theme only, where lightening --gold itself is not an
     option: it is text and border colour on every other surface, and no single
     value clears 4.5:1 as both a fill behind dark text and a text colour on panel
     at once (the same tension --faint and --shared above were rebased for, just
     with the fill and the text roles swapped). This is why a PAIRED token, the
     same shape as --shared/--shared-bg and --dark-c/--dark-bg, was needed rather
     than a hue change: see the light block below for the arithmetic. Missed by
     both July audits (w18-a11y-audit, w19-a11y-shared), which checked --gold as
     TEXT colour, where it is fine on every surface, and never as a fill behind
     text. Reversible: set --gold-bg equal to --gold in every block below and the
     site is back to its prior look. 2026-08-19. */
  /* --dark-c WAS #cf7089 and FAILED WCAG 1.4.3 in the DARK theme too, which is the half
     nobody expected: 4.15:1 on --panel2 once --dark-bg composites in, 4.55 on --panel,
     against a 4.5 bar. It is the "Debunked Myth" and "Rejected Here" badge colour at
     .66rem uppercase, i.e. small text by any reading, plus .msg.err and the danger
     button. Never a background fill anywhere (that is --dark-bg), and never a large
     display size, so LIGHTENING it can only help: it is `color:` or `border-color:` in
     every one of its uses. #d27a92 is the least lightening that clears 4.5 on all six
     surfaces (4.55 panel2+tint, 4.99 panel+tint, 5.30 panel2, 5.57 ground+tint, 5.80
     panel, 6.39 ground), hue and saturation held exactly, only HSL lightness moved.
     w19-a11y-shared, 2026-07-31. Reversible: restore #cf7089 here and in
     [data-theme="dark"] below. --shared needs no change in this theme; it measures
     5.76:1 worst case here and only fails in light. */
  --shared:#79bcb0; --shared-bg:rgba(111,178,168,.14); --dark-c:#d27a92; --dark-bg:rgba(181,84,106,.16);
  --gold-bg:#d8b45f;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
  --sans:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --shadow:0 12px 34px -14px rgba(0,0,0,.6);
  /* The reading measure. In rem, not ch, because ch is relative to each element's own
     font-size -- .lead at 1.04rem and a header row at 1rem would have resolved the same
     ch count to different widths, and the action row would not have lined up with the
     text it sits above. ~78 characters at the body size. */
  --measure:40.5rem;
  /* THE PAGE ACTION ROW'S CONTROL SIZE, IN ONE PLACE.
     Every control in the shared bar is this size: the star, the follow bell, the
     Save To Collection picker, the read control, copy, share, and the phone
     kebab. They are declared here rather than in each block because the row had
     already forked once: .readbtn/.followbtn/.actsmore were a fixed 40px box
     while the injected .dspeak was 2.5em, so the reader's own A-/A+ control
     moved one control in the row and left the other five behind. Measured
     2026-08-02 on a findings page: 37.5px beside 40px at the default, and
     56.25px beside 40px at the reader's 150%.

     em, NOT px, because the project's accessibility rule is that a component
     scales with the reader's text size and a fixed px box opts it out. Every
     control that uses these carries font:inherit, so the em resolves against
     the row's own text size and all of them move together.

     2.6667em against the html{font-size:93.75%} base is 40.0px, and 2.9333em is
     44.0px, so NOTHING MOVES AT THE DEFAULT: this is a scaling fix, not a
     resize, which is what layout parity requires of a ported layout. The comment
     that used to sit in pageacts.css said 2.5em "lands on the same 40px .readbtn
     draws at the default" -- it does not, because the base is 15px and not 16px,
     and that arithmetic slip is what left the read control visibly small in its
     own row from the day the bar shipped. */
  --actbtn:2.6667em; --actbtn-touch:2.9333em; --actico:1.2em; --actgap:.5333em;
}
@media (prefers-color-scheme: light){:root{
  --ground:#f4efe3; --panel:#eee7d6; --panel2:#f8f4ea; --edge:#ddd2ba; --edge2:#cabfa3;
  /* --faint WAS #938b78, the worst contrast failure measured anywhere on the site:
     2.75:1 on --panel and 2.95 on --ground, below even the 3.0 large-text floor, on
     text that is never large. #6d6759 is the least darkening that clears 4.5 on all
     three surfaces (4.56 panel, 4.90 ground, 5.12 panel2) and keeps the warm grey.
     See the dark-theme note above. w18-a11y-audit, 2026-07-31. */
  --ink:#282540; --muted:#655f74; --faint:#6d6759; --gold:#9a7420; --gold-soft:#b6912f;
  /* --gold-bg is the fix. #1a1508 on --gold (#9a7420) measures 4.24:1 here, under
     the 4.5 bar, on the primary button, active pager states and active tab states
     (roughly 60 rules). Hue (41.3 degrees) and saturation (65.6%) held exactly,
     same method as --faint and --shared above, only HSL lightness moved: 36.5% to
     37.8%. #a07921 is the least lightening that clears it, 4.55:1. Only the ~60
     fill rules repoint from var(--gold) to var(--gold-bg); every `color:` and
     `border-color:` use of --gold is untouched, so links, focus rings, borders and
     headings keep their exact prior colour, and --gold-soft (already 6.13:1 on
     #1a1508 here) needs no change either, so hover states were left alone.
     w18-a11y-audit and w19-a11y-shared missed this because they read --gold as a
     TEXT colour, where it passes on every surface; the failure only shows up when
     it sits behind text as a fill, which neither audit checked. Reversible:
     restore --gold-bg:#9a7420 here and in [data-theme="light"] below. 2026-08-19. */
  /* --shared WAS #3c8578 and FAILED WCAG 1.4.3 on EVERY surface in this theme: 3.54:1
     on --panel, 3.10 once --shared-bg composites in, 3.80/3.32 on --ground, 3.97/3.45
     on --panel2, and 3.31 under the tint the Admin success message hard-codes. The
     large-text exemption does not apply to any of it: the .xtb-att "Well-attested"
     badge is .66rem uppercase, and .src-tier.tier1, .pill.on, .msg.ok, .cha-badge
     .ch-accepted and the Compare shared cell are all small text too. Like --faint
     above it is a pure text-and-border token: across this file and the .aspx pages it
     is only ever `color:` (62) or `border-color:` (27), plus one decorative meter
     gradient, and NEVER a background fill behind text, so darkening it strictly
     improves every one of its uses. #2f685e is the least darkening that clears 4.5 on
     all nine surfaces (4.58 panel+tint, 4.89, 4.90, 5.10, 5.22, 5.22, 5.43, 5.61,
     5.86), hue and saturation held exactly, only HSL lightness moved. --shared-bg is
     deliberately left on the old triple: it is a tint, not text, and re-basing it
     would darken the very surface the ratio is measured against. --dark-c fails here
     as well, at 4.33:1 on --panel with --dark-bg composited in, and #9c3f57 is its
     least darkening to 4.56; see the dark-theme note above for why lightening and
     darkening are both safe for it. w19-a11y-shared, 2026-07-31. Reversible: restore
     #3c8578 and #a2415a here and in [data-theme="light"] below. */
  --shared:#2f685e; --shared-bg:rgba(60,133,120,.12); --dark-c:#9c3f57; --dark-bg:rgba(162,65,90,.10);
  --gold-bg:#a07921;
  --shadow:0 14px 30px -18px rgba(60,48,20,.45);}}
:root[data-theme="dark"]{--ground:#0b0d1a;--panel:#141731;--panel2:#1b1f3d;--edge:#2b2f55;--edge2:#3a3f6b;--ink:#eae7f3;--muted:#a7a5c4;--faint:#8785a7;--gold:#d8b45f;--gold-soft:#e6cd8f;--gold-bg:#d8b45f;--shared:#79bcb0;--shared-bg:rgba(111,178,168,.14);--dark-c:#d27a92;--dark-bg:rgba(181,84,106,.16);--shadow:0 12px 34px -14px rgba(0,0,0,.6);}
:root[data-theme="light"]{--ground:#f4efe3;--panel:#eee7d6;--panel2:#f8f4ea;--edge:#ddd2ba;--edge2:#cabfa3;--ink:#282540;--muted:#655f74;--faint:#6d6759;--gold:#9a7420;--gold-soft:#b6912f;--gold-bg:#a07921;--shared:#2f685e;--shared-bg:rgba(60,133,120,.12);--dark-c:#9c3f57;--dark-bg:rgba(162,65,90,.10);--shadow:0 14px 30px -18px rgba(60,48,20,.45);}

/* ---- scrollbars, every one of them (owner, 2026-07-28) -------------------
   "Message scrollbar make navy color when in dark mode and gold in light mode.
   Make all scroll bars carry this style." So this is deliberately global rather
   than scoped to the message list: the page, the message pane, any overflow-x
   block on a table, the lot.

   Declared as its own pair of variables instead of reusing --edge2 and --gold
   directly, because a scrollbar thumb has a different job from a border. It sits
   on whatever surface it happens to overlay and still has to be findable, so the
   dark value is lifted well clear of the panel navies (#2b2f55, #3a3f6b) rather
   than blending into them. The light value IS --gold, which already carries
   enough weight against the parchment ground.

   The data-theme rules repeat the media query's values on purpose and sit after
   it, which is this file's standing pattern: the A11y theme toggle stamps
   data-theme on the root and must beat the OS preference in BOTH directions.

   12px, not the 6px that looks tidy in a screenshot. The owner uses this site
   with increased text size and a screen reader, and a hairline thumb is a
   pointer target nobody can hit. The 2px transparent border with background-clip
   keeps the visible thumb around 8px while leaving the grab area the full 12. */
:root{--scrollthumb:#3f4a8f;--scrollthumb-hi:#5b68b8}
@media (prefers-color-scheme: light){:root{--scrollthumb:var(--gold);--scrollthumb-hi:var(--gold-soft)}}
:root[data-theme="dark"]{--scrollthumb:#3f4a8f;--scrollthumb-hi:#5b68b8}
:root[data-theme="light"]{--scrollthumb:var(--gold);--scrollthumb-hi:var(--gold-soft)}
