:root {
  --ink: #18181b;
  --black: #0b0b0e;
  --paper: #fafafa;
  --slate: #101216;
  --cool-paper: #f2f3f6;
  --profile-paper: #eef0f4;
  --muted-on-dark: #c5cad5;
  --muted: #54545c;
  --accent: #cee8ff;
  --nav-height: 58px;
  --gutter: clamp(20px, 5vw, 80px);
  --font: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--font); }
h1, h2, p, figure { margin: 0; }
h1, h2 { line-height: 1; letter-spacing: -.055em; font-weight: 700; }
:lang(zh-CN) h1, :lang(zh-CN) h2 { letter-spacing: -.045em; }
.kicker { font-weight: 650; font-size: .84rem; letter-spacing: .025em; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; }
[hidden] { display: none !important; }
:is(a, button):focus-visible { outline: 2px solid #568dec; outline-offset: 5px; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 5; padding: 10px 15px; color: var(--ink); background: white; transform: translateY(-180%); }
.skip:focus { transform: translateY(0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.masthead { position: sticky; top: 0; z-index: 4; background: #111115f5; color: #f7f7f8; border-bottom: 1px solid #ffffff1f; backdrop-filter: blur(14px); }
.masthead-inner { width: min(100% - 2 * var(--gutter), 1280px); min-height: calc(var(--nav-height) - 1px); margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.wordmark { font-size: .92rem; font-weight: 700; letter-spacing: -.02em; justify-self: start; white-space: nowrap; }
.masthead nav { display: flex; gap: clamp(18px, 3vw, 42px); }
.masthead nav a { color: #d1d1d6; font-size: .83rem; white-space: nowrap; }
.masthead nav a:hover, .wordmark:hover { color: var(--accent); }
.masthead nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-underline-offset: .25em; }
.language-switch { display: flex; align-items: center; justify-self: end; border: 1px solid #ffffff36; border-radius: 999px; padding: 2px; white-space: nowrap; }
.language-switch button { min-width: 38px; min-height: 26px; padding: 2px 5px; border: 0; background: transparent; color: #d1d1d6; cursor: pointer; border-radius: 999px; font-size: .73rem; }
.language-switch button[aria-pressed="true"] { background: #f4f4f6; color: #131316; }
.language-switch button:hover:not([aria-pressed="true"]) { color: white; }

.pill { width: fit-content; display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 43px; padding: 8px 17px 9px; border: 1px solid transparent; border-radius: 999px; font-size: .88rem; font-weight: 600; }
.pill span[aria-hidden] { font-size: 1.03rem; }
.pill-light { background: #eef4fa; color: #111217; }
.pill-light:hover { background: var(--accent); }
.pill-outline { border-color: #c9c9d0; color: #252528; }
.pill-outline:hover { background: #eeeef2; }
.pill-dark { border-color: #ffffff55; color: white; }
.pill-dark:hover { background: #ffffff24; }

.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: .9rem; }
.text-link:hover { text-decoration: underline; text-underline-offset: .2em; }

.site-footer { display: flex; justify-content: space-between; gap: 15px; padding: 23px var(--gutter); color: #d3d3d9; border-top: 1px solid #ffffff22; background: var(--slate); font-size: .83rem; }
.site-footer a:hover { color: white; }

@media (max-width: 490px) {
  :root { --nav-height: 56px; --gutter: 16px; }
  .masthead-inner { grid-template-columns: auto 1fr auto; gap: 12px; }
  .masthead nav { justify-content: center; gap: 11px; }
  .masthead nav a { font-size: .74rem; }
  .wordmark { font-size: .79rem; }
  .language-switch button { min-width: 31px; font-size: .67rem; }
}
@media (max-width: 360px) {
  .masthead-inner { width: calc(100% - 20px); gap: 8px; }
  .masthead nav { gap: 7px; }
}

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