:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --background: #faf9fd;
  --surface: #fff;
  --text: #22212a;
  --muted: #62616c;
  --line: #e5e3ec;
  --accent: #5447a7;
  --accent-bg: #eeeafd;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font-size: 1rem; line-height: 1.7; }
a { color: var(--accent); text-underline-offset: .16em; }
a:hover { text-decoration-thickness: .12em; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.skip-link { position: absolute; top: -5rem; left: 1rem; padding: .6rem 1rem; background: var(--surface); z-index: 10; }
.skip-link:focus { top: .5rem; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 74rem; margin: auto; padding: .9rem clamp(1rem, 4vw, 2rem); display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 2rem; }
.brand { color: var(--text); font-size: 1.13rem; font-weight: 740; letter-spacing: -.025em; text-decoration: none; white-space: nowrap; }
.brand span { font-size: .82rem; font-weight: 550; color: var(--muted); letter-spacing: 0; margin-left: .22rem; }
.header-inner nav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.header-inner nav a { color: var(--muted); font-size: .93rem; text-decoration: none; white-space: nowrap; }
.header-inner nav a[aria-current="page"] { color: var(--accent); font-weight: 680; }
.language { display: inline-flex; min-height: 2.3rem; align-items: center; padding: .26rem .8rem; border-radius: 100px; background: var(--accent-bg); text-decoration: none; font-size: .86rem; font-weight: 650; white-space: nowrap; }
.document { max-width: 54rem; margin: clamp(1.5rem, 5vw, 4rem) auto; padding: clamp(1.35rem, 5vw, 3.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: 1.5rem; overflow-wrap: anywhere; }
.document > :first-child { margin-top: 0; }
.document h1 { font-size: clamp(1.6rem, 4vw, 2.35rem); line-height: 1.3; letter-spacing: -.035em; margin-bottom: 1.35rem; }
.document h2 { font-size: clamp(1.18rem, 2.5vw, 1.4rem); line-height: 1.45; letter-spacing: -.018em; margin-top: 2.5rem; }
.document p, .document li { max-width: 76ch; }
.document p { margin: .8rem 0 1.1rem; }
.document ul { padding-left: 1.4rem; }
.document li + li { margin-top: .45rem; }
.document strong { font-weight: 690; }
.document code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--accent-bg); padding: .1rem .25rem; border-radius: .25rem; }
.document table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.5rem 0; font-size: .94rem; }
.document th, .document td { min-width: 9rem; padding: .8rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.document th { color: var(--muted); font-weight: 680; background: var(--background); }
.document th:first-child, .document td:first-child { min-width: 7rem; }
.document blockquote { border-left: 3px solid var(--accent); margin: 2rem 0 0; padding: .15rem 0 .15rem 1rem; color: var(--muted); }
.document blockquote p { margin: .35rem 0; }
.landing h1 span { font-size: .62em; font-weight: 500; color: var(--muted); }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.choices section { border: 1px solid var(--line); border-radius: 1.1rem; padding: 1.25rem; }
.choices h2 { margin: 0 0 .75rem; }
.choices ul { margin: 0; }
.site-footer { max-width: 74rem; margin: 0 auto; padding: 1rem clamp(1rem, 4vw, 2rem) 2.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; color: var(--muted); font-size: .83rem; }
@media (max-width: 640px) {
  .header-inner { gap: .45rem .8rem; }
  .header-inner nav { order: 3; width: 100%; margin-left: 0; padding-top: .3rem; gap: 1.25rem; }
  .language { margin-left: auto; }
  .document { border: 0; border-radius: 0; margin: 0; min-height: 65vh; }
  .choices { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme: dark) {
  :root { --background: #141318; --surface: #201e26; --text: #eeeaf3; --muted: #c0bac9; --line: #3a3642; --accent: #c4b7ff; --accent-bg: #342b50; }
}
@media print {
  :root { --background: #fff; --surface: #fff; --text: #111; --muted: #444; --line: #bbb; --accent: #111; --accent-bg: #eee; }
  .site-header, .site-footer, .skip-link { display: none; }
  .document { max-width: none; margin: 0; padding: 0; border: 0; }
  a { color: inherit; }
}
