/* Accessibility: the menu, and what each of its choices does to the page.
   Loaded by every public page, after the page's own styles. */

/* --- what the choices do --- */

html.a11y-text-1 {
  font-size: 112.5%;
}

html.a11y-text-2 {
  font-size: 125%;
}

html.a11y-text-3 {
  font-size: 150%;
}

/* Black on white, with borders that show. The night sky at the top is already light text on dark. */
html.a11y-contrast {
  --page: #ffffff;
  --surface: #ffffff;
  --sunken: #f0f0f0;
  --text: #000000;
  --muted: #1f1f1f;
  --line: #000000;
  --accent: #00574a;
  --accent-strong: #003d33;
  --accent-text: #ffffff;
  --accent-soft: #dff3ee;
  --lantern-soft: #fff1cf;
  --lantern-text: #3d2500;
  --lantern-edge: #000000;
  --coral: #9a2410;
  --danger: #8f0f08;
  --danger-soft: #ffe9e6;
  --info: #0b3d77;
  --ok: #0c4a26;
  --shadow: none;
}

html.a11y-contrast .button {
  background: #ffd27d;
  box-shadow: none;
  outline: 2px solid #000;
}

html.a11y-contrast .chips li,
html.a11y-contrast .hero-copy,
html.a11y-contrast .hero .hero-copy {
  text-shadow: none;
}

html.a11y-contrast .hero::after,
html.a11y-contrast .hero-land-shade {
  content: none;
}

/* The sky stays, dimmed, so the words over it stand clear of the scene. */
html.a11y-contrast .scene {
  opacity: 0.35;
}

html.a11y-still *,
html.a11y-still *::before,
html.a11y-still *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

html.a11y-still .lantern-fly {
  opacity: 0.9;
}

html.a11y-still .sailing {
  transform: translateX(250px);
}

html.a11y-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px;
  font-weight: 800;
}

html.a11y-plain {
  --display: Arial, 'Segoe UI', sans-serif;
  --body: Arial, 'Segoe UI', sans-serif;
}

html.a11y-plain body {
  letter-spacing: 0.01em;
  word-spacing: 0.06em;
}

/* --- the button that opens the menu --- */

.a11y-open {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff6e2;
  background: #0f7b6c;
  border: 2px solid #fff6e2;
  border-radius: 50%;
  cursor: pointer;
}

.a11y-open svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.a11y-open svg circle {
  fill: currentColor;
  stroke: none;
}

.a11y-open:focus-visible,
.a11y-panel :focus-visible {
  outline: 3px solid #f2a93b;
  outline-offset: 3px;
  box-shadow: none;
}

/* --- the menu --- */

.a11y-panel {
  position: fixed;
  z-index: 50;
  top: 72px;
  left: 12px;
  width: min(340px, calc(100vw - 24px));
  max-height: calc(100dvh - 90px);
  overflow: auto;
  padding: 18px;
  display: grid;
  gap: 8px;
  color: #10202a;
  background: #ffffff;
  border: 2px solid #10202a;
  border-radius: 18px;
  box-shadow: 0 18px 50px #0006;
  font: 600 1rem/1.4 Arial, 'Segoe UI', sans-serif;
  text-align: start;
}

.a11y-panel[hidden] {
  display: none;
}

.a11y-panel h2 {
  margin: 0 0 4px;
  font: 700 1.2rem/1.2 Arial, 'Segoe UI', sans-serif;
  color: #10202a;
}

.a11y-panel button {
  min-height: 46px;
  padding: 8px 14px;
  font: inherit;
  color: #10202a;
  background: #f1f3f4;
  border: 2px solid #10202a;
  border-radius: 12px;
  cursor: pointer;
  text-align: start;
}

.a11y-panel button:disabled {
  opacity: 0.45;
  cursor: default;
}

.a11y-switch::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-inline-end: 10px;
  vertical-align: -2px;
  border: 2px solid #10202a;
  border-radius: 4px;
  background: #fff;
}

.a11y-switch[aria-pressed='true'] {
  color: #ffffff;
  background: #00574a;
}

.a11y-switch[aria-pressed='true']::before {
  background: #ffd27d;
  box-shadow: inset 0 0 0 2px #00574a;
}

.a11y-text {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.a11y-text button {
  text-align: center;
  font-weight: 700;
}

.a11y-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 6px;
}

.a11y-foot a {
  color: #003d33;
  font-weight: 700;
}

.a11y-foot .a11y-close {
  margin-inline-start: auto;
}

/* Read by a screen reader, not shown. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
