/* groove · comfort settings (js/a11y.js). Loaded on every page after its own stylesheet. */

/* ---------- High contrast: secondary text close to white, outlines you can see ---------- */
html.a11y-contrast {
  --muted: #DCD7CE; --faint: #CFCAC1; --soft: #EEEAE2;
  --line: #7A756D; --line-2: #9C978F;
  --paper-muted: #33312E; --ink-2: #171614;
  --glow: #F08CB0;
}
html.a11y-contrast :focus-visible { outline-width: 3px !important; outline-color: #FFD24A !important; }
html.a11y-contrast input::placeholder, html.a11y-contrast textarea::placeholder { color: #5E5A53 !important; opacity: 1; }
html.a11y-contrast .dash, html.a11y-contrast hr { opacity: 1 !important; }

/* ---------- Calm motion: the same as the system's reduced motion setting, switched on here ---------- */
html.a11y-calm *, html.a11y-calm *::before, html.a11y-calm *::after {
  animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
  transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important;
}

/* ---------- Easy reading: one plain font, normal case, a little more room ---------- */
html.a11y-readable body, html.a11y-readable body *:not(svg):not(svg *) {
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif !important;
  text-transform: none !important;
  letter-spacing: .015em !important;
  word-spacing: .06em;
}
html.a11y-readable p, html.a11y-readable li, html.a11y-readable small { line-height: 1.6 !important; }
/* big headings keep their own tight spacing, or they push the layout apart */
html.a11y-readable :is(h1, h1 *, h2, h2 *, .wordmark, .wordmark *, .hero__title, .hero__title *) { letter-spacing: -.02em !important; word-spacing: normal; }

/* ---------- Underline links in the text ---------- */
html.a11y-links :is(p, li, small, .note, .hint, .new, .legal, .foot, .spin__foot, .lg__doc, .legaldoc, .devbox, .empty, .crate__cap, .guestbar) a,
html.a11y-links .legal a, html.a11y-links .spin__src {
  text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 1.5px;
}

/* ---------- Larger text: the whole page scales, so nothing ends up cut off ---------- */
html.a11y-text-1 { zoom: 1.12; }
html.a11y-text-2 { zoom: 1.25; }
/* Breakpoints don't know about the zoom, so on the sign in page the three columns give way earlier:
   the record moves under the intro and the form, as it does on smaller screens. */
@media (min-width: 1400px) and (max-width: 1567px) {
  html.a11y-text-1 .page { grid-template-columns: minmax(0, 1fr) var(--receipt-w); }
  html.a11y-text-1 .deck { grid-column: 1 / -1; grid-row: 2; padding: 64px 8% 24px 0; width: 100%; }
  html.a11y-text-1 .stage { grid-column: 2; }
  html.a11y-text-1 .deck__plinth { width: min(440px, 76vw); }
  html.a11y-text-1 .how { grid-row: 3; }
}
@media (min-width: 1400px) and (max-width: 1749px) {
  html.a11y-text-2 .page { grid-template-columns: minmax(0, 1fr) var(--receipt-w); }
  html.a11y-text-2 .deck { grid-column: 1 / -1; grid-row: 2; padding: 64px 8% 24px 0; width: 100%; }
  html.a11y-text-2 .stage { grid-column: 2; }
  html.a11y-text-2 .deck__plinth { width: min(440px, 76vw); }
  html.a11y-text-2 .how { grid-row: 3; }
}
/* On phones the receipt is sized from the screen width, which the zoom would push past the edge. */
@media (max-width: 820px) {
  html.a11y-text-1 { --receipt-w: min(440px, calc(100vw / 1.12 - 32px)); }
  html.a11y-text-2 { --receipt-w: min(440px, calc(100vw / 1.25 - 32px)); }
}

/* ---------- the settings panel ---------- */
.a11yp { display: grid; gap: 10px; margin: 8px 0 24px; }
.a11yp__row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(23, 22, 20, .6); cursor: pointer; color: var(--text); }
.a11yp__row:hover { border-color: var(--line-2, var(--muted)); }
.a11yp__row input {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 40px; height: 24px; margin: 1px 0 0; border-radius: 12px;
  background: var(--line-2, #4A4743); position: relative; cursor: pointer; transition: background-color .15s;
}
.a11yp__row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #F4F1EA; transition: transform .15s; }
.a11yp__row input:checked { background: #A8385F; }
.a11yp__row input:checked::after { transform: translateX(16px); }
.a11yp__row input:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.a11yp__row b { display: block; font-weight: 600; font-size: 15px; }
.a11yp__row small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 19px; }
.a11yp__size { margin: 4px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.a11yp__size legend { padding: 0 6px; margin-left: -6px; font-weight: 600; font-size: 15px; }
.a11yp__seg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.a11yp__seg label { cursor: pointer; }
.a11yp__seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.a11yp__seg span { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-2, #4A4743); font-size: 14px; color: var(--text); }
.a11yp__seg label:nth-child(2) span { font-size: 16px; }
.a11yp__seg label:nth-child(3) span { font-size: 18px; }
.a11yp__seg input:checked + span { background: #F4F1EA; color: #171614; border-color: #F4F1EA; }
.a11yp__seg input:focus-visible + span { outline: 2px solid var(--glow); outline-offset: 2px; }
.a11yp__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 4px; }
.a11yp__reset { border: 1px solid var(--line-2, #4A4743); background: transparent; color: var(--text); border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 14px; cursor: pointer; }
.a11yp__reset:hover { border-color: var(--muted); }
.a11yp__reset:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.a11yp__note { font-size: 13px; color: var(--muted); }

/* ---------- the dialog version ---------- */
.a11yd { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(15, 14, 13, .75); }
.a11yd__box { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border-radius: 16px; background: #1E1D1B; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); color: var(--text); font-family: "Geist", system-ui, sans-serif; }
.a11yd__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.a11yd__head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.3px; }
.a11yd__x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 15px; cursor: pointer; }
.a11yd__x:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.a11yd__lede { margin: 8px 0 16px; color: var(--muted); font-size: 14px; line-height: 21px; }

/* a button that looks like the footer links around it */
.a11y-link { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.a11y-link:hover, .a11y-link:focus-visible { color: var(--text); }

/* the support lists on the accessibility page */
.a11y-list { margin: 10px 0 0; padding-left: 20px; }
.a11y-list li { margin: 8px 0 0; line-height: 1.6; }
.a11y-list b { font-weight: 600; }
