:root {
  --ink: #071C17;
  --ink-deep: #050F0C;
  --field: #0E2B23;
  --grid: #1F4A3D;
  --paper: #F4F1E8;
  --mist: #A7B5AE;
  --lime: #C8FF4D;
  --lime-soft: #D9FF7A;
  --orange: #FF6B35;
  --ice: #6FE7D8;
  --char: #101512;
  --glass: rgba(220, 234, 228, 0.08);
  --line: rgba(167, 181, 174, 0.22);
  --line-strong: rgba(31, 74, 61, 0.85);
  --shell: 1440px;
  --gutter: clamp(16px, 3.4vw, 48px);
  --font-display: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, picture, video { max-width: 100%; display: block; }
a { color: var(--ice); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--lime); }
button { font: inherit; }
strong { font-weight: 700; color: var(--paper); }

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

::selection {
  background: var(--lime);
  color: var(--ink);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ============ SKIP LINK ============ */
.skip-link {
  position: absolute;
  left: 12px;
  top: -90px;
  z-index: 300;
  padding: 12px 18px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 2px;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 12px; color: var(--ink); }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(7, 28, 23, 0.95);
  border-bottom: 1px solid var(--grid);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.header-rail {
  position: relative;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 3vw, 40px);
  min-height: 92px;
  transition: min-height 0.24s ease;
}

.site-header.is-condensed .header-rail { min-height: 64px; }

.header-brand {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

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

.brand-glyph {
  position: relative;
  display: block;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--grid);
  background:
    linear-gradient(160deg, rgba(200, 255, 77, 0.16), rgba(31, 74, 61, 0.4) 70%);
  transition: border-color 0.18s ease;
}
.brand-mark:hover .brand-glyph { border-color: var(--lime); }

.glyph-line {
  position: absolute;
  left: 50%;
  top: 5px;
  bottom: 5px;
  width: 1px;
  background: var(--lime);
  opacity: 0.9;
  transform: translateX(-50%);
}

.glyph-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.14);
}

.brand-text { display: block; }

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.brand-tag {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--ice);
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mist);
  white-space: nowrap;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.site-header.is-condensed .header-status {
  opacity: 0;
  visibility: hidden;
}

.status-pulse {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(200, 255, 77, 0.16);
  animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* ---- navigation ---- */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 22px);
}

.nav-scale {
  display: flex;
  align-items: center;
  gap: clamp(0px, 0.4vw, 6px);
}

.nav-scale a {
  position: relative;
  display: block;
  padding: 10px 12px;
  color: var(--mist);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.18s ease;
}
.nav-scale a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.2s ease;
}
.nav-scale a:hover,
.nav-scale a:focus-visible { color: var(--paper); }
.nav-scale a[aria-current="page"] { color: var(--lime); }
.nav-scale a[aria-current="page"]::after { transform: scaleX(1); }

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 15px;
  border: 1px solid var(--lime);
  border-radius: 2px;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}
.header-cta:hover {
  background: var(--lime);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--grid);
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.nav-toggle:hover { border-color: var(--lime); color: var(--lime); }

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease;
}
.site-header[data-open] .nav-toggle-bar:first-child {
  transform: translateY(3px) rotate(45deg);
}
.site-header[data-open] .nav-toggle-bar:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.nav-toggle-label { line-height: 1; }

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

@media (max-width: 1180px) {
  .header-status { display: none; }
}

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px var(--gutter) 26px;
    background: var(--field);
    border-bottom: 1px solid var(--grid);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.55);
    max-height: calc(100vh - 92px);
    overflow-y: auto;
  }
  .site-header[data-open] .site-nav { display: flex; }

  .nav-scale {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-scale li { border-bottom: 1px solid rgba(31, 74, 61, 0.7); }
  .nav-scale a {
    padding: 15px 2px;
    font-size: 16px;
  }
  .nav-scale a::after {
    left: 2px;
    right: auto;
    width: 22px;
    bottom: 9px;
  }

  .header-cta {
    margin-top: 20px;
    align-self: flex-start;
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* ============ FOOTER ============ */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 128px);
  background: var(--ink-deep);
  border-top: 1px solid var(--grid);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: var(--gutter);
  width: 88px;
  height: 2px;
  background: var(--lime);
}

.footer-rail {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 76px) var(--gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 76px);
}

.footer-brand { min-width: 0; }

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: 0.02em;
  color: var(--paper);
}

.footer-brand-tag {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--ice);
}

.footer-summary {
  margin-top: 20px;
  max-width: 40ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--mist);
}

.footer-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
}

.footer-col { min-width: 0; }

.footer-col-title {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--lime);
  text-transform: uppercase;
}

.footer-links { display: grid; gap: 10px; }
.footer-links a {
  display: inline-block;
  color: var(--mist);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}
.footer-links a:hover {
  color: var(--paper);
  transform: translateX(2px);
}

.footer-contact {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(24px, 3.4vw, 36px) var(--gutter);
  border-top: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 44px);
  align-items: start;
}

.footer-contact-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--paper);
}

.footer-contact-item { display: inline-block; }

.footer-contact-address {
  flex-basis: 100%;
  color: var(--mist);
  font-size: 12.5px;
  line-height: 1.7;
}

.footer-note {
  max-width: 54ch;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--mist);
}

.footer-legal {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 16px var(--gutter) 34px;
  border-top: 1px solid var(--line-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.footer-legal-brand { color: var(--paper); }
.footer-icp { color: var(--mist); }

.footer-legal-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.footer-legal-links a {
  color: var(--mist);
  text-decoration: none;
}
.footer-legal-links a:hover { color: var(--lime); }

@media (max-width: 860px) {
  .footer-rail { grid-template-columns: minmax(0, 1fr); }
  .footer-summary { max-width: 46ch; }
  .footer-contact { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .footer-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-legal { justify-content: flex-start; }
}

/* ============ LAYOUT PRIMITIVES ============ */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: 840px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.grid-12 > .span-3 { grid-column: span 3; }
.grid-12 > .span-4 { grid-column: span 4; }
.grid-12 > .span-5 { grid-column: span 5; }
.grid-12 > .span-6 { grid-column: span 6; }
.grid-12 > .span-7 { grid-column: span 7; }
.grid-12 > .span-8 { grid-column: span 8; }
.grid-12 > .span-12 { grid-column: span 12; }

@media (max-width: 900px) {
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .grid-12 > [class*="span-"] { grid-column: span 6; }
}

@media (max-width: 600px) {
  .grid-12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-12 > [class*="span-"] { grid-column: span 2; }
}

.reading {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.8;
  color: var(--paper);
}
.reading p + p { margin-top: 1.15em; }
.reading h2 {
  margin: 2em 0 0.6em;
  font-size: clamp(22px, 2.6vw, 30px);
}
.reading h3 {
  margin: 1.6em 0 0.5em;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--lime);
}
.reading ul,
.reading ol {
  margin: 1em 0;
  padding-left: 1.3em;
  list-style: disc;
}
.reading li + li { margin-top: 0.45em; }
.reading a { color: var(--ice); }

/* ============ BREADCRUMB ============ */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb li::after {
  content: "/";
  color: var(--grid);
}
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a {
  color: var(--mist);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--lime); }
.breadcrumb [aria-current="page"] { color: var(--paper); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
}
.btn-primary:hover { background: var(--lime-soft); color: var(--ink); }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }

.btn-signal {
  background: transparent;
  color: var(--orange);
  border-color: rgba(255, 107, 53, 0.55);
}
.btn-signal:hover {
  background: rgba(255, 107, 53, 0.12);
  color: var(--orange);
}

/* ============ TAGS & LABELS ============ */
.coord-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ice);
}
.coord-tag::before {
  content: "";
  flex: none;
  width: 20px;
  height: 1px;
  background: var(--orange);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--grid);
  border-radius: 999px;
  background: rgba(31, 74, 61, 0.28);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
  white-space: nowrap;
}
.tag-lime {
  color: var(--lime);
  border-color: rgba(200, 255, 77, 0.45);
  background: rgba(200, 255, 77, 0.08);
}
.tag-orange {
  color: var(--orange);
  border-color: rgba(255, 107, 53, 0.45);
  background: rgba(255, 107, 53, 0.1);
}
.tag-ice {
  color: var(--ice);
  border-color: rgba(111, 231, 216, 0.4);
  background: rgba(111, 231, 216, 0.08);
}

/* ============ PANELS ============ */
.panel {
  background: var(--char);
  border: 1px solid var(--grid);
  border-radius: 3px;
  padding: clamp(20px, 2.6vw, 32px);
}

.panel-glass {
  background: var(--glass);
  border: 1px solid rgba(220, 234, 228, 0.16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 3px;
  padding: clamp(20px, 2.6vw, 32px);
}

/* ============ SECTION RULE ============ */
.section-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(32px, 5vw, 64px) 0 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
}
.section-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--grid), transparent);
}

/* ============ FIGURE / IMAGE CONTAINERS ============ */
.figure { margin: 0; }

.figure-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--grid);
  border-radius: 2px;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(31, 74, 61, 0.95), transparent 62%),
    linear-gradient(158deg, var(--field), var(--ink));
}
.figure-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 74, 61, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 74, 61, 0.55) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.4;
  pointer-events: none;
}
.figure-media::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  border-top: 1px solid var(--lime);
  border-left: 1px solid var(--lime);
  opacity: 0.7;
  pointer-events: none;
}
.figure-media img,
.figure-media picture > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure-media-wide { aspect-ratio: 21 / 9; }
.figure-media-tall { aspect-ratio: 4 / 5; }

.figure-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist);
}

/* ============ 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;
  }
  .status-pulse { animation: none; opacity: 1; }
  .btn:hover,
  .footer-links a:hover { transform: none; }
}
