:root {
  color-scheme: dark;
  --color-bg: #111111;
  --color-bg-top: #171717;
  --color-panel: #181818;
  --color-panel-raised: #202020;
  --color-side: #161616;
  --color-graph: #141414;
  --color-phone: #1c1c1c;
  --color-border: #2a2a2a;
  --color-accent: #9bd84a;
  --color-accent-dark: #6fa92e;
  --color-text: #f2f2f2;
  --color-muted: #9a9a9a;
  --color-dim: #5e5e5e;
  --color-success: #62c46a;
  --color-warning: #e0b341;
  --color-error: #e5534b;
  --color-node: #d6d6d6;
  --color-flag-red: #d6303c;
  --color-flag-blue: #2f4a8a;
  --color-flag-white: #f4f4f4;
  --color-black: #000000;
  --color-focus-shadow: rgba(155, 216, 74, 0.24);
  --color-accent-glow: rgba(155, 216, 74, 0.35);
  --color-accent-soft: rgba(155, 216, 74, 0.14);
  --color-neutral-halo: rgba(255, 255, 255, 0.06);
  --color-highlight: rgba(255, 255, 255, 0.06);
  --color-shadow-near: rgba(0, 0, 0, 0.65);
  --color-shadow-far: rgba(0, 0, 0, 0.7);
  --color-shadow-phone: rgba(0, 0, 0, 0.75);
  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-phone: 28px;
  --radius-pill: 999px;
  --container: 1240px;
  --reading-width: 760px;
  --nav-height: 64px;
  --gutter: 32px;
  --section-space: 104px;
  --focus-ring: 2px solid var(--color-accent);
  --shadow-near: 0 8px 14px -8px var(--color-shadow-near);
  --shadow-far: 0 48px 72px -28px var(--color-shadow-far);
  --shadow-phone: 0 4px 10px -4px var(--color-shadow-near), 0 36px 64px -20px var(--color-shadow-phone);
  --shadow-pill: 0 10px 24px -12px var(--color-shadow-far);
  --toc-offset: 132px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

html.nav-open {
  overflow: hidden;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main,
section,
article,
aside,
header,
footer,
nav,
div {
  min-width: 0;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure,
blockquote,
pre {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--color-text);
  font-family: var(--font-display);
  text-wrap: balance;
}

h1 {
  font-size: clamp(52px, 5.4vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(21px, 2.3vw, 28px);
  line-height: 1.25;
}

p {
  color: var(--color-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

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

svg {
  display: block;
  flex-shrink: 0;
}

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

button {
  border: 0;
}

ul,
ol {
  padding-left: 0;
}

li {
  min-width: 0;
}

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

:not(pre) > code {
  overflow-wrap: anywhere;
  color: var(--color-accent);
}

pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-graph);
  color: var(--color-text);
  -webkit-overflow-scrolling: touch;
}

pre code {
  white-space: pre;
  overflow-wrap: normal;
}

table {
  border-collapse: collapse;
}

summary,
button,
[role="tab"],
.site-nav a,
.mobile-nav a,
.language-menu a,
.btn,
.icon-link {
  min-height: 24px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[role="tab"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  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);
}

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

.section-rule {
  border-top: 1px solid var(--color-border);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 44px;
}

.section-heading h2 {
  margin-bottom: 14px;
  font-weight: 800;
}

.section-heading p {
  margin-bottom: 0;
  font-size: 18px;
}

.mono {
  font-family: var(--font-mono);
}

.accent {
  color: var(--color-accent);
}

.no-break {
  white-space: nowrap;
}

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

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.status-dot,
.eyebrow-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent-glow);
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: 0 0 26px var(--color-accent-glow);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
}

.btn-secondary {
  border-color: var(--color-border);
  background: var(--color-panel-raised);
  color: var(--color-text);
}

.btn-secondary:hover {
  border-color: var(--color-dim);
  background: var(--color-panel);
}

.btn-ghost {
  border-color: var(--color-border);
  background: transparent;
  color: var(--color-text);
}

.btn-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.text-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  color: var(--color-accent);
  font-weight: 650;
}

.text-link:hover {
  color: var(--color-text);
}

.text-link svg {
  width: 14px;
  height: 14px;
}

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

.panel,
.card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-panel);
}

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

.reveal {
  transition: opacity 560ms ease, transform 560ms ease;
}

.reveal.pending {
  opacity: 0;
  transform: translateY(16px);
}

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

#server-status {
  position: static;
  display: block;
  max-width: 100%;
  margin-bottom: 32px;
  overflow: hidden;
}

.site-header {
  position: relative;
  z-index: 50;
  min-height: var(--nav-height);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-top);
}

.header-inner {
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

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

.brand-word {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.brand-local {
  color: var(--color-muted);
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

.site-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-text);
}

.site-nav a.is-active {
  font-weight: 650;
}

.header-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.language-control {
  position: relative;
}

.language-toggle,
.menu-toggle {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
}

.language-toggle {
  padding-inline: 10px;
  font-size: 13px;
}

.language-toggle:hover,
.menu-toggle:hover {
  background: var(--color-panel-raised);
  color: var(--color-text);
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  display: none;
  width: 168px;
  padding: 7px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel-raised);
  box-shadow: var(--shadow-pill);
}

.language-control.is-open .language-menu {
  display: block;
}

.language-menu a {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  padding-inline: 11px;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  font-size: 13px;
}

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

.header-login {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel-raised);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 650;
}

.header-login:hover {
  border-color: var(--color-dim);
}

.menu-toggle {
  display: none;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  width: 19px;
  height: 1px;
  background: var(--color-text);
}

.menu-toggle-lines {
  position: relative;
}

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

.menu-toggle-lines::before {
  top: -6px;
}

.menu-toggle-lines::after {
  top: 6px;
}

.mobile-nav {
  position: absolute;
  top: var(--nav-height);
  right: 0;
  left: 0;
  z-index: 65;
  display: none;
  max-height: calc(100dvh - var(--nav-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px var(--gutter) 22px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-panel);
}

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

.mobile-nav a {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
}

.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--color-text);
}

.mobile-language-links {
  margin-top: 10px;
}

.mobile-language-links a {
  min-height: 44px;
}

.nav-veil {
  position: fixed;
  inset: var(--nav-height) 0 0;
  z-index: 40;
  display: none;
  border: 0;
  background: var(--color-shadow-far);
}

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

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-top);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1.4fr;
  gap: 56px;
  padding-top: 64px;
  padding-bottom: 48px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

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

.footer-intro {
  max-width: 34em;
  margin-bottom: 18px;
  color: var(--color-muted);
  font-size: 14px;
}

.footer-trust {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 12px;
}

.footer-title {
  margin-bottom: 14px;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 20px;
}

.footer-links a,
.footer-language a,
.hot-searches a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: var(--color-muted);
  font-size: 13px;
}

.footer-links a:hover,
.footer-language a:hover,
.hot-searches a:hover {
  color: var(--color-accent);
}

.hot-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.footer-language {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 22px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 28px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 12px;
}

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

.footer-legal a:hover {
  color: var(--color-text);
}

@media (max-width: 1180px) {
  .site-nav {
    gap: 17px;
  }

  .site-nav a {
    font-size: 13px;
  }
}

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

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

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

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

  .footer-main {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --section-space: 76px;
  }

  h1 {
    font-size: clamp(32px, 9vw, 40px);
  }

  h2 {
    font-size: clamp(29px, 7.5vw, 38px);
  }

  .header-login {
    padding-inline: 13px;
  }

  .language-toggle .language-name {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
    --section-space: 64px;
  }

  .no-break {
    white-space: normal;
  }

  .wrap,
  .reading-wrap {
    padding-inline: var(--gutter);
  }

  .tilt,
  [data-tilt] {
    transform: none;
  }

  .decorative-layer,
  .hero-halo,
  .stripe-halo {
    max-width: 100%;
    transform: none;
  }

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

  .footer-main {
    grid-column: auto;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  :root {
    --gutter: 16px;
  }

  .brand-word {
    font-size: 17px;
  }

  .header-inner {
    gap: 8px;
  }

  .language-toggle {
    padding-inline: 5px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
  }

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