/* ==========================================================================
   168中体网 · 站点共享样式  /assets/site.css
   夜间数据终端 / 深靛蓝基底 / 现代粗野主义骨架
   ========================================================================== */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

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

table { border-collapse: collapse; width: 100%; }

hr { border: 0; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #0A1130;
  --ink-deep: #070C22;
  --panel: #121C46;
  --panel-2: #0E1740;
  --edge: #1E2A5E;
  --edge-soft: #1A2450;

  --cyan: #22E0D6;
  --orange: #FF8A3D;
  --cream: #E8ECF5;
  --stone: #9AA6C4;
  --moss: #4E8A63;
  --clay: #B4674A;

  --cyan-08: rgba(34, 224, 214, 0.08);
  --cyan-16: rgba(34, 224, 214, 0.16);
  --cyan-40: rgba(34, 224, 214, 0.40);

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --shadow-hard: 6px 6px 0 rgba(3, 6, 20, 0.75);
  --shadow-lift: 9px 9px 0 rgba(3, 6, 20, 0.85);

  --shell: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 3px;
}

/* ---------- 3. 页面基底与中文排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(900px 520px at 84% -10%, var(--cyan-08), transparent 70%),
    radial-gradient(720px 480px at -8% 20%, rgba(255, 138, 61, 0.07), transparent 72%),
    linear-gradient(rgba(30, 42, 94, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 42, 94, 0.28) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  background-attachment: fixed, fixed, fixed, fixed;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }

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

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

/* ---------- 4. 布局外壳 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

#main-content { display: block; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-wide { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -120px;
  z-index: 200;
  display: inline-block;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: top 0.15s ease;
}

.skip-link:focus,
.skip-link:focus-visible { top: 12px; }

/* ---------- 6. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--ink);
  border-bottom: 2px solid var(--edge);
}

.header-rail {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

/* 品牌块（头部与页脚共用） */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(34, 224, 214, 0.7), 4px 4px 0 rgba(3, 6, 20, 0.85);
}

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

.brand-line {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--cream);
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  color: var(--stone);
  white-space: nowrap;
}

.brand:hover .brand-line { color: var(--cyan); }

/* 头部右侧状态区 */
.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 2px solid var(--edge);
  background: var(--panel-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--stone);
  white-space: nowrap;
}

.status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 10px rgba(78, 138, 99, 0.9);
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--edge);
  background: var(--panel);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #170F07;
  box-shadow: 4px 4px 0 rgba(3, 6, 20, 0.8);
}

.btn-ghost {
  background: transparent;
  border-color: var(--edge);
  color: var(--cyan);
}

.btn-compact { padding: 8px 12px; font-size: 12px; }

.btn:active { transform: translate(1px, 1px); box-shadow: none; }

@media (hover: hover) {
  .btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard); }
  .btn-primary:hover { background: #FF9A57; border-color: #FF9A57; }
  .btn-ghost:hover { border-color: var(--cyan); box-shadow: 4px 4px 0 rgba(34, 224, 214, 0.28); }
}

/* ---------- 8. 移动导航开关 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 2px solid var(--edge);
  background: var(--panel);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--cyan);
  transition: transform 0.16s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }
.nav-toggle[aria-expanded="true"] { border-color: var(--cyan); }

/* ---------- 9. 命令栏导航 ---------- */
.command-bar {
  background: var(--panel-2);
  border-top: 2px solid var(--edge);
}

.command-list {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: max(0px, calc(var(--gutter) - 18px));
  display: flex;
  flex-wrap: wrap;
}

.command-link {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 12px 18px 11px;
  border-right: 2px solid var(--edge);
  color: var(--stone);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  transition: color 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}

.command-list > li:first-child .command-link { border-left: 2px solid var(--edge); }

.nav-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--stone);
  transition: color 0.12s ease;
}

.nav-label { white-space: nowrap; }

@media (hover: hover) {
  .command-link:hover { color: var(--cream); background: var(--cyan-08); }
  .command-link:hover .nav-index { color: var(--cyan); }
}

.command-link[aria-current="page"] {
  color: var(--cream);
  background: linear-gradient(180deg, var(--cyan-16), rgba(34, 224, 214, 0.02));
  box-shadow: inset 0 -3px 0 var(--cyan);
}

.command-link[aria-current="page"] .nav-index { color: var(--cyan); }

/* ---------- 10. 滚动进度 ---------- */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
}

.scroll-progress::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
}

/* ---------- 11. 页脚 ---------- */
.site-footer {
  margin-top: 96px;
  background: var(--ink-deep);
  border-top: 2px solid var(--edge);
}

.footer-grid {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 56px var(--gutter) 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.6fr;
  gap: 40px 32px;
}

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

.footer-slogan {
  margin-top: 18px;
  max-width: 22em;
  font-size: 17px;
  line-height: 1.7;
  color: var(--cream);
}

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid var(--edge);
  background: var(--panel-2);
  color: var(--stone);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.tag-cyan { color: var(--cyan); border-color: var(--cyan-40); }
.tag-moss { color: var(--moss); border-color: rgba(78, 138, 99, 0.5); }
.tag-orange { color: var(--orange); border-color: rgba(255, 138, 61, 0.5); }
.tag-clay { color: var(--clay); border-color: rgba(180, 103, 74, 0.55); }

.footer-title {
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--edge);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--stone);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  display: inline-block;
  width: fit-content;
  font-size: 15px;
  color: var(--cream);
  border-bottom: 1px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}

@media (hover: hover) {
  .footer-links a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
}

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

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.field-name {
  flex: 0 0 auto;
  min-width: 62px;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--stone);
}

.contact-value {
  flex: 1 1 12em;
  min-width: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--cream);
  word-break: break-word;
}

.copy-btn {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--stone);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease;
}

@media (hover: hover) {
  .copy-btn:hover { color: var(--cyan); border-color: var(--cyan); }
}

.copy-btn[data-copied="true"] { color: var(--moss); border-color: var(--moss); }

.footer-base {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 22px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 28px;
  border-top: 2px solid var(--edge);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--stone);
}

.footer-base-item { line-height: 1.6; }
.footer-region { color: var(--moss); }
.footer-icp { color: var(--stone); }
.footer-copy { color: var(--stone); }

/* ---------- 12. 通用内容块 ---------- */
.section-head {
  max-width: 64ch;
  margin-bottom: 28px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.section-kicker::before {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 2px;
  background: var(--cyan);
}

.section-title {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.section-lead {
  margin-top: 12px;
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.8;
  color: var(--stone);
}

.section-band {
  margin: 64px 0;
  padding: 18px 0;
  border-top: 2px solid var(--edge);
  border-bottom: 2px solid var(--edge);
  background: linear-gradient(90deg, var(--cyan-08), rgba(10, 17, 48, 0) 62%);
}

.section-band > .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
}

.panel {
  position: relative;
  padding: 24px;
  background: var(--panel);
  border: 2px solid var(--edge);
  box-shadow: var(--shadow-hard);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.panel-flat { box-shadow: none; }

@media (hover: hover) {
  .panel:not(.panel-flat):hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lift);
    border-color: var(--cyan-40);
  }
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 16px;
}

.panel-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cream);
}

.panel-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--orange);
}

.kpi-value.is-cyan { color: var(--cyan); }

.kpi-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--stone);
}

/* ---------- 13. 图片容器（供页面阶段复用） ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 2px solid var(--edge);
  background-color: var(--panel-2);
  background-image:
    linear-gradient(135deg, rgba(34, 224, 214, 0.14), rgba(10, 17, 48, 0.05) 55%),
    linear-gradient(0deg, rgba(255, 138, 61, 0.09), transparent 60%);
  box-shadow: var(--shadow-hard);
}

.media-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(10, 17, 48, 0.32) 0 1px, transparent 1px 4px);
  opacity: 0.45;
}

.media-frame-16x9 { aspect-ratio: 16 / 9; }
.media-frame-4x3 { aspect-ratio: 4 / 3; }
.media-frame-1x1 { aspect-ratio: 1 / 1; }
.media-frame-3x4 { aspect-ratio: 3 / 4; }

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

/* ---------- 14. 面包屑与正文 ---------- */
.breadcrumb {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 22px var(--gutter) 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--stone);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--edge);
}

.breadcrumb a { transition: color 0.12s ease; }

@media (hover: hover) {
  .breadcrumb a:hover { color: var(--cyan); }
}

.breadcrumb [aria-current="page"] { color: var(--cream); }

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
  color: var(--cream);
}

.prose > * + * { margin-top: 1.1em; }

.prose h2 {
  margin-top: 2em;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cream);
}

.prose ul,
.prose ol { display: flex; flex-direction: column; gap: 0.55em; }

.prose ul li { position: relative; padding-left: 22px; }

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  background: var(--cyan);
}

.prose ol { counter-reset: prose-ol; }

.prose ol li {
  position: relative;
  padding-left: 30px;
  counter-increment: prose-ol;
}

.prose ol li::before {
  content: counter(prose-ol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
}

.prose a {
  color: var(--cyan);
  border-bottom: 1px solid var(--cyan-40);
  transition: border-color 0.12s ease;
}

@media (hover: hover) {
  .prose a:hover { border-bottom-color: var(--cyan); }
}

.prose strong { font-weight: 700; color: #FFFFFF; }

.prose code {
  padding: 1px 6px;
  border: 1px solid var(--edge);
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.prose blockquote {
  padding: 16px 20px;
  border-left: 4px solid var(--cyan);
  background: var(--panel);
  color: var(--cream);
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .header-rail { padding-block: 10px; gap: 12px; }
  .brand-line { font-size: 16px; }
  .brand-sub { display: none; }
  .status-chip { display: none; }
  .nav-toggle { display: inline-flex; }
  .btn-compact { padding: 8px 10px; font-size: 11px; }

  .command-bar { display: none; }
  .command-bar[data-open="true"] { display: block; }

  .command-list {
    flex-direction: column;
    flex-wrap: nowrap;
    padding-inline: 0;
  }

  .command-list > li { border-top: 1px solid var(--edge-soft); }
  .command-list > li:first-child { border-top: 0; }
  .command-list > li:first-child .command-link { border-left: 0; }

  .command-link {
    width: 100%;
    border-right: 0;
    padding: 14px var(--gutter);
    font-size: 15px;
  }

  .command-link[aria-current="page"] {
    background: linear-gradient(90deg, var(--cyan-16), rgba(34, 224, 214, 0));
    box-shadow: inset 3px 0 0 var(--cyan);
  }

  .section-band { margin: 48px 0; }
  .site-footer { margin-top: 64px; }
  .footer-grid { padding-top: 40px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand { grid-column: auto; }
  .footer-base { flex-direction: column; gap: 8px; }
  .section-band > .shell { flex-direction: column; align-items: flex-start; }
  .panel { padding: 18px; }
}

/* ---------- 16. 可访问性与降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .panel:not(.panel-flat):hover,
  .btn:hover { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --edge: #3B4B8C; --stone: #C3CCE4; }
}
