/*
 * Settings → Accessibility (appearance-choice.js `accessibilityForm` and `applyAccess`; 0261; the Founder, 22 October
 * 2026): saved on the person's look, so every device follows. Each switch is an attribute on <html>, set at the first
 * paint and at every draw:
 *   data-a11y-text="large"        the root font size 120% (16px to 19.2px): every size in rem follows; the phone layout keeps its widths
 *   data-a11y-contrast="high"     ink, greys and borders stronger in light and dark; the person's Action color (--purple) is never redefined here
 *   data-a11y-motion="reduce"     animations and transitions end at once (body.reduced-motion too, which the stylesheets already read)
 *   data-a11y-links="underline"   links in text and lists are underlined
 */

/* Larger text. */
html[data-a11y-text=large]{font-size:19.2px}
html[data-a11y-text=large] body{-webkit-text-size-adjust:100%;text-size-adjust:100%}

/* High contrast: no faint greys. Ink is near black on light and white on dark; the muted grey is at least 7:1 against the
   page and the card; borders are at least 3:1. The Action color stays the person's (each value is already 4.5:1). */
html[data-a11y-contrast=high] body{--ink:#0e0d12;--muted:#3a3845;--line:#77748a;--drawer-ink:#0e0d12;--drawer-muted:#3a3845;--drawer-line:#77748a;--bar-ink:#0e0d12;--bar-line:#00000066;--muse-time-ink:#3a3845;--muse-pill-line:#00000073;color:var(--ink)}
html[data-a11y-contrast=high] body[data-theme=dark]{--ink:#ffffff;--muted:#dcdee6;--line:#8a8ea0;--drawer-ink:#ffffff;--drawer-muted:#dcdee6;--drawer-line:#8a8ea0;--bar-ink:#ffffff;--bar-line:#ffffff66;--muse-time-ink:#dcdee6;--muse-pill-line:#ffffff73}
html[data-a11y-contrast=high] :is(.muted,.meta,small,.field-label,.ss-chevron){color:var(--muted);opacity:1}
html[data-a11y-contrast=high] :is(input,select,textarea):not([type=checkbox],[type=radio]){border-color:var(--line)}
html[data-a11y-contrast=high] ::placeholder{color:var(--muted);opacity:1}
html[data-a11y-contrast=high] :is(.card,.ss-card,.accent-option,dialog){border-color:var(--line)}
html[data-a11y-contrast=high] :focus-visible{outline:3px solid var(--purple);outline-offset:2px}

/* Reduce motion. */
html[data-a11y-motion=reduce] *,html[data-a11y-motion=reduce] *::before,html[data-a11y-motion=reduce] *::after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important;scroll-behavior:auto!important}

/* Underline links: in text, notes and lists; a link drawn as a button, a row, a tab or a menu entry stays as it is. */
html[data-a11y-links=underline] a:not([class]),
html[data-a11y-links=underline] :is(p,li,dd,td,label,small,.meta,.muted,.notice,.form-error) a:not(.btn,.ss-row,.list-row,.nav-item,[role=tab],[role=button]){text-decoration:underline;text-decoration-thickness:max(1px,.08em);text-underline-offset:.18em}

/* The page: four rows, each its word, its one line and its switch, 44px at least. */
.a11y-card>.meta{margin:4px 0 0}
.a11y-form{display:grid;gap:17px;margin-top:12px}
.a11y-rows{display:grid}
.a11y-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;padding:12px 0;border-top:1px solid var(--line);cursor:pointer}
.a11y-row:first-child{border-top:0}
.a11y-words{display:grid;gap:3px;min-width:0}
.a11y-word{font-weight:600}
.a11y-line{margin:0;overflow-wrap:anywhere}
.a11y-switch{appearance:none;-webkit-appearance:none;flex:none;position:relative;width:46px;height:28px;margin:0;border:0;border-radius:999px;background:var(--muted);cursor:pointer;transition:background .15s}
.a11y-switch::before{content:'';position:absolute;top:3px;inset-inline-start:3px;width:22px;height:22px;border-radius:50%;background:var(--surface,#fff);box-shadow:0 1px 2px #00000040;transition:transform .15s}
.a11y-switch:checked{background:var(--purple)}
.a11y-switch:checked::before{transform:translateX(18px)}
[dir=rtl] .a11y-switch:checked::before{transform:translateX(-18px)}
[data-theme=dark] .a11y-switch::before{background:var(--canvas,#14151a)}
.a11y-switch:focus-visible{outline:2px solid var(--purple);outline-offset:2px}
.a11y-save{justify-self:start}
