:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui,
    -apple-system, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --focus-ring: 0 0 0 4px rgba(70, 103, 255, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
select,
input {
  font: inherit;
}

a {
  color: inherit;
}

button,
select,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  font-size: 17px;
  font-weight: 850;
}

.language-control {
  display: flex;
  align-items: center;
  gap: 9px;
}

.language-control label {
  font-size: 13px;
  font-weight: 650;
}

.language-select {
  min-width: 146px;
  min-height: 42px;
  padding: 0 36px 0 13px;
  border-radius: 12px;
  background-position: right 12px center;
  cursor: pointer;
}

.policy-section {
  scroll-margin-top: 96px;
}

.policy-section h2 {
  margin: 0;
  letter-spacing: -0.025em;
}

.policy-section p,
.policy-section li {
  line-height: 1.82;
}

.policy-section ul {
  margin: 18px 0 0;
  padding-left: 1.25em;
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.toc-list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-list a {
  display: block;
  text-decoration: none;
}

.back-to-top {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top::before {
  content: "↑";
  font-size: 21px;
  line-height: 1;
}

.reading-progress {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  transition: width 80ms linear;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 680px) {
  .language-control label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .language-select {
    min-width: 128px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}
