:root {
  --surface: #ffffff;
  --ink: #0e1116;
  --ink-2: #5b6472;
  --ink-3: #8b94a3;
  --line: #e9ebef;
  --line-soft: #f0f1f4;
  --accent: #2f6bff;
  --ok: #067a52;
  --ok-weak: #e9f9f1;
  --danger: #c0331f;
  --danger-weak: #fdeeec;
  --radius-pill: 999px;
  --sh-pop: 0 18px 44px rgba(15, 18, 27, 0.16);
  --speed: 0.16s ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: rgb(255, 255, 255);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--speed);
}

a:hover {
  color: rgb(29, 78, 216);
}

.lang-switch {
  margin: 0;
  position: relative;
}

.lang-switch__trigger {
  align-items: center;
  background: rgb(246, 246, 244);
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  gap: 6px;
  line-height: 1;
  list-style: none;
  padding: 9px 12px;
  transition: background var(--speed);
}

.lang-switch__trigger::-webkit-details-marker {
  display: none;
}

.lang-switch__trigger::marker {
  content: "";
}

.lang-switch__trigger:hover,
.lang-switch[open] .lang-switch__trigger {
  background: rgb(236, 236, 234);
}

.lang-switch__icon {
  color: var(--ink-2);
  display: block;
  flex: 0 0 auto;
}

.lang-switch__code {
  letter-spacing: 0.02em;
  min-width: 1.5em;
}

.lang-switch__chevron {
  color: var(--ink-3);
  display: block;
  flex: 0 0 auto;
  transition: transform var(--speed);
}

.lang-switch[open] .lang-switch__chevron {
  transform: rotate(180deg);
}

.lang-switch__menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--sh-pop);
  min-width: 132px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
}

.lang-switch__menu form {
  display: grid;
  gap: 2px;
  margin: 0;
}

.lang-switch__option {
  background: none;
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  display: block;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  transition: background var(--speed);
  width: 100%;
}

.lang-switch__option:hover,
.lang-switch__option.is-active {
  background: var(--line-soft);
}

@media (max-width: 520px) {
  .lang-switch__trigger {
    padding-left: 8px;
    padding-right: 8px;
  }
}
