:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6faff;
  --ink: #111318;
  --muted: #566274;
  --soft: #7d8898;
  --line: rgba(21, 101, 216, 0.14);
  --line-strong: rgba(21, 101, 216, 0.26);
  --accent: #1565d8;
  --accent-strong: #0f55bb;
  --accent-deep: #0b3f92;
  --accent-soft: rgba(22, 119, 255, 0.08);
  --accent-wash: #eef6ff;
  --shadow-soft: 0 10px 30px rgba(17, 61, 130, 0.08);
  --radius: 18px;
  --radius-inner: 12px;
  --motion: cubic-bezier(0.32, 0.72, 0, 1);
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF UI Text", "PingFang SC", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-family: var(--font-text);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1040px, calc(100% - 40px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 0 max(44px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 2px 0 clamp(30px, 5vw, 58px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
  text-decoration: none;
}

.brand__icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(21, 101, 216, 0.16);
}

.brand__copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.brand__name {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0;
}

.brand__section {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}

.language-field {
  position: relative;
  display: inline-grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  z-index: 20;
}

.language-field__label {
  line-height: 1.2;
}

.language-trigger {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 168px;
  max-width: 46vw;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 0 13px 0 14px;
  box-shadow: 0 1px 0 rgba(21, 101, 216, 0.04);
  text-align: left;
  transition:
    background 260ms var(--motion),
    border-color 260ms var(--motion),
    box-shadow 260ms var(--motion),
    transform 260ms var(--motion);
}

.language-trigger:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.language-trigger:focus-visible {
  outline: none;
  border-color: rgba(22, 119, 255, 0.52);
  box-shadow:
    0 0 0 4px rgba(22, 119, 255, 0.1),
    0 1px 0 rgba(21, 101, 216, 0.04);
}

.language-trigger:active {
  transform: scale(0.99);
}

.language-trigger__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-trigger__chevron {
  position: relative;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 1.5px solid var(--soft);
  border-bottom: 1.5px solid var(--soft);
  transform: translateY(-2px) rotate(45deg);
  transition:
    border-color 260ms var(--motion),
    transform 260ms var(--motion);
}

.language-field.is-open .language-trigger {
  border-color: rgba(22, 119, 255, 0.44);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(22, 119, 255, 0.08),
    var(--shadow-soft);
}

.language-field.is-open .language-trigger__chevron {
  border-color: var(--accent);
  transform: translateY(2px) rotate(225deg);
}

.language-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(292px, calc(100vw - 28px));
  max-height: min(390px, 62vh);
  overflow: auto;
  border: 1px solid rgba(21, 101, 216, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 24px 64px rgba(17, 61, 130, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
  padding: 7px;
  opacity: 0;
  transform: translate3d(0, -6px, 0) scale(0.98);
  transform-origin: 90% 0;
  transition:
    opacity 180ms var(--motion),
    transform 180ms var(--motion);
}

.language-field.is-open .language-popover {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.language-popover[hidden] {
  display: none;
}

.language-option {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  padding: 10px 38px 10px 12px;
  transition:
    background 180ms var(--motion),
    color 180ms var(--motion),
    transform 180ms var(--motion);
}

.language-option::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transform: translateY(-50%) scale(0.6);
  transition:
    opacity 180ms var(--motion),
    transform 180ms var(--motion);
}

.language-option:hover,
.language-option:focus-visible {
  outline: none;
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.language-option:active {
  transform: scale(0.985);
}

.language-option.is-selected {
  background: var(--accent-wash);
  color: var(--accent-strong);
  font-weight: 600;
}

.language-option.is-selected::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.layout {
  display: block;
}

.document-shell {
  width: min(920px, 100%);
  margin: 0 auto;
}

.document-card {
  width: 100%;
  min-height: 62vh;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(28px, 5.2vw, 64px) 0 0;
}

.document-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.document-badge,
.document-date {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 8px 10px;
}

.document-badge {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(22, 119, 255, 0.22);
}

.document-date {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(32px, 5.4vw, 56px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0;
  text-wrap: balance;
}

.document-summary {
  max-width: 65ch;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.72;
  text-wrap: pretty;
}

.section-list {
  display: grid;
  gap: 0;
  margin-top: clamp(34px, 5.2vw, 64px);
  border-top: 1px solid var(--line);
}

.legal-section {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 42px);
  padding: clamp(30px, 5vw, 46px) 0;
  border-bottom: 1px solid var(--line);
}

.section-number {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.section-copy {
  display: block;
  min-width: 0;
}

.section-copy h2 {
  max-width: 38ch;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: 0;
  text-wrap: balance;
}

.section-copy p {
  max-width: 66ch;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.76;
  text-wrap: pretty;
}

:lang(zh) .section-copy p,
:lang(zh-Hans) .section-copy p,
:lang(zh-Hant) .section-copy p,
:lang(ja) .section-copy p,
:lang(ko) .section-copy p,
:lang(zh) .document-summary,
:lang(zh-Hans) .document-summary,
:lang(zh-Hant) .document-summary,
:lang(ja) .document-summary,
:lang(ko) .document-summary {
  max-width: 54ch;
}

.document-footer {
  display: grid;
  gap: 16px;
  margin-top: clamp(30px, 5vw, 50px);
  padding-bottom: 12px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.72;
}

.document-footer p {
  max-width: 68ch;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-bottom: 1px solid rgba(21, 101, 216, 0.22);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  padding: 2px 0;
  transition:
    color 260ms var(--motion),
    border-color 260ms var(--motion),
    transform 260ms var(--motion);
}

.footer-links a:hover {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
  transform: translate3d(0, -1px, 0);
}

.footer-links a:active {
  transform: translate3d(0, 0, 0) scale(0.985);
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 520ms var(--motion),
    transform 520ms var(--motion);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 28px, 700px);
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .topbar {
    align-items: flex-start;
    padding-bottom: 20px;
  }

  .language-trigger {
    min-width: 150px;
  }

  .layout {
    display: block;
  }

  .document-shell {
    width: 100%;
  }

  .document-card {
    padding-top: 26px;
  }

  .legal-section {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .language-field {
    width: 100%;
  }

  .language-trigger {
    width: 100%;
    max-width: none;
  }

  .language-popover {
    left: 0;
    right: auto;
    width: 100%;
    max-height: min(420px, 58vh);
    transform-origin: 50% 0;
  }

  h1 {
    font-size: 34px;
  }

  .document-summary {
    font-size: 16.5px;
    line-height: 1.7;
  }

  .section-copy p {
    font-size: 16px;
    line-height: 1.76;
  }
}
