:root {
  --ink-900: #07111F;
  --ink-800: #0E1D33;
  --ink-700: #142543;
  --grid: #2B3B52;
  --cyan: #22E6D3;
  --orange: #FF7A2F;
  --orange-deep: #B84A18;
  --violet: #7C6CFF;
  --paper: #F4F1EA;
  --mist: #A9B8C8;
  --green: #43D17A;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 3vw, 44px);
  --shell-max: 1440px;
  --radius: 3px;
  --header-h: 68px;
}

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

html {
  background-color: var(--ink-900);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--paper);
  background-color: var(--ink-900);
  background-image:
    linear-gradient(180deg, rgba(34, 230, 211, .05), rgba(7, 17, 31, 0) 380px),
    radial-gradient(1100px 620px at 84% -12%, rgba(124, 108, 255, .18), rgba(7, 17, 31, 0) 62%),
    radial-gradient(900px 520px at 6% 104%, rgba(34, 230, 211, .09), rgba(7, 17, 31, 0) 60%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(43, 59, 82, .5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(43, 59, 82, .5) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: .34;
  -webkit-mask-image: radial-gradient(140% 120% at 50% 0%, #000 25%, rgba(0, 0, 0, 0) 88%);
  mask-image: radial-gradient(140% 120% at 50% 0%, #000 25%, rgba(0, 0, 0, 0) 88%);
}

main { position: relative; z-index: 1; }

h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, .h1 {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -.02em;
  font-stretch: condensed;
}

h2, .h2 {
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -.012em;
  font-stretch: condensed;
}

h3, .h3 {
  font-size: 1.06rem;
  line-height: 1.5;
  font-weight: 600;
}

p { text-wrap: pretty; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #6df5e8; }

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

strong { font-weight: 700; color: var(--paper); }

::selection { background: rgba(34, 230, 211, .3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-size: .875em;
  letter-spacing: .02em;
}

.shell {
  width: min(calc(100% - (var(--gutter) * 2)), var(--shell-max));
  margin-inline: auto;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 14px;
  top: -72px;
  z-index: 300;
  padding: 10px 20px;
  background: var(--cyan);
  color: #05141b;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: var(--radius);
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; color: #05141b; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(7, 17, 31, .95);
  border-bottom: 1px solid var(--grid);
  box-shadow: 0 14px 34px -26px #000;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cyan), rgba(34, 230, 211, 0) 82%);
  opacity: .9;
  pointer-events: none;
}

.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(280px, 32%);
  height: 1px;
  background: linear-gradient(90deg, var(--orange), rgba(255, 122, 47, 0));
  pointer-events: none;
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width .1s linear;
}

.header-frame {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 1.8vw, 30px);
  width: min(calc(100% - (var(--gutter) * 2)), var(--shell-max));
  margin-inline: auto;
  padding: 12px 0;
  min-height: var(--header-h);
}

.header-frame__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
}
.brand:hover { color: var(--paper); }

.brand__mark {
  flex: none;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--cyan) 0 46%, transparent 46% 54%, var(--orange) 54% 100%);
  box-shadow: inset 0 0 0 3px var(--ink-900);
  border: 1px solid rgba(34, 230, 211, .55);
  transform: rotate(45deg) scale(.86);
  transition: transform .24s ease, box-shadow .24s ease;
}
.brand:hover .brand__mark {
  transform: rotate(135deg) scale(.86);
  box-shadow: inset 0 0 0 3px var(--ink-900), 0 0 14px -2px rgba(34, 230, 211, .8);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand__name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .04em;
  font-stretch: condensed;
}
.brand__descriptor {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--mist);
  white-space: nowrap;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .09em;
  color: #a99eff;
  background: rgba(124, 108, 255, .13);
  border: 1px solid rgba(124, 108, 255, .45);
  border-radius: 2px;
  white-space: nowrap;
}
.version-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}
.version-badge--violet {
  color: #b9b1ff;
  background: rgba(124, 108, 255, .16);
  border-color: rgba(124, 108, 255, .55);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  background: rgba(34, 230, 211, .07);
  border: 1px solid rgba(34, 230, 211, .38);
  border-radius: var(--radius);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}
.nav-toggle:hover { background: rgba(34, 230, 211, .14); border-color: var(--cyan); }

.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 16px;
}
.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
.site-header[data-open] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.site-nav { min-width: 0; }
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  counter-reset: navidx;
}
.site-nav__item { display: block; }

.site-nav__link {
  position: relative;
  display: block;
  padding: 7px 12px;
  color: var(--mist);
  font-size: 14px;
  letter-spacing: .03em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  white-space: nowrap;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}
.site-nav__link::before {
  counter-increment: navidx;
  content: counter(navidx, decimal-leading-zero);
  margin-right: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0;
  color: var(--mist);
  opacity: .55;
  transition: color .16s ease, opacity .16s ease;
}
.site-nav__link:hover {
  color: var(--paper);
  background: rgba(34, 230, 211, .08);
  border-color: rgba(34, 230, 211, .28);
}
.site-nav__link:hover::before { color: var(--cyan); opacity: 1; }

.site-nav__link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(34, 230, 211, .1);
  border-color: rgba(34, 230, 211, .35);
  box-shadow: inset 0 -2px 0 var(--cyan);
}
.site-nav__link[aria-current="page"]::before { color: var(--cyan); opacity: 1; }

.header-frame__action { display: flex; align-items: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.4;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .14s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--orange);
  color: #150d07;
  box-shadow: 0 0 0 1px rgba(255, 122, 47, .45), 0 10px 24px -14px rgba(255, 122, 47, .95);
}
.btn--primary:hover {
  background: #ff9154;
  color: #150d07;
  box-shadow: 0 0 0 1px rgba(255, 122, 47, .8), 0 12px 26px -12px rgba(255, 122, 47, 1);
}

.btn--ghost {
  background: transparent;
  color: var(--cyan);
  border-color: rgba(34, 230, 211, .42);
}
.btn--ghost:hover {
  background: rgba(34, 230, 211, .1);
  border-color: var(--cyan);
  color: #7cf6ea;
}

.btn--quiet {
  background: rgba(169, 184, 200, .08);
  color: var(--paper);
  border-color: var(--grid);
}
.btn--quiet:hover {
  background: rgba(169, 184, 200, .17);
  border-color: rgba(169, 184, 200, .45);
  color: var(--paper);
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--mist);
}
.breadcrumb a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.breadcrumb a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.breadcrumb__sep { color: var(--grid); }

/* ---------- section head ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--grid);
  margin-bottom: clamp(20px, 3vw, 36px);
}
.section-head__text { min-width: 0; }
.section-head__kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}
.section-head__title { margin: 0; }
.section-head__more {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid rgba(169, 184, 200, .35);
  padding-bottom: 2px;
  white-space: nowrap;
}
.section-head__more:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ---------- tags / rules / panels ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .07em;
  color: var(--cyan);
  background: rgba(34, 230, 211, .08);
  border: 1px solid rgba(34, 230, 211, .3);
  border-radius: 2px;
  white-space: nowrap;
}
.tag--orange {
  color: var(--orange);
  background: rgba(255, 122, 47, .1);
  border-color: rgba(255, 122, 47, .38);
}
.tag--muted {
  color: var(--mist);
  background: rgba(169, 184, 200, .07);
  border-color: rgba(169, 184, 200, .26);
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--cyan), rgba(34, 230, 211, 0) 72%);
}

.panel {
  position: relative;
  padding: clamp(18px, 2.2vw, 30px);
  background: linear-gradient(180deg, rgba(14, 29, 51, .92), rgba(7, 17, 31, .72));
  border: 1px solid var(--grid);
  border-radius: var(--radius);
}
.panel--paper {
  background: var(--paper);
  color: #131c28;
  border-color: #d9d3c6;
  box-shadow: 0 18px 40px -30px #000;
}
.panel--paper a { color: #1b5f57; }

/* ---------- reusable media frame (image placeholder) ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(160deg, #16273f 0%, #0E1D33 48%, #07111F 100%);
  border: 1px solid var(--grid);
  border-radius: var(--radius);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(34, 230, 211, .09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(34, 230, 211, .09) 1px, transparent 1px);
  background-size: 48px 48px;
  mix-blend-mode: screen;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--timecode::before {
  content: attr(data-timecode);
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 10px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: #05141b;
  background: var(--cyan);
  border-radius: 2px;
}

/* ---------- reveal ---------- */
html[data-reveal-ready] [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .24s ease, transform .24s ease;
}
html[data-reveal-ready] [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(60px, 8vw, 120px);
  background: linear-gradient(180deg, rgba(14, 29, 51, .6), rgba(7, 17, 31, 1) 62%);
  border-top: 1px solid var(--grid);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(340px, 42%);
  height: 1px;
  background: linear-gradient(90deg, var(--orange), rgba(255, 122, 47, 0));
}

.footer-frame {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .75fr) minmax(0, .75fr) minmax(0, 1.2fr);
  gap: clamp(24px, 3vw, 56px);
  padding-block: clamp(40px, 5vw, 76px);
}

.footer-lead { min-width: 0; }
.footer-lead__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-brand__name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--paper);
  font-stretch: condensed;
}
.footer-brand__line {
  margin-top: 12px;
  max-width: 30ch;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--mist);
}

.footer-col { min-width: 0; }
.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}
.footer-col__list {
  display: grid;
  gap: 9px;
}
.footer-link {
  display: inline-block;
  color: var(--mist);
  font-size: 14px;
  letter-spacing: .02em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.footer-link:hover {
  color: var(--paper);
  border-bottom-color: var(--cyan);
}

.footer-contact { min-width: 0; }
.footer-contact__list {
  display: grid;
  gap: 12px;
}
.footer-contact__item {
  display: grid;
  gap: 2px;
  padding-left: 12px;
  border-left: 1px solid var(--grid);
}
.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(169, 184, 200, .75);
}
.footer-contact__value {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--paper);
  word-break: break-word;
}

.footer-legal {
  border-top: 1px solid var(--grid);
  background: rgba(4, 10, 19, .72);
}
.footer-legal__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 26px;
  padding-block: 18px 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: rgba(169, 184, 200, .82);
}
.footer-legal__icp { color: var(--mist); }
.footer-legal__copy { color: var(--mist); }
.footer-legal__note {
  flex: 1 1 320px;
  min-width: 0;
  line-height: 1.7;
  color: rgba(169, 184, 200, .68);
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .brand__descriptor { display: none; }
}

@media (max-width: 1080px) {
  .header-frame {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "nav nav"
      "act act";
    row-gap: 0;
    padding: 10px 0 0;
    min-height: 0;
  }
  .header-frame__brand { grid-area: brand; padding-bottom: 10px; }
  .nav-toggle { grid-area: toggle; display: inline-flex; align-self: center; margin-bottom: 10px; }
  .site-nav {
    grid-area: nav;
    display: none;
    border-top: 1px solid var(--grid);
  }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 10px;
  }
  .site-nav__link {
    padding: 13px 6px;
    border: 0;
    border-bottom: 1px solid rgba(43, 59, 82, .55);
    border-radius: 0;
    font-size: 15px;
  }
  .site-nav__link[aria-current="page"] {
    background: rgba(34, 230, 211, .08);
    box-shadow: inset 2px 0 0 var(--cyan);
    border-color: transparent;
  }
  .header-frame__action {
    grid-area: act;
    display: none;
    padding-bottom: 14px;
  }
  .header-frame__action .btn { width: 100%; }
  .site-header[data-open] .site-nav,
  .site-header[data-open] .header-frame__action { display: block; }

  .footer-frame {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-lead { grid-column: 1 / -1; }
  .footer-brand__line { max-width: 46ch; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .footer-frame { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .footer-legal__inner { gap: 6px 18px; }
  .footer-legal__note { flex: 1 1 100%; }
}

@media (max-width: 420px) {
  .brand__name { font-size: 17px; }
  .version-badge { font-size: 10px; padding: 1px 7px; }
  .nav-toggle__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html[data-reveal-ready] [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .brand:hover .brand__mark { transform: rotate(45deg) scale(.86); }
}
