.language-choice {
  position: relative;
  white-space: nowrap;
}
.language-choice summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d4dfd3;
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
  color: #20563f;
  background: #eef3e9;
}
.language-choice summary::-webkit-details-marker {
  display: none;
}
.language-options {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 10px);
  width: 340px;
  max-height: min(560px, 70dvh);
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 12px;
  background: #fffdf8;
  border: 1px solid #d7dfd2;
  border-radius: 18px;
  box-shadow: 0 18px 44px #153d3126;
  z-index: 500;
}
.language-options a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: #20563f;
  text-decoration: none;
}
.language-code {
  flex: 0 0 auto;
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.language-options bdi {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.language-options a:hover {
  background: #edf3e7;
}
.language-choice a[aria-current] {
  background: #246a54;
  color: white;
}
.language-choice :focus-visible {
  outline: 3px solid #bf913f;
  outline-offset: 2px;
}
.header .nav-wrap {
  flex-wrap: wrap;
}
.header nav {
  flex-wrap: wrap;
}
html[dir='rtl'] .ranking-table th,
html[dir='rtl'] .ranking-table td,
html[dir='rtl'] .ranking-table caption {
  text-align: right;
}
html[dir='rtl'] .ranking-table th:last-child,
html[dir='rtl'] .ranking-table td:last-child {
  text-align: left;
}
html[dir='rtl'] .mr-hero h1 {
  letter-spacing: normal;
}
html[dir='rtl'] .skip {
  left: auto;
  right: -10000px;
}
html[dir='rtl'] .skip:focus {
  right: 12px;
}
@media (max-width: 1000px) {
  .language-options {
    position: fixed;
    top: 160px;
    inset-inline: 16px;
    width: auto;
    max-height: calc(100dvh - 190px);
  }
}
.amr-explanation {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid #dfd1b3;
  border-radius: 22px;
  background: #fffaf0;
  line-height: 1.65;
}

@font-face {
  font-family: 'SitePersian';
  src: url('/i18n/fonts/Persian.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html[lang='fa'] body,
html[lang='fa'] :is(h1, h2, h3, p, a, button, input, textarea, label, summary) {
  font-family: 'SitePersian', sans-serif;
  letter-spacing: normal;
}
