:root {
  --ink-900: #071826;
  --ink-800: #0C263B;
  --ink-700: #123B58;
  --line: #2E5F7A;
  --signal: #B6F35A;
  --amber: #FFB454;
  --ice: #63D8E8;
  --paper: #F4F8FA;
  --muted: #A8BECF;
  --archive: #EFE8D8;
  --archive-ink: #1B2A33;

  --font-display: "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --fs-display: clamp(2.6rem, 6vw, 4.5rem);
  --fs-h1: clamp(2rem, 4.6vw, 3.2rem);
  --fs-h2: clamp(1.35rem, 2.4vw, 1.75rem);
  --fs-body: 0.9375rem;
  --fs-small: 0.8125rem;

  --gutter: clamp(1rem, 3vw, 2.5rem);
  --radius: 2px;
  --line-soft: rgba(46, 95, 122, 0.55);
  --line-faint: rgba(46, 95, 122, 0.32);
  --lift: 0 18px 40px -26px rgba(0, 0, 0, 0.92);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul[class], ol[class] { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
a { color: var(--ice); text-decoration: none; }
a:hover { color: var(--signal); }

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

main [id] { scroll-margin-top: clamp(6rem, 12vw, 8rem); }

/* ---------- layout primitives ---------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-main { display: block; min-height: 50vh; }

.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.75rem); }
.grid--3-6-3,
.grid--2-7-3,
.grid--4-5-3 { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 900px) {
  .grid--3-6-3 { grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); }
  .grid--2-7-3 { grid-template-columns: minmax(0, 2fr) minmax(0, 7fr) minmax(0, 3fr); }
  .grid--4-5-3 { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); }
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  left: 1rem;
  top: -140px;
  z-index: 300;
  padding: 0.7rem 1.1rem;
  background: var(--signal);
  color: #06202f;
  font-size: var(--fs-small);
  font-weight: 800;
  border-radius: var(--radius);
  transition: top 0.16s ease;
}
.skip-link:focus,
.skip-link:focus-visible { top: 0.75rem; color: #06202f; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(7, 24, 38, 0.95);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(99, 216, 232, 0.08), var(--lift);
}

.progress-rail {
  position: relative;
  height: 2px;
  background: rgba(18, 59, 88, 0.9);
  overflow: hidden;
}
.progress-rail__bar {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--ice), var(--signal));
  box-shadow: 0 0 12px rgba(182, 243, 90, 0.55);
  transition: transform 0.12s linear;
}

.header-utility {
  background: linear-gradient(90deg, rgba(18, 59, 88, 0.62), rgba(7, 24, 38, 0.1) 72%);
  border-bottom: 1px solid var(--line-faint);
}
.header-utility__inner {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.header-utility__inner::-webkit-scrollbar { display: none; }

.utility-entry {
  --entry-accent: var(--signal);
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-height: 42px;
  padding: 0.4rem 1rem;
  border-left: 1px solid var(--line-faint);
  transition: background-color 0.16s ease;
}
.utility-entry:first-child { border-left: 0; padding-left: 0; }
.utility-entry--account { --entry-accent: var(--signal); }
.utility-entry--notice { --entry-accent: var(--amber); }
.utility-entry--help { --entry-accent: var(--ice); }
.utility-entry:hover { background: rgba(18, 59, 88, 0.55); }

.utility-entry__label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--paper);
  letter-spacing: 0.02em;
}
.utility-entry__dot {
  width: 6px;
  height: 6px;
  background: var(--entry-accent);
  box-shadow: 0 0 8px var(--entry-accent);
}
.utility-entry__hint {
  font-family: var(--font-mono);
  font-size: 0.6563rem;
  letter-spacing: 0.06em;
  color: rgba(168, 190, 207, 0.78);
  padding-left: 0.95rem;
}
.utility-entry:hover .utility-entry__label { color: var(--entry-accent); }

.header-main__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--paper);
  text-decoration: none;
}
.brand:hover { color: var(--paper); }
.brand__mark {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  background: #0a2033;
  border: 1px solid rgba(182, 243, 90, 0.55);
}
.brand__mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(99, 216, 232, 0.45);
}
.brand__mark::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 7px;
  height: 7px;
  background: var(--signal);
  box-shadow: 0 0 10px rgba(182, 243, 90, 0.7);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand__tagline {
  font-family: var(--font-mono);
  font-size: 0.6563rem;
  letter-spacing: 0.12em;
  color: rgba(168, 190, 207, 0.78);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.46rem 0.72rem;
  background: transparent;
  border: 1px solid rgba(46, 95, 122, 0.85);
  border-radius: var(--radius);
  color: var(--paper);
  font-size: var(--fs-small);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}
.nav-toggle:hover { border-color: var(--ice); color: var(--ice); }
.nav-toggle__label { letter-spacing: 0.06em; }
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s ease, top 0.18s ease;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

.site-nav { display: none; }
.site-nav[data-open="true"] { display: block; width: 100%; }

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0.6rem;
}
.site-nav__item { border-top: 1px solid var(--line-faint); }
.site-nav__link {
  position: relative;
  display: block;
  padding: 0.72rem 0.2rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}
.site-nav__link:hover { color: var(--paper); }
.site-nav__link[aria-current="page"] { color: var(--signal); }
.site-nav__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -0.55rem;
  top: 50%;
  width: 3px;
  height: 16px;
  transform: translateY(-50%);
  background: var(--signal);
  box-shadow: 0 0 10px rgba(182, 243, 90, 0.7);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; width: auto; }
  .site-nav[data-open="true"] { width: auto; }
  .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: 0.1rem;
    padding-bottom: 0;
  }
  .site-nav__item { border-top: 0; }
  .site-nav__link {
    padding: 0.42rem 0.7rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
  }
  .site-nav__link:hover {
    color: var(--paper);
    background: rgba(18, 59, 88, 0.6);
    border-color: rgba(46, 95, 122, 0.8);
  }
  .site-nav__link[aria-current="page"] {
    color: var(--signal);
    background: rgba(182, 243, 90, 0.09);
    border-color: rgba(182, 243, 90, 0.5);
  }
  .site-nav__link[aria-current="page"]::before { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--signal {
  background: var(--signal);
  border-color: var(--signal);
  color: #06202f;
}
.btn--signal:hover { background: #c8ff72; color: #06202f; }
.btn--ghost {
  background: transparent;
  border-color: rgba(46, 95, 122, 0.95);
  color: var(--paper);
}
.btn--ghost:hover { background: rgba(18, 59, 88, 0.7); border-color: var(--ice); color: var(--paper); }
.btn--amber {
  background: transparent;
  border-color: rgba(255, 180, 84, 0.6);
  color: var(--amber);
}
.btn--amber:hover { background: rgba(255, 180, 84, 0.12); color: var(--amber); }

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.16rem 0.55rem;
  border: 1px solid;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  line-height: 1.7;
}
.tag--fee { color: var(--amber); border-color: rgba(255, 180, 84, 0.5); background: rgba(255, 180, 84, 0.1); }
.tag--notice { color: var(--amber); border-color: rgba(255, 180, 84, 0.38); background: rgba(255, 180, 84, 0.06); }
.tag--help { color: var(--ice); border-color: rgba(99, 216, 232, 0.45); background: rgba(99, 216, 232, 0.08); }
.tag--ok { color: var(--signal); border-color: rgba(182, 243, 90, 0.45); background: rgba(182, 243, 90, 0.08); }
.tag--muted { color: var(--muted); border-color: rgba(168, 190, 207, 0.32); background: rgba(168, 190, 207, 0.05); }

/* ---------- panels ---------- */
.panel {
  position: relative;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: linear-gradient(180deg, rgba(18, 59, 88, 0.62), rgba(12, 38, 59, 0.92));
  border: 1px solid rgba(46, 95, 122, 0.72);
  border-radius: var(--radius);
}
.panel--paper {
  background: var(--archive);
  border-color: #cec4ae;
  color: var(--archive-ink);
}
.panel--paper a { color: #0b3a56; }
.panel--paper a:hover { color: #14506f; }
.paper-stack {
  box-shadow:
    6px 6px 0 -1px rgba(12, 38, 59, 0.92),
    6px 6px 0 0 rgba(46, 95, 122, 0.6);
}

/* ---------- section heads ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ice);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.012em;
  color: var(--paper);
}
.section-note {
  max-width: 56ch;
  font-size: var(--fs-small);
  line-height: 1.8;
  color: rgba(168, 190, 207, 0.86);
}

/* ---------- breadcrumb ---------- */
.breadcrumb { font-size: 0.75rem; color: var(--muted); }
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.breadcrumb__item { display: inline-flex; align-items: center; gap: 0.45rem; }
.breadcrumb__item::after { content: "/"; color: rgba(168, 190, 207, 0.45); }
.breadcrumb__item:last-child::after { content: ""; }
.breadcrumb__link { color: var(--muted); text-decoration: none; }
.breadcrumb__link:hover { color: var(--ice); }
.breadcrumb__current { color: var(--paper); }

/* ---------- media frames ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(46, 95, 122, 0.72);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(18, 59, 88, 0.85), rgba(7, 24, 38, 0.96)),
    repeating-linear-gradient(135deg, rgba(99, 216, 232, 0.06) 0 1px, transparent 1px 14px);
}
.media-frame > img,
.media-frame > svg,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(99, 216, 232, 0.2);
  pointer-events: none;
}
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--classic { aspect-ratio: 4 / 3; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(99, 216, 232, 0.55);
}
.media-frame__caption {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: rgba(168, 190, 207, 0.8);
}

/* ---------- misc ---------- */
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--signal);
}
.rule-print {
  height: 1px;
  margin: clamp(2rem, 4vw, 3rem) 0;
  border: 0;
  background: repeating-linear-gradient(90deg, rgba(46, 95, 122, 0.85) 0 12px, transparent 12px 18px);
}
[data-spy-link] { transition: color 0.16s ease, border-color 0.16s ease; }
[data-spy-link].is-active { color: var(--signal); }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 7vw, 6rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(12, 38, 59, 0.35), #0b2436 38%, #08202f);
  border-top: 1px solid var(--line-soft);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--signal), var(--ice) 46%, var(--amber));
  opacity: 0.72;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
@media (min-width: 880px) {
  .footer-top { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); align-items: start; }
}

.footer-brand__name {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-decoration: none;
}
.footer-brand__name:hover { color: var(--signal); }
.footer-brand__summary {
  margin-top: 0.7rem;
  max-width: 42ch;
  font-size: var(--fs-small);
  line-height: 1.85;
  color: rgba(168, 190, 207, 0.88);
}
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
@media (max-width: 560px) {
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.footer-col__title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(99, 216, 232, 0.85);
}
.footer-col__list {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.footer-col__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}
.footer-col__link::before {
  content: "";
  width: 5px;
  height: 5px;
  background: rgba(46, 95, 122, 0.95);
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}
.footer-col__link:hover { color: var(--paper); }
.footer-col__link:hover::before { background: var(--signal); box-shadow: 0 0 8px rgba(182, 243, 90, 0.75); }

.footer-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem 2rem;
  margin-top: 0.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
@media (min-width: 760px) {
  .footer-contact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.footer-contact__item { display: flex; flex-direction: column; gap: 0.15rem; }
.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 0.6563rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(168, 190, 207, 0.72);
}
.footer-contact__value {
  font-size: var(--fs-small);
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 0 1.9rem;
}
.footer-bottom__legal { margin: 0; font-size: 0.75rem; color: var(--muted); }
.footer-bottom__meta { margin: 0; font-size: 0.75rem; color: rgba(168, 190, 207, 0.62); }

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.8rem;
  background: transparent;
  border: 1px solid rgba(46, 95, 122, 0.9);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.to-top::after { content: "↑"; font-family: var(--font-mono); }
.to-top[data-visible] { opacity: 1; pointer-events: auto; }
.to-top:hover { color: var(--signal); border-color: rgba(182, 243, 90, 0.7); }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .btn:hover { transform: none; }
  .progress-rail__bar { transition: none; }
}
