:root {
  --color-paper: #FBF5EA;
  --color-panel: #FFFBF3;
  --color-panel-muted: #F1E8D8;
  --color-line: #DDD2BF;
  --color-accent: #6B2A5B;
  --color-accent-deep: #4A1B3E;
  --color-accent-soft: #F0E3EC;
  --color-ink: #2B2119;
  --color-muted: #6F6256;
  --color-success: #2E7D5B;
  --color-warning: #B9781C;
  --color-error: #B23A3A;
  --color-on-accent: #FFFBF3;
  --color-shadow: rgba(43, 33, 25, 0.08);
  --color-shadow-deep: rgba(43, 33, 25, 0.14);
  --color-overlay: rgba(43, 33, 25, 0.3);
  --color-transparent: rgba(255, 255, 255, 0);
  --flag-red: #B23A3A;
  --flag-blue: #243B6B;
  --flag-white: #FFFBF3;
  --font-display: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-pill: 999px;
  --shadow-panel: 0 6px 18px var(--color-shadow);
  --shadow-raised: 0 14px 36px var(--color-shadow-deep);
  --content-width: 1360px;
  --text-width: 760px;
  --gutter: 48px;
  --header-height: 72px;
  --toc-offset: 126px;
  --section-space: 104px;
  --transition-fast: 150ms ease;
  --transition-reveal: 600ms cubic-bezier(.2, .7, .2, 1);
}

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

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

html.nav-open {
  overflow: hidden;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  color: var(--color-ink);
  background-color: var(--color-paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

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

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

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

button {
  border: 0;
  cursor: pointer;
}

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

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

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

nav ul,
.site-footer ul,
.trust-list,
.platform-row,
.flag-row {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

code {
  overflow-wrap: anywhere;
}

pre {
  max-width: 100%;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-panel-muted);
  -webkit-overflow-scrolling: touch;
}

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

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

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

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

.wrap {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow {
  width: 100%;
  max-width: var(--text-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

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

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

.eyebrow {
  margin-bottom: 12px;
  color: var(--color-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

h1,
.display-title {
  margin-bottom: 24px;
  font-size: clamp(52px, 5vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.015em;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(34px, 3.5vw, 52px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -.012em;
}

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

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

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

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

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  padding: 3px 12px 3px 10px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 24px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid var(--color-transparent);
  border-radius: var(--radius-sm);
  font-weight: 700;
  line-height: 1;
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

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

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

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

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

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

.btn-outline {
  border-color: var(--color-ink);
  background: var(--color-transparent);
}

.btn-outline:hover {
  color: var(--color-paper);
  background: var(--color-ink);
}

.btn-small {
  min-height: 38px;
  padding-inline: 16px;
  font-size: 14px;
}

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

.panel {
  padding: 28px;
  box-shadow: var(--shadow-panel);
}

.card {
  padding: 28px;
}

.chrome {
  overflow: hidden;
  padding: 0;
  box-shadow: var(--shadow-panel);
}

.chrome-bar {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding-inline: 12px;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-panel-muted);
}

.chrome-dots {
  display: flex;
  gap: 5px;
}

.chrome-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-line);
}

.chrome-label {
  margin-left: auto;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
}

.site-header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-paper);
}

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

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

.brand-logo {
  width: 28px;
  height: 28px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.01em;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.desktop-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding-inline: 14px;
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 550;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--color-ink);
  background: var(--color-panel-muted);
}

.desktop-nav a.is-active {
  font-weight: 700;
}

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

.language-switch {
  position: relative;
}

.language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding-inline: 8px;
  border-radius: var(--radius-xs);
  background: var(--color-transparent);
  color: var(--color-muted);
  font-size: 14px;
}

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

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 55;
  display: none;
  min-width: 164px;
  padding: 6px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-panel);
  box-shadow: var(--shadow-raised);
}

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

.language-menu a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding-inline: 12px;
  border-radius: var(--radius-xs);
  font-size: 14px;
}

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

.header-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding-inline: 16px;
  border: 1.5px solid var(--color-ink);
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-weight: 700;
}

.header-login:hover {
  color: var(--color-paper);
  background: var(--color-ink);
}

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

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

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

.mobile-nav {
  display: none;
}

.menu-veil {
  display: none;
}

.hero {
  min-height: calc(100svh - var(--header-height) - 56px);
  display: flex;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 32px;
  overflow-x: clip;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
  width: 100%;
}

.hero-copy,
.hero-visual {
  min-width: 0;
}

.hero-title {
  margin-top: 20px;
  margin-bottom: 0;
  font-size: 64px;
}

.hero-title .colon {
  color: var(--color-muted);
  font-weight: 700;
}

.hero-actions {
  margin-top: 28px;
}

.hero-description {
  max-width: 600px;
  margin-top: 22px;
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 17px;
  line-height: 1.75;
}

.hero-description strong {
  color: var(--color-ink);
  font-weight: 650;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  font-size: 13px;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.trust-list svg {
  width: 15px;
  height: 15px;
  color: var(--color-accent);
}

.hero-meta {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--color-line);
}

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

.meta-label {
  width: 62px;
  flex-shrink: 0;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

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

.platform-row li,
.flag-row li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 13px;
}

.platform-row svg {
  width: 16px;
  height: 16px;
}

.flag-icon {
  width: 20px;
  height: 14px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 2px;
}

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

.footer-main {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.35fr .9fr;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 48px;
}

.footer-brand p {
  max-width: 360px;
  margin-top: 18px;
  color: var(--color-muted);
}

.footer-heading {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

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

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 26px;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 13px;
}

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

.reveal {
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

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

.reveal.shown {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

.prose h2 {
  margin-top: 72px;
}

.prose h3 {
  margin-top: 42px;
}

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

.prose img {
  border-radius: var(--radius-sm);
}

body:has(.toc-tabs) section[id] {
  scroll-margin-top: var(--toc-offset);
}

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

  .desktop-nav a {
    padding-inline: 10px;
  }

  .hero {
    min-height: auto;
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .hero-title {
    font-size: 52px;
  }

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

  .footer-language {
    grid-column: 2 / -1;
  }
}

@media (max-width: 920px) {
  .desktop-nav,
  .language-switch {
    display: none;
  }

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

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

  .mobile-nav {
    position: absolute;
    z-index: 54;
    top: 100%;
    right: var(--gutter);
    left: var(--gutter);
    max-height: calc(100dvh - var(--header-height));
    padding: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--color-line);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--color-panel);
    box-shadow: var(--shadow-raised);
  }

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

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

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

  .mobile-language {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--color-line);
  }

  .menu-veil {
    position: fixed;
    z-index: 45;
    inset: var(--header-height) 0 0;
    background: var(--color-overlay);
  }

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

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

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

  h1,
  .display-title,
  .hero-title {
    font-size: clamp(28px, 10vw, 40px);
    line-height: 1.12;
    letter-spacing: -.01em;
  }

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

  .hero {
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
  }

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

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

  .footer-bottom {
    flex-direction: column;
  }
}

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

  body {
    overflow-x: clip;
  }

  .wrap,
  .narrow {
    min-width: 0;
    padding-inline: var(--gutter);
  }

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

  .header-inner {
    gap: 8px;
  }

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

  .header-login {
    min-height: 38px;
    padding-inline: 12px;
  }

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

  .hero-inner {
    gap: 38px;
  }

  .hero-actions .btn {
    flex: 1 1 140px;
  }

  .hero-description {
    font-size: 16px;
  }

  .meta-row {
    align-items: flex-start;
    gap: 10px;
  }

  .meta-label {
    width: 100%;
  }

  .platform-row,
  .flag-row {
    gap: 12px 16px;
  }

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

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

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

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

  .prose h2 {
    margin-top: 56px;
  }
}

@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,
  .reveal.pending {
    opacity: 1;
    transform: none;
  }
}