/* ============================================================
   百博体育 OIS(CHINA) — 共享样式表 /assets/site.css
   深墨蓝底 · 电光青 / 荧光橙双强调 · 粗野主义数据看板
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

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

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

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

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

button { background: none; border: 0; }

a { color: inherit; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  /* 色彩 */
  --ink:        #0B1B2E;
  --ink-2:      #102542;
  --ink-3:      #081422;
  --cyan:       #2FE0D0;
  --orange:     #FF7A2F;
  --muted:      #8A87A6;
  --text:       #E8EEF5;
  --paper:      #E6E1D6;
  --warn:       #FF4D5E;
  --stroke:     #24384F;

  /* 布局 */
  --content-max: 1120px;
  --shell-max:   1440px;
  --rail-w:      240px;
  --gutter:      clamp(16px, 3vw, 40px);

  /* 字号阶 */
  --fs-12: 12px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-20: 20px;
  --fs-28: 28px;
  --fs-44: 44px;
  --fs-64: 64px;

  /* 字体 */
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", system-ui,
               -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace,
               SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC",
                "SimSun", Georgia, "Times New Roman", serif;

  /* 材质 */
  --radius: 2px;
  --shadow-hard: 6px 6px 0 0 var(--stroke);
  --shadow-soft: 0 18px 40px -24px rgba(2, 10, 22, 0.95);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;
}

/* ---------- 3. 页面基座 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    linear-gradient(to right, rgba(36, 56, 79, 0.30) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(36, 56, 79, 0.30) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 4. 中文排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.18;
  color: var(--text);
}

h1 { font-size: clamp(32px, 5vw, var(--fs-64)); }
h2 { font-size: clamp(24px, 3.4vw, var(--fs-44)); }
h3 { font-size: clamp(18px, 2.2vw, var(--fs-28)); }
h4 { font-size: var(--fs-20); }
h5 { font-size: var(--fs-16); }

.editorial,
.prose h2,
.prose h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.005em;
}

.numeric,
time,
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

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

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

/* ---------- 5. 焦点可见 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 1px;
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- 6. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--shell {
  max-width: var(--shell-max);
}

.prose {
  max-width: 40em;
  color: var(--text);
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.5em; }
.prose ul,
.prose ol {
  padding-left: 1.35em;
  list-style: disc;
}
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.5em; }
.prose strong { color: var(--cyan); font-weight: 700; }
.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover { color: var(--orange); }

/* ---------- 7. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  transform: translateY(-160%);
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--ink);
  font-size: var(--fs-14);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 0 var(--orange);
  transition: transform 160ms var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 8. 页头：命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink-2);
  border-bottom: 3px solid var(--stroke);
  transition: box-shadow 200ms var(--ease);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: clamp(72px, 12vw, 148px);
  height: 3px;
  background: var(--cyan);
}
.site-header[data-scrolled] {
  box-shadow: 0 14px 32px -18px rgba(0, 0, 0, 0.95);
}

.command-bar {
  position: relative;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  gap: 0;
  min-height: 68px;
  transition: min-height 200ms var(--ease);
}
.site-header[data-scrolled] .command-bar { min-height: 58px; }

/* --- 品牌 --- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px 10px 0;
  border-right: 1px solid var(--stroke);
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--ink);
  border: 2px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand-mark::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  background: var(--orange);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.22;
  min-width: 0;
}
.brand-text strong {
  font-size: var(--fs-16);
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.brand-text small {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--muted);
  white-space: nowrap;
}

/* --- 移动端开关 --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 2px solid var(--stroke);
  border-radius: var(--radius);
  background: transparent;
  color: var(--cyan);
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.nav-toggle:hover { border-color: var(--cyan); background: rgba(47, 224, 208, 0.08); }

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 180ms var(--ease), top 180ms var(--ease);
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { top: 8px; }
.site-header[data-open] .nav-toggle-bars::before { top: 4px; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { top: 4px; transform: rotate(-45deg); }

/* --- 主导航 --- */
.primary-nav {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.nav-index {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  min-width: 0;
}
.nav-index > li { display: flex; }

.nav-index a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 12px 17px;
  border-right: 1px solid rgba(36, 56, 79, 0.75);
  text-decoration: none;
  color: var(--muted);
  font-size: var(--fs-14);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.nav-index a:last-child { border-right: 0; }

.nav-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(138, 135, 166, 0.62);
  transition: color 160ms var(--ease);
}

.nav-index a:hover {
  color: var(--text);
  background: rgba(47, 224, 208, 0.05);
}
.nav-index a:hover .nav-num { color: var(--cyan); }

.nav-index a[aria-current="page"] {
  color: var(--cyan);
  background: rgba(47, 224, 208, 0.08);
}
.nav-index a[aria-current="page"] .nav-num { color: var(--orange); }
.nav-index a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--cyan);
}

/* --- 页头右侧 --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 20px;
  border-left: 1px solid var(--stroke);
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}
.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(47, 224, 208, 0.55);
  animation: syncPulse 2400ms var(--ease) infinite;
}
@keyframes syncPulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 224, 208, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(47, 224, 208, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 224, 208, 0); }
}

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 140ms var(--ease), background-color 140ms var(--ease),
              color 140ms var(--ease), border-color 140ms var(--ease),
              box-shadow 140ms var(--ease);
}

.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #1A0C00;
  box-shadow: 3px 3px 0 0 rgba(47, 224, 208, 0.55);
}
.btn-primary:hover {
  background: #FF9052;
  border-color: #FF9052;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 0 rgba(47, 224, 208, 0.65);
}
.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 rgba(47, 224, 208, 0.5);
}

.btn-ghost {
  background: transparent;
  border-color: var(--stroke);
  color: var(--cyan);
}
.btn-ghost:hover {
  border-color: var(--cyan);
  background: rgba(47, 224, 208, 0.09);
}

/* ---------- 10. 媒体容器（供页面阶段放置图片 / SVG） ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--ink-2);
  background-image:
    linear-gradient(135deg, rgba(47, 224, 208, 0.10) 0%, transparent 45%),
    linear-gradient(to right, rgba(36, 56, 79, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(36, 56, 79, 0.55) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  border: 2px solid var(--stroke);
  box-shadow: var(--shadow-hard);
}
.media > img,
.media > svg,
.media > video,
.media > picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--square { aspect-ratio: 1 / 1; }
.media--tall   { aspect-ratio: 3 / 4; }
.media--wide   { aspect-ratio: 21 / 9; }

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

/* ---------- 11. 基础组件 ---------- */
.panel {
  background: var(--ink-2);
  border: 2px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 18px;
  border-bottom: 2px solid var(--stroke);
  background: rgba(11, 27, 46, 0.6);
}
.panel-head h3,
.panel-head h4 {
  font-size: var(--fs-16);
  font-weight: 900;
  letter-spacing: 0.02em;
}
.panel-head time,
.panel-head .stamp {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.06em;
  color: var(--orange);
}

.panel-body {
  padding: 18px;
  font-size: var(--fs-14);
  line-height: 1.78;
  color: var(--text);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  background: rgba(47, 224, 208, 0.06);
  white-space: nowrap;
}
.tag--warn {
  color: var(--warn);
  border-color: rgba(255, 77, 94, 0.5);
  background: rgba(255, 77, 94, 0.08);
}

/* ---------- 12. 滚动进度条 ---------- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  z-index: 90;
  pointer-events: none;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--cyan) 52%, var(--orange) 100%);
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 110px);
  background: var(--ink-3);
  border-top: 3px solid var(--stroke);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: clamp(90px, 16vw, 220px);
  height: 3px;
  background: var(--orange);
}

.footer-grid {
  position: relative;
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) var(--gutter) clamp(26px, 4vw, 38px);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 3fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.footer-grid::after {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--stroke) 0%, rgba(36, 56, 79, 0.25) 55%, transparent 100%);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 300px;
}
.brand--footer {
  padding: 0;
  border-right: 0;
}
.brand--footer .brand-mark { border-color: var(--orange); color: var(--orange); }
.brand--footer .brand-mark::after { background: var(--cyan); }

.footer-note {
  margin: 0;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.footer-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.06em;
  color: var(--muted);
}

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

.footer-col h3 {
  margin: 0 0 16px;
  padding-bottom: 9px;
  border-bottom: 2px solid var(--stroke);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--cyan);
  text-transform: uppercase;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  display: inline-block;
  font-size: var(--fs-14);
  line-height: 1.55;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.footer-col a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(47, 224, 208, 0.45);
}

.footer-base {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 18px var(--gutter) 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 26px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.05em;
  color: var(--muted);
}
.footer-base-item { white-space: nowrap; }
.footer-icp { color: var(--text); }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1200px) {
  .nav-index a { padding: 12px 13px; }
  .brand { padding-right: 16px; }
  .header-actions { padding-left: 14px; gap: 8px; }
}

@media (max-width: 1080px) {
  .sync-badge { display: none; }
}

@media (max-width: 960px) {
  .command-bar {
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 0 16px;
  }
  .site-header[data-scrolled] .command-bar { min-height: 56px; }

  .brand {
    padding: 8px 0;
    border-right: 0;
    min-width: 0;
  }

  .nav-toggle { display: inline-flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    z-index: 55;
    background: var(--ink-2);
    border-top: 2px solid var(--stroke);
    border-bottom: 3px solid var(--stroke);
    max-height: min(72vh, 560px);
    overflow-y: auto;
    box-shadow: 0 26px 42px -18px rgba(0, 0, 0, 0.9);
  }
  .site-header[data-open] .primary-nav { display: block; }

  .nav-index {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-index a {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 15px 20px;
    border-right: 0;
    border-bottom: 1px solid rgba(36, 56, 79, 0.75);
    font-size: var(--fs-16);
  }
  .nav-index a:last-child { border-bottom: 0; }
  .nav-index a .nav-num { font-size: 12px; letter-spacing: 0.2em; }
  .nav-index a[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 3px;
    height: auto;
  }

  .header-actions {
    padding-left: 0;
    border-left: 0;
    gap: 8px;
  }
  .header-actions .btn-ghost { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-brand { max-width: none; }
}

@media (max-width: 720px) {
  .brand-text small { display: none; }
  .brand-mark { width: 30px; height: 30px; font-size: 10px; }
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: 9px 11px; }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }
  .footer-base { gap: 6px 18px; }
}

@media (max-width: 480px) {
  .footer-columns { grid-template-columns: 1fr; }
  .header-actions .btn-primary {
    padding: 8px 12px;
    font-size: var(--fs-12);
  }
  .footer-base { font-size: 11px; }
}

/* ---------- 15. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-padding-top: 76px; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .sync-dot { box-shadow: none; }
}
