/* =========================================================
   9博平台服务中心 · 共享样式 /assets/site.css
   色彩分区：深墨蓝轨道 → 纸白内容面 → 深墨蓝收束
   ========================================================= */

/* ---------- 设计令牌 ---------- */
:root {
  --ink-950: #070D18;
  --ink-900: #0C1524;
  --ink-700: #1A2A42;
  --slate-500: #5F7591;
  --mist-200: #D8E1EC;
  --paper-050: #F7F9FC;
  --amber-400: #F2B24A;
  --signal-500: #FF6B3D;
  --mint-400: #57B894;
  --deep-950: #101820;

  --font-head: "Barlow Condensed", "Archivo Narrow", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --line-dark: rgba(216, 225, 236, 0.14);
  --line-strong: rgba(216, 225, 236, 0.28);
  --line-light: rgba(95, 117, 145, 0.26);
  --grid-dark: rgba(216, 225, 236, 0.055);

  --shell: 1440px;
  --pad: clamp(18px, 4vw, 56px);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.7, 0.28, 1);
  --shadow-lg: 0 24px 48px rgba(7, 13, 24, 0.45);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--deep-950);
  background-color: var(--paper-050);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink-950); }

ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
ul:last-child, ol:last-child { margin-bottom: 0; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--amber-400);
  outline-offset: 3px;
  border-radius: var(--radius);
}

@media (max-width: 640px) {
  body { font-size: 15px; }
}

@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;
  }
}

/* ---------- 布局容器与网格 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  padding-block: clamp(40px, 6vw, 88px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}

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

@media (max-width: 900px) {
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .grid-12 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 文本工具 ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.kicker::before {
  content: "";
  width: 20px;
  height: 1px;
  background-color: var(--amber-400);
}

.on-dark { color: var(--mist-200); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--paper-050); }
.on-dark .kicker { color: var(--slate-500); }
.on-dark a { color: var(--mist-200); }
.on-dark a:hover { color: var(--amber-400); }

/* ---------- 材质面板 ---------- */
.panel {
  padding: clamp(18px, 2.4vw, 28px);
  background-color: var(--paper-050);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
}

.panel--dark {
  background-color: var(--ink-700);
  border-color: var(--line-dark);
  color: var(--mist-200);
}

.panel--dark h2, .panel--dark h3 { color: var(--paper-050); }

.glass-panel {
  padding: clamp(18px, 2.4vw, 28px);
  background-color: rgba(12, 21, 36, 0.66);
  border: 1px solid rgba(216, 225, 236, 0.16);
  border-radius: var(--radius);
  color: var(--mist-200);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ---------- 状态标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.6;
  white-space: nowrap;
}

.tag--ok { color: #1E7A5C; background-color: rgba(87, 184, 148, 0.10); border-color: rgba(87, 184, 148, 0.45); }
.tag--warn { color: #B23A16; background-color: rgba(255, 107, 61, 0.10); border-color: rgba(255, 107, 61, 0.45); }
.tag--info { color: var(--ink-700); background-color: rgba(95, 117, 145, 0.10); border-color: rgba(95, 117, 145, 0.35); }
.tag--amber { color: #7A4E05; background-color: rgba(242, 178, 74, 0.16); border-color: rgba(242, 178, 74, 0.50); }

.on-dark .tag--ok { color: #8CE2C1; background-color: rgba(87, 184, 148, 0.14); border-color: rgba(87, 184, 148, 0.50); }
.on-dark .tag--warn { color: #FFA184; background-color: rgba(255, 107, 61, 0.14); border-color: rgba(255, 107, 61, 0.50); }
.on-dark .tag--info { color: var(--mist-200); background-color: rgba(216, 225, 236, 0.08); border-color: rgba(216, 225, 236, 0.28); }
.on-dark .tag--amber { color: var(--amber-400); background-color: rgba(242, 178, 74, 0.12); border-color: rgba(242, 178, 74, 0.45); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn-amber {
  background-color: var(--amber-400);
  border-color: var(--amber-400);
  color: var(--ink-950);
}

.btn-amber:hover {
  background-color: #FFC46B;
  border-color: #FFC46B;
  color: var(--ink-950);
}

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

.btn-ghost:hover {
  background-color: rgba(242, 178, 74, 0.10);
  border-color: var(--amber-400);
  color: var(--amber-400);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding-block: 14px;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--slate-500);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--slate-500);
  opacity: 0.6;
}

.breadcrumb-item a { color: inherit; text-decoration: none; }
.breadcrumb-item a:hover { color: var(--ink-900); }
.breadcrumb-item[aria-current="page"] { color: var(--deep-950); }

/* ---------- 图片容器基础 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: var(--ink-900);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
}

.media-frame img,
.media-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

@media (max-width: 640px) {
  .media-frame, .media-frame--wide { aspect-ratio: 16 / 10; }
  .media-frame--tall { aspect-ratio: 4 / 5; }
}

/* ---------- 显现动效 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- 目录高亮（页面阶段配合 data-toc 使用） ---------- */
[data-toc] a { transition: color 0.18s var(--ease); }
[data-toc] a[aria-current="true"] {
  color: var(--amber-400);
  font-weight: 600;
}

/* =========================================================
   头部
   ========================================================= */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius);
  background-color: var(--amber-400);
  color: var(--ink-950);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--ink-950);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
}

/* 顶部刻度条 */
.header-rail {
  background-color: var(--ink-950);
  border-bottom: 1px solid var(--line-dark);
  color: var(--slate-500);
}

.rail-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 6px var(--pad);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}

.rail-tag { color: var(--amber-400); }

.rail-ticks {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  height: 10px;
  overflow: hidden;
}

.rail-ticks i {
  display: block;
  flex: none;
  width: 1px;
  height: 5px;
  background-color: rgba(95, 117, 145, 0.45);
}

.rail-ticks i:nth-child(4n+1) {
  height: 9px;
  background-color: rgba(242, 178, 74, 0.55);
}

.rail-meta { color: var(--slate-500); }

/* 主导航区 */
.header-main {
  position: relative;
  background-color: var(--ink-900);
  background-image: linear-gradient(to right, var(--grid-dark) 0 1px, transparent 1px 100%);
  background-size: 64px 100%;
  border-bottom: 1px solid var(--line-dark);
  transition: box-shadow 0.24s var(--ease);
}

.site-header.is-stuck .header-main {
  box-shadow: 0 16px 34px rgba(7, 13, 24, 0.42);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 10px var(--pad);
  min-height: 66px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--paper-050);
  text-decoration: none;
}

.brand:hover { color: var(--paper-050); }

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  flex: none;
  width: 32px;
  height: 32px;
}

.brand-mark i {
  display: block;
  background-color: rgba(95, 117, 145, 0.55);
  border-radius: 1px;
}

.brand-mark i:nth-child(1),
.brand-mark i:nth-child(9) { background-color: rgba(242, 178, 74, 0.34); }
.brand-mark i:nth-child(3),
.brand-mark i:nth-child(7) { background-color: rgba(216, 225, 236, 0.22); }
.brand-mark i:nth-child(5) { background-color: var(--amber-400); }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-sub {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--slate-500);
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 2px;
  color: var(--mist-200);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: var(--amber-400);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s var(--ease);
}

.nav-link:hover { color: var(--paper-050); }
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  color: var(--amber-400);
  font-weight: 600;
}

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta { flex: none; }

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background-color: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--paper-050);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.nav-toggle:hover { border-color: var(--amber-400); color: var(--amber-400); }

.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle-bars span {
  display: block;
  height: 1.5px;
  background-color: currentColor;
  transition: transform 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child {
  transform: translateY(2.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child {
  transform: translateY(-2.75px) rotate(-45deg);
}

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

.header-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-image: linear-gradient(90deg, var(--amber-400), var(--signal-500));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* 移动 / 平板导航 */
@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad) 20px;
    background-color: var(--ink-950);
    background-image: linear-gradient(to right, var(--grid-dark) 0 1px, transparent 1px 100%);
    background-size: 64px 100%;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid rgba(242, 178, 74, 0.35);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 96px);
    overflow-y: auto;
  }

  .site-nav[data-open] { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item { border-bottom: 1px solid rgba(216, 225, 236, 0.08); }

  .nav-link {
    display: flex;
    justify-content: flex-start;
    padding: 14px 12px;
    border-left: 2px solid transparent;
    font-size: 16px;
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] {
    border-left-color: var(--amber-400);
    background-color: rgba(242, 178, 74, 0.07);
  }

  .nav-cta {
    width: 100%;
    margin-top: 18px;
  }
}

@media (max-width: 640px) {
  .rail-inner { gap: 10px; font-size: 10px; letter-spacing: 0.06em; }
  .rail-ticks { display: none; }
  .rail-meta { margin-left: auto; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-name { font-size: 18px; }
  .brand-sub { font-size: 9px; letter-spacing: 0.10em; }
  .header-inner { min-height: 60px; gap: 12px; }
  .nav-toggle { padding: 8px 10px; }
}

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  position: relative;
  padding-top: clamp(36px, 5vw, 64px);
  background-color: var(--ink-950);
  background-image: linear-gradient(to right, var(--grid-dark) 0 1px, transparent 1px 100%);
  background-size: 72px 100%;
  border-top: 1px solid rgba(242, 178, 74, 0.28);
  color: var(--mist-200);
}

.footer-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.5fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.footer-brand {
  display: grid;
  justify-items: start;
  gap: 12px;
}

.footer-brand .brand-mark {
  width: 36px;
  height: 36px;
}

.footer-brand-line {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(19px, 2.1vw, 24px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--paper-050);
}

.footer-brand-line span {
  margin-inline: 6px;
  color: var(--amber-400);
}

.footer-coord {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--slate-500);
}

.footer-cta { margin-top: 4px; }

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

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.footer-col-no { color: var(--amber-400); }

.footer-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--mist-200);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-list a::before {
  content: "";
  flex: none;
  width: 6px;
  height: 1px;
  background-color: var(--slate-500);
  transition: width 0.18s var(--ease), background-color 0.18s var(--ease);
}

.footer-list a:hover { color: var(--amber-400); }
.footer-list a:hover::before { width: 14px; background-color: var(--amber-400); }

.footer-contact {
  display: grid;
  gap: 10px;
  align-content: start;
}

.contact-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  font-size: 13px;
  line-height: 1.65;
}

.contact-k {
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.10em;
  color: var(--slate-500);
}

.contact-v {
  color: var(--mist-200);
  overflow-wrap: anywhere;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: clamp(28px, 4vw, 48px);
  padding: 16px 0 24px;
  border-top: 1px solid rgba(216, 225, 236, 0.12);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--slate-500);
}

.footer-copy,
.footer-icp { margin: 0; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-legal a {
  color: var(--mist-200);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-legal a:hover { color: var(--amber-400); }

@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .footer-contact { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-contact { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { gap: 24px; }
  .footer-base { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- 返回顶部（脚本生成） ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 2.4vw, 28px);
  bottom: clamp(14px, 2.4vw, 28px);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background-color: var(--ink-900);
  border: 1px solid rgba(242, 178, 74, 0.45);
  border-radius: var(--radius);
  color: var(--amber-400);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s linear, background-color 0.18s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background-color: var(--ink-700);
  border-color: var(--amber-400);
}

@media (prefers-reduced-motion: reduce) {
  .to-top { transition: opacity 0.001ms, visibility 0.001ms; transform: none; }
}
