:root {
  --color-bg: #FFFFFF;
  --color-panel: #F8F9FB;
  --color-panel-strong: #EFF1F5;
  --color-border: #E4E7EC;
  --color-accent: #7A5AF8;
  --color-accent-dark: #5B3FD4;
  --color-text: #101322;
  --color-muted: #5D6470;
  --color-success: #17A672;
  --color-warning: #E8A013;
  --color-error: #DE3B4C;
  --color-hero: #101322;
  --color-hero-raised: #1A2033;
  --color-hero-text: #F5F7FC;
  --color-hero-soft: #C7CDDC;
  --color-hero-muted: #8B93A9;
  --color-accent-soft: #A18CFF;
  --color-success-soft: #3ECF9C;
  --color-white: #FFFFFF;
  --color-flag-red: #CE2F3C;
  --color-flag-hk: #DE2910;
  --color-flag-blue: #3C3B6E;
  --color-flag-kr: #0047A0;
  --color-flag-sg: #EF3340;
  --color-transparent: transparent;
  --line-hero: rgba(255, 255, 255, .09);
  --line-hero-soft: rgba(255, 255, 255, .055);
  --line-hero-strong: rgba(255, 255, 255, .16);
  --shadow-card: 0 2px 5px rgba(6, 9, 20, .35), 0 26px 52px -14px rgba(6, 9, 20, .55);
  --shadow-panel: 0 30px 70px -34px rgba(16, 19, 34, .35);
  --shadow-soft: 0 10px 30px -22px rgba(16, 19, 34, .35);
  --shadow-button: 0 6px 16px -6px rgba(122, 90, 248, .55);
  --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', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 24px;
  --radius-round: 999px;
  --header-height: 64px;
  --content-width: 1180px;
  --reading-width: 820px;
  --gutter: clamp(16px, 3vw, 32px);
  --space-section: clamp(64px, 9vw, 112px);
  --transition-fast: 150ms ease;
  --transition-reveal: 600ms cubic-bezier(.2, .75, .25, 1);
}

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

html {
  background: var(--color-bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

html.nav-open {
  overflow: hidden;
}

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

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

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: var(--color-accent-dark);
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
}

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

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

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

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

h1 {
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: -.01em;
}

h2 {
  font-size: clamp(27px, 3vw, 36px);
}

h3 {
  font-size: clamp(20px, 2vw, 25px);
}

h4 {
  font-size: 17px;
}

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

small {
  color: var(--color-muted);
}

strong {
  font-weight: 700;
}

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

:not(pre) > code {
  overflow-wrap: anywhere;
  padding: .12em .35em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  background: var(--color-panel);
  color: var(--color-text);
  font-size: .9em;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 20px;
  border: 1px solid var(--line-hero-strong);
  border-radius: var(--radius-md);
  background: var(--color-hero);
  color: var(--color-hero-text);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

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

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

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

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

.wrap {
  width: 100%;
  max-width: calc(var(--content-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);
}

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

.section-rule {
  border-top: 1px solid var(--color-border);
}

.section-head {
  max-width: 720px;
  margin-bottom: 36px;
}

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

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

.surface {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
}

.panel-surface {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  color: var(--color-text);
}

.card {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
}

.card > :last-child {
  margin-bottom: 0;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 21px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.button:hover {
  border-color: var(--color-muted);
  background: var(--color-panel);
  color: var(--color-text);
}

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

.button:focus-visible,
.site-nav a:focus-visible,
.lang-button:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid var(--color-accent-soft);
  outline-offset: 2px;
}

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

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

.button-dark {
  border-color: var(--line-hero-strong);
  background: var(--color-transparent);
  color: var(--color-hero-text);
}

.button-dark:hover {
  border-color: var(--color-hero-muted);
  background: var(--line-hero-soft);
  color: var(--color-white);
}

.button svg,
.icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

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

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

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

.site-brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

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

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

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

.site-nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

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

.site-nav a.is-active {
  color: var(--color-text);
  font-weight: 700;
}

.site-nav a.is-active svg {
  color: var(--color-accent);
}

.site-nav svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

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

.lang-button,
.menu-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-muted);
  cursor: pointer;
}

.lang-button {
  gap: 7px;
  padding: 7px 12px;
  white-space: nowrap;
}

.lang-button:hover,
.menu-toggle:hover {
  border-color: var(--color-muted);
  color: var(--color-text);
}

.lang-button svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.lang-short {
  display: none;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  display: none;
  width: 180px;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

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

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

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

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

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

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

.menu-toggle-lines::before,
.menu-toggle-lines::after {
  position: absolute;
  left: 0;
  content: "";
}

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

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

.mobile-nav {
  position: absolute;
  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) 18px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
  overscroll-behavior: contain;
}

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

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

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

.mobile-nav svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

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

.mobile-language-label {
  padding: 7px 12px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.nav-veil {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 40;
  display: none;
  background: var(--line-hero-soft);
}

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

.site-footer {
  overflow-x: clip;
  border-top: 1px solid var(--color-border);
  background: var(--color-panel);
  color: var(--color-text);
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) repeat(3, minmax(150px, 1fr));
  gap: 42px;
  padding-top: 56px;
  padding-bottom: 42px;
}

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

.footer-title {
  margin-bottom: 14px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
}

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

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

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

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

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

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

.tilt {
  transform: rotate(-2deg);
}

.decor-zone {
  position: relative;
  overflow-x: clip;
}

.full-bleed-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

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

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

.prose h2 {
  margin-top: 2.3em;
  padding-top: .8em;
  border-top: 1px solid var(--color-border);
}

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

.prose a {
  font-weight: 600;
}

.prose img {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

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

.table-wrap table {
  min-width: 620px;
  margin: 0;
}

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

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

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

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

@media (max-width: 768px) {
  h1 {
    font-size: clamp(24px, 7.5vw, 30px);
    line-height: 1.2;
  }

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

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

  .footer-shell {
    gap: 32px 24px;
  }
}

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

  .lang-full {
    display: none;
  }

  .lang-short {
    display: inline;
  }

  .lang-button {
    padding-inline: 10px;
  }

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

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

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

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

  .tilt,
  [class*="tilt"] {
    transform: none;
  }

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

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

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

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }

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