:root {
  --color-page: #FDFDFC;
  --color-panel: #FFFFFF;
  --color-panel-muted: #F4F6F2;
  --color-border: #E7E9E3;
  --color-accent: #4BA33F;
  --color-accent-deep: #2E6B2A;
  --color-accent-soft: #E6F2E0;
  --color-text: #1E2A20;
  --color-text-muted: #5C6A5E;
  --color-success: #3E9B4F;
  --color-warning: #D9A400;
  --color-error: #D64545;
  --color-white: #FFFFFF;
  --color-overlay: rgba(30, 42, 32, 0.38);
  --color-grid: rgba(30, 42, 32, 0.05);
  --color-glow: rgba(75, 163, 63, 0.15);
  --color-shadow-soft: rgba(30, 42, 32, 0.04);
  --color-shadow-mid: rgba(30, 42, 32, 0.07);
  --color-shadow-strong: rgba(30, 42, 32, 0.10);
  --color-shadow-accent: rgba(75, 163, 63, 0.30);
  --color-pastel-green: #E4F2DD;
  --color-pastel-yellow: #F9EFD3;
  --color-pastel-blue: #DDEFFA;
  --color-pastel-pink: #F7E2EB;
  --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, 'Courier New', monospace;
  --radius-small: 10px;
  --radius-medium: 16px;
  --radius-card: 24px;
  --radius-large: 28px;
  --radius-pill: 999px;
  --shadow-tile: 0 12px 28px var(--color-shadow-mid), 0 2px 6px var(--color-shadow-soft);
  --shadow-card: 0 16px 40px var(--color-shadow-mid), 0 2px 8px var(--color-shadow-soft);
  --shadow-button: 0 10px 22px var(--color-shadow-accent);
  --shadow-hover: 0 20px 46px var(--color-shadow-strong);
  --content-width: 1160px;
  --reading-width: 820px;
  --header-width: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-height: 78px;
  --transition-fast: 150ms ease;
  --transition-medium: 260ms ease;
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-body);
}

html.nav-open {
  overflow: hidden;
}

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

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

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

img {
  height: auto;
}

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

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

button {
  color: inherit;
}

a {
  color: var(--color-accent-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

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

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

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

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

h1 {
  margin-bottom: 1.35rem;
  font-size: clamp(34px, 3.4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.015em;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 780;
  letter-spacing: -0.012em;
}

h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 740;
}

h4 {
  margin-bottom: 0.55rem;
  font-size: 18px;
  font-weight: 700;
}

.title-lock {
  white-space: nowrap;
}

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

.eyebrow {
  margin-bottom: 0.8rem;
  color: var(--color-accent-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

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

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

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

:not(pre) > code {
  padding: 0.13em 0.38em;
  overflow-wrap: anywhere;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-panel-muted);
  color: var(--color-text);
  font-size: 0.9em;
}

pre {
  max-width: 100%;
  padding: 20px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-text);
  color: var(--color-white);
  font: 13px/1.75 var(--font-mono);
  -webkit-overflow-scrolling: touch;
}

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

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

.wrap,
.reading-wrap,
.header-shell,
.footer-shell {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap {
  max-width: calc(var(--content-width) + var(--gutter) * 2);
}

.reading-wrap {
  max-width: calc(var(--reading-width) + var(--gutter) * 2);
}

.header-shell {
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
}

.footer-shell {
  max-width: min(100%, calc(var(--header-width) + var(--gutter) * 2));
}

.section {
  padding-top: clamp(72px, 9vw, 124px);
  padding-bottom: clamp(72px, 9vw, 124px);
  overflow-x: clip;
}

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

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(30px, 5vw, 54px);
}

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

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

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

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

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

.card {
  padding: clamp(22px, 3vw, 32px);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

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

.tilt,
.tilt-soft {
  transform: rotate(-0.35deg);
}

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

.button,
.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.button svg,
.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

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

.button--primary,
.btn-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: var(--shadow-button);
}

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

.button--secondary,
.btn-ghost {
  border-color: var(--color-border);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: 0 2px 8px var(--color-shadow-soft);
}

.button--secondary:hover,
.btn-ghost:hover {
  border-color: var(--color-accent);
  background: var(--color-panel);
  color: var(--color-accent-deep);
}

.button--quiet {
  min-height: 42px;
  padding: 9px 18px;
  border-color: transparent;
  background: var(--color-panel-muted);
  color: var(--color-text);
  box-shadow: none;
}

.button[disabled],
.button.is-disabled {
  opacity: 0.58;
  pointer-events: none;
}

.icon-box,
.inline-icon,
.status-dot {
  flex-shrink: 0;
}

.icon-box {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-medium);
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
}

.icon-box svg {
  width: 22px;
  height: 22px;
}

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

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

.badge {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 650;
}

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

.badge--warning {
  border-color: var(--color-warning);
  background: var(--color-panel);
  color: var(--color-text);
}

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

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

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

.site-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  text-decoration: none;
}

.site-brand:hover {
  color: var(--color-text);
}

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

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

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

.desktop-nav a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 560;
  text-decoration: none;
}

.desktop-nav a svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.desktop-nav a:hover {
  background: var(--color-panel-muted);
  color: var(--color-text);
}

.desktop-nav a.is-active {
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
  font-weight: 700;
}

.header-tools {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.language-trigger,
.menu-trigger {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-text-muted);
  cursor: pointer;
}

.language-trigger {
  min-width: 126px;
  gap: 7px;
  padding: 8px 14px;
  white-space: nowrap;
}

.language-trigger svg,
.menu-trigger svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.language-short {
  display: none;
}

.menu-trigger {
  display: none;
  min-width: 44px;
  padding: 8px;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 190px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-tile);
}

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

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

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

.mobile-drawer {
  display: none;
}

.nav-veil {
  display: none;
}

.site-footer {
  margin-top: clamp(72px, 9vw, 124px);
  border-top: 1px solid var(--color-border);
  background: var(--color-panel-muted);
  color: var(--color-text);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 0.9fr;
  gap: 48px;
  padding-top: 62px;
  padding-bottom: 48px;
}

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

.footer-heading {
  margin-bottom: 15px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 780;
}

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

.footer-links li {
  margin: 0;
}

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

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

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

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

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

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

.prose h2,
.prose h3,
.prose h4,
.prose strong {
  color: var(--color-text);
}

.prose h2 {
  margin-top: 3.6rem;
}

.prose h3 {
  margin-top: 2.4rem;
}

.prose a {
  overflow-wrap: anywhere;
}

.prose img {
  margin-block: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
}

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

.data-table {
  width: 100%;
  min-width: 680px;
  margin: 0;
  border-collapse: collapse;
  background: var(--color-panel);
  color: var(--color-text);
}

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

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

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

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

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

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

  .desktop-nav a {
    padding-inline: 8px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 70px;
  }

  .desktop-nav {
    display: none;
  }

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

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

  .language-menu {
    display: none;
  }

  .mobile-drawer {
    position: fixed;
    z-index: 103;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    display: block;
    width: min(390px, 92vw);
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid var(--color-border);
    background: var(--color-panel);
    color: var(--color-text);
    box-shadow: var(--shadow-card);
    transform: translateX(105%);
    transition: transform var(--transition-medium);
  }

  .mobile-drawer.is-open {
    transform: translateX(0);
  }

  .mobile-drawer a {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-radius: var(--radius-small);
    color: var(--color-text);
    text-decoration: none;
  }

  .mobile-drawer a svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
  }

  .mobile-drawer a:hover,
  .mobile-drawer a.is-active,
  .mobile-drawer a[aria-current="true"] {
    background: var(--color-accent-soft);
    color: var(--color-accent-deep);
  }

  .drawer-divider {
    height: 1px;
    margin: 14px 0;
    background: var(--color-border);
  }

  .drawer-label {
    padding: 4px 13px 8px;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 700;
  }

  .nav-veil {
    position: fixed;
    z-index: 99;
    inset: var(--header-height) 0 0;
    display: block;
    visibility: hidden;
    background: var(--color-overlay);
    opacity: 0;
    transition: opacity var(--transition-medium), visibility var(--transition-medium);
  }

  .nav-veil.is-open {
    visibility: visible;
    opacity: 1;
  }

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

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

@media (max-width: 768px) {
  .title-lock {
    white-space: normal;
  }

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

  h2 {
    font-size: clamp(25px, 7vw, 34px);
  }

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

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

@media (max-width: 640px) {
  .tilt,
  .tilt-soft {
    transform: none;
  }

  .head-row {
    gap: 10px;
  }

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

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

  .language-trigger {
    min-width: 72px;
    padding-inline: 11px;
  }

  .language-full {
    display: none;
  }

  .language-short {
    display: inline;
  }

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

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

  .badge-row {
    flex-direction: row;
    justify-content: center;
  }

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

@media (max-width: 380px) {
  .brand-name {
    max-width: 112px;
    white-space: normal;
    line-height: 1.15;
  }

  .language-trigger {
    min-width: 50px;
  }
}

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

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

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