:root {
  --color-bg: #FFFFFF;
  --color-panel: #F8F9FA;
  --color-panel-strong: #F1F3F5;
  --color-border: #DDE1E5;
  --color-border-soft: #EAEDF0;
  --color-accent: #12B886;
  --color-accent-dark: #087F66;
  --color-accent-soft: #E6F8F2;
  --color-text: #17191C;
  --color-muted: #697078;
  --color-muted-light: #959CA3;
  --color-warn: #F5B82E;
  --color-warn-soft: #FFF5D8;
  --color-error: #F04478;
  --color-error-soft: #FFF0F5;
  --color-coral: #F06D62;
  --color-white: #FFFFFF;
  --color-code: #17191C;
  --color-overlay: rgba(23, 25, 28, 0.42);
  --color-shadow: rgba(23, 25, 28, 0.09);
  --color-shadow-soft: rgba(23, 25, 28, 0.045);
  --color-grid: rgba(105, 112, 120, 0.075);
  --color-accent-glow: rgba(18, 184, 134, 0.13);
  --color-error-glow: rgba(240, 68, 120, 0.08);
  --gradient-title: linear-gradient(102deg, var(--color-coral) 2%, var(--color-error) 94%);
  --gradient-logo: linear-gradient(145deg, var(--color-accent), var(--color-accent-dark));
  --gradient-edge: linear-gradient(90deg, var(--color-accent), var(--color-warn), var(--color-error));
  --font-display: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: Inter, "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --radius-xs: 7px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --shadow-nav: 0 1px 0 var(--color-border-soft);
  --shadow-card: 0 8px 20px var(--color-shadow-soft);
  --shadow-device: 0 22px 55px var(--color-shadow), 0 4px 12px var(--color-shadow-soft);
  --shadow-float: 0 18px 42px var(--color-shadow);
  --page-width: 1280px;
  --reading-width: 800px;
  --nav-height: 74px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-space: clamp(64px, 9vw, 112px);
  --transition-fast: 160ms ease;
  --transition-slow: 520ms cubic-bezier(.2, .8, .2, 1);
}

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

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

html.nav-open {
  overflow: hidden;
}

body {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  background: var(--color-bg);
  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,
ul,
ol,
li {
  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: transparent;
}

button {
  cursor: pointer;
}

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

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

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

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

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

code {
  padding: 0.12em 0.36em;
  border-radius: var(--radius-xs);
  background: var(--color-panel-strong);
  font-size: 0.9em;
}

pre {
  max-width: 100%;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: var(--color-code);
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  -webkit-overflow-scrolling: touch;
}

pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  overflow-wrap: normal;
  white-space: pre;
}

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

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

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

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

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

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

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

.reading-wrap {
  width: min(100%, calc(var(--reading-width) + (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-compact {
  padding-top: clamp(42px, 6vw, 72px);
  padding-bottom: clamp(42px, 6vw, 72px);
  overflow-x: clip;
}

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

.stack > * + * {
  margin-top: 24px;
}

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

.cluster > svg,
.cluster > img,
.icon-lock {
  flex-shrink: 0;
}

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

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

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

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

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

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

h1 {
  margin-bottom: 24px;
  font-size: clamp(52px, 5vw, 72px);
  font-weight: 840;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 820;
  letter-spacing: -0.018em;
  line-height: 1.18;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 780;
  line-height: 1.3;
}

h4 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.4;
}

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

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

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

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

.gradient-text {
  color: var(--color-error);
  background: var(--gradient-title);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  box-shadow: 0 0 0 5px var(--color-accent-glow);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 36px;
}

.section-heading.centered {
  margin-inline: auto;
  text-align: center;
}

.button {
  min-height: 45px;
  padding: 0 21px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

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

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

.button:active {
  transform: translateY(0);
}

.button-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 9px 22px var(--color-accent-glow);
}

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

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

.button-quiet {
  border-color: transparent;
  background: var(--color-panel);
}

.button[disabled],
.button.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

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

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

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

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

.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: 680px;
  margin: 0;
}

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

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

.site-header {
  position: relative;
  z-index: 100;
  height: var(--nav-height);
  background: var(--color-bg);
  box-shadow: var(--shadow-nav);
}

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

.brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 39px;
  height: 39px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.primary-nav {
  height: 100%;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 31px;
}

.nav-link {
  height: 100%;
  padding: 2px 1px 0;
  display: inline-flex;
  align-items: center;
  position: relative;
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 600;
  transition: color var(--transition-fast);
}

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

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

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

.language-switcher {
  position: relative;
}

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

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 178px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: none;
  background: var(--color-bg);
  box-shadow: var(--shadow-float);
}

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

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

.language-menu a:hover,
.language-menu a.current {
  background: var(--color-panel);
  color: var(--color-text);
}

.menu-toggle {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  display: none;
  place-items: center;
  background: var(--color-bg);
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  width: 18px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--color-text);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

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

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

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

.menu-toggle-lines::after {
  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-drawer {
  position: absolute;
  z-index: 103;
  top: var(--nav-height);
  right: 0;
  left: 0;
  max-height: calc(100dvh - var(--nav-height));
  padding: 12px var(--gutter) 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
  border-top: 1px solid var(--color-border-soft);
  background: var(--color-bg);
  box-shadow: var(--shadow-float);
}

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

.mobile-drawer a {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  color: var(--color-muted);
  font-weight: 650;
}

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

.drawer-separator {
  height: 1px;
  margin: 10px 0;
  background: var(--color-border-soft);
}

.drawer-label {
  padding: 7px 12px 3px;
  color: var(--color-muted-light);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-veil {
  position: fixed;
  z-index: 99;
  inset: var(--nav-height) 0 0;
  display: none;
  border: 0;
  background: var(--color-overlay);
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 1.2fr 0.9fr;
  gap: clamp(28px, 5vw, 64px);
}

.footer-brand {
  max-width: 330px;
}

.footer-brand .brand {
  margin-bottom: 16px;
}

.footer-description {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.75;
}

.footer-heading {
  margin: 4px 0 16px;
  font-size: 14px;
  font-weight: 780;
}

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

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

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

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

.footer-keywords a {
  max-width: 100%;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-muted);
  font-size: 12px;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 22px;
  padding-bottom: 22px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--color-muted);
  font-size: 13px;
}

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

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

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

.prose h2 {
  margin-top: 2.2em;
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

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

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

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

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

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

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

  .menu-toggle {
    display: grid;
  }

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

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

@media (max-width: 768px) {
  :root {
    --nav-height: 66px;
  }

  h1 {
    font-size: clamp(28px, 9vw, 40px);
    line-height: 1.15;
  }

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

  .language-switcher {
    display: none;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  body {
    font-size: 15px;
  }

  .brand {
    gap: 9px;
    font-size: 16px;
  }

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

  .nav-shell {
    gap: 10px;
  }

  .button {
    min-height: 46px;
  }

  .cluster .button {
    width: 100%;
  }

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

  .table-wrap {
    width: 100%;
  }

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

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

@media (max-width: 360px) {
  .brand span:last-child {
    max-width: 150px;
    line-height: 1.2;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }

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