/* Accessibility widget, in the theme's green, navy and gold. */
.a11y-btn {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--green);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(12, 27, 51, .3);
  transition: background .15s, color .15s;
}

.a11y-btn.is-right {
  left: auto;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 62px);
}

.a11y-btn:hover,
.a11y-btn:focus-visible {
  background: var(--gold);
  color: var(--navy);
}

.a11y-btn:focus-visible,
.a11y-card:focus-visible,
.a11y-close:focus-visible,
.a11y-note summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.a11y-dialog {
  width: min(680px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(12, 27, 51, .45);
  overflow: hidden;
}

.a11y-dialog[open] {
  display: flex;
  flex-direction: column;
}

.a11y-dialog::backdrop {
  background: rgba(12, 27, 51, .65);
}

.a11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.25rem;
  background: var(--green);
  color: var(--white);
}

.a11y-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.a11y-close {
  width: 38px;
  height: 38px;
  border: 2px solid var(--gold-light);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
}

.a11y-close:hover {
  background: var(--gold);
  color: var(--navy);
}

.a11y-body {
  padding: 1rem 1.25rem 1.25rem;
  overflow-y: auto;
}

.a11y-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.a11y-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 14px 6px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.a11y-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--green);
  color: var(--green);
  font-size: 1.4rem;
  transition: background .15s, color .15s;
}

.a11y-card:hover .a11y-circle,
.a11y-card.is-active .a11y-circle {
  background: var(--green);
  color: var(--white);
}

.a11y-card.is-active .a11y-circle {
  border-color: var(--gold);
}

.a11y-label {
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.25;
}

.a11y-sub {
  font-size: .75rem;
  color: var(--muted);
}

.a11y-translate {
  margin-top: .5rem;
  text-align: center;
}

.a11y-note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: .9rem;
}

.a11y-note summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
}

.a11y-note p {
  margin: .75rem 0 0;
  color: var(--muted);
}

@media (max-width: 560px) {
  .a11y-grid { grid-template-columns: repeat(2, 1fr); }
}

html.a11y-open {
  overflow: hidden;
}

/* Preferences */
html.a11y-text-large { font-size: 115%; }
html.a11y-text-larger { font-size: 130%; }

html.a11y-high-contrast {
  --ink: #000;
  --muted: #000;
  --line: #000;
  --green: #254012;
  --gold-light: #ffe08a;
}

html.a11y-high-contrast body { background: #fff; color: #000; }
html.a11y-high-contrast main a:not(.btn) { color: #0000ee; }
html.a11y-high-contrast .a11y-dialog a { color: #0000ee; }

html.a11y-dyslexia-font,
html.a11y-dyslexia-font body,
html.a11y-dyslexia-font button,
html.a11y-dyslexia-font input,
html.a11y-dyslexia-font textarea {
  font-family: Verdana, Tahoma, Geneva, sans-serif !important;
  letter-spacing: .03em;
}

html.a11y-underline-links a { text-decoration: underline !important; }

html.a11y-reduce-motion *,
html.a11y-reduce-motion *::before,
html.a11y-reduce-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}

html.a11y-reduce-saturation main,
html.a11y-reduce-saturation .site-footer { filter: saturate(.5); }

html.a11y-monochrome main,
html.a11y-monochrome .site-footer { filter: grayscale(1); }

html.a11y-big-cursor,
html.a11y-big-cursor * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="black" stroke="white" stroke-width="1" d="M3 2l18 8-7.5 2.5L11 20z"/></svg>') 4 4, auto !important;
}

html.a11y-highlight-titles h1,
html.a11y-highlight-titles h2,
html.a11y-highlight-titles h3,
html.a11y-highlight-titles h4,
html.a11y-highlight-titles h5,
html.a11y-highlight-titles h6 {
  background: #fff3cd !important;
  color: #000 !important;
  outline: 2px solid var(--gold);
  padding: 2px 6px;
}

html.a11y-hide-images img { visibility: hidden; }

html.a11y-text-spacing body {
  letter-spacing: .05em !important;
  word-spacing: .15em !important;
}

html.a11y-line-height body,
html.a11y-line-height p,
html.a11y-line-height li { line-height: 2 !important; }

/* Google Translate, trimmed to a plain link in the theme's colors */
#google_translate_element { display: inline-block; }
.goog-te-gadget { display: inline-block !important; }
.goog-te-gadget .goog-te-gadget-simple a { color: var(--green); font-size: 16px !important; }
.goog-te-gadget-simple { background: transparent !important; border: 0 !important; white-space: nowrap !important; }
.goog-te-gadget-icon,
#goog-gt-tt,
.goog-tooltip.skiptranslate,
.goog-te-banner-frame.skiptranslate,
.VIpgJd-ZVi9od-ORHb-OEVmcd { display: none !important; }
body { top: 0 !important; }
