/* dara. "Reading options": a panel on every page that helps people with dyslexia, low vision or
   motion sensitivity. Each option is a class on <html> (set by assets/a11y.js and the tiny script in
   every page's <head>, so a saved choice applies before the page paints). */

/* ---------- The options ---------- */

/* Easy-read font: Atkinson Hyperlegible, built so letters like b/d and I/l/1 can't be confused */
html.a11y-font :is(.pg, .cp, .dchat, .a11y, .ad) *:not(svg):not(svg *):not(.tr-word):not(.anton):not(.anton *) { font-family: 'Atkinson Hyperlegible', 'Verdana', sans-serif !important; font-style: normal !important; }

/* Logos (the Tropicana wordmark) keep their own typeface: they are pictures of a name, and the
   easy-read font is too wide for them. */

/* Bigger text: the page is zoomed, so the layout reflows instead of overflowing */
html.a11y-size-1 :is(.pg, .cp) { zoom: 1.15; }
html.a11y-size-2 :is(.pg, .cp) { zoom: 1.3; }
/* Long words and the one-line hero highlight may wrap when text is bigger or wider */
html:is(.a11y-size-1, .a11y-size-2, .a11y-spacing, .a11y-font) .hero--split h1 .hl { white-space: normal; }
html:is(.a11y-size-1, .a11y-size-2, .a11y-spacing, .a11y-font) :is(.pg, .cp) :is(h1, h2, h3, p, li) { overflow-wrap: break-word; }

/* More spacing (WCAG text-spacing values): letters, words, lines and paragraphs */
html.a11y-spacing :is(.pg, .cp, .dchat) :is(p, li, dd, dt, span, a, label, summary, td, small, figcaption, .faq-answer) { letter-spacing: 0.12em !important; word-spacing: 0.16em !important; line-height: 1.8 !important; }
html.a11y-spacing :is(.pg, .cp) :is(h1, h2, h3, h4) { letter-spacing: 0.02em !important; word-spacing: 0.12em !important; line-height: 1.3 !important; }
html.a11y-spacing :is(.pg, .cp) p { margin-bottom: 1.6em !important; }

/* Straighten: everything that is tilted on purpose sits straight (the hero cards keep their pile) */
html.a11y-straight :is(.pg, .cp) *:not(.pile):not(.pile > *),
html.a11y-straight :is(.pg, .cp) *::before,
html.a11y-straight :is(.pg, .cp) *::after { rotate: none !important; }
html.a11y-straight :is(.pg, .cp) *:not(.pile):not(.pile > *):not(.pile *):not(.steam *):not(.embers *):not(.marquee-row) { transform: none !important; }
html.a11y-straight .pile > * { --r: 0deg !important; }
html.a11y-straight .ad .sc .frame, html.a11y-straight .ad .gl, html.a11y-straight .ad { rotate: none !important; --fr: 0deg !important; }

/* Stop motion: no animation, no transitions; the dots and films are paused in their scripts too */
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-still .steam, html.a11y-still .embers, html.a11y-still .mist { display: none !important; }
html.a11y-still .ad .rise, html.a11y-still .ad .pop, html.a11y-still .ad .drop span, html.a11y-still .ad .frame.fly, html.a11y-still .ad .spin-in { opacity: 1 !important; transform: none !important; }
html.a11y-still .ad .ring .val { stroke-dashoffset: 68; }
html.a11y-still .ad .line-draw { height: 100%; }

/* Higher contrast: grey text turns dark, pale borders turn solid, colours get stronger */
html.a11y-contrast :is(.pg, .cp) { --muted: #1f1f1d; --line: rgba(31,31,29,0.45); --line-strong: rgba(31,31,29,0.7); filter: contrast(1.18) saturate(1.1); }
html.a11y-contrast :is(.pg, .cp) :is(.lead, .ask-hint, .site-kind, .sites-note, .work-sub p, .form-fine, .faq-answer, .price-period, .service-foot, .step-text p, .doc p, .doc li, .updated) { color: #1f1f1d !important; }
html.a11y-contrast .pg .ask input::placeholder { color: #3f3d38 !important; }
html.a11y-contrast .dchat-panel { filter: contrast(1.18); }

/* Underline links so they can't be missed */
html.a11y-links :is(.pg, .cp) a:not(.btn):not(.c-pill):not(.brand):not(.deck-card):not(.site):not(.fan-card) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 4px !important; }
html.a11y-links :is(.pg, .cp) :is(.btn, .c-pill, .site) { outline: 2px solid currentColor; outline-offset: 2px; }

/* Reading ruler: a soft band follows the pointer or finger so you keep your place in a line */
.a11y-ruler { position: fixed; left: 0; right: 0; top: 0; height: 2.6em; font-size: 18px; z-index: 85; pointer-events: none; display: none; background: rgba(163,240,100,0.18); border-top: 2px solid rgba(35,74,49,0.55); border-bottom: 2px solid rgba(35,74,49,0.55); box-shadow: 0 0 0 100vmax rgba(31,31,29,0.18); }
html.a11y-guide .a11y-ruler { display: block; }

/* ---------- The panel ---------- */
.a11y { --a-bg: #ffffff; --a-ink: #1f1f1d; --a-muted: #5b5952; --a-line: rgba(31,31,29,0.14); --a-lime: #a3f064; --a-forest: #234a31; --a-mint: #e3fbcf; font-family: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--a-ink); }
.a11y-launch { position: fixed; left: 20px; bottom: 20px; z-index: 90; display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--a-ink); cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
.a11y-fab { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--a-forest); color: var(--a-lime); box-shadow: 0 14px 30px -12px rgba(35,74,49,0.7); transition: transform 200ms ease; }
.a11y-fab svg { width: 30px; height: 30px; }
.a11y-launch:hover .a11y-fab { transform: rotate(8deg) scale(1.04); }
.a11y-launch:focus-visible { outline: none; }
.a11y-launch:focus-visible .a11y-fab { outline: 3px solid var(--a-lime); outline-offset: 3px; }
.a11y-tag { padding: 6px 12px; border-radius: 999px; background: #fff; color: var(--a-forest); font-family: 'Cal Sans', 'Figtree', sans-serif; font-size: 15px; line-height: 1.1; white-space: nowrap; box-shadow: 0 10px 20px -12px rgba(31,31,29,0.5); transform: rotate(3deg); }
.a11y.is-open .a11y-tag, .a11y.is-scrolled .a11y-tag { opacity: 0; pointer-events: none; }
.a11y-tag { transition: opacity 200ms ease; }
.a11y.is-on .a11y-fab::after { content: ''; position: absolute; width: 14px; height: 14px; margin: -38px 0 0 38px; border-radius: 50%; background: var(--a-lime); border: 3px solid #fff; }

.a11y-panel { position: fixed; left: 20px; bottom: 90px; z-index: 91; width: 380px; max-height: min(640px, calc(100vh - 120px)); overflow: auto; overscroll-behavior: contain; background: var(--a-bg); border-radius: 26px; box-shadow: 0 40px 90px -30px rgba(31,31,29,0.55), 0 0 0 1px var(--a-line); padding: 20px 20px 16px; }
.a11y-panel[hidden] { display: none; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.a11y-head h2 { margin: 0; font-family: 'Cal Sans', 'Figtree', sans-serif; font-weight: 400; font-size: 24px; line-height: 1.1; }
.a11y-sub { margin: 0 0 14px; font-size: 14px; color: var(--a-muted); }
.a11y-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #f1efe8; color: var(--a-ink); font-size: 20px; cursor: pointer; flex: none; }
.a11y-x:focus-visible, .a11y-opt:focus-visible, .a11y-size button:focus-visible, .a11y-read:focus-visible, .a11y-reset:focus-visible { outline: 3px solid var(--a-forest); outline-offset: 2px; }

.a11y-size { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: #f6f5f0; margin-bottom: 10px; }
.a11y-size > span { font-weight: 700; font-size: 15px; }
.a11y-size div { display: flex; gap: 6px; justify-content: flex-end; }
.a11y-size button { min-width: 48px; height: 44px; border-radius: 12px; border: 1.5px solid var(--a-line); background: #fff; color: var(--a-ink); font-family: 'Cal Sans', sans-serif; cursor: pointer; }
.a11y-size button:nth-child(1) { font-size: 15px; } .a11y-size button:nth-child(2) { font-size: 19px; } .a11y-size button:nth-child(3) { font-size: 23px; }
.a11y-size button[aria-pressed="true"] { background: var(--a-lime); border-color: var(--a-forest); color: var(--a-forest); }

.a11y-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.a11y-opt { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 8px; min-height: 64px; padding: 10px 10px; border-radius: 16px; border: 1.5px solid var(--a-line); background: #fff; color: var(--a-ink); text-align: left; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.25; cursor: pointer; }
.a11y-opt small { display: block; font-weight: 500; font-size: 12px; color: var(--a-muted); }
.a11y-opt i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #f1efe8; color: var(--a-forest); font-style: normal; }
.a11y-opt i svg { width: 20px; height: 20px; }
.a11y-opt[aria-pressed="true"] { background: var(--a-mint); border-color: var(--a-forest); }
.a11y-opt[aria-pressed="true"] i { background: var(--a-forest); color: var(--a-lime); }

.a11y-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.a11y-read { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--a-forest); color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.a11y-read[aria-pressed="true"] { background: #b3261e; }
.a11y-read[hidden] { display: none; }
.a11y-reset { min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--a-muted); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.a11y-note { margin: 10px 0 0; font-size: 12px; color: var(--a-muted); }

/* While a film is open, the launcher stays under it (the film player is z-index 100) */
@media (max-width: 520px) {
  .a11y-launch { left: 16px; bottom: 16px; }
  .a11y-tag { display: none; }
  .a11y-fab { width: 50px; height: 50px; }
  .a11y-fab svg { width: 26px; height: 26px; }
  .a11y-panel { left: 12px; right: 12px; bottom: 78px; width: auto; max-height: calc(100vh - 100px); padding: 16px 14px 12px; }
  .a11y-opt { min-height: 60px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .a11y-fab { transition: none; } .a11y-launch:hover .a11y-fab { transform: none; } }
@media print { .a11y, .a11y-ruler { display: none !important; } }

/* Bigger or wider text on small screens: let labels wrap and drop the small decorative quiz cards */
html:is(.a11y-size-1, .a11y-size-2, .a11y-spacing, .a11y-font) .site-meta { flex-wrap: wrap; }
html:is(.a11y-size-1, .a11y-size-2, .a11y-spacing, .a11y-font) .chip { white-space: normal; }
@container (max-width: 560px) {
  html:is(.a11y-size-1, .a11y-size-2) .c-stagewin .glass { display: none !important; }
}
