:root {
  --color-bg: #FFFFFF;
  --color-panel: #F7F8FA;
  --color-panel-strong: #EFF1F6;
  --color-border: #E4E7EE;
  --color-accent: #5462E8;
  --color-accent-dark: #3947C2;
  --color-sky: #3CA7F0;
  --color-text: #1C1F2B;
  --color-muted: #5F667A;
  --color-success: #1FA971;
  --color-success-bg: #EAF7F0;
  --color-ready-bg: #F0F1F5;
  --color-warn: #D48A0F;
  --color-warn-bg: #FFF5DF;
  --color-error: #D63B4B;
  --color-error-bg: #FDEDEF;
  --color-accent-soft: #EEF0FF;
  --color-accent-line: #C9CEFF;
  --color-overlay: rgba(28, 31, 43, 0.28);
  --color-shadow-soft: rgba(84, 98, 232, 0.06);
  --color-shadow-medium: rgba(84, 98, 232, 0.10);
  --color-shadow-strong: rgba(84, 98, 232, 0.16);
  --color-shadow-button: rgba(84, 98, 232, 0.28);
  --color-shadow-button-hover: rgba(84, 98, 232, 0.34);
  --color-shadow-neutral: rgba(28, 31, 43, 0.05);
  --color-shadow-knob: rgba(28, 31, 43, 0.20);
  --color-transparent: rgba(255, 255, 255, 0);

  --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', 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-card: 20px;
  --radius-tile: 24px;
  --radius-panel: 28px;
  --radius-pill: 999px;

  --shadow-card: 0 10px 30px var(--color-shadow-soft), 0 1px 2px var(--color-shadow-neutral);
  --shadow-card-hover: 0 18px 44px var(--color-shadow-medium), 0 1px 2px var(--color-shadow-neutral);
  --shadow-float: 0 18px 44px var(--color-shadow-strong), 0 1px 2px var(--color-shadow-neutral);
  --shadow-button: 0 10px 22px var(--color-shadow-button);
  --shadow-button-hover: 0 14px 28px var(--color-shadow-button-hover);

  --nav-height: 72px;
  --content-width: 1200px;
  --reading-width: 780px;
  --gutter: 40px;
  --section-space: 104px;
  --ease-standard: 180ms ease;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html.nav-open {
  overflow: hidden;
}

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

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

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

img {
  height: auto;
}

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

button {
  cursor: pointer;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

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

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

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

h1 {
  margin-bottom: 24px;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h4 {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

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

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

:not(pre) > code {
  padding: 0.12em 0.38em;
  overflow-wrap: anywhere;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  background: var(--color-panel);
  color: var(--color-accent-dark);
  font-size: 0.9em;
}

pre {
  max-width: 100%;
  padding: 22px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-text);
  color: var(--color-bg);
  font: 14px/1.75 var(--font-mono);
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}

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

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

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

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

hr {
  height: 1px;
  margin: 48px 0;
  border: 0;
  background: var(--color-border);
}

.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);
}

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

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--color-accent-dark);
  font-size: 14px;
  font-weight: 700;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-accent);
  content: "";
}

.lead {
  max-width: 680px;
  color: var(--color-muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.75;
}

.gradient-text {
  display: inline;
  padding-bottom: 0.05em;
  background: linear-gradient(90deg, var(--color-accent), var(--color-sky));
  color: var(--color-accent-dark);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

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

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

.button {
  display: inline-flex;
  min-height: 48px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text);
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  transition: transform var(--ease-standard), border-color var(--ease-standard), box-shadow var(--ease-standard), background-color var(--ease-standard);
}

.button:hover {
  border-color: var(--color-accent);
  background: var(--color-panel);
  color: var(--color-text);
  transform: translateY(-2px);
}

.button-primary {
  border-color: var(--color-accent-dark);
  background: linear-gradient(180deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-bg);
  box-shadow: var(--shadow-button);
}

.button-primary:hover {
  border-color: var(--color-accent-dark);
  background: linear-gradient(180deg, var(--color-accent-dark), var(--color-accent-dark));
  color: var(--color-bg);
  box-shadow: var(--shadow-button-hover);
}

.button-secondary {
  border-color: var(--color-accent-line);
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
}

.button[aria-disabled="true"],
.button:disabled {
  border-color: var(--color-border);
  background: var(--color-panel-strong);
  color: var(--color-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.card,
.panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

.card {
  padding: 28px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card:hover {
  border-color: var(--color-accent-line);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.panel {
  padding: clamp(24px, 4vw, 44px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.badge-row,
.chip-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.badge,
.chip {
  display: inline-flex;
  min-height: 30px;
  max-width: 100%;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 650;
}

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

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

.badge-warning {
  border-color: var(--color-warn-bg);
  background: var(--color-warn-bg);
  color: var(--color-warn);
}

.badge-error {
  border-color: var(--color-error-bg);
  background: var(--color-error-bg);
  color: var(--color-error);
}

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

.header-shell {
  display: flex;
  width: 100%;
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  align-items: center;
}

.site-brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
}

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

.site-brand-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-tabs a {
  position: relative;
  display: flex;
  min-height: var(--nav-height);
  align-items: center;
  padding-inline: 15px;
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 550;
}

.nav-tabs a::after {
  position: absolute;
  right: 15px;
  bottom: 17px;
  left: 15px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

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

.nav-tabs a:hover::after {
  transform: scaleX(0.4);
}

.nav-tabs a[aria-current="page"] {
  font-weight: 700;
}

.nav-tabs a[aria-current="page"]::after {
  transform: scaleX(1);
}

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

.language-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding-inline: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-accent-dark);
  font-size: 14px;
  font-weight: 650;
}

.language-button:hover {
  border-color: var(--color-accent);
  background: var(--color-panel);
}

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

.language-short {
  display: none;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: 176px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-card-hover);
  list-style: none;
}

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

.language-menu a {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
}

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

.menu-toggle {
  display: none;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: var(--radius-pill);
  background: var(--color-text);
  transition: transform var(--ease-standard), opacity var(--ease-standard);
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-drawer {
  position: absolute;
  z-index: 52;
  top: var(--nav-height);
  right: 0;
  left: 0;
  display: none;
  max-height: calc(100dvh - var(--nav-height));
  padding: 12px var(--gutter) 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-card-hover);
}

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

.mobile-drawer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-drawer a {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-weight: 650;
}

.mobile-drawer a:hover,
.mobile-drawer a[aria-current="page"],
.mobile-drawer a[aria-current="true"] {
  background: var(--color-panel);
  color: var(--color-accent-dark);
}

.drawer-label {
  margin: 16px 12px 5px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

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

.site-footer {
  padding-top: 72px;
  padding-bottom: 28px;
  border-top: 1px solid var(--color-border);
  background: var(--color-panel);
  color: var(--color-text);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.5fr;
  gap: 56px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
}

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

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

.footer-title {
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 800;
}

.footer-links {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.footer-keywords,
.footer-languages {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-keywords a,
.footer-languages a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-muted);
  font-size: 12px;
}

.footer-keywords a:hover,
.footer-languages a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
}

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

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

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

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

.decorated-section,
.hero,
.hero-preview,
.visual-stage {
  overflow-x: clip;
}

.tilt-card {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
  transform-origin: center;
}

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

.prose > * {
  max-width: 100%;
}

.prose p,
.prose li {
  color: var(--color-muted);
}

.prose h2 {
  margin-top: 64px;
  scroll-margin-top: 92px;
}

.prose h3 {
  margin-top: 36px;
  scroll-margin-top: 92px;
}

.prose a:not(.button) {
  color: var(--color-accent-dark);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-line);
  text-underline-offset: 3px;
}

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

@media (max-width: 980px) {
  :root {
    --gutter: 28px;
    --section-space: 84px;
  }

  .desktop-nav {
    display: none;
  }

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

  .menu-toggle {
    display: block;
  }

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

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

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

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

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

  .language-full {
    display: none;
  }

  .language-short {
    display: inline;
  }

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

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

  .site-brand-name {
    font-size: 18px;
  }

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

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

  .mobile-drawer {
    padding-right: var(--gutter);
    padding-left: var(--gutter);
  }

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

  .footer-grid > :first-child {
    grid-column: auto;
  }

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

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

  .card,
  .panel {
    padding: 22px;
  }

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

  .badge-row,
  .chip-row {
    align-items: center;
    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-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

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