/* ==========================================================================
   安博赛场 / readgame-anbo.com.cn — 共享样式表 /assets/site.css
   设计语言：高原档案室 · 经幡五色标签 · 堆叠面板 · 等宽数据
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --night: #0A1A2F;
  --panel: #10233D;
  --panel-raise: #17304F;
  --l-blue: #2F7BE0;
  --paper: #F2F6FB;
  --cream: #E6E1D6;
  --muted: #9DB2CC;
  --l-yellow: #F0C33C;
  --l-green: #1FA07A;
  --l-red: #D9483C;
  --red-bright: #FF6B5A;
  --rule: #2A4467;
  --terminal: #050D18;

  --rail-w: 252px;
  --topbar-h: 58px;
  --wrap: 1200px;

  --font-display: "Chakra Petch", "Archivo Expanded", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Noto Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-top: var(--topbar-h);
  background-color: var(--night);
  background-image:
    linear-gradient(180deg, rgba(23, 48, 79, .55) 0%, rgba(10, 26, 47, 0) 320px);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--l-blue); text-decoration: none; }
a:hover { color: var(--paper); }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.012em;
}

p { margin: 0; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

::selection { background: var(--l-yellow); color: var(--night); }

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

/* ---------- 3. 中文排版与等宽数字 ---------- */
.num,
.stat__value,
.panel__num,
.nav-link__idx,
.foot__meta,
.foot__legal,
.breadcrumb__list,
.figure__cap,
.tag {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

#main-content { scroll-margin-top: calc(var(--topbar-h) + 16px); }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--l-yellow);
  color: var(--night);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform .18s var(--ease);
}
.skip-link:focus { transform: translateY(0); color: var(--night); }

/* ---------- 5. 阅读进度条 ---------- */
.progress {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
}
.progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--l-blue) 0%, var(--l-green) 60%, var(--l-yellow) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- 6. 头部：移动顶栏 ---------- */
.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
}

.brand { display: inline-block; }
.brand__mark {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--paper);
  line-height: 1.1;
}
.brand:hover .brand__mark { color: var(--l-yellow); }

.brand--slim .brand__mark { font-size: 17px; letter-spacing: .04em; }

.brand__tag {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.topbar__tag {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  background: var(--panel-raise);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.nav-toggle:hover { border-color: var(--l-blue); }

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--paper);
  transition: transform .2s var(--ease), background-color .2s var(--ease), top .2s var(--ease);
}
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before,
.nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -5px; }
.nav-toggle__bar::after { top: 5px; }

.site-head[data-open] .nav-toggle__bar { background: transparent; }
.site-head[data-open] .nav-toggle__bar::before { top: 0; transform: rotate(45deg); }
.site-head[data-open] .nav-toggle__bar::after { top: 0; transform: rotate(-45deg); }

/* ---------- 7. 头部：侧边轨道 / 移动抽屉 ---------- */
.rail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: min(340px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: calc(var(--topbar-h) + 22px) 20px 28px;
  background: var(--panel);
  border-left: 1px solid var(--rule);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(102%);
  transition: transform .24s var(--ease);
}
.site-head[data-open] .rail { transform: translateX(0); }

.rail__top { display: flex; flex-direction: column; }

.rail__note {
  margin-top: 14px;
  padding-left: 10px;
  border-left: 2px solid var(--l-blue);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .06em;
  color: var(--muted);
}

.nav-list { display: flex; flex-direction: column; }
.nav-list__item { border-top: 1px solid var(--rule); }
.nav-list__item:last-child { border-bottom: 1px solid var(--rule); }

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 10px;
  border-left: 3px solid transparent;
  color: var(--paper);
  font-size: 15px;
  font-weight: 500;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.nav-link:hover {
  background: var(--panel-raise);
  border-left-color: var(--rule);
  color: var(--paper);
}
.nav-link__idx { font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.nav-link__txt { display: inline-block; }

.nav-link[aria-current="page"] {
  background: var(--panel-raise);
  border-left-color: var(--l-yellow);
  color: var(--paper);
  font-weight: 700;
}
.nav-link[aria-current="page"] .nav-link__idx { color: var(--l-yellow); }

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

/* 遮罩 */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--night);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s var(--ease);
}
.nav-scrim[data-visible="true"] { opacity: .72; pointer-events: auto; }

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--rule);
  background: var(--panel-raise);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .02em;
  text-align: center;
  transition: transform .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
  border-color: var(--l-blue);
  color: var(--paper);
}
.btn--primary {
  background: var(--l-blue);
  border-color: var(--l-blue);
  color: #06121F;
  font-weight: 700;
}
.btn--primary:hover { background: #4A90EF; color: #06121F; }
.btn--ghost { background: transparent; }
.btn--block { width: 100%; }

/* ---------- 9. 容器与正文 ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}
.container--narrow { max-width: 760px; }

.prose { max-width: 68ch; }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 48px; font-size: 28px; }
.prose h3 { margin-top: 34px; font-size: 20px; }
.prose p { color: var(--paper); }
.prose ul { display: flex; flex-direction: column; gap: 10px; }
.prose li { position: relative; padding-left: 22px; color: var(--paper); }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .82em;
  width: 9px;
  height: 1px;
  background: var(--l-blue);
}
.prose strong { color: var(--l-yellow); font-weight: 700; }
.prose a { border-bottom: 1px solid var(--rule); }
.prose a:hover { border-bottom-color: var(--l-blue); }
.prose blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--cream);
  color: #1B2430;
  border-left: 3px solid var(--l-blue);
  font-size: 15px;
}
.prose code {
  font-family: var(--font-mono);
  font-size: .92em;
  padding: 1px 6px;
  background: var(--panel-raise);
  border: 1px solid var(--rule);
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb { padding: 26px 0 0; }
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.breadcrumb__item { display: inline-flex; align-items: center; gap: 10px; }
.breadcrumb__item + .breadcrumb__item::before { content: "/"; color: var(--rule); }
.breadcrumb__link { color: var(--muted); }
.breadcrumb__link:hover { color: var(--l-blue); }
.breadcrumb__current { color: var(--paper); }

/* ---------- 11. 堆叠面板 ---------- */
.panel {
  position: relative;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--rule);
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.panel--raise { background: var(--panel-raise); }
.panel--offset-1 { margin-left: 8px; margin-right: -8px; }
.panel--offset-2 { margin-left: 16px; margin-right: -16px; }
.panel--offset-3 { margin-left: 24px; margin-right: -24px; }
.panel__num {
  display: block;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--l-blue);
}
.panel__title { margin-top: 8px; font-size: 24px; }
.panel__body { margin-top: 14px; color: var(--paper); }

a.panel:hover,
.panel[data-reveal]:hover {
  transform: translateY(-2px);
  border-color: var(--l-blue);
}

/* ---------- 12. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  clip-path: polygon(0 0, 100% 0, 100% 68%, calc(100% - 8px) 100%, 0 100%);
}
.tag--blue { color: var(--l-blue); }
.tag--white { color: var(--paper); }
.tag--yellow { color: var(--l-yellow); }
.tag--green { color: var(--l-green); }
.tag--red { color: var(--red-bright); }

/* ---------- 13. 数据焦点 ---------- */
.stat { display: block; }
.stat__value {
  display: block;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--l-yellow);
}
.stat__label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
}

/* ---------- 14. 横向主题带 ---------- */
.band { margin: 0; }
.band__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
}
.band__track::-webkit-scrollbar { height: 6px; }
.band__track::-webkit-scrollbar-thumb { background: var(--rule); }
.band__item {
  flex: 0 0 88%;
  scroll-snap-align: start;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.band__item:active { transform: scale(.98); }

/* ---------- 15. 可展开内容组 ---------- */
.accordion { border-top: 1px solid var(--rule); }
.acc-item { border-bottom: 1px solid var(--rule); }
.acc-item__btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 6px;
  border-left: 3px solid transparent;
  text-align: left;
  color: var(--paper);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.acc-item__btn:hover { background: var(--panel); border-left-color: var(--rule); }
.acc-item[data-open] .acc-item__btn { border-left-color: var(--l-green); }
.acc-item__meta {
  margin-left: auto;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}
.acc-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows .18s var(--ease), opacity .18s var(--ease);
}
.acc-item[data-open] .acc-item__panel { grid-template-rows: 1fr; opacity: 1; }
.acc-item__inner { overflow: hidden; }
.acc-item__body { padding: 0 6px 20px 20px; color: var(--muted); }

/* ---------- 16. 网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

/* ---------- 17. 图片容器（页面阶段放入实际图片） ---------- */
.figure { margin: 0; }
.figure__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--rule);
  background-color: var(--panel);
  background-image:
    linear-gradient(to right, rgba(42, 68, 103, .45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42, 68, 103, .45) 1px, transparent 1px);
  background-size: 34px 34px;
}
.figure__media--wide { aspect-ratio: 21 / 9; }
.figure__media--tall { aspect-ratio: 3 / 4; }
.figure__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure__cap {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: .06em;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- 18. 显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 19. 页脚 ---------- */
.site-foot {
  margin-top: 96px;
  padding: 56px 0 28px;
  background: var(--terminal);
  border-top: 1px solid var(--rule);
}

.foot__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--rule);
}

.foot__brand { min-width: 0; }
.foot__mark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .03em;
  color: var(--paper);
}
.foot__tag { margin-top: 8px; font-size: 13px; color: var(--l-blue); }
.foot__note {
  margin-top: 16px;
  max-width: 36ch;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.foot__col { min-width: 0; }
.foot__title {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--l-yellow);
}
.foot__list { display: flex; flex-direction: column; }
.foot__link {
  display: inline-block;
  padding: 5px 0;
  font-size: 14px;
  color: var(--muted);
  transition: color .18s var(--ease), padding-left .18s var(--ease);
}
.foot__link:hover { color: var(--paper); padding-left: 5px; }

.foot__contact { min-width: 0; }
.foot__contact-item {
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  word-break: break-word;
}

.foot__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding-top: 22px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
}
.foot__meta { color: var(--muted); }
.foot__legal { color: var(--muted); }

/* ---------- 20. 断点：平板 ---------- */
@media (min-width: 640px) {
  .container { padding-inline: 28px; }
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__brand { grid-column: 1 / -1; }
  .foot__legal { margin-left: auto; }
  .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  body {
    padding-top: 0;
    padding-left: var(--rail-w);
  }

  .site-head {
    top: 0;
    left: 0;
    bottom: 0;
    right: auto;
    width: var(--rail-w);
  }

  .topbar { display: none; }
  .nav-scrim { display: none; }

  .progress { top: 0; left: var(--rail-w); }

  .rail {
    position: absolute;
    inset: 0;
    width: auto;
    padding: 30px 24px 24px;
    border-left: 0;
    border-right: 1px solid var(--rule);
    transform: none;
    overflow-y: auto;
    gap: 26px;
  }

  .rail__foot { margin-top: auto; }

  .container { padding-inline: 40px; }

  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
  .col-3 { grid-column: span 3; }
  .col-4 { grid-column: span 4; }
  .col-5 { grid-column: span 5; }
  .col-6 { grid-column: span 6; }
  .col-7 { grid-column: span 7; }
  .col-8 { grid-column: span 8; }
  .col-9 { grid-column: span 9; }
  .col-12 { grid-column: span 12; }

  .band__item { flex: 0 0 300px; }

  .breadcrumb { padding-top: 32px; }

  .site-foot { padding-top: 64px; }

  .foot__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr; }
  .foot__brand { grid-column: auto; }
}

@media (min-width: 1180px) {
  .container { padding-inline: 48px; }
}

/* ---------- 21. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .btn:hover,
  .panel:hover,
  a.panel:hover { transform: none; }
  .band__item:active { transform: none; }
  .foot__link:hover { padding-left: 0; }
}
