:root {
  --color-canvas: #F2F0EA;
  --color-surface: #E9E6DD;
  --color-night: #171614;
  --color-border: #D6D2C6;
  --color-border-strong: #B7B2A3;
  --color-night-line: #3A3833;
  --color-ink: #171614;
  --color-ink-soft: #5F5C53;
  --color-night-ink: #EDEAE1;
  --color-night-soft: #A6A196;
  --color-night-caption: #8C887C;
  --color-brand: #1B1A16;
  --color-brand-strong: #000000;
  --color-mist: #8FA6B8;
  --color-moss: #77906B;
  --color-ochre: #C6913F;
  --color-brick: #B0563F;
  --color-chip-dark: #26251F;
  --color-chip-line: #33312B;
  --color-white: #FFFFFF;
  --color-transparent: transparent;
  --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;
  --font-serif: Georgia, 'Times New Roman', 'Songti SC', 'Noto Serif CJK SC', serif;
  --radius-large: 16px;
  --radius-medium: 12px;
  --radius-small: 8px;
  --radius-pill: 999px;
  --page-width: 1184px;
  --header-width: 1280px;
  --reading-width: 780px;
  --gutter: clamp(16px, 3.4vw, 48px);
  --header-height: 68px;
  --space-section: clamp(64px, 9vw, 120px);
  --transition-fast: 150ms ease;
  --transition-reveal: 620ms cubic-bezier(.2, .7, .2, 1);
  --layer-header: 60;
  --layer-veil: 50;
  --layer-drawer: 70;
  --layer-floating: 80;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.nav-open {
  overflow: hidden;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.68;
}

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

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

img {
  height: auto;
}

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

button,
summary {
  cursor: pointer;
}

button {
  border: 0;
}

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

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
}

::selection {
  background: var(--color-mist);
  color: var(--color-ink);
}

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

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

h1,
.hero-title {
  margin-bottom: 24px;
  font-size: clamp(34px, 3.35vw, 48px);
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.16;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -.012em;
  line-height: 1.2;
}

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

h4 {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 750;
}

p {
  margin-bottom: 1.15em;
}

strong {
  font-weight: 750;
}

small,
.text-small {
  font-size: 13px;
}

.mono,
.eyebrow,
.meta-line {
  font-family: var(--font-mono);
}

.eyebrow {
  display: block;
  margin-bottom: 18px;
  color: var(--color-ink-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.serif-lead {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.72;
}

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

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

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

.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(--space-section);
  padding-bottom: var(--space-section);
}

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

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

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

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

.decorated-section,
.hero-stage,
.relay-band {
  position: relative;
  overflow-x: clip;
}

.stack > * + * {
  margin-top: 20px;
}

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

.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 20px;
}

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

.panel {
  padding: clamp(22px, 3vw, 36px);
}

.card {
  padding: clamp(22px, 3vw, 32px);
}

.card-dark {
  border-color: var(--color-night-line);
  background: var(--color-night);
  color: var(--color-night-ink);
}

.card-dark h2,
.card-dark h3,
.card-dark h4 {
  color: var(--color-night-ink);
}

.button,
.btn {
  display: inline-flex;
  min-height: 48px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--color-transparent);
  border-radius: var(--radius-medium);
  padding: 12px 25px;
  background: var(--color-brand);
  color: var(--color-canvas);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.button:hover,
.btn:hover {
  background: var(--color-brand-strong);
  color: var(--color-canvas);
  text-decoration: none;
}

.button-secondary,
.btn-ghost {
  border-color: var(--color-ink);
  background: var(--color-transparent);
  color: var(--color-ink);
}

.button-secondary:hover,
.btn-ghost:hover {
  border-color: var(--color-ink);
  background: var(--color-surface);
  color: var(--color-ink);
}

.button-light {
  background: var(--color-night-ink);
  color: var(--color-night);
}

.button-light:hover {
  background: var(--color-white);
  color: var(--color-night);
}

.button[aria-disabled='true'],
.button:disabled {
  border-color: var(--color-border);
  background: var(--color-border);
  color: var(--color-ink-soft);
  cursor: not-allowed;
}

.button svg,
.btn svg,
.inline-icon,
.platform-icon,
.app-icon {
  flex-shrink: 0;
}

.button svg,
.btn svg {
  width: 16px;
  height: 16px;
}

.badge,
.tag,
.fact-pill,
.platform-pill {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  line-height: 1.35;
}

.badge,
.tag {
  padding: 6px 11px;
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 12px;
}

.fact-pill,
.platform-pill {
  border: 1px solid var(--color-border-strong);
  padding: 8px 16px;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-size: 12px;
}

.platform-pill {
  font-family: var(--font-body);
  font-weight: 550;
}

.platform-pill svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-moss);
}

.chip-mist {
  background: var(--color-mist);
  color: var(--color-ink);
}

.chip-moss {
  background: var(--color-moss);
  color: var(--color-ink);
}

.chip-ochre {
  background: var(--color-ochre);
  color: var(--color-ink);
}

.chip-brick {
  background: var(--color-brick);
  color: var(--color-white);
}

.prose {
  font-size: 17px;
}

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

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

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.prose ul,
.prose ol {
  margin-bottom: 1.4em;
  padding-left: 1.45em;
}

.prose li + li {
  margin-top: .55em;
}

code {
  border-radius: var(--radius-small);
  padding: .12em .38em;
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: .9em;
  overflow-wrap: anywhere;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-night-line);
  border-radius: var(--radius-medium);
  padding: 20px;
  background: var(--color-night);
  color: var(--color-night-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  -webkit-overflow-scrolling: touch;
}

pre code {
  padding: 0;
  background: var(--color-transparent);
  color: inherit;
  overflow-wrap: normal;
  white-space: pre;
}

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

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

th {
  background: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
}

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

.table-scroll table {
  min-width: 620px;
}

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

.site-head__row {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
}

.site-brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
}

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

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

.desktop-nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  align-items: center;
  list-style: none;
}

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

.desktop-nav li + li::before {
  margin-inline: 14px;
  color: var(--color-ink-soft);
  content: '·';
  font-size: 14px;
}

.desktop-nav a {
  padding: 8px 2px;
  font-size: 14px;
  font-weight: 550;
}

.desktop-nav a[aria-current='page'] {
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.header-tools {
  display: flex;
  margin-left: 34px;
  align-items: center;
  gap: 8px;
}

.language-switcher {
  position: relative;
}

.language-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  background: var(--color-canvas);
  color: var(--color-ink-soft);
  font-size: 13px;
  white-space: nowrap;
}

.language-button:hover {
  background: var(--color-surface);
  color: var(--color-ink);
}

.language-short {
  display: none;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 168px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  padding: 7px;
  background: var(--color-canvas);
  color: var(--color-ink);
}

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

.language-menu a {
  display: flex;
  min-height: 42px;
  width: 100%;
  align-items: center;
  border-radius: var(--radius-small);
  padding: 8px 10px;
  font-size: 13px;
}

.language-menu a:hover,
.language-menu a[aria-current='true'] {
  background: var(--color-surface);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-small);
  background: var(--color-transparent);
  color: var(--color-ink);
}

.menu-toggle:hover {
  background: var(--color-surface);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

.mobile-veil {
  position: fixed;
  z-index: var(--layer-veil);
  inset: var(--header-height) 0 0;
  background: var(--color-night);
  opacity: .42;
}

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

.mobile-drawer {
  display: none;
  position: absolute;
  z-index: var(--layer-drawer);
  top: 100%;
  right: 0;
  left: 0;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-bottom: 1px solid var(--color-border);
  padding: 10px var(--gutter) 18px;
  background: var(--color-canvas);
  color: var(--color-ink);
}

.mobile-drawer[hidden] {
  display: none;
}

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

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

.mobile-drawer a[aria-current='page'] {
  font-weight: 750;
}

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

.mobile-drawer__label {
  margin: 8px 4px;
  color: var(--color-ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
}

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

.site-footer__inner {
  padding-top: 64px;
  padding-bottom: 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(150px, .65fr) minmax(260px, 1.2fr) minmax(160px, .7fr);
  gap: clamp(28px, 5vw, 68px);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
}

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

.footer-summary {
  max-width: 390px;
  margin-top: 18px;
  color: var(--color-night-soft);
  font-family: var(--font-serif);
  line-height: 1.7;
}

.footer-title {
  margin-bottom: 16px;
  color: var(--color-night-caption);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
}

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

.footer-links li + li {
  margin-top: 9px;
}

.footer-links a {
  color: var(--color-night-ink);
  font-size: 14px;
}

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

.footer-keywords a {
  border: 1px solid var(--color-night-line);
  border-radius: var(--radius-small);
  padding: 6px 9px;
  color: var(--color-night-ink);
  font-family: var(--font-mono);
  font-size: 11px;
}

.footer-keywords a:hover {
  background: var(--color-chip-dark);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  margin-top: 48px;
  padding-top: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--color-night-line);
  color: var(--color-night-soft);
  font-family: var(--font-mono);
  font-size: 11px;
}

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

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

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

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

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    animation-duration: .01ms;
    animation-iteration-count: 1;
    transition-duration: .01ms;
  }

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

@media (max-width: 960px) {
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .desktop-nav {
    display: none;
  }

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

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

  .mobile-drawer {
    display: block;
  }

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

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

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

  .prose {
    font-size: 16px;
  }

  .language-full {
    display: none;
  }

  .language-short {
    display: inline;
  }

  .language-button {
    min-width: 54px;
    min-height: 38px;
    padding-inline: 10px;
  }

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

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

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

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

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

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

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

  .footer-keywords,
  .cluster {
    flex-direction: row;
    flex-wrap: wrap;
  }

  th,
  td {
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .site-brand span {
    font-size: 15px;
  }

  .header-tools {
    gap: 2px;
  }

  .button,
  .btn {
    width: 100%;
  }
}