/* ==========================================================================
   178体育安装 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 页头 / 导航 / 页脚 / 基础组件
   ========================================================================== */

:root {
  --night: #0B1220;
  --stand: #131C2E;
  --line: #23304A;
  --warm: #F2F4F0;
  --mist: #98A6BF;
  --cyan: #35E0D0;
  --orange: #FF7A2F;
  --pure: #FFFFFF;
  --board: #1B2740;
  --mint: #7BE8B0;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    "Courier New", monospace;

  --max: 1240px;
  --gutter: 24px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 40px; --header-h: 72px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 64px; --header-h: 76px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 96px);
}

body {
  margin: 0;
  background: var(--night);
  color: var(--warm);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-nav-open { overflow: hidden; }

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

h1, h2, h3, h4, h5 {
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

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

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

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

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

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

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

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: var(--gutter);
  z-index: 200;
  transform: translateY(-140%);
  background: var(--cyan);
  color: var(--night);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 10px 16px;
  transition: transform 0.18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

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

.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 104px);
}
.section--tight { padding-block: clamp(28px, 4vw, 56px); }
.section--stand { background: var(--stand); }
.section--board { background: var(--board); }
.section--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 48px), calc(100% - 48px) 100%, 0 100%);
}

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

@media (min-width: 900px) {
  .grid--5-7 { grid-template-columns: 5fr 7fr; }
  .grid--4-8 { grid-template-columns: 4fr 8fr; }
  .grid--7-5 { grid-template-columns: 7fr 5fr; }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 26px);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 0;
}

/* ---------- 排版 ---------- */
.display {
  font-size: clamp(52px, 9vw, 132px);
  font-weight: 200;
  line-height: 0.94;
  letter-spacing: -0.02em;
}
.display--md {
  font-size: clamp(38px, 5.6vw, 76px);
  font-weight: 200;
  line-height: 0.98;
  letter-spacing: -0.018em;
}
.section-title {
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 300;
  line-height: 1.12;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.lede {
  max-width: 34em;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.75;
  color: var(--warm);
}

.body-text {
  max-width: 34em;
  font-size: 16px;
  line-height: 1.8;
  color: var(--warm);
}

.note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--mist);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

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

.text-link {
  color: var(--cyan);
  border-bottom: 1px solid rgba(53, 224, 208, 0.45);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.text-link:hover {
  color: var(--warm);
  border-bottom-color: var(--warm);
}

/* ---------- 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--warm);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.2;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease),
    transform 0.18s var(--ease), background-color 0.18s var(--ease);
}
.btn::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
  transition: transform 0.18s var(--ease);
}
.btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}
.btn:hover::after { transform: translateX(2px); }

.btn--primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--night);
  font-weight: 700;
}
.btn--primary:hover {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--night);
}

.btn--ghost { color: var(--mist); border-color: var(--line); }
.btn--ghost:hover { color: var(--cyan); border-color: var(--cyan); }

.btn--quiet {
  padding-inline: 0;
  border-color: transparent;
  color: var(--cyan);
}
.btn--quiet:hover { border-color: transparent; color: var(--warm); }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--night);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.site-header[data-stuck="true"] {
  border-bottom-color: #2c3d5e;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.site-header__scan {
  display: block;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--cyan) 0%,
    rgba(53, 224, 208, 0.35) 24%,
    rgba(35, 48, 74, 0) 58%,
    rgba(35, 48, 74, 0.95) 100%
  );
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px 6px 7px;
  background: var(--cyan);
  color: var(--night);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.brand:hover .brand__mark { background: var(--warm); color: var(--night); }

.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--warm);
}
.brand__tag {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--mist);
}

/* 右端操作区 */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.site-header__status {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist);
}
.site-header__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(123, 232, 176, 0.16);
}
@media (min-width: 1100px) {
  .site-header__status { display: inline-flex; }
}

.site-header__cta { display: none; }
@media (min-width: 768px) {
  .site-header__cta { display: inline-flex; }
}

/* 菜单按钮 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  color: var(--warm);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }
.nav-toggle__label { line-height: 1; }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.18s var(--ease);
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease), top 0.22s var(--ease);
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.site-header[data-open="true"] .nav-toggle { border-color: var(--cyan); color: var(--cyan); }
.site-header[data-open="true"] .nav-toggle__bars { background: transparent; }
.site-header[data-open="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

@media (min-width: 901px) {
  .nav-toggle { display: none; }
}

/* ---------- 导航条 ---------- */
.site-nav {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 28, 46, 0.9) 0%, rgba(11, 18, 32, 0) 100%);
}
.site-nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 54px;
}

.site-nav__lede {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--mist);
  white-space: nowrap;
}
.site-nav__lede::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--cyan);
}
.site-nav__lede-cn { letter-spacing: 0.22em; }
.site-nav__lede-en {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: #46587a;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 26px);
  margin-left: auto;
}
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 16px 2px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--mist);
  transition: color 0.18s var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 10px;
  height: 1px;
  background: rgba(35, 48, 74, 0.95);
  transition: background-color 0.18s var(--ease), height 0.18s var(--ease);
}
.site-nav__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #3d4d6d;
  transition: color 0.18s var(--ease);
}
.site-nav__link:hover { color: var(--warm); }
.site-nav__link:hover .site-nav__num { color: var(--cyan); }
.site-nav__link:hover::after { background: var(--cyan); }

.site-nav__link[aria-current="page"] { color: var(--warm); }
.site-nav__link[aria-current="page"] .site-nav__num { color: var(--cyan); }
.site-nav__link[aria-current="page"]::after {
  background: var(--cyan);
  height: 2px;
}

.site-nav__label { white-space: nowrap; }

.site-nav__aside { display: none; }
.site-nav__aside-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--cyan);
}
.site-nav__aside-text {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--mist);
}
.site-nav__aside-cta { margin-top: 16px; }

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--night);
  border-top: 1px solid var(--line);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(360px, 62%);
  height: 1px;
  background: var(--cyan);
}
.site-footer::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 148px;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(35, 48, 74, 0.6) 0 1px,
    transparent 1px 96px
  );
  opacity: 0.5;
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(40px, 5vw, 72px) 24px;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
}
@media (min-width: 768px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .site-footer__top { grid-template-columns: 1.05fr 1.35fr 1.1fr; }
}

.footer-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px 7px 8px;
  background: var(--cyan);
  color: var(--night);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background-color 0.18s var(--ease);
}
.footer-brand__link:hover .footer-brand__mark { background: var(--warm); }
.footer-brand__name {
  font-size: 21px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--warm);
}
.footer-brand__tag {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--mist);
}
.footer-brand__note {
  margin-top: 14px;
  max-width: 26em;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--mist);
}
.footer-brand__cta { margin-top: 20px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(20px, 3vw, 36px);
  align-content: start;
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--warm);
  line-height: 1.4;
}
.footer-col__title::before {
  content: "";
  width: 10px;
  height: 2px;
  background: var(--cyan);
  flex: 0 0 auto;
}

.footer-links {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 14px;
  color: var(--mist);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.footer-link::before {
  content: "";
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.2s var(--ease);
}
.footer-link:hover { color: var(--warm); border-bottom-color: var(--cyan); }
.footer-link:hover::before { width: 12px; }

.footer-contact__list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-contact__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--mist);
}
.footer-contact__value {
  font-size: 14px;
  line-height: 1.6;
  color: var(--warm);
  overflow-wrap: anywhere;
}
.footer-contact__value--num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.footer-note {
  margin-top: 18px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
  color: var(--mist);
}

.site-footer__bottom {
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}
.footer-legal {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mist);
}
.footer-legal__icp { color: var(--warm); }
.footer-sign {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: #46587a;
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
}
.breadcrumbs__link {
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.breadcrumbs__link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.breadcrumbs__sep { color: #3d4d6d; }
.breadcrumbs__current { color: var(--warm); }

/* ---------- 卡片 ---------- */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.4vw, 30px);
  background: var(--stand);
  border: 1px solid var(--line);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.panel:hover { border-color: var(--cyan); transform: translateY(-2px); }
.panel--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}
.panel__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--cyan);
}
.panel__title {
  margin-top: 12px;
  font-size: clamp(18px, 1.8vw, 21px);
  font-weight: 500;
  line-height: 1.35;
  color: var(--warm);
}
.panel__body {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--mist);
}

/* ---------- 榜单行 ---------- */
.score-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.18s var(--ease);
}
.score-row:hover { border-bottom-color: var(--cyan); }
.score-row__rank {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
}
.score-row__name { font-size: 15px; color: var(--warm); }
.score-row__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  text-align: right;
  color: var(--pure);
}

/* ---------- 步骤（技能树路径） ---------- */
.steps {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s var(--ease);
}
.step__num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  color: var(--mist);
}
.step__title {
  font-size: 16px;
  font-weight: 500;
  color: var(--warm);
  line-height: 1.4;
}
.step__meta {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
}
.step__bar {
  display: block;
  height: 2px;
  width: 0;
  margin-top: 10px;
  background: var(--orange);
  transition: width 0.22s var(--ease);
}
.step--current .step__num { color: var(--orange); }
.step--current .step__bar,
.step.is-active .step__bar { width: 100%; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  line-height: 1.3;
  color: var(--mist);
}
.tag--cyan { color: var(--cyan); border-color: rgba(53, 224, 208, 0.5); }
.tag--orange { color: var(--orange); border-color: rgba(255, 122, 47, 0.5); }

/* ---------- 图片容器 ---------- */
.media { margin: 0; }
.media__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--board) 0%, var(--stand) 60%, var(--night) 100%);
}
.media__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(152, 166, 191, 0.09) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(152, 166, 191, 0.09) 0 1px, transparent 1px 24px);
}
.media__frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0) 0%, rgba(11, 18, 32, 0.88) 100%);
}
.media__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}
.media:hover .media__img { transform: scale(1.02); }
.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
}

.media--16x9 .media__frame { aspect-ratio: 16 / 9; }
.media--4x3 .media__frame { aspect-ratio: 4 / 3; }
.media--1x1 .media__frame { aspect-ratio: 1 / 1; }
.media--4x5 .media__frame { aspect-ratio: 4 / 5; }
.media--21x9 .media__frame { aspect-ratio: 21 / 9; }

/* ---------- 筛选标签组 ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}
.chip:hover { border-color: var(--cyan); color: var(--cyan); }
.chip[aria-pressed="true"] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--night);
  font-weight: 700;
}

/* ---------- 手风琴 ---------- */
.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: var(--warm);
  transition: color 0.18s var(--ease);
}
.accordion__trigger:hover { color: var(--cyan); }
.accordion__icon {
  position: relative;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  transition: transform 0.22s var(--ease), color 0.18s var(--ease);
  color: var(--cyan);
}
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.accordion__icon::before { left: 0; top: 5px; width: 12px; height: 1px; }
.accordion__icon::after { left: 5.5px; top: 0; width: 1px; height: 12px; }
.accordion__item[data-open="true"] .accordion__icon { transform: rotate(45deg); }
.accordion__panel {
  display: none;
  padding: 0 4px 20px;
  max-width: 34em;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--mist);
}
.accordion__item[data-open="true"] .accordion__panel { display: block; }

/* ---------- 章节细竖条导航 ---------- */
.rail {
  position: sticky;
  top: calc(var(--header-h) + 96px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.rail__link {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
  transition: color 0.18s var(--ease);
}
.rail__link:hover { color: var(--cyan); }
.rail__link[aria-current="true"] { color: var(--cyan); }

/* ---------- 滚动进度与显现 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 90;
  pointer-events: none;
  background: transparent;
}
.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--mint) 100%);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 移动导航抽屉 ---------- */
@media (max-width: 900px) {
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    background: var(--night);
    padding: calc(var(--header-h) + 26px) var(--gutter) 40px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
      visibility 0.22s var(--ease);
  }
  .site-header[data-open="true"] .site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .site-nav__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    min-height: 0;
    max-width: none;
    padding: 0;
  }

  .site-nav__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--line);
  }
  .site-nav__item { border-bottom: 1px solid var(--line); }
  .site-nav__link {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 2px;
    font-size: 18px;
    color: var(--warm);
  }
  .site-nav__link::after { display: none; }
  .site-nav__num { font-size: 11px; color: var(--cyan); }
  .site-nav__link[aria-current="page"] { color: var(--cyan); }

  .site-nav__aside {
    display: block;
    padding: 18px;
    border: 1px solid var(--line);
    background: var(--stand);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
  }
  .site-nav__aside-cta { width: 100%; justify-content: center; }
}

@media (min-width: 560px) and (max-width: 900px) {
  .site-nav__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: 34px;
  }
  .site-nav__lede { grid-column: 1 / -1; }
  .site-nav__list { align-self: start; }
  .site-nav__aside { align-self: start; }
}

/* ---------- 减少动效 ---------- */
@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;
    transition-delay: 0ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .btn:hover,
  .panel:hover,
  .media:hover .media__img { transform: none; }
}
