/* Circle of Nine Multilingual: language switcher */

.c9ml-switch {
  position: relative;
  font-family: var(--sans, inherit);
}

.c9ml-flag {
  display: inline-block;
  flex: none;
  width: 21px;
  height: 14px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(9, 10, 11, 0.16);
}

.c9ml-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- header button ---------- */

.c9ml-switch--nav {
  flex: none;
}

.c9ml-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--nav-fg, var(--white, #fff));
  border-radius: 999px;
  background: transparent;
  color: var(--nav-fg, var(--white, #fff));
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s var(--ease, ease), color 0.2s var(--ease, ease);
}

.c9-nav[data-theme="on-image"] .c9ml-switch__btn {
  background: rgba(9, 10, 11, 0.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.c9ml-switch__btn:hover,
.c9ml-switch.is-open .c9ml-switch__btn {
  background: var(--nav-fg, var(--white, #fff));
  color: var(--nav-inv, var(--ink, #090a0b));
}

.c9ml-switch__btn:focus-visible,
.c9ml-switch__opt:focus-visible,
.c9ml-switch__reset:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.c9ml-switch__btn-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.c9ml-switch__btn .c9ml-switch__code {
  font-weight: 700;
}

.c9ml-switch__chev {
  width: 10px;
  height: 6px;
  transition: transform 0.2s var(--ease, ease);
}

.c9ml-switch.is-open .c9ml-switch__chev {
  transform: rotate(180deg);
}

/* ---------- dropdown panel ---------- */

.c9ml-switch__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1000;
  min-width: 232px;
  padding: 8px;
  border: 1px solid var(--line-light, rgba(9, 10, 11, 0.14));
  border-radius: 14px;
  background: var(--white, #fff);
  color: var(--ink, #090a0b);
  box-shadow: 0 18px 48px rgba(9, 10, 11, 0.18);
  text-shadow: none;
}

.c9ml-switch__label {
  margin: 0;
  padding: 6px 12px 8px;
  color: var(--mute-light, #585d64);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.c9ml-switch__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.c9ml-switch__opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: inherit;
  font-size: 15px;
  text-decoration: none;
}

.c9ml-switch__opt:hover {
  background: var(--silver, #f3f4f4);
}

.c9ml-switch__opt[aria-current="true"] {
  font-weight: 700;
}

.c9ml-switch__name {
  flex: 1;
}

.c9ml-switch__opt .c9ml-switch__code {
  color: var(--mute-light, #585d64);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.c9ml-switch__check {
  width: 12px;
  height: 12px;
  visibility: hidden;
}

.c9ml-switch__opt[aria-current="true"] .c9ml-switch__check {
  visibility: visible;
}

.c9ml-switch__reset {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 0 12px;
  border: 0;
  border-top: 1px solid var(--line-light, rgba(9, 10, 11, 0.14));
  border-radius: 0 0 10px 10px;
  background: none;
  color: var(--mute-light, #585d64);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.c9ml-switch__reset:hover {
  color: var(--ink, #090a0b);
}

.c9ml-switch__reset svg {
  flex: none;
  width: 16px;
  height: 16px;
}

/* ---------- mobile menu list ---------- */

.c9ml-switch--menu {
  margin-top: 28px;
  color: var(--white, #fff);
}

.c9ml-switch--menu .c9ml-switch__label {
  padding: 0 0 12px;
  color: var(--mute-dark, #a7acb2);
}

.c9ml-switch--menu .c9ml-switch__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.c9ml-switch--menu .c9ml-switch__opt {
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-dark, rgba(255, 255, 255, 0.16));
  border-radius: 999px;
  font-size: 14px;
}

.c9ml-switch--menu .c9ml-switch__opt:hover {
  background: rgba(255, 255, 255, 0.08);
}

.c9ml-switch--menu .c9ml-switch__opt[aria-current="true"] {
  border-color: var(--white, #fff);
  background: var(--white, #fff);
  color: var(--ink, #090a0b);
}

.c9ml-switch--menu .c9ml-switch__name {
  flex: none;
}

.c9ml-switch--menu .c9ml-switch__code,
.c9ml-switch--menu .c9ml-switch__check {
  display: none;
}

.c9ml-switch--menu .c9ml-switch__reset {
  width: auto;
  margin-top: 12px;
  padding: 0;
  border-top: 0;
  color: var(--body-dark, #c9ccd0);
}

.c9ml-switch--menu .c9ml-switch__reset:hover {
  color: var(--white, #fff);
}

/* ---------- layout in the header ---------- */

@media (max-width: 1023px) {
  .c9ml-switch--nav {
    margin-left: auto;
    margin-right: -24px;
  }

  .c9ml-switch__btn {
    padding: 0 12px;
  }
}

@media (max-width: 560px) {
  .c9ml-switch--nav .c9ml-switch__chev {
    display: none;
  }

  .c9ml-switch__panel {
    right: -8px;
    min-width: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c9ml-switch__btn,
  .c9ml-switch__chev {
    transition: none;
  }
}

/* ---------- language suggestion (shown after the page has rendered; never hides content) ---------- */

.c9ml-suggest {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 9990;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 10px 10px 10px 18px;
  border: 1px solid var(--line-dark, rgba(255, 255, 255, 0.16));
  border-radius: 999px;
  background: rgba(9, 10, 11, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--white, #fff);
  font-family: var(--sans, inherit);
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 14px 40px rgba(9, 10, 11, 0.28);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s var(--ease, ease), transform 0.3s var(--ease, ease);
}

.c9ml-suggest.is-in {
  opacity: 1;
  transform: translate(-50%, 0);
}

.c9ml-suggest__text {
  margin: 0;
  color: var(--body-dark, #c9ccd0);
}

.c9ml-suggest__go,
.c9ml-suggest__stay {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.c9ml-suggest__go {
  background: var(--white, #fff);
  color: var(--ink, #090a0b);
  font-weight: 700;
}

.c9ml-suggest__stay {
  border: 1px solid var(--line-dark, rgba(255, 255, 255, 0.16));
  background: transparent;
  color: var(--white, #fff);
}

.c9ml-suggest__go:hover {
  background: var(--silver, #f3f4f4);
}

.c9ml-suggest__stay:hover {
  border-color: var(--white, #fff);
}

.c9ml-suggest__go:focus-visible,
.c9ml-suggest__stay:focus-visible {
  outline: 2px solid var(--white, #fff);
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .c9ml-suggest {
    left: 12px;
    right: 12px;
    width: auto;
    border-radius: 18px;
    padding: 14px;
    transform: translateY(12px);
  }

  .c9ml-suggest.is-in {
    transform: none;
  }

  .c9ml-suggest__text {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c9ml-suggest {
    transition: none;
  }
}
