/* ============================================================
   TableSet Desk; accessibility options (v0.194)

   The attributes are set on <html> by js/a11y.js. Nothing here may
   reach the sheet (.page and what it contains): it is the list's own
   design and what prints. Loaded last so it wins over the room sheets.
   ============================================================ */

/* ---------- Motion ----------
   The device asking for less motion, or the option, stops every
   animation and transition. Unset follows the device; "device" is the
   same thing written down. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
html[data-motion="reduce"] *,
html[data-motion="reduce"] *::before,
html[data-motion="reduce"] *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}

/* ---------- Contrast ----------
   More: soft and faint text go to near-ink, every line darkens, links
   are underlined. Unset follows prefers-contrast; "standard" holds the
   standard look on a machine that asks for more. */
html[data-contrast="more"] {
  --ink-soft:      #2c2925;
  --ink-faint:     #3a3631;
  --chrome-line:   #6f685e;
  --chrome-line-2: #857d72;
  --chrome-rule:   #5f5950;
  --accent-line:   #7a1f2b;
}
html[data-contrast="more"][data-theme="dark"] {
  --ink-soft:      #f7f5f0;
  --ink-faint:     #e6e0d6;
  --chrome-line:   #8f877d;
  --chrome-line-2: #776f66;
  --chrome-rule:   #a8a095;
  --accent-line:   #e8727c;
}
@media (prefers-contrast: more) {
  html:not([data-contrast]) {
    --ink-soft:      #2c2925;
    --ink-faint:     #3a3631;
    --chrome-line:   #6f685e;
    --chrome-line-2: #857d72;
    --chrome-rule:   #5f5950;
  }
  html:not([data-contrast])[data-theme="dark"] {
    --ink-soft:      #f7f5f0;
    --ink-faint:     #e6e0d6;
    --chrome-line:   #8f877d;
    --chrome-line-2: #776f66;
    --chrome-rule:   #a8a095;
  }
}
html[data-contrast="more"] a:not(.page a) { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Text size ----------
   The rooms grow; the sheet does not (it has its own zoom and prints at
   its true size). Applied to each room's children rather than the room,
   so a full-screen room still fills the screen. */
html[data-text="large"]   { --a11y-zoom: 1.15; }
html[data-text="largest"] { --a11y-zoom: 1.3; }
html[data-text] #library > *,
html[data-text] #house > *,
html[data-text] #master > *,
html[data-text] .st-panel,
html[data-text] .ks-pop,
html[data-text] body.mobile #mFields,
html[data-text] body.mobile .m-sheet { zoom: var(--a11y-zoom); }

/* ---------- Interface type ----------
   Atkinson Hyperlegible, drawn by the Braille Institute for low-vision
   readers. The interface only; the sheet keeps the list's type. */
html[data-type="hyper"] {
  --font-ui:   'Atkinson Hyperlegible', 'EB Garamond', Georgia, serif;
  --font-ui-2: 'Atkinson Hyperlegible', 'Jost', system-ui, sans-serif;
}
