:root {
  --bg: #04192b;
  --bg-panel: #031421;
  --bg-panel-2: #0b2c42;
  --border: #1c3c52;
  --accent: #5df25a;
  --accent-dark: #1fae4a;
  --lime: #c8f560;
  --teal: #17d4c4;
  --field-deep: #0f5a4a;
  --link: #2f8cff;
  --text: #e8f1f2;
  --text-muted: #8fa7b3;
  --success: #34d27b;
  --warn: #f2c14e;
  --error: #ff6b6b;
  --shadow: #010a12;
  --on-accent: #04192b;
  --clear: transparent;
  --grad-accent: linear-gradient(90deg, var(--lime) 0%, var(--accent) 48%, var(--teal) 100%);
  --font-display: "Iowan Old Style", "Charter", Georgia, "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Hiragino Mincho ProN", "Nanum Myeongjo", serif;
  --font-body: "Inter", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-xl: 40px;
  --r-lg: 32px;
  --r-md: 20px;
  --r-sm: 12px;
  --r-btn: 10px;
  --r-row: 6px;
  --r-focus: 4px;
  --r-logo: 8px;
  --r-frame: 26px;
  --r-status: 14px;
  --r-pill: 999px;
  --r-shot: 10px;
  --gutter: 32px;
  --content-max: 1320px;
  --reading-max: 820px;
  --header-h: 72px;
  --section-gap: 148px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --duration: .2s;
  --panel-shadow: 0 24px 48px -18px color-mix(in srgb, var(--shadow) 72%, var(--clear)), 0 64px 110px -40px color-mix(in srgb, var(--shadow) 88%, var(--clear));
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; scroll-padding-top: 24px; }
html.nav-open { overflow: hidden; }
body {
  margin: 0;
  padding-bottom: 88px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: var(--clear); }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: var(--r-focus); }
::selection { background: var(--accent); color: var(--on-accent); }
h1, h2, h3 { text-wrap: balance; overflow-wrap: normal; font-weight: 400; }
h1, h2 { font-family: var(--font-display); }
h1 { font-size: clamp(34px, 1.2rem + 2.2vw, 48px); line-height: 1.17; letter-spacing: -.005em; }
h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.25; margin: 0 0 24px; }
h3 { font-size: 22px; line-height: 1.4; margin: 0 0 16px; }
p { margin: 0 0 20px; }
strong { font-weight: 600; }
small, .small { font-size: 13px; }
code { font-family: var(--font-mono); font-size: .9em; overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-panel);
  color: var(--text);
  line-height: 1.85;
  tab-size: 2;
}
pre code { font-size: 13px; overflow-wrap: normal; word-break: normal; white-space: pre; }
hr { border: 0; border-top: 1px solid var(--border); margin-block: 40px; }
.wrap {
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.reading { max-width: calc(var(--reading-max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { margin-top: var(--section-gap); }
.section-pad { padding-top: var(--section-gap); padding-bottom: var(--section-gap); }
.section-heading { max-width: 760px; margin-bottom: 40px; }
.section-heading p, .muted { color: var(--text-muted); }
.keep { white-space: nowrap; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link { position: fixed; z-index: 100; left: var(--gutter); top: 8px; padding: 10px 16px; transform: translateY(-180%); background: var(--accent); color: var(--on-accent); border-radius: var(--r-btn); }
.skip-link:focus { transform: none; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid > *, .hero__layout > *, .footer-grid > *, .masthead__row > *, .prose, .prose div { min-width: 0; }
.panel, .card { border: 1px solid var(--border); background: var(--bg-panel); color: var(--text); border-radius: var(--r-lg); padding: 36px; }
.panel--raised { background: var(--bg-panel-2); color: var(--text); border-radius: var(--r-md); box-shadow: var(--panel-shadow); }
.card p:last-child { margin-bottom: 0; }
.card__eyebrow { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.prose { line-height: 1.85; }
.prose h2 { margin-top: 64px; }
.prose h3 { margin-top: 36px; }
.prose li + li { margin-top: 10px; }
.prose :where(ul, ol) { padding-left: 1.5em; }
.prose img { max-width: 100%; }
.actions, .get-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  border: 1px solid var(--clear);
  border-radius: var(--r-btn);
  background: var(--clear);
  color: var(--text);
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--lime) 85%, var(--clear)), 0 12px 30px -14px color-mix(in srgb, var(--accent) 75%, var(--clear)); }
.btn--primary:hover, .btn--primary.is-hover { background: var(--lime); color: var(--on-accent); transform: translateY(-1px); }
.btn--primary:active { background: var(--teal); color: var(--on-accent); transform: none; }
.btn--ghost { border-color: color-mix(in srgb, var(--text) 36%, var(--clear)); background: var(--clear); color: var(--text); font-weight: 500; }
.btn--ghost:hover { border-color: var(--text); }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--bg-panel-2); color: var(--text-muted); border-color: var(--border); box-shadow: none; cursor: not-allowed; transform: none; }
.btn.is-focus { outline: 2px solid var(--link); outline-offset: 3px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.text-link::after { content: "›"; font-size: 24px; }

.masthead { position: relative; z-index: 40; background: var(--bg); color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, var(--clear)); }
.masthead__row {
  display: flex;
  align-items: center;
  gap: 36px;
  min-height: var(--header-h);
  max-width: min(100%, calc(1280px + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; margin-right: auto; color: var(--text); text-decoration: none; }
.brand__mark { display: block; width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r-logo); }
.brand__placeholder { background: var(--text); color: var(--bg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 18%, var(--clear)), 0 6px 14px -6px var(--shadow); }
.brand__name { font-size: 16px; font-weight: 600; letter-spacing: .02em; }
.nav { min-width: 0; }
.nav ul { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 6px 0; color: var(--text-muted); font-size: 15px; text-decoration: none; white-space: nowrap; transition: color var(--duration) var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { font-weight: 600; }
.header-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.language { position: relative; }
.lang { padding: 6px 0 6px 26px; border: 0; border-left: 1px solid var(--border); background: var(--clear); color: var(--text); font-size: 14px; min-height: 44px; white-space: nowrap; }
.lang:hover { color: var(--lime); }
.lang__short { display: none; }
.language-list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  padding: 8px;
  margin: 0;
  list-style: none;
  background: var(--bg-panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--panel-shadow);
}
.language-list a { display: block; padding: 10px 14px; min-height: 44px; border-radius: var(--r-row); color: var(--text); text-decoration: none; }
.language-list a:hover, .language-list a[aria-current] { background: var(--bg-panel); color: var(--text); }
.menu-toggle { display: none; min-width: 44px; min-height: 44px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--bg-panel); color: var(--text); }
.menu-toggle svg { display: block; width: 22px; height: 22px; }
.mobile-drawer { display: none; }
.nav-veil { position: fixed; inset: var(--header-h) 0 0; z-index: 1; border: 0; background: color-mix(in srgb, var(--shadow) 78%, var(--clear)); color: var(--text); }
.footer { margin-top: var(--section-gap); padding-top: 64px; padding-bottom: 28px; border-top: 1px solid var(--border); background: var(--bg-panel); color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr 1.3fr; gap: 64px; }
.footer .brand { margin-bottom: 22px; }
.footer p { color: var(--text-muted); max-width: 32em; }
.footer h2 { font: 600 15px var(--font-body); margin-bottom: 20px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li + li { margin-top: 8px; }
.footer a:not(.brand) { display: inline-block; padding-block: 5px; color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer-languages { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 42px; }
.footer-languages a[aria-current] { color: var(--text); text-decoration: underline; }
.footer-bottom { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(18px); }
.reveal-ready .reveal { transition: opacity .65s var(--ease), transform .65s var(--ease); }
.reveal.shown { opacity: 1; transform: none; }

.hero { position: relative; isolation: isolate; overflow-x: clip; padding-top: 36px; }
.hero__lines {
  position: absolute;
  inset: 0 0 -80px;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(to right, color-mix(in srgb, var(--border) 55%, var(--clear)) 1px, var(--clear) 1px), linear-gradient(to bottom, color-mix(in srgb, var(--border) 55%, var(--clear)) 1px, var(--clear) 1px);
  background-size: 64px 64px;
  background-position: center top;
  mask-image: radial-gradient(ellipse 62% 58% at 32% 42%, var(--bg) 0%, var(--clear) 78%);
  opacity: .55;
}
.hero__layout { display: grid; grid-template-columns: minmax(0, 540px) minmax(0, 1fr); gap: 52px; align-items: center; }
.copy { padding-block: 8px; }
.tag { display: inline-flex; align-items: center; gap: 10px; padding: 6px 15px 6px 11px; border: 1px solid var(--border); border-radius: var(--r-pill); background: color-mix(in srgb, var(--bg-panel) 70%, var(--clear)); color: var(--text-muted); font-size: 13px; line-height: 1.4; }
.tag__dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, var(--clear)), 0 0 12px color-mix(in srgb, var(--accent) 55%, var(--clear)); }
.tag b { color: var(--text); font-weight: 500; }
.title { margin: 26px 0 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 1.2rem + 2.2vw, 48px); line-height: 1.17; letter-spacing: -.005em; }
.title__line { display: block; }
.title__line--grad { padding-bottom: .06em; background: var(--grad-accent); background-clip: text; -webkit-background-clip: text; color: var(--clear); }
.lede { max-width: 33em; margin: 22px 0 0; color: var(--text-muted); font-size: 16.5px; line-height: 1.78; }
.lede strong { color: var(--text); font-weight: 500; }
.lede code { color: var(--text); }
.stage {
  position: relative;
  height: 664px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text) 8%, var(--clear));
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-dark) 50%, var(--field-deep)) 0%, var(--field-deep) 32%, color-mix(in srgb, var(--field-deep) 42%, var(--bg)) 68%, var(--bg-panel) 100%);
  color: var(--text);
  box-shadow: 0 44px 90px -46px color-mix(in srgb, var(--shadow) 90%, var(--clear));
}
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(58% 44% at 50% -4%, color-mix(in srgb, var(--lime) 88%, var(--clear)) 0%, color-mix(in srgb, var(--accent) 58%, var(--clear)) 34%, color-mix(in srgb, var(--teal) 22%, var(--clear)) 62%, var(--clear) 82%); opacity: .8; }
.stage::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 color-mix(in srgb, var(--lime) 40%, var(--clear)); pointer-events: none; }
.sheet { position: absolute; z-index: 1; top: 126px; left: 50%; width: min(560px, calc(100% - 160px)); height: 60px; transform: translateX(-50%); border: 1px solid color-mix(in srgb, var(--text) 11%, var(--clear)); border-radius: var(--r-md); background: color-mix(in srgb, var(--bg-panel-2) 55%, var(--clear)); color: var(--text); }
.frame { position: absolute; z-index: 2; top: 148px; left: 50%; width: min(660px, calc(100% - 64px)); padding: 6px; transform: translateX(-50%); border: 1px solid color-mix(in srgb, var(--text) 16%, var(--clear)); border-radius: var(--r-frame); background: color-mix(in srgb, var(--text) 8%, var(--clear)); color: var(--text); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 18%, var(--clear)), 0 2px 4px color-mix(in srgb, var(--shadow) 30%, var(--clear)), var(--panel-shadow); }
.reader { overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel-2); color: var(--text); }
.reader__bar { display: flex; align-items: flex-end; height: 42px; padding-inline: 14px; border-bottom: 1px solid var(--border); background: var(--bg-panel); color: var(--text); }
.reader__tab { display: flex; align-items: center; height: 32px; margin-bottom: -1px; padding-inline: 16px; border: 1px solid var(--border); border-bottom: 0; border-radius: var(--r-btn) var(--r-btn) 0 0; background: var(--bg-panel-2); color: var(--text); font-family: var(--font-mono); font-size: 12.5px; }
.reader__body { display: grid; grid-template-columns: 136px minmax(0, 1fr); }
.reader__index { padding: 18px 12px; border-right: 1px solid var(--border); background: color-mix(in srgb, var(--bg-panel) 45%, var(--bg-panel-2)); color: var(--text-muted); }
.reader__index p { margin: 0 0 10px 12px; color: var(--text-muted); font-size: 11px; letter-spacing: .14em; }
.reader__index ul { margin: 0; padding: 0; list-style: none; }
.reader__index li { position: relative; padding: 7px 12px; border-radius: var(--r-row); font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; }
.reader__index .is-current { background: color-mix(in srgb, var(--text) 5%, var(--clear)); color: var(--text); }
.reader__index .is-current::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: 0; width: 2px; background: var(--link); border-radius: var(--r-focus); }
.rule-lines { min-width: 0; overflow-x: auto; margin: 0; padding: 16px 14px 16px 6px; list-style: none; font-family: var(--font-mono); font-size: 13px; }
.rule-lines li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 150px; align-items: center; min-height: 32px; border-radius: var(--r-row); }
.ln { padding-right: 14px; color: var(--text-muted); font-size: 12px; text-align: right; }
.src { min-width: 0; white-space: nowrap; color: var(--text); }
.src .br, .src .val, .pol-direct { color: var(--text-muted); }
.pol-proxy, .rule-key { color: var(--accent); }
.rule-lines .is-final { background: color-mix(in srgb, var(--teal) 13%, var(--clear)); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal) 22%, var(--clear)); }
.ann { position: relative; display: flex; align-items: center; height: 100%; }
.ann--start::before, .ann--mid::before, .ann--end::before { content: ""; position: absolute; left: 10px; border-left: 1px dashed var(--teal); }
.ann--start::before { top: 50%; bottom: 0; }
.ann--mid::before { top: 0; bottom: 0; }
.ann--end::before { top: 0; bottom: 50%; }
.ann--start::after, .ann--end::after { content: ""; position: absolute; top: calc(50% - 3.5px); left: 7px; width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, var(--clear)); }
.note { margin-left: 26px; padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--teal) 45%, var(--clear)); border-radius: var(--r-pill); background: color-mix(in srgb, var(--teal) 10%, var(--bg-panel-2)); color: var(--text); font: 11.5px/1 var(--font-body); white-space: nowrap; }
.statusline { display: flex; align-items: center; gap: 30px; min-height: 42px; margin-top: 28px; padding: 8px 20px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-status); background: var(--bg-panel); color: var(--text-muted); font: 12px var(--font-mono); white-space: nowrap; }
.statusline__seg { display: inline-flex; align-items: center; gap: 10px; }
.statusline b { color: var(--text); font-size: 11px; font-weight: 500; letter-spacing: .1em; }
.statusline__dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-pill); background: var(--success); }
.decorated { position: relative; overflow-x: clip; }

@media (max-width: 1180px) {
  .masthead__row { gap: 22px; }
  .nav--desktop { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-block; }
  .mobile-drawer:not([hidden]) { display: block; position: absolute; top: 100%; inset-inline: 0; z-index: 3; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; padding: 16px var(--gutter) 28px; border-bottom: 1px solid var(--border); background: var(--bg-panel); color: var(--text); }
  .mobile-drawer ul { list-style: none; padding: 0; margin: 0; }
  .mobile-drawer a { display: block; width: 100%; min-height: 44px; padding: 12px 16px; color: var(--text-muted); text-decoration: none; border-radius: var(--r-row); }
  .mobile-drawer a:hover, .mobile-drawer a[aria-current] { background: var(--bg-panel-2); color: var(--text); }
  .drawer-languages { border-top: 1px solid var(--border); margin-top: 16px !important; padding-top: 16px !important; }
}
@media (max-width: 1180px) {
  .hero__layout { gap: 40px; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); }
  .rule-lines li { grid-template-columns: 30px minmax(0, 1fr) 128px; }
}
@media (min-width: 1025px) and (max-width: 1450px) {
  .reader__body { grid-template-columns: 105px minmax(0, 1fr); }
  .reader__index { padding-inline: 6px; }
  .reader__index li { padding-inline: 8px; font-size: 11px; }
  .rule-lines { font-size: 10px; }
  .rule-lines li { grid-template-columns: 20px minmax(0, 1fr); }
  .rule-lines .ann { display: none; }
  .ln { padding-right: 6px; font-size: 10px; }
}
@media (max-width: 1024px) {
  .hero__layout { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .stage { height: 600px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  h1, .title { font-size: clamp(24px, 4vw, 30px); }
}
@media (max-width: 720px) {
  :root { --gutter: 18px; }
  .lede { font-size: 15.5px; }
  .btn { min-height: 48px; padding: 11px 20px; }
  .stage { height: auto; padding: 104px 12px 28px; border-radius: var(--r-lg); }
  .sheet { display: none; }
  .frame { position: relative; top: auto; left: auto; width: 100%; transform: none; }
  .reader__body { grid-template-columns: minmax(0, 1fr); }
  .reader__index { display: none; }
  .rule-lines { font-size: 12px; }
  .rule-lines li { grid-template-columns: 28px minmax(265px, 1fr); }
  .ann { display: none; }
  .statusline { display: none; }
}
@media (max-width: 640px) {
  .grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-brand { grid-column: auto; }
  .panel, .card { padding: 24px; }
  .lang { padding-left: 12px; }
  .lang__full { display: none; }
  .lang__short { display: inline; }
  .masthead__row { gap: 8px; }
  .brand__name { font-size: 14px; }
  .brand { gap: 8px; }
  .header-tools { margin-left: auto; gap: 6px; }
  .tilt, [data-tilt] { transform: none !important; }
  .title__line { overflow-wrap: normal; }
  .footer { padding-bottom: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}