:root {
  --color-bg: #FFFFFF;
  --color-panel: #F7F7F7;
  --color-panel-strong: #EFEFEF;
  --color-border: #E5E6E6;
  --color-accent: #16535C;
  --color-accent-dark: #0C3940;
  --color-text: #191B1C;
  --color-text-muted: #5C6366;
  --color-success: #2F7D63;
  --color-warning: #E9944F;
  --color-error: #C64B33;
  --color-sand: #E8D9C4;
  --color-stage-mid: #7E9A94;
  --color-stage-start: #3E6E73;
  --color-stage-end: #D9C9B2;
  --color-stage-soft: #7A9694;
  --color-window: #1B1D1F;
  --color-window-bar: #232628;
  --color-window-border: #2E3234;
  --color-window-text: #D8DBDC;
  --color-window-muted: #8A9194;
  --color-white: #FFFFFF;
  --color-black-line: #191B1C;
  --color-overlay: rgba(25, 27, 28, .42);
  --color-accent-haze: rgba(22, 83, 92, .52);
  --color-accent-clear: rgba(22, 83, 92, 0);
  --color-sand-haze: rgba(232, 217, 196, .92);
  --color-sand-clear: rgba(232, 217, 196, 0);
  --color-soft-haze: rgba(122, 150, 148, .34);
  --color-soft-clear: rgba(122, 150, 148, 0);
  --color-white-haze: rgba(255, 255, 255, .30);
  --color-white-clear: rgba(255, 255, 255, 0);
  --color-shadow-a: rgba(12, 57, 64, .18);
  --color-shadow-b: rgba(12, 57, 64, .10);
  --color-fab-shadow: rgba(12, 57, 64, .20);
  --font-display: Georgia, 'Times New Roman', 'Songti SC', 'Noto Serif CJK SC', 'Source Han Serif SC', serif;
  --font-body: 'Inter', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Courier New', monospace;
  --radius-large: 28px;
  --radius-medium: 16px;
  --radius-small: 10px;
  --radius-pill: 999px;
  --shadow-window: 0 18px 44px var(--color-shadow-a), 0 4px 12px var(--color-shadow-b);
  --shadow-fab: 0 12px 30px var(--color-fab-shadow);
  --content-max: 1184px;
  --reading-max: 780px;
  --header-max: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-height: 78px;
  --section-space: clamp(72px, 10vw, 144px);
  --motion-fast: 180ms;
  --motion-reveal: 620ms;
}

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

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

html.nav-open {
  overflow: hidden;
}

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

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

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

svg[aria-hidden="true"] {
  flex-shrink: 0;
}

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

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

button {
  border: 0;
}

a {
  color: var(--color-accent-dark);
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
}

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

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

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

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

h1,
.display-title {
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-size: clamp(34px, 3.35vw, 48px);
  font-weight: 400;
  letter-spacing: .005em;
  line-height: 1.2;
}

h2 {
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.22;
}

h3 {
  margin-bottom: 14px;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.35;
}

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

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

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

:not(pre) > code {
  padding: .12em .38em;
  border-radius: var(--radius-small);
  background: var(--color-panel-strong);
  color: var(--color-text);
  font-size: .9em;
  overflow-wrap: anywhere;
}

pre {
  max-width: 100%;
  padding: 22px;
  overflow-x: auto;
  border-radius: var(--radius-medium);
  background: var(--color-window);
  color: var(--color-window-text);
  font: 14px/1.7 var(--font-mono);
  -webkit-overflow-scrolling: touch;
}

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

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

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

th {
  background: var(--color-panel);
  color: var(--color-text);
  font-weight: 650;
}

td {
  background: var(--color-bg);
  color: var(--color-text);
}

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

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

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

.section-heading {
  max-width: 760px;
  margin-bottom: clamp(38px, 6vw, 76px);
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--color-text-muted);
  font: 600 13px/1.4 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

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

.nowrap-term {
  white-space: nowrap;
}

.button {
  display: inline-flex;
  min-height: 48px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

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

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

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

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

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

.button-dark {
  background: var(--color-window);
  color: var(--color-white);
}

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

.button-text {
  min-height: 44px;
  padding-inline: 0;
  border-bottom-color: var(--color-text);
  border-radius: 0;
  background: var(--color-bg);
  color: var(--color-text);
}

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

.button-arrow {
  flex-shrink: 0;
  color: var(--color-warning);
  font-family: var(--font-mono);
}

.button[aria-disabled="true"],
.button:disabled {
  background: var(--color-panel-strong);
  color: var(--color-text-muted);
  cursor: not-allowed;
  transform: none;
}

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

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

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

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

.soft-panel {
  border-radius: var(--radius-large);
  background: var(--color-panel);
  color: var(--color-text);
}

.dark-panel {
  border-radius: var(--radius-large);
  background: var(--color-window);
  color: var(--color-window-text);
}

.dark-panel h2,
.dark-panel h3,
.dark-panel strong {
  color: var(--color-white);
}

.dark-panel a {
  color: var(--color-sand);
}

.site-head {
  position: relative;
  z-index: 50;
  background: var(--color-bg);
  color: var(--color-text);
}

.header-shell {
  display: flex;
  width: 100%;
  max-width: min(100%, calc(var(--header-max) + var(--gutter) * 2));
  min-height: var(--header-height);
  margin-inline: auto;
  padding-inline: var(--gutter);
  align-items: center;
}

.brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 11px;
  color: var(--color-text);
  text-decoration: none;
}

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

.brand-logo {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: .01em;
}

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

.desktop-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 15px;
  text-decoration: none;
}

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

.desktop-nav a.is-active,
.desktop-nav a[aria-current="page"] {
  font-weight: 650;
}

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

.language-menu {
  position: relative;
}

.language-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.language-button:hover,
.language-button[aria-expanded="true"] {
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

.language-short {
  display: none;
}

.language-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: 176px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-bg);
  color: var(--color-text);
}

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

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

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

.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--color-text);
  content: "";
  transition: transform var(--motion-fast) ease, opacity var(--motion-fast) ease;
}

.menu-toggle-lines {
  position: relative;
  margin-inline: auto;
}

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

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

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

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

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

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

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

.mobile-drawer {
  position: absolute;
  z-index: 51;
  top: 100%;
  right: var(--gutter);
  left: var(--gutter);
  display: none;
  max-height: calc(100dvh - var(--header-height) - 12px);
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-bg);
  color: var(--color-text);
}

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

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

.mobile-drawer a:hover,
.mobile-drawer a.is-active {
  background: var(--color-panel);
  color: var(--color-accent-dark);
}

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

.site-footer {
  margin-top: var(--section-space);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(150px, 1fr));
  gap: clamp(30px, 5vw, 72px);
  padding-top: 72px;
  padding-bottom: 62px;
}

.footer-brand-copy {
  max-width: 380px;
  margin-top: 18px;
  color: var(--color-text-muted);
}

.footer-heading {
  margin-bottom: 16px;
  font: 650 13px/1.4 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

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

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

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

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

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

.footer-legal a {
  color: var(--color-text-muted);
  text-decoration: none;
}

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

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

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

.prose > * + * {
  margin-top: 1.25em;
}

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

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

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

.prose img {
  height: auto;
  border-radius: var(--radius-medium);
}

.prose blockquote {
  padding-left: 20px;
  border-left: 3px solid var(--color-accent);
  color: var(--color-text-muted);
}

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

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

@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }

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

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

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

@media (max-width: 640px) {
  :root {
    --header-height: 70px;
    --section-space: 72px;
  }

  h1,
  .display-title {
    font-size: clamp(24px, 8vw, 30px);
    line-height: 1.22;
  }

  h2 {
    font-size: clamp(27px, 8vw, 34px);
  }

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

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

  .language-full {
    display: none;
  }

  .language-short {
    display: inline;
  }

  .language-button {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    padding-inline: 11px;
  }

  .language-popover {
    display: none;
  }

  .button-row {
    justify-content: center;
  }

  .footer-main {
    grid-template-columns: 1fr;
    padding-top: 54px;
    padding-bottom: 44px;
  }

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

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

  th,
  td {
    padding: 12px 14px;
  }
}

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

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

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