:root {
  --color-bg: #0A0B0D;
  --color-panel: #101216;
  --color-panel-deep: #07080A;
  --color-border: #26282E;
  --color-accent: #EFAE3F;
  --color-accent-strong: #C9871F;
  --color-on-accent: #0A0B0D;
  --color-text: #E9EBEE;
  --color-text-muted: #9BA1AB;
  --color-success: #2BD9C7;
  --color-warning: #E3B341;
  --color-error: #E5534B;
  --color-overlay: rgba(7, 8, 10, 0.82);
  --color-accent-soft: rgba(239, 174, 63, 0.12);
  --color-success-soft: rgba(43, 217, 199, 0.12);
  --color-error-soft: rgba(229, 83, 75, 0.12);
  --font-display: 'Inter', 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --header-height: 60px;
  --content-width: 1180px;
  --reading-width: 820px;
  --header-width: 1280px;
  --gutter: 40px;
  --section-space: 96px;
  --transition-fast: 150ms ease;
  --transition-reveal: 620ms cubic-bezier(.2, .72, .2, 1);
  --line-thin: 1px;
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--color-bg);
}

html.nav-open {
  overflow: hidden;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background-color: var(--color-bg);
  background-image:
    linear-gradient(150deg, transparent 48%, var(--color-border) 49%, transparent 50%),
    linear-gradient(30deg, transparent 48%, var(--color-border) 49%, transparent 50%);
  background-position: 0 0, 36px 20px;
  background-size: 72px 40px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-body);
}

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

img {
  height: auto;
}

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

button,
summary {
  cursor: pointer;
}

button {
  color: inherit;
}

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

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

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: var(--line-thin) solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

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);
  font-weight: 500;
  text-wrap: balance;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(34px, 3.3vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.012em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(26px, 2.3vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.35;
}

h4 {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.45;
}

p {
  margin-bottom: 1em;
}

strong {
  color: var(--color-text);
  font-weight: 600;
}

small {
  color: var(--color-text-muted);
}

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

:not(pre) > code {
  padding: 0.14em 0.36em;
  overflow-wrap: anywhere;
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-xs);
  background: var(--color-panel-deep);
  color: var(--color-accent);
  font-size: 0.9em;
}

pre {
  max-width: 100%;
  padding: 18px;
  overflow-x: auto;
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-panel-deep);
  color: var(--color-text);
  font: 13px/1.7 var(--font-mono);
  -webkit-overflow-scrolling: touch;
}

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

hr {
  margin: 52px 0;
  border: 0;
  border-top: var(--line-thin) solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--color-text);
}

th,
td {
  padding: 13px 15px;
  border: var(--line-thin) solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

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

td {
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.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 {
  position: relative;
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
  overflow-x: clip;
  border-top: var(--line-thin) solid var(--color-border);
}

.section-head {
  max-width: 760px;
  margin-bottom: 38px;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--color-accent);
  font: 600 11px/1.4 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

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

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

.panel,
.card {
  min-width: 0;
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  color: var(--color-text);
}

.panel-deep {
  min-width: 0;
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel-deep);
  color: var(--color-text);
}

.card {
  padding: 24px;
}

.card p:last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid > * {
  min-width: 0;
}

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

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

.stack {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.cluster {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cluster > svg,
.cluster > img,
.icon,
.dot {
  flex-shrink: 0;
}

.button,
.btn {
  display: inline-flex;
  min-height: 44px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 21px;
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-panel-deep);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

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

.button:hover,
.btn:hover {
  border-color: var(--color-text-muted);
  background: var(--color-panel);
  color: var(--color-text);
}

.button-primary,
.btn-main {
  border-color: var(--color-accent-strong);
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.button-primary:hover,
.btn-main:hover {
  border-color: var(--color-accent-strong);
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
}

.button-quiet {
  background: transparent;
  color: var(--color-text-muted);
}

.button[disabled],
.btn[disabled] {
  cursor: not-allowed;
  border-color: var(--color-border);
  background: var(--color-panel);
  color: var(--color-text-muted);
  opacity: 0.62;
}

.badge,
.chip {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  overflow: hidden;
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-panel-deep);
  color: var(--color-text-muted);
  font: 11.5px/1.5 var(--font-mono);
  text-overflow: ellipsis;
}

.badge-accent {
  border-color: var(--color-accent-strong);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.badge-success {
  border-color: var(--color-success);
  background: var(--color-success-soft);
  color: var(--color-success);
}

.status-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-success);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--transition-reveal),
    transform var(--transition-reveal);
}

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

.tilt {
  transform: rotate(-0.35deg);
  transform-origin: center;
}

.prose {
  min-width: 0;
  color: var(--color-text-muted);
}

.prose h2,
.prose h3,
.prose h4 {
  scroll-margin-top: calc(var(--header-height) + 26px);
}

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

.prose h3 {
  margin-top: 1.9em;
}

.prose a:not([class*="btn"]):not([class*="button"]) {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-strong);
  text-underline-offset: 3px;
}

.prose li + li {
  margin-top: 7px;
}

.prose .data-table {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: var(--line-thin) solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.header-row {
  display: flex;
  height: var(--header-height);
  align-items: center;
  gap: 12px;
}

.site-brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}

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

.desktop-nav {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 4px;
}

.nav-link,
.nav-more-button,
.language-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 13px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 13.5px;
  white-space: nowrap;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.nav-link:hover,
.nav-more-button:hover,
.language-button:hover,
.nav-link.is-active,
.nav-more.is-active > .nav-more-button {
  background: var(--color-panel);
  color: var(--color-text);
}

.nav-more,
.language-menu {
  position: relative;
}

.nav-dropdown,
.language-dropdown {
  position: absolute;
  z-index: 90;
  top: calc(100% + 7px);
  right: 0;
  display: none;
  min-width: 172px;
  padding: 6px;
  border: var(--line-thin) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  color: var(--color-text);
}

.nav-more:hover .nav-dropdown,
.nav-more:focus-within .nav-dropdown,
.nav-more.is-open .nav-dropdown,
.language-menu.is-open .language-dropdown {
  display: block;
}

.nav-dropdown a,
.language-dropdown a {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 13.5px;
}

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

.nav-divider {
  width: 1px;
  height: 18px;
  margin-inline: 5px;
  flex-shrink: 0;
  background: var(--color-border);
}

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

.language-short {
  display: none;
}

.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  display: block;
  width: 20px;
  height: 1px;
  background: currentColor;
}

.menu-toggle-lines {
  position: relative;
  margin-inline: auto;
}

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

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

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

.mobile-nav {
  position: fixed;
  z-index: 85;
  top: var(--header-height);
  right: 0;
  left: 0;
  display: none;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-bottom: var(--line-thin) solid var(--color-border);
  background: var(--color-panel-deep);
  color: var(--color-text);
}

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

.mobile-nav-inner {
  padding: 10px var(--gutter) 20px;
}

.mobile-nav a {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}

.mobile-nav a:hover,
.mobile-nav a.is-active,
.mobile-nav a[aria-current="true"] {
  background: var(--color-panel);
  color: var(--color-text);
}

.mobile-language-label {
  margin: 16px 12px 5px;
  color: var(--color-text-muted);
  font: 11px/1.4 var(--font-mono);
  letter-spacing: 0.08em;
}

.mobile-veil {
  position: fixed;
  z-index: 70;
  inset: var(--header-height) 0 0;
  display: none;
  border: 0;
  background: var(--color-overlay);
}

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

.site-footer {
  border-top: var(--line-thin) solid var(--color-border);
  background: var(--color-panel-deep);
  color: var(--color-text);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(150px, 1fr));
  gap: 42px;
  padding-top: 62px;
  padding-bottom: 48px;
}

.footer-brand {
  max-width: 350px;
}

.footer-brand-line {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-brand-line img {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.footer-brand p {
  color: var(--color-text-muted);
}

.footer-heading {
  margin-bottom: 14px;
  color: var(--color-text);
  font: 600 12px/1.4 var(--font-mono);
  letter-spacing: 0.08em;
}

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

.footer-links a {
  display: block;
  padding: 5px 0;
  color: var(--color-text-muted);
  font-size: 13.5px;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  padding-bottom: 24px;
  border-top: var(--line-thin) solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 12.5px;
}

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

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

  .desktop-nav {
    display: none;
  }

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

  .menu-toggle {
    display: block;
  }

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

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

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

  h2 {
    font-size: clamp(23px, 6vw, 28px);
  }

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

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

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

  body {
    font-size: 14.5px;
  }

  .tilt,
  [class*="tilt"] {
    transform: none;
  }

  .brand-name {
    font-size: 14px;
  }

  .language-full {
    display: none;
  }

  .language-short {
    display: inline;
  }

  .language-button {
    min-width: 44px;
    padding-inline: 9px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .card {
    padding: 19px;
  }

  .button,
  .btn {
    padding-inline: 17px;
  }

  .cluster {
    flex-direction: row;
    flex-wrap: wrap;
  }

  th,
  td {
    padding: 11px 12px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }

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