:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --panel: #F7F7F7;
  --panel-2: #EFEFF0;
  --border: #DEDEE1;
  --accent: #ED681C;
  --accent-dark: #A64112;
  --text: #252528;
  --muted: #626267;
  --success: #535D54;
  --warn: #A64112;
  --error: #874C45;
  --clear: transparent;
  --flag-red: #C93843;
  --flag-blue: #2C426C;
  --flag-white: #FFFFFF;
  --wash: color-mix(in srgb, var(--accent) 14%, var(--bg));
  --wash-light: color-mix(in srgb, var(--accent) 5%, var(--bg));
  --clay: color-mix(in srgb, var(--accent) 57%, var(--bg));
  --clay-dark: color-mix(in srgb, var(--accent-dark) 68%, var(--bg));
  --clay-pale: color-mix(in srgb, var(--accent) 24%, var(--bg));
  --shade: color-mix(in srgb, var(--accent-dark) 12%, transparent);
  --dot: color-mix(in srgb, var(--accent-dark) 12%, transparent);
  --edge-warm: color-mix(in srgb, var(--accent-dark) 20%, transparent);
  --veil: color-mix(in srgb, var(--text) 24%, transparent);
  --secondary-surface: color-mix(in srgb, var(--bg) 28%, transparent);
  --flag-edge: color-mix(in srgb, var(--text) 7%, transparent);
  --display: 'Inter', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', system-ui, sans-serif;
  --body: var(--display);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --pill: 999px;
  --soft: 20px;
  --small: 4px;
  --round: 50%;
  --regular: 400;
  --medium: 500;
  --semibold: 600;
  --bold: 700;
  --heavy: 800;
  --h1: 68px;
  --mobile-h1: 36px;
  --h2: 40px;
  --mobile-h2: 28px;
  --h3: 24px;
  --large: 20px;
  --body-size: 18px;
  --nav-size: 15px;
  --small-size: 13px;
  --tiny: 11px;
  --micro: 10px;
  --caption-mobile: 9px;
  --stat-size: 32px;
  --brand-size: 24px;
  --brand-mobile: 21px;
  --leading: 1.75;
  --heading-leading: 1.2;
  --tracking: -.02em;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;
  --gutter: 24px;
  --content-width: 1216px;
  --reading-width: 800px;
  --header-height: 80px;
  --anchor-offset: 96px;
  --toc-offset: 80px;
  --toc-landing: 152px;
  --line: 1px;
  --focus-width: 2px;
  --focus-gap: 5px;
  --soft-shadow: 0 12px 36px var(--shade), 0 2px 5px color-mix(in srgb, var(--accent-dark) 4%, transparent);
  --lift-shadow: 0 18px 48px color-mix(in srgb, var(--accent-dark) 14%, transparent), 0 2px 0 var(--bg) inset;
  --notice-shadow: 0 4px 20px var(--shade);
  --focus-ring: 0 0 0 3px var(--wash);
  --transition: 180ms ease;
  --reveal-duration: 650ms;
  --reveal-offset: 16px;
}

* { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--body-size);
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: var(--anchor-offset);
  scroll-behavior: smooth;
}
body { margin: 0; line-height: var(--leading); }
main, article, section, aside, nav, div, li { min-width: 0; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, summary, a { -webkit-tap-highlight-color: var(--clear); }
button { background: var(--bg); border: var(--line) solid var(--border); }
summary { cursor: pointer; }
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: var(--focus-width) solid var(--accent-dark);
  outline-offset: var(--focus-gap);
}
[hidden] { display: none !important; }
::selection { color: var(--text); background: var(--clay-pale); }
h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: var(--heading-leading);
  letter-spacing: var(--tracking);
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--h1); font-weight: var(--heavy); margin: 16px 0 20px; }
h2 { font-size: var(--h2); font-weight: var(--bold); margin: 0 0 var(--space-3); }
h3 { font-size: var(--h3); font-weight: var(--bold); margin: 0 0 var(--space-2); }
h4 { font-size: var(--large); margin: 0 0 var(--space-1); }
p { margin: 0 0 var(--space-3); }
ul, ol { padding-inline-start: var(--space-3); }
code { font-family: var(--mono); font-size: .88em; overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  overflow-x: auto;
  padding: var(--space-3);
  background: var(--panel-2);
  border-radius: var(--small);
}
pre code { white-space: pre; overflow-wrap: normal; }
table { border-collapse: collapse; }
th { text-align: start; }
hr { border: 0; border-top: var(--line) solid var(--border); margin-block: var(--space-6); }
.no-break { white-space: nowrap; }
.emphasis { color: var(--accent); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.lead { font-size: var(--large); color: var(--muted); }
.small-text { font-size: var(--small-size); color: var(--muted); }
.wrap { width: 100%; max-width: var(--content-width); margin-inline: auto; padding-inline: var(--gutter); }
.reading { max-width: var(--reading-width); margin-inline: auto; }
.section { padding-top: var(--space-10); padding-bottom: var(--space-10); }
.section-heading { max-width: var(--reading-width); margin-bottom: var(--space-5); }
.surface-band { background: var(--panel); }
.decorated { position: relative; isolation: isolate; overflow-x: clip; max-width: 100%; }
.stack > * + * { margin-top: var(--space-3); }
.grid { display: grid; gap: var(--space-3); }
.grid > * { min-width: 0; }
.grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .card {
  padding: var(--space-4);
  background: linear-gradient(145deg, var(--bg), var(--panel));
  border: var(--line) solid var(--border);
  border-radius: var(--soft);
}
.panel { box-shadow: var(--soft-shadow); }
.prose { overflow-wrap: anywhere; }
.prose h2 { margin-top: var(--space-8); }
.prose h3 { margin-top: var(--space-5); }
.prose a, .text-link { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.prose li + li { margin-top: var(--space-1); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 52px;
  padding: 0 28px;
  border: var(--line) solid var(--border);
  border-radius: var(--pill);
  font-size: var(--nav-size);
  font-weight: var(--semibold);
  line-height: 1.4;
  text-align: center;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.button-primary { background: var(--bg); border-color: var(--bg); box-shadow: var(--soft-shadow); }
.button-primary:hover, .button-primary.is-hover { box-shadow: var(--lift-shadow); }
.button-secondary { border-color: var(--edge-warm); background: var(--secondary-surface); }
.button-secondary:hover { background: var(--bg); }
.button:active, .button.is-active { transform: translateY(1px); background: var(--panel-2); }
.button.is-focus { outline: var(--focus-width) solid var(--accent-dark); outline-offset: var(--focus-gap); }
.button:disabled, .button[aria-disabled="true"] { color: var(--muted); background: var(--panel-2); box-shadow: none; cursor: not-allowed; }
.button-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.mast {
  height: var(--header-height);
  padding: 0 56px;
  display: flex;
  align-items: center;
  gap: 48px;
  background: var(--bg);
  position: relative;
  z-index: 50;
  line-height: 1.5;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: var(--brand-size); letter-spacing: -.04em; font-weight: var(--heavy); flex-shrink: 0; }
.brand-mark { width: 36px; height: 36px; }
.brand-local { color: var(--muted); font-weight: var(--medium); font-size: var(--nav-size); }
.nav { display: flex; align-items: center; gap: 34px; margin-left: auto; font-size: var(--nav-size); }
.nav a { display: inline-flex; align-items: center; min-height: 24px; }
.nav a:hover, .menu summary:hover { color: var(--accent-dark); }
.current, .nav [aria-current="page"] { font-weight: var(--semibold); }
.primary-nav { white-space: nowrap; }
.menu { position: relative; }
.menu summary { display: flex; align-items: center; gap: 8px; list-style: none; min-height: 24px; }
.menu summary::-webkit-details-marker { display: none; }
.chevron { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.menu[open] .chevron { transform: rotate(180deg); }
.menu-list, .language-list {
  position: absolute;
  top: calc(100% + 12px);
  right: -22px;
  width: 200px;
  padding: 12px;
  background: var(--bg);
  border: var(--line) solid var(--border);
  border-radius: var(--soft);
  box-shadow: var(--soft-shadow);
  z-index: 4;
}
.menu-list a, .language-list a { display: flex; min-height: 44px; padding: 10px 12px; border-radius: var(--small); }
.menu-list a:hover, .language-list a:hover { background: var(--wash-light); }
.header-tools { display: flex; align-items: center; gap: 28px; font-size: var(--nav-size); }
.language { position: relative; color: var(--muted); white-space: nowrap; }
.language-toggle { display: flex; align-items: center; gap: 8px; padding: 0; min-height: 32px; border: 0; background: var(--clear); font-size: inherit; }
.language-list { right: 0; }
.login { display: inline-flex; align-items: center; justify-content: center; padding: 10px 26px; border: var(--line) solid var(--border); border-radius: var(--pill); font-weight: var(--semibold); white-space: nowrap; }
.login:hover { background: var(--panel); }
.menu-toggle { display: none; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border-radius: var(--pill); padding: 10px; }
.menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.mobile-drawer, .nav-veil { display: none; }
html.nav-open { overflow: hidden; }
.skip-link { position: absolute; top: 8px; left: 16px; transform: translateY(-160%); background: var(--bg); padding: 8px 16px; border-radius: var(--pill); z-index: 60; }
.skip-link:focus-visible { transform: none; }

.site-footer { background: linear-gradient(180deg, var(--panel), var(--bg)); border-top: var(--line) solid var(--border); padding-top: var(--space-8); padding-bottom: var(--space-4); font-size: var(--nav-size); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--space-6); }
.footer-brand p { margin-top: var(--space-3); max-width: 320px; color: var(--muted); }
.footer-heading { font-size: var(--nav-size); font-weight: var(--semibold); margin: 0 0 var(--space-2); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 32px; padding-block: 4px; color: var(--muted); }
.footer-links a:hover { color: var(--accent-dark); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); border-top: var(--line) solid var(--border); padding-top: var(--space-3); margin-top: var(--space-6); color: var(--muted); font-size: var(--small-size); }
.footer-legal { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.footer-legal a { min-height: 24px; display: inline-flex; align-items: center; }

.reveal { transition: opacity var(--reveal-duration) ease, transform var(--reveal-duration) ease; }
.reveal.pending { opacity: 0; transform: translateY(var(--reveal-offset)); }
.reveal.shown { opacity: 1; transform: none; }
#server-status { position: relative; display: flow-root; min-height: 48px; min-width: 0; width: 100%; max-width: 100%; overflow: hidden; margin-block: var(--space-3); }
#server-status > * { min-width: 0; max-width: 100%; }
#server-status + * { margin-top: var(--space-3); }

@media (max-width: 1000px) {
  .mast { padding-inline: 28px; gap: 28px; }
  .nav { gap: 24px; }
  .header-tools { gap: 18px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  h1 { font-size: var(--mobile-h1); }
  .grid-three { grid-template-columns: 1fr; }
  .mast { gap: 20px; }
  .header-tools { margin-left: auto; gap: 12px; }
  .nav { display: none; }
  .language { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-drawer {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--bg);
    padding: var(--space-2) var(--gutter) var(--space-3);
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: var(--line) solid var(--border);
    box-shadow: var(--soft-shadow);
    z-index: 3;
  }
  .mobile-drawer:not([hidden]) { display: block; }
  .mobile-drawer a { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--small); font-size: var(--nav-size); }
  .mobile-drawer a:hover, .mobile-drawer a[aria-current] { color: var(--accent-dark); background: var(--wash-light); }
  .drawer-languages { border-top: var(--line) solid var(--border); margin-top: var(--space-2); padding-top: var(--space-2); }
  .nav-veil:not([hidden]) { display: block; position: fixed; inset: var(--header-height) 0 0; background: var(--veil); border: 0; z-index: 1; width: 100%; }
  .static-mobile { display: block; position: relative; }
  .static-mobile .menu-list { right: 0; width: min(280px, calc(100vw - 32px)); max-height: calc(100dvh - var(--header-height) - 32px); overflow-y: auto; }
}
@media (min-width: 769px) {
  .static-mobile { display: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; --header-height: 64px; --anchor-offset: 80px; --toc-offset: 0px; --toc-landing: 80px; }
  .no-break { white-space: normal; }
  h1 { font-size: var(--mobile-h1); line-height: 1.28; margin: 18px auto; }
  h2 { font-size: var(--mobile-h2); }
  .section { padding-top: var(--space-6); padding-bottom: var(--space-6); }
  .mast { padding-inline: 16px; gap: 14px; }
  .brand { font-size: var(--brand-mobile); gap: 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-tools { font-size: var(--small-size); gap: 8px; margin-left: auto; }
  .login { padding: 8px 17px; }
  .button { min-height: 46px; font-size: var(--small-size); padding-inline: 22px; gap: 12px; }
  .card, .panel { padding: var(--space-3); }
  .tilt, [data-tilt] { transform: none; }
  .decorated { max-width: 100%; }
  .footer-grid { gap: var(--space-4); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
  .reveal, .reveal.pending, .reveal.shown { opacity: 1; transform: none; }
}