/* ============================================================
   爱游戏体育 · 全站共享样式 /assets/site.css
   ============================================================ */

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--paper);
}

h1 { font-size: clamp(36px, 6vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 46px); }
h3 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.15; }
h4 { font-size: 20px; font-weight: 800; }

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

a { color: var(--teal); }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }

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

button { font: inherit; color: inherit; }

/* ------------------------------------------------------------
   变量
   ------------------------------------------------------------ */
:root {
  --ink: #0B1026;
  --violet: #221046;
  --teal: #12E1C3;
  --teal-soft: #6FF3E2;
  --orange: #FF7A1A;
  --orange-soft: #FFB068;
  --yellow: #F5E663;
  --text: #E8ECF5;
  --slate: #8A93AC;
  --paper: #F7F8FB;
  --green: #2FBF71;
  --red: #FF4D6D;
  --black: #05070F;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Source Han Sans SC", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono",
               Consolas, "Liberation Mono", Menlo, monospace;

  --maxw: 1320px;
  --gutter: 24px;
  --bar-h: 52px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: 160ms;
  --dur-mid: 200ms;
  --dur-slow: 320ms;
}

/* ------------------------------------------------------------
   中文排版基线
   ------------------------------------------------------------ */
:where(p, li, dd, dt, td, th, figcaption, blockquote) {
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}

:lang(zh-CN) body { font-kerning: normal; }

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

/* ------------------------------------------------------------
   焦点可见
   ------------------------------------------------------------ */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--yellow);
  color: var(--black);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  text-decoration: none;
  border: 3px solid var(--black);
  box-shadow: 4px 4px 0 var(--black);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------
   工具
   ------------------------------------------------------------ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
}

.section { padding: 72px 0; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.rule {
  height: 0;
  border: 0;
  border-top: 2px dashed rgba(138, 147, 172, .35);
  margin: 32px 0;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: .02em;
}

.idx {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--orange);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--slate);
}
.section-label::after {
  content: "";
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--slate) 0 6px, transparent 6px 12px);
}

.lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--paper);
  max-width: 68ch;
}

.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose strong { font-weight: 700; color: var(--paper); }

.punch {
  display: block;
  margin: 24px 0;
  padding-left: 16px;
  border-left: 3px solid var(--orange);
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1.55;
  color: var(--paper);
}

.slab {
  background: var(--paper);
  color: var(--ink);
}
.slab h1, .slab h2, .slab h3, .slab h4 { color: var(--ink); }
.slab .prose { color: #1B2338; }
.slab .prose strong { color: var(--ink); }
.slab .section-label { color: #5B6480; }
.slab .section-label::after {
  background: repeating-linear-gradient(90deg, #B9C0D2 0 6px, transparent 6px 12px);
}
.slab .lede { color: #1B2338; }

.cut-b { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 44px), 0 100%); }
.cut-t { clip-path: polygon(0 44px, 100% 0, 100% 100%, 0 100%); }

.grid-12 {
  display: 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; }

/* ------------------------------------------------------------
   标签
   ------------------------------------------------------------ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.5;
  border: 2px solid currentColor;
  white-space: nowrap;
}
.tag--teal { color: var(--teal); }
.tag--orange { color: var(--orange); }
.tag--yellow { color: var(--yellow); background: rgba(245, 230, 99, .14); }
.tag--red { color: var(--red); }
.tag--green { color: var(--green); }

/* ------------------------------------------------------------
   按钮
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border: 2px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur) var(--ease),
              background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.btn:hover,
.btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--black);
}

.btn--solid {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--black);
}
.btn--solid:hover { background: var(--orange-soft); border-color: var(--orange-soft); }

.btn--ghost {
  border-color: var(--teal);
  color: var(--teal);
}
.btn--ghost:hover { background: rgba(18, 225, 195, .14); }

.btn--mini {
  padding: 5px 11px;
  font-size: 11px;
  letter-spacing: .08em;
}

/* ------------------------------------------------------------
   卡片 / 图片容器
   ------------------------------------------------------------ */
.card {
  position: relative;
  padding: 22px;
  background: linear-gradient(150deg, rgba(34, 16, 70, .72), rgba(11, 16, 38, .9));
  border: 3px solid var(--slate);
  box-shadow: 6px 6px 0 var(--black);
  transition: border-color var(--dur-mid) var(--ease),
              transform var(--dur-mid) var(--ease),
              box-shadow var(--dur-mid) var(--ease);
}
.card:hover {
  border-color: var(--teal);
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--black);
}
.card--shift { transform: translateY(24px); }
.card--shift:hover { transform: translate(-2px, 22px); }

.slab .card {
  background: #FFFFFF;
  border-color: #C9CFDE;
  box-shadow: 6px 6px 0 #D8DDEA;
  color: #1B2338;
}
.slab .card:hover {
  border-color: var(--ink);
  box-shadow: 8px 8px 0 #D8DDEA;
}

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--violet), var(--ink));
  border: 3px solid var(--teal);
  box-shadow: 8px 8px 0 var(--black);
}
.media-frame > img,
.media-frame > picture > img,
.media-frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  margin: 0;
  padding: 10px 14px;
  background: linear-gradient(0deg, rgba(5, 7, 15, .92), rgba(5, 7, 15, 0));
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.5;
}

/* ------------------------------------------------------------
   面包屑
   ------------------------------------------------------------ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--slate);
}
.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--slate);
  opacity: .6;
}
.breadcrumb__item a {
  color: var(--slate);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.breadcrumb__item a:hover { color: var(--teal); }
.breadcrumb__item[aria-current="page"] { color: var(--teal); }

/* ------------------------------------------------------------
   章节索引
   ------------------------------------------------------------ */
.toc {
  position: sticky;
  top: calc(var(--bar-h) + 22px);
  align-self: start;
}
.toc__title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--slate);
}
.toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid rgba(138, 147, 172, .3);
}
.toc__link {
  display: block;
  margin-left: -2px;
  padding: 7px 8px 7px 14px;
  border-left: 3px solid transparent;
  color: var(--slate);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.toc__link:hover { color: var(--text); }
.toc__link[aria-current="true"] {
  color: var(--teal);
  border-left-color: var(--teal);
  background: linear-gradient(90deg, rgba(18, 225, 195, .14), transparent);
}

/* ------------------------------------------------------------
   头部
   ------------------------------------------------------------ */
.version-strip {
  background: linear-gradient(90deg, var(--violet) 0%, var(--ink) 62%, var(--ink) 100%);
  border-bottom: 2px solid rgba(18, 225, 195, .38);
}
.version-strip__inner {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 30px;
  padding: 5px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--slate);
}
.version-strip__tag {
  padding: 1px 7px;
  background: var(--red);
  color: #FFFFFF;
  font-weight: 700;
  letter-spacing: .16em;
}
.version-strip__mono {
  color: var(--teal);
  font-weight: 700;
}
.version-strip__text { color: var(--text); }
.version-strip__hint {
  margin-left: auto;
  opacity: .82;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 16, 38, .94);
  border-bottom: 2px solid var(--teal);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header__inner {
  position: relative;
  z-index: 2;
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: var(--bar-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--teal);
  color: var(--ink);
  border: 2px solid var(--black);
  box-shadow: 3px 3px 0 var(--black);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.04em;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.brand:hover .brand__mark {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--black);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--paper);
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--slate);
}

/* 命令栏导航 */
.cmdbar { margin-left: 8px; }
.cmdbar__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cmdbar__item { display: block; }
.cmdbar__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 11px;
  border-bottom: 3px solid transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.cmdbar__link::before {
  content: attr(data-index);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--slate);
  transition: color var(--dur) var(--ease);
}
.cmdbar__link:hover {
  color: var(--teal);
  border-bottom-color: var(--teal-soft);
  background: rgba(18, 225, 195, .08);
}
.cmdbar__link:hover::before { color: var(--teal-soft); }

.cmdbar__link[aria-current="page"] {
  color: var(--teal);
  border-bottom-color: var(--teal);
  background: linear-gradient(180deg, rgba(18, 225, 195, .12), transparent);
}
.cmdbar__link[aria-current="page"]::before {
  color: var(--orange);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 8px 12px;
  background: transparent;
  border: 2px solid var(--teal);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  cursor: pointer;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 12px;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before {
  top: 0;
  box-shadow: 0 5px 0 currentColor;
}
.nav-toggle__bars::after { bottom: 0; }

.nav-toggle:hover { background: rgba(18, 225, 195, .14); }
.site-header[data-open] .nav-toggle {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--black);
}

/* ------------------------------------------------------------
   页脚
   ------------------------------------------------------------ */
.site-footer {
  margin-top: 0;
  background: linear-gradient(165deg, var(--violet) 0%, #150A2E 34%, var(--ink) 68%, var(--black) 100%);
  border-top: 3px solid var(--teal);
  color: var(--text);
}
.site-footer__inner {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
  padding: 58px 0 44px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(300px, 1.75fr) minmax(240px, 1.15fr);
  gap: 44px 40px;
}

.site-footer__lead { display: flex; flex-direction: column; gap: 16px; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.footer-brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--ink);
  color: var(--teal);
  border: 2px solid var(--teal);
  box-shadow: 3px 3px 0 var(--black);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.04em;
}
.footer-brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.footer-brand__name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--paper);
}
.footer-brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--slate);
}

.footer-badge {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  padding: 7px 11px;
  border: 2px solid rgba(138, 147, 172, .38);
  font-family: var(--font-mono);
  font-size: 12px;
}
.footer-badge__k {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--slate);
}
.footer-badge__v {
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--teal);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 20px;
}
.footer-col { min-width: 0; }
.footer-col__title {
  margin: 0 0 14px;
  padding-bottom: 9px;
  border-bottom: 2px solid rgba(138, 147, 172, .3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--slate);
}
.footer-col__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-col__list li { margin-bottom: 6px; }
.footer-col__list a {
  display: inline-block;
  padding: 2px 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.footer-col__list a:hover {
  color: var(--teal);
  transform: translateX(3px);
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.site-footer__contact .footer-col__title { margin-bottom: 4px; }

.footer-contact__line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--text);
  word-break: break-all;
}
.footer-contact__k {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--orange);
  padding-top: 3px;
}
.footer-contact__note {
  margin: 6px 0 0;
  padding-top: 12px;
  border-top: 2px dashed rgba(138, 147, 172, .32);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--slate);
}

.site-footer__legal {
  width: min(100% - 48px, var(--maxw));
  margin-inline: auto;
  padding: 18px 0 34px;
  border-top: 2px solid rgba(138, 147, 172, .28);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--slate);
}

/* ------------------------------------------------------------
   JS 注入组件
   ------------------------------------------------------------ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--orange));
  pointer-events: none;
  transition: width 100ms linear;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--ink);
  color: var(--teal);
  border: 3px solid var(--teal);
  box-shadow: 4px 4px 0 var(--black);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur-mid) var(--ease),
              visibility var(--dur-mid) var(--ease),
              transform var(--dur-mid) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top:hover {
  box-shadow: 6px 6px 0 var(--black);
  background: var(--teal);
  color: var(--ink);
}

/* ------------------------------------------------------------
   章节显现
   ------------------------------------------------------------ */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
}
.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}

/* ------------------------------------------------------------
   响应式 · 平板
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .site-header__inner { gap: 14px; }

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

  .cmdbar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: min(330px, 86vw);
    margin-left: 0;
    padding: 78px 22px 190px;
    overflow-y: auto;
    background: linear-gradient(160deg, var(--violet) 0%, var(--ink) 55%, var(--black) 100%);
    border-left: 3px solid var(--teal);
    transform: translateX(102%);
    transition: transform var(--dur-mid) var(--ease);
    visibility: hidden;
  }
  .site-header[data-open] .cmdbar {
    transform: translateX(0);
    visibility: visible;
  }

  .cmdbar__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .cmdbar__item + .cmdbar__item { border-top: 2px solid rgba(138, 147, 172, .22); }
  .cmdbar__link {
    padding: 15px 8px;
    border-bottom: 0;
    border-left: 3px solid transparent;
    font-size: 16px;
  }
  .cmdbar__link::before { font-size: 11px; }
  .cmdbar__link:hover { background: rgba(18, 225, 195, .1); border-left-color: var(--teal-soft); }
  .cmdbar__link[aria-current="page"] {
    border-left-color: var(--teal);
    background: linear-gradient(90deg, rgba(18, 225, 195, .18), transparent);
  }

  .header-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: min(330px, 86vw);
    margin-left: 0;
    padding: 16px 22px 30px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    background: linear-gradient(180deg, rgba(5, 7, 15, 0), rgba(5, 7, 15, .96) 40%);
    transform: translateX(102%);
    transition: transform var(--dur-mid) var(--ease);
    visibility: hidden;
  }
  .site-header[data-open] .header-actions {
    transform: translateX(0);
    visibility: visible;
  }
  .header-actions .btn { width: 100%; padding: 12px 16px; font-size: 14px; }

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

  .card--shift { transform: none; }
  .card--shift:hover { transform: translate(-2px, -2px); }

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 40px 32px;
  }
  .site-footer__contact { grid-column: 1 / -1; }
  .site-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .toc { position: static; }
}

/* ------------------------------------------------------------
   响应式 · 手机
   ------------------------------------------------------------ */
@media (max-width: 640px) {
  body { font-size: 15px; }

  .container,
  .site-header__inner,
  .version-strip__inner,
  .site-footer__inner,
  .site-footer__legal { width: min(100% - 32px, var(--maxw)); }

  .section { padding: 48px 0; }

  .version-strip__hint { display: none; }
  .version-strip__inner { gap: 8px; font-size: 10px; }

  .brand__sub { display: none; }
  .brand__name { font-size: 15px; }

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

  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
    padding: 44px 0 36px;
    gap: 32px;
  }
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__legal { justify-content: flex-start; font-size: 11px; }

  .media-frame { box-shadow: 5px 5px 0 var(--black); }

  .to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

/* ------------------------------------------------------------
   减少动效
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .btn:focus-visible,
  .card:hover,
  .brand:hover .brand__mark {
    transform: none;
  }
}
