.legacy-root {
  display: contents;
}

html:not(.theme-ready) *,
html:not(.theme-ready) *::before,
html:not(.theme-ready) *::after {
  transition: none !important;
}

/*
 * The source design uses intentionally quiet metadata. These interactive and
 * navigational labels need the full foreground token to retain WCAG AA contrast
 * across both the night and day palettes.
 */
.legacy-root
  :is(
    .crumb,
    .epistemic,
    .study__hint,
    .toc > h2,
    .sec > h2 .meta,
    .qs a,
    .stations .y,
    .foot a,
    .brand b,
    .colophon p,
    footer,
    footer a,
    #paletteBtn,
    .nav__brand b
  ) {
  color: var(--ink) !important;
  opacity: 1;
}

.translation-notice {
  position: relative;
  z-index: 1001;
  padding: 0.6rem 1rem;
  border-block-end: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  background: #f3f2ed;
  color: #262c31;
  font:
    500 0.76rem/1.4 system-ui,
    sans-serif;
  text-align: center;
}
.translation-notice strong {
  font-weight: 700;
}
.locale-menu {
  inline-size: min(42rem, calc(100vw - 2rem));
  max-block-size: min(48rem, calc(100dvh - 2rem));
  padding: 0;
  border: 1px solid #767069;
  background: #f3f2ed;
  color: #262c31;
  box-shadow: 0 2rem 6rem rgb(0 0 0 / 0.3);
}
.locale-menu::backdrop {
  background: rgb(15 19 25 / 0.72);
  backdrop-filter: blur(4px);
}
.locale-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border-block-end: 1px solid #c8c2b9;
}
.locale-menu__head h2 {
  margin: 0;
  font:
    700 1.2rem/1.2 system-ui,
    sans-serif;
}
.locale-menu__head button {
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border: 1px solid #767069;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}
.locale-menu ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0.8rem;
  list-style: none;
}
.locale-menu li {
  min-inline-size: 0;
}
.locale-menu a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-block-size: 4rem;
  padding: 0.8rem;
  border: 1px solid transparent;
  color: inherit;
  text-decoration: none;
}
.locale-menu a:hover,
.locale-menu a:focus-visible,
.locale-menu a[aria-current='page'] {
  border-color: #767069;
  background: #e8e4dc;
  outline: none;
}
.locale-menu a span {
  font:
    700 1rem/1.2 system-ui,
    sans-serif;
}
.locale-menu a small {
  color: #625d57;
  font:
    500 0.72rem/1.35 system-ui,
    sans-serif;
}
@media (max-width: 34rem) {
  .locale-menu ul {
    grid-template-columns: 1fr;
  }
}
@media (prefers-color-scheme: dark) {
  .translation-notice,
  .locale-menu {
    background: #151a21;
    color: #efe7cf;
  }
  .locale-menu__head,
  .locale-menu a:hover,
  .locale-menu a:focus-visible,
  .locale-menu a[aria-current='page'] {
    border-color: #525b65;
  }
  .locale-menu a:hover,
  .locale-menu a:focus-visible,
  .locale-menu a[aria-current='page'] {
    background: #202730;
  }
  .locale-menu a small {
    color: #b6b0a3;
  }
}
