:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-panel: #f7f7f8;
  --ink: #161314;
  --border: #e6e6e9;
  --accent: #a3182c;
  --accent-dark: #7a0f1f;
  --accent-on-dark: #ff7a8a;
  --text: #16151a;
  --text-muted: #5f6068;
  --success: #1e8e5a;
  --warn: #b7791f;
  --error: #c2410c;
  --card-1: #1f1b1d;
  --card-2: #26211f;
  --card-3: #2e2829;
  --on-accent: #ffffff;
  --on-dark: #f4f1f2;
  --on-dark-muted: #b3acaf;
  --on-dark-dim: #847d80;
  --on-dark-faint: #5e5759;
  --line-dark: rgba(255, 255, 255, 0.07);
  --line-dark-strong: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --gutter-shade: rgba(0, 0, 0, 0.18);
  --dot: rgba(255, 255, 255, 0.085);
  --mask-solid: #000000;
  --clear: rgba(255, 255, 255, 0);
  --hit-fill: rgba(255, 122, 138, 0.18);
  --hit-fade: rgba(255, 122, 138, 0.04);
  --hit-clear: rgba(255, 122, 138, 0);
  --dot-ring: rgba(255, 122, 138, 0.18);
  --focus-ring: rgba(163, 24, 44, 0.35);
  --veil: rgba(22, 19, 20, 0.42);

  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 800;
  --size-xs: 12px;
  --size-sm: 13px;
  --size-nav: 14px;
  --size-label: 15px;
  --size-body: 16px;
  --size-lead: 20px;
  --size-h1: clamp(34px, 3.3vw, 48px);
  --size-h2: clamp(24px, 2.4vw, 32px);
  --size-h3: 22px;
  --size-section: 28px;
  --size-hero-mobile: 28px;
  --size-code-small: 11.5px;
  --size-fact-code: 12.5px;
  --tracking-title: -0.02em;
  --tracking-brand: -0.015em;
  --leading-body: 1.6;
  --leading-prose: 1.85;
  --leading-title: 1.14;

  --radius-card: 8px;
  --radius-btn: 6px;
  --radius-pill: 999px;
  --radius-panel: 14px;
  --radius-mark: 8px;
  --radius-shot: 10px;
  --radius-line: 2px;

  --gutter: 24px;
  --content-width: 1120px;
  --reading-width: 780px;
  --header-width: 1280px;
  --header-height: 64px;
  --section-space: 140px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-18: 72px;
  --stroke: 1px;
  --focus-width: 2px;
  --touch-size: 44px;
  --icon-size: 18px;
  --row-h: 34px;
  --hit-cycle: 4.8s;
  --ease-quick: 0.18s ease;
  --ease-tab: 0.22s ease;
  --ease-reveal: 0.55s ease;

  --shadow-xs: 0 1px 2px rgba(22, 21, 26, 0.05);
  --shadow-card: 0 1px 2px rgba(22, 21, 26, 0.04), 0 8px 24px rgba(22, 21, 26, 0.06);
  --shadow-btn: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 22px rgba(163, 24, 44, 0.32);
  --shadow-l1: 0 1px 2px rgba(0, 0, 0, 0.18), 0 10px 26px rgba(22, 19, 20, 0.22);
  --shadow-l2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px rgba(0, 0, 0, 0.38);
  --shadow-l3: 0 1px 2px rgba(0, 0, 0, 0.4), 0 26px 56px rgba(0, 0, 0, 0.5), 0 60px 110px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-8);
}
html.nav-open {
  overflow: hidden;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[hidden] {
  display: none !important;
}
img,
svg {
  vertical-align: middle;
}
img {
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a,
summary {
  -webkit-tap-highlight-color: var(--focus-ring);
}
a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}
a:hover {
  color: var(--accent-dark);
}
:focus-visible {
  outline: var(--focus-width) solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-btn);
}
::selection {
  background: var(--accent);
  color: var(--on-accent);
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: 1.25;
  letter-spacing: var(--tracking-title);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 {
  font-size: var(--size-h1);
  line-height: var(--leading-title);
}
h2 {
  font-size: var(--size-h2);
}
h3 {
  font-size: var(--size-h3);
}
p,
ul,
ol,
dl,
figure {
  margin-top: 0;
}
code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
}
code {
  overflow-wrap: anywhere;
}
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: var(--space-6);
  border: var(--stroke) solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  color: var(--text);
  font-size: var(--size-sm);
  line-height: 1.9;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}
pre code {
  overflow-wrap: normal;
  word-break: normal;
  white-space: pre;
}
blockquote {
  margin-inline: 0;
}
.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading {
  width: 100%;
  max-width: calc(var(--reading-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}
.section--panel {
  background: var(--bg-panel);
  color: var(--text);
}
.section + .section:not(.section--panel) {
  padding-top: 0;
}
.prose,
.prose :where(div, section, article),
.grid > *,
.split > *,
.card,
.panel {
  min-width: 0;
}
.prose {
  line-height: var(--leading-prose);
}
.prose h2 {
  margin-top: var(--space-16);
  margin-bottom: var(--space-6);
}
.prose h3 {
  margin-top: var(--space-10);
}
.prose :where(p, ul, ol, pre, blockquote) {
  margin-bottom: var(--space-6);
}
.prose li + li {
  margin-top: var(--space-2);
}
.prose img {
  height: auto;
}
.prose > :first-child {
  margin-top: 0;
}
.keep {
  white-space: nowrap;
}
.muted {
  color: var(--text-muted);
}
.accent {
  color: var(--accent);
}
.lead {
  font-size: var(--size-lead);
  line-height: 1.75;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  z-index: 100;
  left: var(--gutter);
  top: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
  color: var(--on-accent);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-12);
}
.card,
.panel {
  padding: var(--space-7);
  border: var(--stroke) solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.panel {
  box-shadow: var(--shadow-xs);
}
.card > :last-child,
.panel > :last-child {
  margin-bottom: 0;
}
.card__title {
  margin-top: 0;
  margin-bottom: var(--space-3);
}
.card__meta {
  color: var(--text-muted);
  font-size: var(--size-sm);
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: var(--space-3) 22px;
  border: var(--stroke) solid var(--clear);
  border-radius: var(--radius-btn);
  font: var(--weight-semibold) var(--size-label)/1.35 var(--font-body);
  text-decoration: none;
  text-align: center;
  transition: background-color var(--ease-quick), border-color var(--ease-quick), transform var(--ease-quick);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn__icon {
  width: var(--icon-size);
  height: var(--icon-size);
  flex-shrink: 0;
}
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover,
.btn--primary.is-hover {
  background: var(--accent-dark);
  color: var(--on-accent);
}
.btn--primary:active,
.btn--primary.is-active {
  background: var(--accent-dark);
  color: var(--on-accent);
  transform: translateY(1px);
  box-shadow: var(--shadow-xs);
}
.btn--secondary {
  border-color: var(--border);
  background: var(--bg);
  color: var(--text);
}
.btn--secondary:hover {
  background: var(--bg-panel);
  color: var(--text);
}
.btn--ghost {
  border-color: var(--line-dark-strong);
  background: var(--glass);
  color: var(--on-dark);
}
.btn--ghost:hover {
  border-color: var(--on-dark-faint);
  background: var(--glass-hover);
  color: var(--on-dark);
}
.btn--ghost .btn__icon {
  width: var(--size-body);
  height: var(--size-body);
  color: var(--on-dark-muted);
}
.btn.is-focus {
  outline: var(--focus-width) solid var(--accent);
  outline-offset: 3px;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  border-color: var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.sect-head {
  display: flex;
  align-items: center;
  gap: var(--space-7);
  max-width: var(--content-width);
  margin-inline: auto;
}
.sect-head::before,
.sect-head::after {
  content: "";
  flex: 1;
  min-width: var(--space-4);
  height: var(--stroke);
  background: var(--border);
  color: var(--text);
}
.sect-head__title {
  margin: 0;
  font-size: var(--size-section);
  line-height: 1.2;
  text-align: center;
}
.section-sub {
  margin: var(--space-3) auto var(--space-12);
  color: var(--text-muted);
  font-size: var(--size-label);
  text-align: center;
}
.topbar {
  position: relative;
  z-index: 50;
  height: var(--header-height);
  border-bottom: var(--stroke) solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.topbar__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-7);
  width: 100%;
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--size-body);
  letter-spacing: var(--tracking-brand);
}
.brand:hover {
  color: var(--text);
}
.brand__mark {
  display: block;
  width: var(--space-8);
  height: var(--space-8);
  flex-shrink: 0;
  border: var(--stroke) solid var(--border);
  border-radius: var(--radius-mark);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}
.tabs {
  min-width: 0;
  height: 100%;
  margin-left: auto;
}
.tabs__list {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tabs__list > li {
  height: 100%;
}
.tabs__link {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding-inline: 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--size-nav);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  transition: color var(--ease-quick);
}
.tabs__link::after {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  border-radius: var(--radius-line);
  background: var(--accent);
  color: var(--on-accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.3);
  transition: transform var(--ease-tab), opacity var(--ease-tab);
}
.tabs__link:hover {
  color: var(--text);
}
.tabs__link:hover::after {
  opacity: 0.28;
  transform: scaleX(1);
}
.tabs__link[aria-current="page"] {
  color: var(--text);
  font-weight: var(--weight-semibold);
}
.tabs__link[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}
.header-tools {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.language {
  position: relative;
}
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--space-8);
  padding: var(--space-2) var(--space-3);
  border: var(--stroke) solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font: var(--weight-medium) var(--size-sm)/1.2 var(--font-body);
  white-space: nowrap;
  transition: background-color var(--ease-quick);
}
.lang:hover {
  background: var(--bg-panel);
  color: var(--text);
}
.lang__caret {
  color: var(--text-muted);
  font-size: var(--size-xs);
}
.language__list {
  position: absolute;
  z-index: 55;
  top: calc(100% + var(--space-3));
  right: 0;
  width: 180px;
  margin: 0;
  padding: var(--space-2);
  border: var(--stroke) solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
  list-style: none;
}
.language__list a {
  display: flex;
  align-items: center;
  min-height: var(--touch-size);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-btn);
  color: var(--text);
  text-decoration: none;
}
.language__list a:hover,
.language__list a[aria-current="true"] {
  background: var(--bg-panel);
  color: var(--accent);
}
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: var(--touch-size);
  min-height: var(--touch-size);
  padding: var(--space-2);
  border: var(--stroke) solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
}
.menu-toggle svg {
  width: var(--space-6);
  height: var(--space-6);
  flex-shrink: 0;
}
.menu-drawer {
  position: absolute;
  z-index: 54;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--gutter) var(--space-6);
  border-bottom: var(--stroke) solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.menu-drawer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu-drawer a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--stroke) solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.menu-drawer a:hover,
.menu-drawer a[aria-current] {
  background: var(--bg-panel);
  color: var(--accent);
}
.menu-drawer__label {
  margin: var(--space-6) var(--space-4) var(--space-2);
  color: var(--text-muted);
  font-size: var(--size-sm);
}
.menu-veil {
  position: fixed;
  z-index: 40;
  inset: var(--header-height) 0 0;
  width: 100%;
  border: 0;
  background: var(--veil);
  color: var(--on-dark);
}
.site-footer {
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
  border-top: var(--stroke) solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 1.5fr);
  gap: var(--space-12);
}
.footer-grid > * {
  min-width: 0;
}
.footer-brand p {
  max-width: 36em;
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--size-nav);
}
.footer-heading {
  margin: 0 0 var(--space-4);
  font-size: var(--size-label);
  font-weight: var(--weight-semibold);
}
.footer-links,
.footer-searches,
.footer-languages {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links {
  flex-direction: column;
}
.footer-links a,
.footer-searches a,
.footer-languages a,
.footer-bottom a {
  color: var(--text-muted);
  font-size: var(--size-sm);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.footer-links a:hover,
.footer-searches a:hover,
.footer-languages a:hover,
.footer-bottom a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.footer-languages {
  margin-top: var(--space-8);
}
.footer-languages a[aria-current="true"] {
  color: var(--accent);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: var(--stroke) solid var(--border);
  color: var(--text-muted);
  font-size: var(--size-xs);
}
.footer-bottom p {
  margin: 0;
}
.reveal {
  opacity: 1;
  transform: none;
}
html.reveal-ready .reveal {
  transition: opacity var(--ease-reveal), transform var(--ease-reveal);
}
html.reveal-ready .reveal:not(.shown) {
  opacity: 0;
  transform: translateY(16px);
}
@media (max-width: 1279px) {
  .topbar:not(.topbar--preview) .tabs {
    display: none;
  }
  .header-tools {
    margin-left: auto;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .header-tools .lang {
    min-height: var(--touch-size);
  }
}
@media (min-width: 1280px) {
  .menu-drawer,
  .menu-veil {
    display: none !important;
  }
}
@media (max-width: 768px) {
  :root {
    --size-h1: 28px;
    --gutter: 20px;
  }
  .grid,
  .split,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-grid {
    gap: var(--space-8);
  }
  .footer-links {
    flex-direction: row;
  }
}
@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --size-section: 22px;
  }
  .brand__name {
    font-size: var(--size-label);
  }
  .topbar__inner {
    gap: var(--space-2);
  }
  .brand {
    gap: 6px;
    min-width: 0;
    flex-shrink: 1;
  }
  .brand__name {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }
  .header-tools {
    margin-left: auto;
    gap: var(--space-1);
  }
  .card,
  .panel {
    padding: var(--space-5);
  }
  .sect-head {
    gap: var(--space-4);
  }
  .section-sub {
    margin-bottom: var(--space-8);
  }
  .tilt,
  [class*="__tilt"],
  [class*="--tilt"] {
    transform: none;
  }
}
@media (max-width: 360px) {
  .brand__name {
    font-size: var(--size-xs);
  }
  .header-tools .lang {
    padding-inline: var(--space-2);
    font-size: var(--size-xs);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  html.reveal-ready .reveal:not(.shown) {
    opacity: 1;
    transform: none;
  }
  .btn:hover {
    transform: none;
  }
}