/* ==========================================================================
   ACCESSIBILITY MENU: the look of the Sienna accessibility widget (the small
   button in the bottom left corner and the panel it opens).
   The widget itself is loaded by a <script> line at the end of each page.
   It ships with its own blue and white look. Everything below repaints it
   with this site's colors and fonts from css/tokens.css.
   The widget marks its own styles "important", so these have to be as well.
   To go back to the widget's stock look, remove the a11y.css <link> lines.
   ========================================================================== */

/* ---- COLORS AND FONT the widget reads ------------------------------------- */
html .asw-widget,
html .asw-menu,
html .asw-menu-btn {
  --asw-primary: var(--ember) !important;
  --asw-primary-subtle: color-mix(in srgb, var(--ember) 16%, transparent) !important;
  --asw-primary-faint: color-mix(in srgb, var(--sand) 12%, transparent) !important;
  --asw-menu-text: var(--bone) !important;
  --asw-font-family: var(--font-body) !important;
}

/* ---- THE BUTTON in the corner ----------------------------------------------
   Same dark slanted shape as the "Play the tour" button, mirrored, so the two
   read as a pair: this one bottom left, the tour bottom right. */
html .asw-menu-btn {
  --asw-btn-size: 2.75rem !important;
  --asw-btn-size-mobile: 2.75rem !important;
  --asw-icon-size: 1.6rem !important;
  --asw-icon-size-mobile: 1.6rem !important;
  z-index: 54 !important;                    /* under the tour button and the top progress line */
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: var(--ink-deep) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sand) 35%, transparent) !important;
  clip-path: polygon(0.75rem 0, 100% 0, 100% 100%, 0 100%);
  padding-left: 0.5rem !important;           /* centers the icon in the slanted shape */
  transition: background-color var(--speed-fast) var(--ease-smooth) !important;
}
html .asw-menu-btn:hover { transform: none !important; background: var(--charcoal) !important; }
html .asw-menu-btn:focus-visible { box-shadow: inset 0 0 0 3px var(--bone) !important; }
html .asw-menu-btn .asw-fill-white,
html .asw-menu-btn svg { fill: var(--ember) !important; }

/* ---- THE PANEL ------------------------------------------------------------- */
html .asw-menu {
  z-index: 70 !important;
  width: min(30rem, 100%) !important;
  background: var(--ink) !important;
  backdrop-filter: none !important;
  border-right: 1px solid var(--line-on-dark);
  box-shadow: 0 0 60px rgb(0 0 0 / 0.5) !important;
  font-size: 1rem !important;
  letter-spacing: 0 !important;
}
html .asw-overlay { z-index: 69 !important; background: color-mix(in srgb, var(--ink-deep) 55%, transparent); }

/* Top bar: title, reset and close */
html .asw-menu-header {
  height: 4.25rem !important;
  padding-inline: 1.5rem !important;
  background: var(--ink-deep) !important;
  box-shadow: none !important;
  border-bottom: 3px solid var(--ember);
}
html .asw-menu .asw-menu-title {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  font-size: 1.6rem !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase;
  text-decoration: none !important;
  color: var(--bone) !important;
}
html .asw-menu .asw-menu-reset,
html .asw-menu .asw-menu-close {
  width: 2.5rem; height: 2.5rem;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: inset 0 0 0 1px var(--line-on-dark);
  transition: background-color var(--speed-fast) var(--ease-smooth) !important;
}
html .asw-menu .asw-menu-reset:hover,
html .asw-menu .asw-menu-close:hover { opacity: 1 !important; background: var(--charcoal) !important; }
html .asw-menu .asw-menu-header svg { fill: var(--bone) !important; }

/* Sections: flat, divided by a thin line, instead of floating white cards */
html .asw-menu .asw-menu-content { padding: 1.5rem 0 0.5rem !important; scrollbar-color: var(--sand) transparent; }
html .asw-menu .asw-card {
  margin: 0 1.5rem 1.75rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
}
html .asw-menu .asw-card + .asw-card { padding-top: 1.5rem !important; border-top: 1px solid var(--line-on-dark) !important; }
html .asw-menu .asw-card-title,
html .asw-menu .asw-card-title span {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  font-size: 1.2rem !important;
  letter-spacing: 0.06em !important;
  color: var(--sand) !important;
  opacity: 1 !important;
}
html .asw-menu .asw-info-icon,
html .asw-menu .asw-info-icon svg { color: var(--sand) !important; fill: var(--sand) !important; }

/* Language picker */
html .asw-menu .asw-select {
  min-height: 3rem !important; max-height: 3rem !important; height: 3rem !important;
  border: 1px solid var(--line-on-dark) !important;
  border-radius: 0 !important;
  background: var(--charcoal) !important;
  color: var(--bone) !important;
  font-weight: 500 !important;
}
html .asw-menu .asw-select option { background: var(--charcoal) !important; color: var(--bone) !important; }

/* Profile rows with their on and off switches */
html .asw-menu .asw-profile-btn {
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  background: var(--charcoal) !important;
  box-shadow: none !important;
  transition: border-color var(--speed-fast) var(--ease-smooth) !important;
}
html .asw-menu .asw-profile-btn:hover { border-color: var(--sand) !important; }
html .asw-menu .asw-profile-btn.asw-selected { border-color: var(--ember) !important; }
html .asw-menu .asw-profile-icon {
  border-radius: 0 !important;
  background: var(--ink-deep) !important;
  box-shadow: none !important;
}
html .asw-menu .asw-profile-icon svg,
html .asw-menu .asw-profile-icon svg * { color: var(--ember) !important; }
html .asw-menu .asw-profile-title { color: var(--bone) !important; font-weight: 600 !important; }
html .asw-menu .asw-profile-desc { color: var(--sand) !important; }
html .asw-menu .asw-profile-toggle {
  border-radius: 0 !important;
  background: var(--ink-deep) !important;
  box-shadow: inset 0 0 0 1px var(--line-on-dark);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 100%, 0 100%);
}
html .asw-menu .asw-profile-toggle::after { border-radius: 0 !important; background: var(--sand) !important; box-shadow: none !important; transition: transform var(--speed-fast) var(--ease-smooth) !important; }
html .asw-menu .asw-profile-btn.asw-selected .asw-profile-toggle { background: var(--ember) !important; box-shadow: none; }
html .asw-menu .asw-profile-btn.asw-selected .asw-profile-toggle::after { background: var(--ink-deep) !important; transform: translate(16px) !important; }

/* Text size row */
html .asw-menu .asw-adjust-font { border-radius: 0 !important; background: var(--charcoal) !important; }
html .asw-menu .asw-adjust-font div[role="button"] {
  width: 2.5rem !important; height: 2.5rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--ink-deep) !important;
  box-shadow: inset 0 0 0 1px var(--line-on-dark);
}
html .asw-menu .asw-adjust-font div[role="button"]:hover { box-shadow: inset 0 0 0 2px var(--ember); }
html .asw-menu .asw-adjust-font svg { fill: var(--bone) !important; }
html .asw-menu .asw-amount { font-family: var(--font-display) !important; font-size: 1.5rem !important; font-weight: 800 !important; }

/* The grid of option tiles */
html .asw-menu .asw-items { gap: 0.6rem !important; }
html .asw-menu .asw-btn {
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  background: var(--charcoal) !important;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color var(--speed-fast) var(--ease-smooth), background-color var(--speed-fast) var(--ease-smooth) !important;
}
html .asw-menu .asw-btn:hover { border-color: var(--sand) !important; }
html .asw-menu .asw-btn svg { fill: var(--sand) !important; }
html .asw-menu .asw-btn .asw-translate { font-weight: 500 !important; color: var(--bone) !important; }
html .asw-menu .asw-btn.asw-selected { border-color: var(--ember) !important; background: color-mix(in srgb, var(--ember) 16%, var(--charcoal)) !important; }
html .asw-menu .asw-btn.asw-selected svg { fill: var(--ember) !important; }
html .asw-menu .asw-btn.asw-selected span { color: var(--bone) !important; }
html .asw-menu .asw-btn.asw-selected::after {
  top: -1px !important; right: -1px !important;
  width: 1.4rem !important; height: 1.4rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--ember) !important;
  box-shadow: none !important;
  color: var(--ink-deep) !important;
  font-size: 0.8rem !important;
  font-weight: 700;
}

/* Keyboard focus inside the panel: the same bone ring as the rest of the site */
html .asw-menu :focus-visible { outline: 3px solid var(--bone) !important; outline-offset: 2px !important; }

/* Bottom bar */
html .asw-menu .asw-footer {
  padding: 1rem 1.5rem !important;
  border-top: 1px solid var(--line-on-dark) !important;
  background: var(--ink-deep) !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}
html .asw-menu .asw-footer-link { color: var(--sand) !important; }
html .asw-menu .asw-footer-powered { color: var(--sand) !important; font-weight: 500 !important; }
html .asw-menu .asw-menu-reset-footer-btn {
  border-radius: 0 !important;
  background: var(--ember) !important;
  color: var(--ink) !important;
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  font-size: 1.25rem !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase;
}

/* Phones: full-width panel, a little less side margin */
@media (max-width: 560px) {
  html .asw-menu .asw-card { margin-inline: 1rem !important; }
  html .asw-menu .asw-menu-header { padding-inline: 1rem !important; }
}

/* Blog pages: the button sits bottom right there (no tour button to share
   the corner with), so its slant flips to the other side */
html .blog .asw-menu-btn {
  clip-path: polygon(0 0, calc(100% - 0.75rem) 0, 100% 100%, 0 100%);
  padding-left: 0 !important;
  padding-right: 0.5rem !important;
}
html .blog .asw-menu { border-right: 0; border-left: 1px solid var(--line-on-dark); }
