:root {
  color-scheme: light dark;
  --background: #fff;
  --text: #202833;
  --muted: #596573;
  --link: #145ca4;
  --border: #dce1e7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--background); font-size: 1rem; line-height: 1.9; }
main { width: 100%; max-width: 52rem; margin: 0 auto; padding: 3.5rem 2rem; }
.language-switch { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.9rem; }
.language-switch a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.language-switch a[aria-current="page"] { color: var(--text); font-weight: 650; text-decoration: none; }
article { overflow-wrap: anywhere; }
h1 { margin: 0 0 0.75rem; font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.5; }
article > p:first-of-type { margin-top: 0; margin-bottom: 2.25rem; color: var(--muted); font-size: 0.9rem; }
h2 { margin: 2.2rem 0 0.75rem; font-size: 1.2rem; line-height: 1.65; }
h3 { margin: 1.8rem 0 0.6rem; font-size: 1.05rem; }
p { margin: 0.85rem 0; }
ul, ol { padding-left: 1.5em; }
li + li { margin-top: 0.65rem; }
strong { font-weight: 650; }
a { color: var(--link); overflow-wrap: anywhere; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
footer { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: 0.9rem; }
footer p { margin-top: 0; }
footer ul { margin-bottom: 0; }

@media (max-width: 480px) {
  main { padding: 1.75rem 1.25rem 2.5rem; }
  h2 { font-size: 1.1rem; }
}

@media (prefers-color-scheme: dark) {
  :root { --background: #141b24; --text: #e8eef5; --muted: #b5c0cd; --link: #98c9ff; --border: #425061; }
}

@media print {
  :root { color-scheme: light; --background: #fff; --text: #000; --muted: #333; --link: #000; --border: #aaa; }
  @page { margin: 18mm; }
  body { font-size: 10.5pt; line-height: 1.7; }
  main { max-width: none; padding: 0; }
  h1 { font-size: 20pt; }
  h2 { font-size: 13pt; break-after: avoid; }
  h3 { break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  footer { font-size: 9pt; }
}
