:root {
  color-scheme: light;
  --ink: #142044;
  --muted: #5d6785;
  --line: #dbe2f2;
  --paper: #ffffff;
  --soft: #f4f7ff;
  --blue: #29479b;
  --blue-dark: #1d3479;
  --focus: #f5ad35;
  --max: 72rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 86% -8%, rgba(75, 111, 218, .18), transparent 30rem),
    linear-gradient(180deg, #f8faff 0, #fff 30rem);
  font-size: 1rem;
  line-height: 1.65;
}

a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-dark); }
a:focus-visible, button:focus-visible, select:focus-visible { outline: .2rem solid var(--focus); outline-offset: .2rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  border-radius: .6rem;
  background: var(--ink);
  color: #fff;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgba(219, 226, 242, .9);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
}

.header-inner, .footer-inner, main {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.header-inner {
  min-height: 4.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 750;
  text-decoration: none;
}
.brand img { width: 2.25rem; height: 2.25rem; border-radius: .62rem; box-shadow: 0 .3rem .9rem rgba(35, 63, 148, .2); }

nav { display: flex; align-items: center; justify-self: end; gap: 1rem; }
nav a { color: var(--muted); font-size: .95rem; font-weight: 600; text-decoration: none; }
nav a[aria-current="page"] { color: var(--blue); }

.language-picker select {
  min-height: 2.5rem;
  padding: .45rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  font-size: .9rem;
  font-weight: 650;
  cursor: pointer;
  max-width: 10rem;
}

main { padding-block: clamp(3rem, 7vw, 6.5rem); }
.hero { max-width: 55rem; }
.eyebrow { margin: 0 0 .8rem; color: var(--blue); font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.025em; }
h1 { max-width: 16ch; margin: 0; font-size: clamp(2.7rem, 7vw, 5.8rem); }
.legal h1 { max-width: none; font-size: clamp(2.35rem, 6vw, 4.3rem); }
h2 { margin-top: 2.75rem; font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
.lede { max-width: 42rem; margin: 1.5rem 0 0; color: var(--muted); font-size: clamp(1.1rem, 2.5vw, 1.35rem); }

.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .65rem 1rem;
  border-radius: .8rem;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 .65rem 1.5rem rgba(41, 71, 155, .18);
}
.button:hover { background: var(--blue-dark); color: #fff; }
.button.secondary { border: 1px solid var(--line); background: #fff; color: var(--ink); box-shadow: none; }

.feature-grid, .link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: clamp(3rem, 8vw, 6rem);
}
.card {
  min-height: 13rem;
  padding: clamp(1.25rem, 3vw, 1.7rem);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 1rem 3rem rgba(26, 51, 117, .07);
}
.card-number { color: var(--blue); font-weight: 800; }
.card h2, .card h3 { margin: .8rem 0 .55rem; }
.card p { margin: 0; color: var(--muted); }
.card-link { color: inherit; text-decoration: none; }
.card-link:hover .card { border-color: #9aace0; transform: translateY(-2px); }
.card-link .card { transition: transform .16s ease, border-color .16s ease; }

.document { max-width: 52rem; }
.document-meta { margin: 1rem 0 2.5rem; color: var(--muted); }
.document section { padding-top: .25rem; }
.document li + li { margin-top: .55rem; }
.notice { margin: 2rem 0; padding: 1rem 1.15rem; border-left: .3rem solid var(--blue); border-radius: .5rem; background: var(--soft); }
.notice p { margin: 0; }

.faq { max-width: 52rem; margin-top: 3rem; }
.faq details { border-top: 1px solid var(--line); padding: 1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-size: 1.05rem; font-weight: 720; }
.faq details p { color: var(--muted); }

.site-footer { margin-top: 2rem; border-top: 1px solid var(--line); background: #f8faff; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; padding-block: 2rem; color: var(--muted); font-size: .92rem; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }

[data-lang="zh"] { display: none; }
html.lang-zh [data-lang="en"] { display: none; }
html.lang-zh [data-lang="zh"] { display: revert; }

@media (max-width: 48rem) {
  .header-inner { grid-template-columns: auto 1fr; padding-block: .7rem; }
  nav { grid-column: 1 / -1; grid-row: 2; width: 100%; overflow-x: auto; padding-bottom: .2rem; }
  .language-picker { justify-self: end; }
  .feature-grid, .link-grid { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .footer-inner { flex-direction: column; }
}

html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .notice { border-left: 0; border-right: .3rem solid var(--blue); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
