/* ============================================================
   6688赛场 · 共享样式 /assets/site.css
   夜墨绿底 · 荧光青数据线 · 暖橙重点标记 · 粗野主义档案感
   ============================================================ */

:root {
  --ink-900: #071B16;
  --ink-800: #0E2A22;
  --ink-700: #16382E;
  --cyan: #3BE0C8;
  --cyan-deep: #1FA893;
  --orange: #FF8A3D;
  --orange-deep: #D9642A;
  --paper: #F4EFE3;
  --paper-2: #EAE3D4;
  --gray: #9AA8A2;
  --paper-dim: #C8C2B4;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1280px;
  --bar-wrap: 1440px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow-solid: 10px 10px 0 rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html, body { margin: 0; padding: 0; }

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

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

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

p { margin: 0; }

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

a { color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

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

/* ---------- 中文排版与基础节奏 ---------- */
body {
  background-color: var(--ink-900);
  background-image: linear-gradient(180deg, rgba(59, 224, 200, 0.06), rgba(7, 27, 22, 0) 460px);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

#main-content { display: block; }
#main-content:focus { outline: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -70px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: 2px solid var(--ink-900);
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 12px; }

.mono, .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--cyan);
}
.eyebrow { text-transform: uppercase; }
.lede {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.8;
  color: var(--paper-dim);
  max-width: 38em;
}
.muted { color: var(--gray); font-size: 14px; }

/* ---------- 容器与网格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
}
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-10 { grid-column: span 10; }

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 2px solid var(--ink-700);
  background: var(--ink-800);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}
.btn-accent {
  background: var(--orange);
  border-color: var(--orange-deep);
  color: #1B0E04;
}
.btn-accent:hover { background: #FFA161; }
.btn-line {
  background: transparent;
  border-color: var(--cyan);
  color: var(--cyan);
}
.btn-line:hover { background: var(--cyan); color: var(--ink-900); }
.btn-paper {
  background: var(--paper);
  border-color: #0B241D;
  color: var(--ink-900);
}
.btn-paper:hover { background: var(--paper-2); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag-cyan { color: var(--cyan); }
.tag-orange { color: var(--orange); }
.tag-gray { color: var(--gray); }
.tag-solid { background: var(--cyan); border-color: var(--cyan); color: var(--ink-900); }

/* ============================================================
   命令栏页头
   ============================================================ */
.cmd-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--ink-900);
  border-bottom: 2px solid var(--ink-700);
}
.cmd-progress {
  position: relative;
  height: 2px;
  background: var(--ink-700);
  overflow: hidden;
}
.cmd-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  transition: width 0.12s linear;
}
.cmd-inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 22px);
  min-height: 64px;
  max-width: var(--bar-wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.cmd-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--paper);
}
.cmd-brand-mark {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cyan);
}
.cmd-brand-name { font-size: 18px; font-weight: 900; letter-spacing: -0.02em; }
.cmd-brand-ver {
  padding: 1px 6px;
  border: 1px solid var(--ink-700);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gray);
}

/* 移动按钮 */
.cmd-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: transparent;
  border: 2px solid var(--ink-700);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.cmd-toggle:hover { border-color: var(--cyan); color: var(--cyan); }
.cmd-toggle-bars { display: inline-flex; flex-direction: column; gap: 3px; width: 16px; }
.cmd-toggle-bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.cmd-bar[data-open="true"] .cmd-toggle-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.cmd-bar[data-open="true"] .cmd-toggle-bars i:nth-child(2) { opacity: 0; }
.cmd-bar[data-open="true"] .cmd-toggle-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 主导航 */
.cmd-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}
.cmd-nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.cmd-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  color: var(--paper-dim);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.cmd-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--cyan-deep);
}
.cmd-link:hover,
.cmd-link:focus-visible {
  color: var(--paper);
  background: var(--ink-800);
}
.cmd-link:hover .cmd-idx,
.cmd-link:focus-visible .cmd-idx { color: var(--cyan); }
.cmd-link[aria-current="page"] {
  color: var(--cyan);
  background: var(--ink-800);
  border-bottom-color: var(--cyan);
}
.cmd-link[aria-current="page"] .cmd-idx { color: var(--cyan); }

/* 右侧快捷区 */
.cmd-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}
.cmd-readout {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gray);
  white-space: nowrap;
}
.cmd-index { position: relative; }
.cmd-index-btn {
  list-style: none;
  cursor: pointer;
  padding: 5px 10px;
  border: 2px solid var(--ink-700);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gray);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.cmd-index-btn::-webkit-details-marker { display: none; }
.cmd-index-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.cmd-index[open] .cmd-index-btn {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-900);
}
.cmd-index-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 90;
  width: 268px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: var(--ink-800);
  border: 2px solid var(--cyan);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
}
.cmd-index-note {
  padding: 2px 8px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gray);
  border-bottom: 1px solid var(--ink-700);
}
.cmd-index-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-bottom: 1px solid var(--ink-700);
  font-size: 13px;
  color: var(--paper);
  text-decoration: none;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.cmd-index-item:last-child { border-bottom: 0; }
.cmd-index-item:hover { background: var(--ink-700); color: var(--cyan); }

/* 压缩态 */
.cmd-bar.is-condensed .cmd-inner { min-height: 48px; }
.cmd-bar.is-condensed .cmd-brand-name { font-size: 16px; }
.cmd-bar.is-condensed .cmd-brand-ver { display: none; }
.cmd-bar.is-condensed .cmd-link { padding-block: 5px; }

/* ============================================================
   通用组件：卡片 / 纸面 / 章节 / 时间轴 / 表格 / 面包屑
   ============================================================ */
.card {
  position: relative;
  padding: clamp(16px, 2vw, 24px);
  background: var(--ink-800);
  border: 2px solid var(--ink-700);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card:hover {
  transform: translate(0, -2px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
  border-color: var(--cyan-deep);
}
.card-title { font-size: clamp(18px, 2vw, 20px); }
.card-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray);
}

.sheet {
  padding: clamp(20px, 3vw, 40px);
  background: var(--paper);
  color: var(--ink-900);
  border: 2px solid #0B241D;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.45);
}
.sheet h2, .sheet h3, .sheet h4 { color: var(--ink-900); }
.sheet a { color: var(--cyan-deep); }

.chapter {
  position: relative;
  padding-block: clamp(36px, 6vw, 80px);
  border-left: 4px solid transparent;
  transition: border-color 0.4s var(--ease);
}
.chapter.is-current { border-left-color: var(--cyan); }
.chapter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}
.chapter-index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.chapter-title { font-size: clamp(24px, 3.4vw, 40px); }
.chapter-status {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid var(--orange);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--orange);
}

.axis {
  position: relative;
  padding-left: 22px;
  border-left: 2px solid var(--ink-700);
}
.axis-node { position: relative; padding-bottom: 24px; }
.axis-node::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 7px;
  width: 10px;
  height: 10px;
  background: var(--ink-900);
  border: 2px solid var(--cyan);
}
.axis-node.is-current::before {
  background: var(--orange);
  border-color: var(--orange);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(7, 27, 22, 0.18);
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4E6A60;
}
.data-table--dark { color: var(--paper); }
.data-table--dark th { color: var(--cyan); }
.data-table--dark td { border-bottom-color: var(--ink-700); }

.kv {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr;
  gap: 6px 16px;
  font-size: 14px;
}
.kv dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray);
}
.kv dd { margin: 0; }

.crumbs { margin-bottom: 20px; }
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gray);
}
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--ink-700); }
.crumbs a { color: var(--gray); text-decoration: none; }
.crumbs a:hover { color: var(--cyan); }
.crumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(140deg, #0E2A22, #071B16 65%, #0B2F27);
  border: 2px solid var(--ink-700);
  box-shadow: var(--shadow-solid);
}
.media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-ratio-21x9 { aspect-ratio: 21 / 9; }
.media-ratio-16x9 { aspect-ratio: 16 / 9; }
.media-ratio-4x5 { aspect-ratio: 4 / 5; }
.media-ratio-1x1 { aspect-ratio: 1 / 1; }
.media-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: repeating-linear-gradient(135deg, rgba(59, 224, 200, 0.1) 0 2px, transparent 2px 12px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gray);
}
.media-tag {
  position: absolute;
  left: -2px;
  top: 16px;
  padding: 4px 10px;
  background: var(--cyan);
  border: 2px solid var(--ink-900);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-900);
}
.media-tag--orange { background: var(--orange); }
.media-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(7, 27, 22, 0.94), rgba(7, 27, 22, 0));
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
}
.media--paper { border-color: var(--paper); box-shadow: 10px 10px 0 var(--orange-deep); }

@keyframes pulse-line {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
.pulse { animation: pulse-line 2.4s var(--ease) infinite; }

/* ============================================================
   页脚
   ============================================================ */
.site-foot {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--ink-800);
  border-top: 2px solid var(--ink-700);
}
.site-foot::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: min(200px, 42%);
  height: 2px;
  background: var(--cyan);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: clamp(24px, 3vw, 44px);
  padding-block: clamp(36px, 5vw, 64px);
}
.foot-brand { min-width: 0; }
.foot-mark {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.foot-mark span {
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--cyan);
}
.foot-note {
  margin-top: 10px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray);
}
.foot-ver {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--paper-dim);
  opacity: 0.72;
}
.foot-col { min-width: 0; }
.foot-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.foot-links { display: flex; flex-direction: column; gap: 8px; }
.foot-links a {
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  font-size: 14px;
  color: var(--paper-dim);
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.foot-links a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.foot-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px 24px;
  padding-block: 22px;
  border-top: 1px solid var(--ink-700);
}
.foot-contact-item { display: flex; flex-direction: column; gap: 4px; }
.foot-contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gray);
}
.foot-contact-value { font-size: 14px; color: var(--paper); }

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 18px 28px;
  border-top: 1px solid var(--ink-700);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gray);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
  .cmd-readout { display: none; }
}

@media (max-width: 1080px) {
  .cmd-toggle { display: inline-flex; order: 3; }
  .cmd-brand { order: 1; }
  .cmd-actions { order: 2; margin-left: auto; }
  .cmd-nav {
    order: 4;
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 85;
    flex-direction: column;
    justify-content: flex-start;
    padding: 12px var(--gutter) 20px;
    background: var(--ink-800);
    border-top: 2px solid var(--ink-700);
    border-bottom: 2px solid var(--cyan);
    box-shadow: 0 14px 0 rgba(0, 0, 0, 0.4);
  }
  .cmd-bar[data-open="true"] .cmd-nav { display: flex; }
  .cmd-nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .cmd-link {
    justify-content: flex-start;
    padding: 12px 4px;
    border-bottom: 1px dashed var(--ink-700);
    border-left: 3px solid transparent;
    font-size: 15px;
  }
  .cmd-link[aria-current="page"] {
    border-bottom-color: var(--ink-700);
    border-left-color: var(--cyan);
  }
  .cmd-index-panel { right: auto; left: 0; }
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-4 { grid-column: span 3; }
  .col-6 { grid-column: span 6; }
  .col-8 { grid-column: span 6; }
  .col-10 { grid-column: span 6; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .cmd-index { display: none; }
  .cmd-cta--line { display: none; }
  .cmd-inner { min-height: 58px; }
  .col-4, .col-6, .col-8, .col-10 { grid-column: span 6; }
  .chapter-status { margin-left: 0; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .cmd-brand-ver { display: none; }
  .cmd-toggle-label { display: none; }
  .cmd-cta { padding: 7px 10px; font-size: 13px; }
  .grid-12 { grid-template-columns: 1fr; }
  .col-4, .col-6, .col-8, .col-10 { grid-column: span 1; }
  .foot-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
}

/* ============================================================
   动效收敛
   ============================================================ */
@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,
  .card:hover { transform: none; }
  .pulse { animation: none; opacity: 1; }
}
