:root {
  --color-bg: #15100D;
  --color-bg-soft: #1A130F;
  --color-panel: #211814;
  --color-panel-raised: #30231C;
  --color-border: #49372D;
  --color-border-soft: #382820;
  --color-accent: #D9874B;
  --color-accent-dark: #A95D31;
  --color-accent-soft: #C77B45;
  --color-accent-pale: #E6AC76;
  --color-text: #F3E9DA;
  --color-text-muted: #B7A696;
  --color-success: #7FA68A;
  --color-warning: #D9A35D;
  --color-error: #C9685C;
  --color-screen: #DCECE7;
  --color-screen-soft: #B9D1CC;
  --color-screen-muted: #76918C;
  --color-screen-deep: #17201E;
  --color-screen-panel: #202C29;
  --color-screen-line: #344A45;
  --color-shadow: #090605;
  --color-shadow-soft: #100B08;
  --color-desk: #3D281D;
  --color-desk-light: #523528;
  --color-desk-dark: #261812;
  --color-desk-edge: #1D120E;
  --color-key: #241A16;
  --color-key-top: #3B2C25;
  --color-metal: #332A27;
  --color-metal-light: #594A43;
  --color-cat: #0D0908;
  --color-cat-soft: #18100D;
  --color-white-soft: #FFF8ED;
  --color-transparent: transparent;
  --glow-accent: rgba(217, 135, 75, 0.24);
  --glow-accent-strong: rgba(217, 135, 75, 0.42);
  --glow-screen: rgba(185, 209, 204, 0.19);
  --glow-screen-strong: rgba(220, 236, 231, 0.28);
  --shade-heavy: rgba(9, 6, 5, 0.68);
  --shade-medium: rgba(9, 6, 5, 0.42);
  --shade-light: rgba(9, 6, 5, 0.22);
  --line-warm: rgba(243, 233, 218, 0.08);
  --line-cool: rgba(220, 236, 231, 0.12);
  --wood-line: rgba(217, 135, 75, 0.075);
  --lamp-light: rgba(217, 163, 93, 0.15);
  --lamp-core: rgba(230, 172, 118, 0.22);
  --focus-ring: rgba(230, 172, 118, 0.55);
  --font-display: "Noto Sans SC", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --radius-xs: 5px;
  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-xxl: 44px;
  --radius-pill: 999px;
  --shadow-button: 0 12px 34px var(--glow-accent);
  --shadow-card: 0 24px 58px var(--shade-medium);
  --shadow-device: 0 34px 70px var(--shade-heavy);
  --shadow-desk: 0 50px 100px var(--color-shadow);
  --header-height: 84px;
  --content-max: 1240px;
  --content-wide: 1368px;
  --gutter: clamp(16px, 4vw, 36px);
  --section-space: clamp(64px, 9vw, 116px);
  --transition-fast: 180ms ease;
  --transition-slow: 560ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  min-width: 0;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--color-bg);
}

html.nav-open {
  overflow: hidden;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--color-text);
  background:
    radial-gradient(circle at 84% 9%, var(--glow-accent), var(--color-transparent) 25rem),
    linear-gradient(128deg, var(--color-bg), var(--color-bg-soft) 54%, var(--color-panel));
  font-family: var(--font-body);
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

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: var(--color-transparent);
}

button {
  border: 0;
}

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

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

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

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

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

h1 {
  margin-bottom: 24px;
  font-size: clamp(48px, 6.2vw, 74px);
  font-weight: 900;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(31px, 4vw, 48px);
  font-weight: 850;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(21px, 2.5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h4 {
  margin-bottom: 10px;
  font-size: 18px;
}

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

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

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

:not(pre) > code {
  padding: 0.14em 0.38em;
  border-radius: var(--radius-xs);
  overflow-wrap: anywhere;
  color: var(--color-accent-pale);
  background: var(--color-panel-raised);
}

pre {
  max-width: 100%;
  padding: 20px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  color: var(--color-screen);
  background: var(--color-screen-deep);
  -webkit-overflow-scrolling: touch;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--color-accent-pale);
  background: var(--color-panel-raised);
  font-size: 13px;
}

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

.wrap {
  width: min(100%, calc(var(--content-max) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-wide {
  width: min(100%, calc(var(--content-wide) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

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

.section-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--color-accent-pale);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.section-kicker::before,
.eyebrow::before {
  width: 34px;
  height: 2px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  content: "";
  background: var(--color-accent);
  box-shadow: 0 0 14px var(--glow-accent-strong);
}

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

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

.title-emphasis {
  color: var(--color-accent);
  background: linear-gradient(90deg, var(--color-accent-pale), var(--color-accent), var(--color-accent-dark));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: var(--color-transparent);
}

.button,
.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 19px;
  border-radius: var(--radius-md);
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    background-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.button svg,
.primary-button svg,
.secondary-button svg,
.text-button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

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

.button-secondary,
.secondary-button {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: var(--color-panel);
}

.button-quiet,
.text-button {
  min-height: 42px;
  padding-inline: 8px;
  color: var(--color-accent-pale);
  background: var(--color-transparent);
}

.button:hover,
.primary-button:hover,
.secondary-button:hover,
.text-button:hover {
  transform: translateY(-2px);
}

.button-primary:hover,
.primary-button:hover {
  background: var(--color-accent-pale);
  box-shadow: 0 16px 40px var(--glow-accent-strong);
}

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

.button:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

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

.panel,
.card {
  min-width: 0;
  border-radius: var(--radius-xl);
  color: var(--color-text-muted);
  background: var(--color-panel);
}

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

.card {
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-card);
}

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

.card h3,
.panel h2,
.panel h3 {
  color: var(--color-text);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 20px;
}

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

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

.grid-2 > *,
.grid-3 > *,
.site-footer-grid > *,
.hero > * {
  min-width: 0;
}

.badge,
.chip,
.tag {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  background: var(--shade-light);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-success);
  box-shadow: 0 0 9px var(--color-success);
}

.status-dot.warning {
  background: var(--color-warning);
  box-shadow: 0 0 9px var(--color-warning);
}

.status-dot.error {
  background: var(--color-error);
  box-shadow: 0 0 9px var(--color-error);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  min-width: 680px;
}

.prose {
  max-width: 820px;
  min-width: 0;
  color: var(--color-text-muted);
  font-size: 17px;
}

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

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

.prose p,
.prose li {
  overflow-wrap: break-word;
}

.prose a {
  color: var(--color-accent-pale);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-dark);
  text-underline-offset: 0.2em;
}

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

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

.site-header {
  position: relative;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid var(--line-warm);
  background: linear-gradient(180deg, var(--shade-light), var(--color-transparent));
}

.site-header-inner {
  position: relative;
  z-index: 70;
  display: flex;
  width: min(100%, calc(var(--content-wide) + var(--gutter) * 2));
  height: 100%;
  align-items: center;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-domain {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.11em;
}

.desktop-nav {
  display: flex;
  height: var(--header-height);
  align-items: stretch;
  gap: 25px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 2px 0 0;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 650;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--color-text);
}

.nav-link.is-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: var(--radius-pill) var(--radius-pill) 0 0;
  content: "";
  background: var(--color-accent);
  box-shadow: 0 -3px 14px var(--glow-accent-strong);
}

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

.language-control {
  position: relative;
}

.language-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  background: var(--color-panel);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.language-button svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: 164px;
  padding: 7px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel-raised);
  box-shadow: var(--shadow-card);
}

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

.language-menu a {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 13px;
}

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

.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-panel);
  cursor: pointer;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  width: 19px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: currentColor;
}

.menu-toggle-lines {
  position: relative;
  display: block;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
  position: absolute;
  left: 0;
  content: "";
  transition: transform var(--transition-fast), top var(--transition-fast);
}

.menu-toggle-lines::before {
  top: -6px;
}

.menu-toggle-lines::after {
  top: 6px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines {
  background: var(--color-transparent);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after {
  top: 0;
  transform: rotate(-45deg);
}

.mobile-drawer {
  position: fixed;
  top: var(--header-height);
  right: 0;
  left: 0;
  z-index: 65;
  display: none;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  padding: 10px var(--gutter) 22px;
  overscroll-behavior: contain;
  border-top: 1px solid var(--color-border-soft);
  background: var(--color-panel);
}

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

.mobile-drawer a {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid var(--color-border-soft);
  color: var(--color-text-muted);
}

.mobile-drawer a.is-active,
.mobile-drawer a:hover {
  color: var(--color-text);
}

.mobile-language-title {
  margin: 18px 12px 5px;
  color: var(--color-accent-pale);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.nav-veil {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 50;
  display: none;
  background: var(--shade-heavy);
}

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

.site-footer {
  position: relative;
  overflow-x: clip;
  border-top: 1px solid var(--line-warm);
  background:
    repeating-linear-gradient(96deg, var(--color-transparent) 0, var(--color-transparent) 34px, var(--wood-line) 35px, var(--color-transparent) 36px),
    var(--color-bg-soft);
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 1.35fr 0.8fr;
  gap: clamp(28px, 5vw, 64px);
  padding-top: 66px;
  padding-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 17px;
}

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

.footer-summary {
  max-width: 330px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.footer-title {
  margin-bottom: 16px;
  color: var(--color-accent-pale);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

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

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

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

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

.footer-keywords a {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  padding: 4px 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  background: var(--color-panel);
  font-size: 12px;
  white-space: nowrap;
}

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

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

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

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

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

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

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

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

@media (max-width: 640px) {
  :root {
    --header-height: 70px;
    --gutter: max(16px, 4.5vw);
  }

  h1 {
    font-size: clamp(42px, 13.5vw, 58px);
  }

  h2 {
    font-size: clamp(29px, 9vw, 38px);
  }

  .site-brand {
    min-width: 0;
    flex: 1 1 auto;
  }

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

  .brand-name {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-domain {
    font-size: 9px;
  }

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

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

  .button-row .button,
  .button-row .primary-button,
  .button-row .secondary-button {
    width: 100%;
  }

  .panel,
  .card {
    border-radius: var(--radius-lg);
  }

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

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

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

@media (max-width: 370px) {
  .brand-domain {
    display: none;
  }

  .site-brand {
    gap: 9px;
  }
}

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

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

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