/* =========================================================
   b体育登录 · 赛场数据室 共享样式 /assets/site.css
   ========================================================= */

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

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

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

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

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

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

a { color: inherit; }

/* ---------- 变量 ---------- */
:root {
  --paper: #F5F0E6;
  --paper-2: #E8E0D0;
  --ink: #10151C;
  --ink-2: #1E2A38;
  --turf: #2F7D4F;
  --turf-deep: #256A42;
  --turf-dark: #123A28;
  --whistle: #F2C14E;
  --alert: #C9382F;
  --card-yellow: #D9A21B;
  --rule: #C9C0AE;
  --chalk: #FDFCF8;

  --font-title: "Barlow Condensed", "Oswald", "Arial Narrow", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono CJK SC", monospace;

  --rail-w: 96px;
  --topbar-h: 56px;
  --container: 1280px;
  --gutter: clamp(20px, 4vw, 64px);
}

/* ---------- 基础排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(201, 192, 174, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 192, 174, .22) 1px, transparent 1px);
  background-size: 96px 96px;
  padding-top: var(--topbar-h);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(40px, 7vw, 96px); line-height: .95; }
h2 { font-size: clamp(28px, 4.4vw, 64px); }
h3 { font-size: clamp(20px, 2.6vw, 28px); }
h4 { font-size: 17px; font-family: var(--font-body); font-weight: 700; }

p { max-width: 40em; }

strong { font-weight: 700; color: var(--turf-deep); }

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

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

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

.section { padding-block: clamp(48px, 8vw, 128px); }
.section--tight { padding-block: clamp(32px, 4vw, 48px); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.axis-col { grid-column: span 3; }

.card-flow {
  grid-column: span 9;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.stack { display: grid; gap: 16px; }

@media (max-width: 1023px) {
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .axis-col, .card-flow { grid-column: span 6; }
}

@media (max-width: 700px) {
  .grid-12 { grid-template-columns: minmax(0, 1fr); }
  .axis-col, .card-flow { grid-column: span 1; }
  .card-flow { grid-template-columns: minmax(0, 1fr); }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 文字组件 ---------- */
.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--turf-deep);
  border-left: 3px solid var(--whistle);
  padding-left: 10px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.7;
  color: rgba(16, 21, 28, .78);
  max-width: 34em;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(16, 21, 28, .6);
}

.prose { max-width: 38em; }
.prose > * + * { margin-top: 1.2em; }
.prose a {
  color: var(--turf-deep);
  text-decoration: none;
  border-bottom: 2px solid var(--whistle);
}
.prose a:hover { color: var(--ink); background: rgba(242, 193, 78, .28); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
  margin-bottom: 28px;
}
.section-head__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--turf-deep);
}
.section-head__title { margin: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--rule);
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: transform .12s ease-out, background-color .12s ease-out,
              border-color .12s ease-out, color .12s ease-out;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: var(--turf);
  color: var(--turf-deep);
}
.btn--primary {
  background: var(--turf);
  color: var(--chalk);
  border-color: var(--turf-deep);
}
.btn--primary:hover { background: var(--turf-deep); color: var(--chalk); }
.btn--ghost {
  background: transparent;
  color: var(--chalk);
  border-color: rgba(245, 240, 230, .4);
}
.btn--ghost:hover { color: var(--whistle); border-color: var(--whistle); }
.btn--block { width: 100%; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(16, 21, 28, .6);
}
.breadcrumb a {
  color: var(--turf-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 125, 79, .32);
}
.breadcrumb a:hover { border-bottom-color: var(--whistle); }
.breadcrumb__sep { color: var(--rule); }

/* ---------- 标签 ---------- */
.mono-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  color: var(--ink);
  border-radius: 2px;
  white-space: nowrap;
}
.mono-tag--turf { background: var(--turf); color: var(--chalk); border-color: var(--turf-deep); }
.mono-tag--whistle { background: var(--whistle); color: var(--ink); border-color: var(--card-yellow); }
.mono-tag--alert { background: var(--alert); color: var(--chalk); border-color: #a52c24; }
.mono-tag--card { background: var(--card-yellow); color: var(--ink); border-color: #b8870f; }
.mono-tag--ghost { background: transparent; }

/* ---------- 胶囊筛选 ---------- */
.chip-bar { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  background: var(--chalk);
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .12s ease-out, color .12s ease-out,
              border-color .12s ease-out;
}
.chip:hover { border-color: var(--turf); color: var(--turf-deep); }
.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--turf);
  border-color: var(--turf-deep);
  color: var(--chalk);
}

/* ---------- 档案卡 ---------- */
.data-card {
  position: relative;
  background: var(--chalk);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 24px;
  box-shadow: 3px 3px 0 var(--paper-2);
  transition: transform .12s ease-out, border-color .12s ease-out,
              box-shadow .12s ease-out;
}
.data-card:hover {
  transform: translateY(-2px);
  border-color: var(--turf);
  box-shadow: 3px 3px 0 rgba(47, 125, 79, .28);
}
.data-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.data-card__corner {
  position: absolute;
  top: -1px;
  right: -1px;
}
.data-card__foot {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(201, 192, 174, .6);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: rgba(16, 21, 28, .58);
}

/* ---------- 指标 ---------- */
.metric { display: grid; gap: 4px; }
.metric__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(48px, 8vw, 112px);
  line-height: .92;
  letter-spacing: .02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.metric__value--turf { color: var(--turf-deep); }
.metric__value--alert { color: var(--alert); }
.metric__value--small { font-size: clamp(32px, 4vw, 56px); }
.metric__unit {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--turf-deep);
}
.metric__label {
  font-size: 13px;
  color: rgba(16, 21, 28, .62);
}

/* ---------- 折叠面板 ---------- */
.fold {
  border: 1px solid var(--rule);
  background: var(--chalk);
  border-radius: 2px;
}
.fold + .fold { margin-top: -1px; }

.fold__head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: var(--paper-2);
  border: 0;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .12s ease-out;
}
.fold__head:hover { background: #e0d7c4; }
.fold__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--turf-deep);
}
.fold__title { font-weight: 700; font-size: 15px; }
.fold__sign {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--turf-deep);
}
.fold__body {
  padding: 16px;
  border-top: 1px solid var(--rule);
  background: var(--chalk);
}

/* ---------- 数据表 ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  font-weight: 500;
  text-align: left;
  color: var(--turf-deep);
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  padding: 8px 10px;
}
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(201, 192, 174, .5);
}
.data-table tbody tr:nth-child(even) { background: rgba(232, 224, 208, .42); }
.data-table .num {
  font-family: var(--font-mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.data-table th[aria-sort] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--whistle);
  text-decoration-thickness: 2px;
}

/* ---------- 图片容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: 3px 3px 0 var(--paper-2);
}
.media-frame::before {
  content: "";
  display: block;
  padding-top: 62%;
}
.media-frame > img,
.media-frame > .media-frame__inner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--wide::before { padding-top: 56.25%; }
.media-frame--tall::before { padding-top: 125%; }
.media-frame--square::before { padding-top: 100%; }
.media-frame--turf {
  background-color: var(--turf);
  background-image:
    repeating-linear-gradient(90deg, rgba(253, 252, 248, .06) 0 8px, transparent 8px 16px),
    repeating-linear-gradient(0deg, rgba(18, 58, 40, .22) 0 48px, transparent 48px 96px);
}
.figure-note {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: rgba(16, 21, 28, .58);
}

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: absolute;
  top: -120px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--whistle);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  text-decoration: none;
  border: 1px solid var(--card-yellow);
}
.skip-link:focus { top: 8px; }

/* ---------- 滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--turf), var(--whistle));
}
@media (min-width: 1024px) {
  .scroll-progress { top: 0; left: var(--rail-w); }
}

/* ---------- 桌面竖轨 ---------- */
.rail { display: none; }

@media (min-width: 1024px) {
  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail-w);
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0 24px;
    background: var(--ink-2);
    border-right: 1px solid var(--turf-dark);
    overflow-y: auto;
  }
}

.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  padding: 0 6px;
}
.rail__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--turf);
  border: 1px solid var(--whistle);
  color: var(--chalk);
  font-family: var(--font-mono);
  font-weight: 700;
  font-style: italic;
  font-size: 20px;
  line-height: 1;
  border-radius: 2px;
}
.rail__brand-name {
  writing-mode: vertical-rl;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .14em;
  color: var(--chalk);
}

.rail__nav { width: 100%; }
.rail__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.rail__item { display: block; }

.rail__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 68px;
  padding: 12px 4px;
  color: rgba(245, 240, 230, .72);
  text-decoration: none;
  border-radius: 2px;
  box-shadow: inset 0 0 0 0 var(--whistle);
  transition: color .12s ease-out, background-color .12s ease-out,
              box-shadow .12s ease-out;
}
.rail__link:hover {
  color: var(--chalk);
  background: rgba(253, 252, 248, .07);
}
.rail__link[aria-current="page"] {
  color: var(--chalk);
  background: var(--ink);
  box-shadow: inset 4px 0 0 var(--whistle);
}
.rail__idx {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .06em;
  color: rgba(242, 193, 78, .6);
}
.rail__link[aria-current="page"] .rail__idx { color: var(--whistle); }
.rail__label {
  writing-mode: vertical-rl;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: .12em;
  line-height: 1;
}

.rail__cta {
  margin-top: auto;
  display: block;
  width: 68px;
  padding: 16px 0;
  background: var(--turf);
  border: 1px solid var(--turf-deep);
  border-radius: 2px;
  color: var(--chalk);
  text-align: center;
  text-decoration: none;
  transition: background-color .12s ease-out;
}
.rail__cta:hover { background: var(--turf-deep); }
.rail__cta-text {
  writing-mode: vertical-rl;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
}

/* ---------- 移动顶栏 ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: var(--ink-2);
  border-bottom: 2px solid var(--turf);
}
@media (min-width: 1024px) { .topbar { display: none; } }

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--chalk);
}
.topbar__mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--turf);
  border: 1px solid var(--whistle);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-style: italic;
  font-size: 14px;
  line-height: 1;
}
.topbar__name {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: .04em;
}

.topbar__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid rgba(242, 193, 78, .5);
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  cursor: pointer;
}
.topbar__toggle:hover { border-color: var(--whistle); color: var(--whistle); }
.topbar__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: var(--whistle);
}
.topbar__bars::before,
.topbar__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--whistle);
  transition: transform .16s ease-out, opacity .16s ease-out;
}
.topbar__bars::before { top: -5px; }
.topbar__bars::after { top: 5px; }
.topbar__toggle[data-open] .topbar__bars { background: transparent; }
.topbar__toggle[data-open] .topbar__bars::before { transform: translateY(5px) rotate(45deg); }
.topbar__toggle[data-open] .topbar__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- 抽屉导航 ---------- */
.drawer {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: min(88vw, 360px);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 20px 32px;
  background: var(--ink-2);
  color: var(--paper);
  overflow-y: auto;
  transform: translateX(-102%);
  transition: transform .2s ease-out;
}
.drawer[data-open] {
  transform: translateX(0);
  box-shadow: 14px 0 0 rgba(16, 21, 28, .16);
}
@media (min-width: 1024px) { .drawer { display: none; } }

.drawer__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(245, 240, 230, .55);
  margin-bottom: 12px;
  max-width: none;
}
.drawer__list { display: grid; gap: 2px; }
.drawer__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(201, 192, 174, .18);
  text-decoration: none;
  color: rgba(245, 240, 230, .86);
  font-size: 15px;
  transition: color .12s ease-out, box-shadow .12s ease-out;
}
.drawer__link:hover { color: var(--chalk); }
.drawer__link[aria-current="page"] {
  color: var(--whistle);
  box-shadow: inset 3px 0 0 var(--whistle);
}
.drawer__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(242, 193, 78, .7);
}
.drawer__cta { margin-top: 20px; }

.drawer-scrim {
  position: fixed;
  inset: var(--topbar-h) 0 0 0;
  z-index: 75;
  background: rgba(16, 21, 28, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease-out, visibility .2s ease-out;
}
.drawer-scrim[data-open] { opacity: 1; visibility: visible; }
@media (min-width: 1024px) { .drawer-scrim { display: none; } }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(245, 240, 230, .76);
  border-top: 1px solid var(--turf-dark);
}
.footer__turf {
  height: 10px;
  background: repeating-linear-gradient(90deg,
    var(--turf-dark) 0 28px,
    var(--turf-deep) 28px 56px);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
  padding-block: clamp(48px, 6vw, 80px) clamp(32px, 4vw, 48px);
}
@media (max-width: 900px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

.footer__brand-mark {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: .02em;
  color: var(--chalk);
  max-width: none;
}
.footer__tagline {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--whistle);
  max-width: none;
}
.footer__note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245, 240, 230, .55);
  max-width: 30em;
}
.footer__col-title {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--whistle);
  margin: 0 0 12px;
}
.footer__links { display: grid; gap: 8px; }
.footer__link {
  font-size: 14px;
  color: rgba(245, 240, 230, .76);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .12s ease-out, border-color .12s ease-out;
}
.footer__link:hover {
  color: var(--chalk);
  border-bottom-color: var(--whistle);
}
.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(201, 192, 174, .2);
  padding-block: 20px 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: rgba(245, 240, 230, .5);
}
.footer__contact { max-width: 70ch; }
.footer__legal {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: none;
}
.footer__dot { color: var(--turf); }

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--chalk);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease-out, visibility .16s ease-out,
              border-color .12s ease-out;
}
.to-top[data-visible] { opacity: 1; visibility: visible; }
.to-top:hover { border-color: var(--turf); color: var(--turf-deep); }

/* ---------- 入场显现 ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .24s ease-out, transform .24s ease-out;
}
.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

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