/* ==========================================================================
   金宝博 BEAT · 共享样式 /assets/site.css
   顺序：重置 → 变量 → 排版 → 布局 → 通用组件 → 页头 → 页脚 → 响应式
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}

p { margin: 0 0 1em; }

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

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

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

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

main { display: block; }

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

/* ---------- 变量 ---------- */
:root {
  --ink-blue: #0E1B2E;
  --ink-blue-2: #16263D;
  --mist: #E7E3DC;
  --paper: #F7F5F1;
  --gold: #C9A227;
  --gold-light: #E6C86A;
  --cinnabar: #B23A2E;
  --text-ink: #10161F;
  --index-gray: #5A6270;
  --rule: #A99B7A;

  --on-dark: #F7F5F1;
  --on-dark-dim: rgba(247, 245, 241, .62);
  --on-dark-faint: rgba(247, 245, 241, .38);
  --rule-on-dark: rgba(169, 155, 122, .4);
  --rule-on-dark-soft: rgba(169, 155, 122, .26);

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

  --gutter: clamp(16px, 4vw, 48px);
  --max-wide: 1240px;
  --max-narrow: 900px;
}

/* ---------- 排版工具 ---------- */
.display {
  margin: 0 0 .6em;
  font-size: clamp(32px, 6vw, 76px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -.02em;
}
.display strong { font-weight: 700; }

.lede {
  max-width: 62ch;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.8;
  color: var(--index-gray);
}
.section--dark .lede,
.panel--dark .lede { color: var(--on-dark-dim); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--index-gray);
}
.section-label::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--rule);
}
.section-label--dark { color: var(--gold-light); }
.section-label--dark::before { background: var(--rule-on-dark); }

/* ---------- 布局 ---------- */
.wrap {
  width: 100%;
  max-width: var(--max-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--max-narrow); }

.section { padding-block: clamp(40px, 6vw, 88px); }
.section--paper { background: var(--paper); }
.section--mist { background: var(--mist); }
.section--dark {
  background: var(--ink-blue);
  color: var(--on-dark);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
}
.col-main { grid-column: 1 / span 7; }
.col-index { grid-column: 9 / span 4; }
.col-half { grid-column: span 6; }
.col-wide { grid-column: 1 / -1; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--rule);
  background: transparent;
  color: inherit;
  font-size: 14px;
  letter-spacing: .08em;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.btn:hover,
.btn:focus-visible {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--ink-blue);
}
.btn--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink-blue);
}
.btn--gold:hover,
.btn--gold:focus-visible {
  background: var(--gold-light);
  border-color: var(--gold-light);
}
.btn--ghost { border-color: var(--rule-on-dark); color: var(--on-dark); }
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold-light);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--index-gray);
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--rule);
}
.breadcrumb a { transition: color .16s ease; }
.breadcrumb a:hover { color: var(--gold); }
.section--dark .breadcrumb { color: var(--on-dark-dim); }

/* ---------- 框景容器 ---------- */
.framed {
  position: relative;
  border: 1px solid var(--rule);
  padding: clamp(22px, 4vw, 56px);
}
.framed::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(169, 155, 122, .45);
  pointer-events: none;
}
.section--dark .framed { border-color: var(--rule-on-dark); }
.section--dark .framed::before { border-color: rgba(169, 155, 122, .3); }

/* ---------- 堆叠面板 ---------- */
.panel {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: clamp(20px, 3vw, 34px);
}
.panel--mist { background: var(--mist); }
.panel--dark {
  background: var(--ink-blue-2);
  border-color: var(--rule-on-dark);
  color: var(--on-dark);
}
.panel__num {
  position: absolute;
  top: -1px;
  left: -1px;
  padding: 5px 10px;
  background: var(--ink-blue);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  line-height: 1.5;
}
.panel--dark .panel__num { background: var(--gold); color: var(--ink-blue); }
.panel__title {
  margin: 14px 0 10px;
  font-size: clamp(17px, 1.7vw, 21px);
  font-weight: 700;
  letter-spacing: -.01em;
}
.panel__meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--index-gray);
}
.panel--dark .panel__meta { color: var(--on-dark-dim); }

/* ---------- 展签卡 ---------- */
.tag-card {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: clamp(18px, 2.4vw, 26px);
  transition: border-color .16s ease, transform .16s ease;
}
.tag-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--gold);
}
.tag-card:hover { border-color: var(--gold); }
.tag-card__index {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  color: var(--gold);
}

/* ---------- 索引列表 ---------- */
.index-list {
  border-top: 1px solid var(--rule);
}
.index-list__item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(169, 155, 122, .4);
  transition: background-color .16s ease;
}
.index-list__item:hover { background: rgba(201, 162, 39, .07); }
.index-list__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--gold);
}
.index-list__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.index-list__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--index-gray);
  text-align: right;
}
.section--dark .index-list { border-top-color: var(--rule-on-dark); }
.section--dark .index-list__item { border-bottom-color: var(--rule-on-dark-soft); }
.section--dark .index-list__title { color: var(--on-dark); }
.section--dark .index-list__meta { color: var(--on-dark-dim); }

/* ---------- 折叠索引 ---------- */
.index-details {
  border: 1px solid var(--rule);
  background: var(--paper);
}
.index-details + .index-details { border-top: 0; }
.index-details > summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  list-style: none;
  transition: color .16s ease, background-color .16s ease;
}
.index-details > summary::-webkit-details-marker { display: none; }
.index-details > summary::after {
  content: "＋";
  font-family: var(--font-mono);
  color: var(--gold);
}
.index-details[open] > summary::after { content: "－"; }
.index-details > summary:hover { background: rgba(201, 162, 39, .08); }
.index-details__body {
  padding: 0 16px 18px;
  font-size: 15px;
  line-height: 1.78;
  color: var(--index-gray);
}

/* ---------- 数据块 ---------- */
.data-block { display: grid; gap: 6px; }
.data-block__value {
  font-family: var(--font-mono);
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--gold);
}
.data-block__label {
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--index-gray);
}
.panel--dark .data-block__label,
.section--dark .data-block__label { color: var(--on-dark-dim); }

/* ---------- 刻度分隔线 ---------- */
.scale-rule {
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 14px);
  opacity: .55;
}
.section--dark .scale-rule { opacity: .4; }

/* ---------- 图片容器基础规则 ---------- */
.figure {
  position: relative;
  display: block;
  margin: 0;
  background: var(--mist);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.figure > img,
.figure > picture,
.figure > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure--21x9 { aspect-ratio: 21 / 9; }
.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x3  { aspect-ratio: 4 / 3; }
.figure--1x1  { aspect-ratio: 1 / 1; }
.figure--3x4  { aspect-ratio: 3 / 4; }
.figure--fill {
  aspect-ratio: auto;
  min-height: clamp(200px, 32vw, 420px);
}
.figure--framed::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(247, 245, 241, .35);
  pointer-events: none;
}
.figure__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 14px 10px;
  background: linear-gradient(to top, rgba(14, 27, 46, .9), rgba(14, 27, 46, 0));
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
}

/* ---------- 显现动画 ---------- */
html.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .24s ease, transform .24s ease;
}
html.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 滚动进度与回到顶部（JS 注入） ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 120;
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  bottom: clamp(14px, 2vw, 28px);
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  background: var(--ink-blue);
  color: var(--on-dark);
  font-size: 12px;
  letter-spacing: .12em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease,
              border-color .16s ease, color .16s ease;
}
.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover { border-color: var(--gold); color: var(--gold-light); }
.to-top__mark { font-family: var(--font-mono); color: var(--gold); }

/* ---------- 页头 ---------- */
.site-header {
  background: var(--ink-blue);
  color: var(--on-dark);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--ink-blue);
  font-size: 14px;
  letter-spacing: .06em;
  transition: top .16s ease;
}
.skip-link:focus { top: 12px; }

.masthead {
  padding: clamp(18px, 3vw, 32px) var(--gutter) 0;
}
.masthead__inner {
  max-width: var(--max-wide);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
}
.masthead__code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--on-dark-faint);
  white-space: nowrap;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.brand__name {
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--on-dark);
}
.brand__beat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .5em;
  text-indent: .5em;
  color: var(--gold);
  transition: color .16s ease;
}
.brand:hover .brand__beat { color: var(--gold-light); }
.masthead__tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
}
.tool-link {
  position: relative;
  padding-bottom: 3px;
  font-size: 13px;
  letter-spacing: .08em;
  white-space: nowrap;
  color: var(--on-dark-dim);
  transition: color .16s ease;
}
.tool-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .16s ease;
}
.tool-link:hover { color: var(--gold); }
.tool-link:hover::after { transform: scaleX(1); transform-origin: left center; }
.tool-link--gold { color: var(--gold); }

.masthead__scale {
  max-width: var(--max-wide);
  margin: clamp(14px, 2vw, 20px) auto 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, rgba(169, 155, 122, .6) 0 1px, transparent 1px 15px);
}

.navbar {
  background: var(--ink-blue-2);
  border-bottom: 1px solid var(--rule-on-dark);
}
.navbar__inner {
  max-width: var(--max-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  justify-content: center;
  align-items: center;
}
.site-nav { display: block; }
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(6px, 2vw, 26px);
}
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 17px 2px;
  font-size: 14px;
  letter-spacing: .06em;
  color: rgba(247, 245, 241, .78);
  transition: color .16s ease;
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--cinnabar);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .16s ease, background-color .16s ease;
}
.site-nav__link:hover { color: var(--gold-light); }
.site-nav__link:hover::after {
  background: var(--gold);
  transform: scaleX(1);
}
.site-nav__link[aria-current="page"] { color: var(--on-dark); }
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.site-nav__index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: rgba(201, 162, 39, .85);
}

.nav-toggle { display: none; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink-blue);
  color: var(--on-dark);
  border-top: 1px solid var(--rule-on-dark);
}
.footer__inner {
  max-width: var(--max-wide);
  margin-inline: auto;
  padding: clamp(38px, 5vw, 66px) var(--gutter) clamp(20px, 3vw, 32px);
}
.footer__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule-on-dark);
}
.footer__brand {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  letter-spacing: -.02em;
}
.footer__beat {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .4em;
  color: var(--gold);
}
.footer__note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--on-dark-faint);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
  padding: clamp(26px, 4vw, 44px) 0;
}
.footer-col__title {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--gold);
}
.footer-col__list { display: grid; gap: 9px; }
.footer-col__list a {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  font-size: 14px;
  color: rgba(247, 245, 241, .78);
  transition: color .16s ease;
}
.footer-col__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .16s ease;
}
.footer-col__list a:hover { color: var(--gold-light); }
.footer-col__list a:hover::after { transform: scaleX(1); }

.footer__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: clamp(20px, 3vw, 28px) 0;
  border-top: 1px solid var(--rule-on-dark-soft);
}
.footer__contact-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--on-dark-faint);
}
.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--rule-on-dark);
  background: transparent;
  color: var(--on-dark);
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.copy-chip:hover {
  border-color: var(--gold);
  background: rgba(201, 162, 39, .12);
}
.copy-chip__key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--gold);
}
.copy-chip__val {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
}
.copy-chip__state {
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--on-dark-faint);
}
.footer__address {
  margin: 0;
  font-size: 13px;
  color: var(--on-dark-dim);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-on-dark-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--on-dark-dim);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer__legal a {
  color: rgba(247, 245, 241, .82);
  transition: color .16s ease;
}
.footer__legal a:hover { color: var(--gold); }
.footer__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer__icp { color: var(--on-dark-faint); }

/* ---------- 响应式：平板 ---------- */
@media (max-width: 1023px) {
  .col-main { grid-column: 1 / span 7; }
  .col-index { grid-column: 1 / -1; }
}

/* ---------- 响应式：手机与窄平板 ---------- */
@media (max-width: 899px) {
  .grid-12 { grid-template-columns: minmax(0, 1fr); }
  .col-main,
  .col-index,
  .col-half,
  .col-wide { grid-column: 1 / -1; }

  .masthead__inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: 8px;
  }
  .masthead__code { order: 3; }
  .masthead__tools { justify-content: center; order: 4; }

  .navbar__inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 14px 2px;
    font-size: 14px;
    letter-spacing: .12em;
    color: var(--on-dark);
  }
  .nav-toggle__bars {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    width: 18px;
  }
  .nav-toggle__bars span {
    display: block;
    height: 1.5px;
    background: var(--gold);
    transition: transform .16s ease, opacity .16s ease;
  }

  .site-nav { display: none; }
  .site-nav[data-open] {
    display: block;
    border-top: 1px solid var(--rule-on-dark);
    padding-bottom: 10px;
  }
  .site-nav__list {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  .site-nav__item { border-bottom: 1px solid var(--rule-on-dark-soft); }
  .site-nav__link {
    padding: 14px 2px;
    justify-content: flex-start;
    font-size: 15px;
  }
  .site-nav__link::after { display: none; }
  .site-nav__link[aria-current="page"] { color: var(--gold-light); }
  .site-nav__link[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--cinnabar);
  }
  .site-nav__link[aria-current="page"] .site-nav__index { color: var(--cinnabar); }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__head { align-items: flex-start; }
}

@media (max-width: 560px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__base { flex-direction: column; }
  .copy-chip { width: 100%; justify-content: space-between; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html.has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
