:root {
  --color-page: #ffffff;
  --color-panel: #f7f7f8;
  --color-panel-strong: #efeff1;
  --color-border: #dcdce0;
  --color-border-dark: #afafb5;
  --color-accent: #c72e4f;
  --color-accent-dark: #9f1f3b;
  --color-text: #1b1b1d;
  --color-muted: #68686e;
  --color-success: #287a5d;
  --color-warn: #9a6508;
  --color-error: #b4233c;
  --color-white: #ffffff;
  --color-terminal: #242427;
  --color-terminal-text: #e6e6e9;
  --color-overlay: rgba(27, 27, 29, 0.42);
  --color-shadow-soft: rgba(27, 27, 29, 0.07);
  --color-shadow-device: rgba(27, 27, 29, 0.12);

  --font-display: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --radius-xs: 4px;
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-soft: 0 8px 24px var(--color-shadow-soft);
  --shadow-device: 0 12px 28px var(--color-shadow-device);

  --page-width: 1200px;
  --reading-width: 820px;
  --header-height: 70px;
  --gutter: clamp(16px, 4vw, 36px);
  --section-space: clamp(64px, 9vw, 116px);
  --transition-fast: 160ms ease;
  --transition-base: 260ms ease;
}

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

html {
  min-width: 0;
  scroll-behavior: smooth;
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-body);
  text-size-adjust: 100%;
}

html.nav-open {
  overflow: hidden;
}

body {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

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

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

img {
  height: auto;
}

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

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

button {
  cursor: pointer;
}

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

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

p:last-child,
ul:last-child,
ol:last-child,
blockquote:last-child {
  margin-bottom: 0;
}

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

li + li {
  margin-top: 0.45rem;
}

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

code {
  overflow-wrap: anywhere;
  border-radius: var(--radius-xs);
  background: var(--color-panel-strong);
  padding: 0.14em 0.36em;
  font-size: 0.9em;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-terminal);
  color: var(--color-terminal-text);
  padding: 18px;
  font-size: 13px;
  line-height: 1.7;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}

pre code {
  overflow-wrap: normal;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  white-space: pre;
}

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

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

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

.section-compact {
  padding-top: clamp(42px, 6vw, 72px);
  padding-bottom: clamp(42px, 6vw, 72px);
}

.section-panel {
  background: var(--color-panel);
  border-block: 1px solid var(--color-border);
}

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-heading.centered {
  margin-inline: auto;
  text-align: center;
}

.kicker,
.eyebrow {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-page);
  color: var(--color-muted);
  padding: 4px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.status-dot,
.eyebrow-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--color-success);
  box-shadow: 0 0 0 3px var(--color-panel-strong);
}

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

h1,
.hero-title {
  margin-bottom: 20px;
  font-size: clamp(52px, 5.2vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 850;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 800;
  line-height: 1.25;
}

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

.heading-lock,
.headline-accent {
  white-space: normal;
  overflow-wrap: anywhere;
}

.headline-accent,
.accent-text {
  color: var(--color-accent);
}

.lead {
  max-width: 720px;
  color: var(--color-muted);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.65;
}

.small {
  color: var(--color-muted);
  font-size: 13px;
}

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

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

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

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

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

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

.button {
  min-height: 44px;
  max-width: 100%;
  border: 1px solid var(--color-text);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  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: 0 0 auto;
}

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

.button-primary {
  background: var(--color-text);
  color: var(--color-white);
  box-shadow: var(--shadow-soft);
}

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

.button-secondary {
  border-color: var(--color-border-dark);
  background: var(--color-page);
  color: var(--color-text);
}

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

.button-accent {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
}

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

.button-small {
  min-height: 36px;
  padding: 7px 13px;
  font-size: 13px;
}

.button[aria-disabled="true"],
.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.panel,
.card {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-page);
}

.panel {
  padding: clamp(22px, 4vw, 40px);
}

.card {
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

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

.grid {
  display: grid;
  min-width: 0;
  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));
}

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

.inline-list {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-muted);
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
}

.chip-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--color-page);
  text-align: left;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 14px 16px;
  vertical-align: top;
}

.data-table th {
  background: var(--color-panel);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
}

.data-table td {
  color: var(--color-muted);
  font-size: 14px;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

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

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

.prose h2 {
  margin-top: 2.2em;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.prose h3 {
  margin-top: 1.8em;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

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

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

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

.prose img {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

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

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

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

.nav-shell {
  position: relative;
  z-index: 3;
  width: min(var(--page-width), calc(100% - 72px));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
}

.site-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: var(--color-text);
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.site-brand img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.desktop-nav {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 34px;
  margin-left: auto;
}

.desktop-nav a {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

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

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

.desktop-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  background: var(--color-accent);
}

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

.language-control {
  position: relative;
}

.language-button {
  min-height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-page);
  padding: 0 13px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 700;
}

.language-button svg {
  width: 11px;
  height: 7px;
  flex: 0 0 auto;
  color: var(--color-muted);
}

.language-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 164px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-page);
  box-shadow: var(--shadow-soft);
  list-style: none;
}

.language-menu a {
  min-height: 38px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  padding: 8px 10px;
  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);
  font-weight: 750;
}

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

.menu-toggle-lines {
  width: 20px;
  height: 14px;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-toggle-lines i {
  width: 100%;
  height: 2px;
  border-radius: var(--radius-pill);
  display: block;
  background: var(--color-text);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

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

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

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

.mobile-drawer {
  position: fixed;
  z-index: 4;
  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: 1px solid var(--color-border);
  background: var(--color-page);
  padding: 10px var(--gutter) 22px;
}

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

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

.mobile-drawer li {
  margin: 0;
}

.mobile-drawer a {
  width: 100%;
  min-height: 48px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 12px 4px;
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 650;
}

.mobile-drawer a[aria-current="page"],
.mobile-drawer a[aria-current="true"] {
  color: var(--color-text);
  font-weight: 800;
}

.drawer-label {
  margin: 18px 4px 5px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

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

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

.footer-main {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.3fr 0.8fr;
  gap: 42px;
  padding-top: 58px;
  padding-bottom: 44px;
}

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

.footer-title {
  margin-bottom: 14px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 850;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin: 0;
}

.footer-links a {
  display: inline-flex;
  padding: 4px 0;
  color: var(--color-muted);
  font-size: 13px;
}

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

.footer-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.footer-keywords a {
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-page);
  padding: 5px 9px;
  color: var(--color-muted);
  font-size: 11px;
}

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

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

.hero,
.hero-visual,
.preview-hero,
.decor-zone {
  overflow-x: clip;
}

.tilt,
.tilt-card {
  transform: rotate(-0.45deg);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

@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;
  }
}

@media (max-width: 960px) {
  .nav-shell {
    width: 100%;
    padding-inline: var(--gutter);
  }

  .desktop-nav {
    display: none;
  }

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

  .language-control {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

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

@media (max-width: 768px) {
  h1,
  .hero-title {
    font-size: clamp(28px, 9.4vw, 40px);
    line-height: 1.14;
    letter-spacing: -0.015em;
  }

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

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

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 18px;
  }
}

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

  body {
    font-size: 15px;
  }

  .site-brand {
    gap: 8px;
    font-size: 17px;
  }

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

  .grid-2,
  .grid-4,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .footer-main {
    gap: 30px;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row .button {
    width: 100%;
  }

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

  .tilt,
  .tilt-card {
    transform: none;
  }

  .heading-lock {
    white-space: normal;
  }

  .table-wrap {
    margin-inline: 0;
  }
}