:root {
  --color-canvas: #FFFFFF;
  --color-panel: #F5F6FA;
  --color-panel-deep: #0F1440;
  --color-line: #E4E6EE;
  --color-line-strong: #CDD1DE;
  --color-brand: #2B3F8F;
  --color-brand-deep: #1A2760;
  --color-ink: #12142B;
  --color-ink-muted: #5E627A;
  --color-positive: #2BA37C;
  --color-caution: #E8A33D;
  --color-coral: #F0705F;
  --color-white: #FFFFFF;
  --color-code: #F1F2F7;
  --color-bar: #ECEEF4;
  --color-dot: #D3D6E0;
  --color-switch-off: #D5D8E3;
  --color-dark-cell: rgba(255, 255, 255, 0.07);
  --color-dark-line: rgba(255, 255, 255, 0.14);
  --color-dark-muted: rgba(255, 255, 255, 0.72);
  --color-brand-soft: rgba(43, 63, 143, 0.08);
  --color-brand-shadow-05: rgba(43, 63, 143, 0.05);
  --color-brand-shadow-09: rgba(43, 63, 143, 0.09);
  --color-brand-shadow-12: rgba(43, 63, 143, 0.12);
  --color-brand-shadow-15: rgba(43, 63, 143, 0.15);
  --color-brand-shadow-20: rgba(43, 63, 143, 0.20);
  --color-brand-shadow-28: rgba(43, 63, 143, 0.28);
  --color-overlay: rgba(15, 20, 64, 0.46);

  --font-display: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;

  --radius-card: 24px;
  --radius-card-large: 28px;
  --radius-inner: 14px;
  --radius-window: 16px;
  --radius-pill: 999px;

  --gradient-line: linear-gradient(135deg, var(--color-brand) 0%, var(--color-coral) 100%);
  --gradient-text: linear-gradient(90deg, var(--color-brand) 0%, var(--color-coral) 100%);

  --shadow-back: 0 12px 24px -8px var(--color-brand-shadow-09), 0 1px 2px var(--color-brand-shadow-05);
  --shadow-mid: 0 20px 40px -12px var(--color-brand-shadow-12), 0 2px 4px var(--color-brand-shadow-05);
  --shadow-front: 0 32px 64px -16px var(--color-brand-shadow-15), 0 3px 8px var(--color-brand-shadow-05);
  --shadow-card: 0 28px 56px -28px var(--color-brand-shadow-15);
  --shadow-card-hover: 0 34px 64px -26px var(--color-brand-shadow-20);
  --shadow-fab: 0 16px 40px -12px var(--color-brand-shadow-28);

  --content-width: 1180px;
  --header-width: 1280px;
  --reading-width: 820px;
  --header-height: 72px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-space: clamp(72px, 10vw, 128px);
  --transition-fast: 180ms ease;
  --transition-main: 280ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

html.nav-open {
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main,
section,
header,
footer {
  position: relative;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

svg[data-decorative-background] {
  width: 100%;
  height: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--color-brand);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-brand-deep);
}

p,
ul,
ol,
dl,
figure,
blockquote {
  margin-top: 0;
}

ul,
ol {
  padding-left: 1.35em;
}

nav ul,
.clean-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(34px, 4vw, 48px);
}

h2 {
  font-size: clamp(28px, 3vw, 38px);
}

h3 {
  font-size: clamp(21px, 2vw, 27px);
}

h4 {
  font-size: 18px;
}

strong {
  font-weight: 600;
}

code,
kbd,
samp {
  font-family: var(--font-mono);
}

:not(pre) > code {
  padding: 0.12em 0.38em;
  border-radius: 6px;
  background: var(--color-code);
  color: var(--color-ink);
  overflow-wrap: anywhere;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-inner);
  background: var(--color-panel-deep);
  color: var(--color-white);
  font-family: var(--font-mono);
  line-height: 1.65;
  -webkit-overflow-scrolling: touch;
}

pre code {
  color: inherit;
  white-space: pre;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--color-panel);
  color: var(--color-ink);
  font-weight: 600;
}

.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.reading-wrap {
  width: 100%;
  max-width: calc(var(--reading-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.header-shell {
  width: 100%;
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
  overflow-x: clip;
}

.section--panel {
  background: var(--color-panel);
  color: var(--color-ink);
}

.section--dark {
  background: var(--color-panel-deep);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

.section--dark p {
  color: var(--color-dark-muted);
}

.kicker {
  margin-bottom: 12px;
  color: var(--color-brand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted {
  color: var(--color-ink-muted);
}

.nowrap-term {
  white-space: nowrap;
}

.gradient-word {
  background: var(--gradient-text);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 46px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: var(--color-brand);
  color: var(--color-white);
}

.button--primary:hover {
  background: var(--color-brand-deep);
  color: var(--color-white);
}

.button--secondary {
  border-color: var(--color-line-strong);
  background: var(--color-canvas);
  color: var(--color-brand);
}

.button--secondary:hover {
  border-color: var(--color-brand);
  color: var(--color-brand-deep);
}

.button--quiet {
  background: var(--color-panel);
  color: var(--color-ink);
}

.button[disabled],
.button.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.surface-card {
  position: relative;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  background: var(--color-canvas);
  color: var(--color-ink);
  box-shadow: var(--shadow-card);
}

.gradient-outline::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--gradient-line);
  pointer-events: none;
  -webkit-mask: linear-gradient(var(--color-ink) 0 0) content-box, linear-gradient(var(--color-ink) 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.icon-dot,
.status-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-coral);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.reveal.shown {
  opacity: 1;
  transform: none;
}

.prose {
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose h2 {
  margin-top: 2.4em;
  scroll-margin-top: 96px;
}

.prose h3 {
  margin-top: 1.8em;
  scroll-margin-top: 96px;
}

.prose img {
  height: auto;
  border-radius: var(--radius-inner);
}

.site-header {
  position: relative;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-canvas);
  color: var(--color-ink);
}

.site-header__row {
  display: flex;
  height: var(--header-height);
  align-items: center;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 17px;
  text-decoration: none;
}

.site-brand:hover {
  color: var(--color-ink);
}

.site-brand img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.desktop-nav {
  margin-left: auto;
}

.desktop-nav ul {
  display: flex;
  align-items: center;
}

.desktop-nav li {
  display: flex;
  align-items: center;
}

.desktop-nav li + li::before {
  content: "·";
  margin-inline: 12px;
  color: var(--color-line-strong);
}

.desktop-nav a {
  padding: 10px 2px;
  color: var(--color-ink-muted);
  font-size: 14px;
  text-decoration: none;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--color-brand);
}

.header-tools {
  position: relative;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

.language-button,
.menu-button {
  min-height: 44px;
  border: 1px solid var(--color-line);
  background: var(--color-canvas);
  color: var(--color-ink-muted);
  cursor: pointer;
}

.language-button {
  display: inline-flex;
  min-width: 112px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-inline: 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.language-button:hover,
.menu-button:hover {
  border-color: var(--color-brand);
  color: var(--color-ink);
}

.language-button__short {
  display: none;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 130;
  width: 188px;
  padding: 8px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-inner);
  background: var(--color-canvas);
  color: var(--color-ink);
  box-shadow: var(--shadow-mid);
}

.language-menu[hidden] {
  display: none;
}

.language-menu a {
  display: flex;
  min-height: 44px;
  width: 100%;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--color-ink-muted);
  text-decoration: none;
}

.language-menu a:hover,
.language-menu a[aria-current="true"] {
  background: var(--color-panel);
  color: var(--color-brand);
}

.menu-button {
  display: none;
  min-width: 44px;
  padding: 0;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}

.menu-button__lines,
.menu-button__lines::before,
.menu-button__lines::after {
  width: 18px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
}

.menu-button__lines {
  position: relative;
}

.menu-button__lines::before,
.menu-button__lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-button__lines::before {
  top: -6px;
}

.menu-button__lines::after {
  top: 6px;
}

.mobile-nav {
  display: none;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav__panel {
  position: absolute;
  top: var(--header-height);
  right: 0;
  left: 0;
  z-index: 120;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px var(--gutter) 22px;
  border-top: 1px solid var(--color-line);
  background: var(--color-canvas);
  color: var(--color-ink);
}

.mobile-nav a {
  display: flex;
  min-height: 48px;
  width: 100%;
  align-items: center;
  padding: 11px 10px;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-ink);
  text-decoration: none;
}

.mobile-nav a[aria-current="page"],
.mobile-nav a:hover {
  color: var(--color-brand);
}

.mobile-nav__languages {
  margin-top: 14px;
}

.mobile-nav__caption {
  padding: 8px 10px 4px;
  color: var(--color-ink-muted);
  font-size: 12px;
}

.nav-veil {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 90;
  background: var(--color-overlay);
}

.nav-veil[hidden] {
  display: none;
}

.site-footer {
  padding-top: 72px;
  padding-bottom: 28px;
  background: var(--color-panel-deep);
  color: var(--color-white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 1.4fr 0.8fr;
  gap: 44px;
}

.footer-brand {
  color: var(--color-white);
}

.footer-brand img {
  width: 34px;
  height: 34px;
}

.footer-brand p {
  margin-top: 16px;
  color: var(--color-dark-muted);
  font-size: 14px;
}

.footer-title {
  margin-bottom: 14px;
  color: var(--color-white);
  font-size: 14px;
  font-weight: 600;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: var(--color-dark-muted);
  font-size: 14px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-hot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-hot a {
  max-width: 100%;
  overflow: hidden;
  padding: 6px 10px;
  border: 1px solid var(--color-dark-line);
  border-radius: var(--radius-pill);
  color: var(--color-dark-muted);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.footer-hot a:hover {
  border-color: var(--color-white);
  color: var(--color-white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 54px;
  padding-top: 22px;
  border-top: 1px solid var(--color-dark-line);
  color: var(--color-dark-muted);
  font-size: 13px;
}

@media (max-width: 1080px) {
  .desktop-nav {
    display: none;
  }

  .header-tools {
    margin-left: auto;
  }

  .menu-button {
    display: inline-flex;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: clamp(24px, 7.5vw, 30px);
    line-height: 1.18;
  }

  h2 {
    font-size: clamp(24px, 6vw, 30px);
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .language-button {
    min-width: 58px;
    padding-inline: 12px;
  }

  .language-button__full {
    display: none;
  }

  .language-button__short {
    display: inline;
  }

  .footer-grid {
    gap: 34px 24px;
  }
}

@media (max-width: 640px) {
  .tilt,
  [class*="tilt-"] {
    transform: none !important;
  }

  .button-row {
    align-items: stretch;
  }

  .button-row .button {
    flex: 1 1 150px;
  }

  th,
  td {
    padding: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .site-brand span {
    font-size: 15px;
  }
}

@media (max-width: 380px) {
  .site-header__row {
    gap: 8px;
  }

  .site-brand {
    gap: 7px;
  }

  .site-brand img {
    width: 26px;
    height: 26px;
  }

  .language-button {
    min-width: 52px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}