/* ==========================================================================
   365登录 · 共享样式 /assets/site.css
   夜间球场数据指挥中心 · 侧轨导航 · 刻度框景 · 展签信息组件
   ========================================================================== */

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

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

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

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

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

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

a { color: inherit; }

/* ---------- 2. Tokens ---------- */
:root {
  --night: #071C17;
  --moss: #0E2A22;
  --tactical: #24473C;
  --cyan: #38F2CF;
  --amber: #F3B64B;
  --chase: #FF5C3A;
  --mist: #9FB5AC;
  --cream: #F4EFE3;
  --fog: #D8E7E2;

  --rail-w: 96px;
  --gutter: clamp(18px, 4vw, 56px);
  --radius: 18px;
  --radius-sm: 10px;

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

  --ease: cubic-bezier(.22, .61, .36, 1);
  --line: rgba(36, 71, 60, .95);
  --line-glow: rgba(56, 242, 207, .22);
}

/* ---------- 3. Base ---------- */
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  font-family: var(--font-body);
  font-size: clamp(15px, .55vw + 14px, 17px);
  line-height: 1.8;
  font-weight: 400;
  color: var(--cream);
  background-color: var(--night);
  background-image:
    radial-gradient(90rem 40rem at 10% -10%, rgba(56, 242, 207, .10), transparent 62%),
    radial-gradient(70rem 36rem at 104% 2%, rgba(243, 182, 75, .075), transparent 58%),
    repeating-linear-gradient(90deg, rgba(36, 71, 60, .30) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(36, 71, 60, .20) 0 1px, transparent 1px 96px);
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

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

h1 { font-size: clamp(2.25rem, 4.6vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 2.8vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.3; }

p + p { margin-top: .9em; }

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

::selection { background: rgba(56, 242, 207, .32); color: #fff; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 300;
  transform: translate(-50%, -180%);
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--cyan);
  color: #052420;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 12px 30px -14px rgba(56, 242, 207, .9);
  transition: transform .22s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- 5. Layout ---------- */
.container {
  width: min(calc(100% - var(--gutter) * 2), 1240px);
  margin-inline: auto;
}

.section { padding-block: clamp(44px, 6.4vw, 104px); }
.section--tight { padding-block: clamp(28px, 4vw, 56px); }

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }

.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--line-glow), transparent 78%);
}

/* ---------- 6. Typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mist);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .7;
}

.chapter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(12px, 2vw, 22px);
  align-items: start;
}
.chapter__no {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--cyan);
  padding-top: .55em;
}
.chapter__body > * + * { margin-top: 14px; }

.lede {
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.85;
  color: var(--fog);
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn--primary {
  background: var(--cyan);
  color: #052420;
  box-shadow: 0 14px 32px -20px rgba(56, 242, 207, .95);
}
.btn--primary:hover { background: #63fadd; transform: translateY(-1px); }
.btn--amber { background: var(--amber); color: #2A1E05; }
.btn--amber:hover { background: #ffcb70; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(56, 242, 207, .38);
}
.btn--ghost:hover { color: var(--cyan); border-color: var(--cyan); background: rgba(56, 242, 207, .08); }
.btn--sm { padding: 9px 16px; font-size: 13px; }

/* ---------- 8. Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mist);
}
.breadcrumbs a {
  color: rgba(216, 231, 226, .88);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.breadcrumbs a:hover { color: var(--cyan); border-bottom-color: rgba(56, 242, 207, .55); }
.breadcrumbs__sep { opacity: .45; }
.breadcrumbs [aria-current="page"] { color: var(--amber); }

/* ---------- 9. Cards / placards / data ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 42, 34, .92), rgba(9, 30, 25, .88));
  box-shadow: inset 0 1px 0 rgba(216, 231, 226, .05);
}

.placard {
  display: grid;
  gap: 6px;
  padding: 12px 16px;
  border-left: 2px solid var(--amber);
  background: rgba(243, 182, 75, .08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.placard__k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--amber);
}
.placard__v { font-size: 14px; color: var(--fog); line-height: 1.6; }

.stat { display: grid; gap: 4px; }
.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.05;
  color: var(--amber);
}
.stat__label {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mist);
}

.data-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(36, 71, 60, .8);
  overflow: hidden;
}
.data-bar__fill {
  display: block;
  height: 100%;
  width: var(--v, 50%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), #9CFCE7);
  box-shadow: 0 0 14px rgba(56, 242, 207, .55);
}
.data-bar--amber .data-bar__fill {
  background: linear-gradient(90deg, var(--amber), #FFD79A);
  box-shadow: 0 0 14px rgba(243, 182, 75, .45);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--fog);
}
.tag--live { border-color: rgba(255, 92, 58, .5); color: var(--chase); background: rgba(255, 92, 58, .1); }

/* ---------- 10. Image containers（页面阶段放置占位图） ---------- */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(56, 242, 207, .18), transparent 60%),
    linear-gradient(150deg, #12332A, #071C17 72%);
}
.media--tall { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }

.media > img,
.media > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.9) contrast(1.06);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 28, 23, .05) 40%, rgba(7, 28, 23, .88));
  pointer-events: none;
}
.media__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--fog);
}

/* ---------- 11. Header / rail ---------- */
.site-header {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 90;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 6px 16px;
  background-color: #0B2620;
  background-image:
    repeating-linear-gradient(180deg, rgba(56, 242, 207, .42) 0 1px, transparent 1px 10px),
    linear-gradient(180deg, rgba(14, 42, 34, .98), rgba(6, 24, 19, .99));
  background-repeat: no-repeat, no-repeat;
  background-size: 4px 100%, 100% 100%;
  background-position: right top, left top;
  border-right: 1px solid rgba(56, 242, 207, .14);
  box-shadow: 1px 0 0 rgba(0, 0, 0, .45), 14px 0 60px -30px rgba(0, 0, 0, .9);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.site-header::-webkit-scrollbar { display: none; }

.rail-brand { width: 100%; display: flex; justify-content: center; }

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid rgba(56, 242, 207, .42);
  background: rgba(56, 242, 207, .10);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--amber);
  box-shadow: inset 0 0 18px rgba(56, 242, 207, .16);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.brand:hover .brand__mark {
  border-color: var(--cyan);
  box-shadow: inset 0 0 20px rgba(56, 242, 207, .3), 0 0 18px -6px rgba(56, 242, 207, .8);
}
.brand__text { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.brand__name {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1;
  color: var(--cream);
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--mist);
  white-space: nowrap;
}

/* 移动菜单按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(56, 242, 207, .38);
  border-radius: 999px;
  background: rgba(56, 242, 207, .08);
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.nav-toggle:hover { border-color: var(--cyan); background: rgba(56, 242, 207, .16); }
.nav-toggle__bars { display: grid; gap: 3px; width: 16px; }
.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform .22s var(--ease), opacity .18s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }
.nav-toggle[aria-expanded="true"] { border-color: var(--cyan); color: var(--cyan); }

/* 导航（桌面：竖排轨道） */
.site-nav {
  width: 100%;
  margin-top: clamp(14px, 3.2vh, 30px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nav-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.9vh, 20px);
  width: 100%;
}
.nav-list__item { width: 100%; display: flex; justify-content: center; }

.nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border-radius: 10px;
  text-decoration: none;
  color: rgba(216, 231, 226, .74);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav-link::after {
  content: "";
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.nav-link:hover { color: var(--cream); background: rgba(56, 242, 207, .09); }
.nav-link:hover::after { background: rgba(56, 242, 207, .55); }
.nav-link__index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: rgba(159, 181, 172, .8);
}
.nav-link__label {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  line-height: 1;
}
.nav-link[aria-current="page"] { color: var(--cyan); background: rgba(56, 242, 207, .1); }
.nav-link[aria-current="page"] .nav-link__index { color: var(--cyan); }
.nav-link[aria-current="page"]::after {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(56, 242, 207, .9);
}

/* 轨道底部 */
.rail-foot {
  margin-top: auto;
  padding-top: clamp(14px, 3vh, 28px);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.rail-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.3;
  letter-spacing: .08em;
  color: rgba(159, 181, 172, .9);
  text-align: center;
}
.rail-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(56, 242, 207, .55);
  animation: railPulse 2.8s var(--ease) infinite;
}
.rail-status__text { white-space: nowrap; }

.rail-cta {
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding: 18px 9px;
  font-size: 13px;
  letter-spacing: .22em;
  border-radius: 999px;
}

/* 抽屉遮罩与进度条 */
.nav-scrim { display: none; }

.rail-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(56, 242, 207, .1);
  z-index: 2;
}
.rail-progress__fill {
  display: block;
  width: 100%;
  height: 0;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(56, 242, 207, .85);
}

@keyframes railPulse {
  0%   { box-shadow: 0 0 0 0 rgba(56, 242, 207, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(56, 242, 207, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 242, 207, 0); }
}

/* ---------- 12. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 120px);
  border-top: 1px solid rgba(56, 242, 207, .22);
  background-color: #061813;
  background-image:
    radial-gradient(56rem 22rem at 12% 0%, rgba(56, 242, 207, .09), transparent 62%),
    radial-gradient(40rem 18rem at 92% 6%, rgba(243, 182, 75, .06), transparent 60%),
    linear-gradient(180deg, #0B2620, #05140F 72%);
  background-repeat: no-repeat;
  color: var(--fog);
}

.footer-tickline {
  height: 9px;
  background: repeating-linear-gradient(90deg, rgba(56, 242, 207, .5) 0 1px, transparent 1px 14px);
  opacity: .5;
}

.footer-inner {
  width: min(calc(100% - var(--gutter) * 2), 1240px);
  margin-inline: auto;
  padding-block: clamp(34px, 5vw, 72px) clamp(26px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(215px, 1.1fr) minmax(0, 1.55fr) minmax(235px, 1.2fr);
  gap: clamp(24px, 3.6vw, 56px);
  align-items: start;
}

.footer-brand__mark {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer-brand__mark:hover { color: var(--cyan); border-bottom-color: rgba(56, 242, 207, .6); }
.footer-brand__line {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(216, 231, 226, .78);
  max-width: 34ch;
}
.footer-brand__meta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--mist);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.footer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--amber);
}
.footer-title::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: .8;
}

.footer-list { display: grid; gap: 9px; }
.footer-list a {
  display: inline-block;
  font-size: 14px;
  color: rgba(216, 231, 226, .86);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), transform .18s var(--ease), border-color .18s var(--ease);
}
.footer-list a:hover {
  color: var(--cyan);
  transform: translateX(3px);
  border-bottom-color: rgba(56, 242, 207, .5);
}

.footer-contact__list { display: grid; gap: 12px; }
.footer-contact__list li { display: grid; gap: 2px; }
.footer-contact__k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--mist);
}
.footer-contact__v {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--cream);
  word-break: break-word;
}

.copy-btn {
  padding: 3px 10px;
  border: 1px solid rgba(56, 242, 207, .38);
  border-radius: 999px;
  background: rgba(56, 242, 207, .08);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.copy-btn:hover { background: rgba(56, 242, 207, .2); border-color: var(--cyan); }

.copy-status {
  min-height: 1.2em;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--cyan);
}
.footer-contact__note {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(159, 181, 172, .92);
  max-width: 32ch;
}

.footer-legal {
  width: min(calc(100% - var(--gutter) * 2), 1240px);
  margin-inline: auto;
  padding-block: 16px 26px;
  border-top: 1px solid rgba(36, 71, 60, .9);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--mist);
}
.footer-legal__copy { margin-right: auto; }
.footer-legal__icp { letter-spacing: .06em; }
.footer-legal__link {
  color: rgba(216, 231, 226, .8);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer-legal__link:hover { color: var(--cyan); border-bottom-color: rgba(56, 242, 207, .55); }

/* ---------- 13. Back to top ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 34px);
  bottom: clamp(14px, 3vw, 34px);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(56, 242, 207, .42);
  border-radius: 999px;
  background: rgba(11, 38, 32, .94);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .22s var(--ease), transform .22s var(--ease),
              visibility .22s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.to-top__arrow { color: var(--cyan); font-size: 13px; line-height: 1; }
.to-top:hover { border-color: var(--cyan); color: var(--cyan); }
.to-top[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }

/* ---------- 14. Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 15. Responsive ---------- */
@media (max-width: 1080px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  :root { --rail-w: 0px; --gutter: clamp(16px, 5vw, 32px); }

  body {
    padding-left: 0;
    padding-top: 64px;
    background-image:
      radial-gradient(60rem 30rem at 8% -6%, rgba(56, 242, 207, .1), transparent 62%),
      radial-gradient(50rem 26rem at 100% 2%, rgba(243, 182, 75, .07), transparent 58%),
      repeating-linear-gradient(90deg, rgba(36, 71, 60, .26) 0 1px, transparent 1px 64px),
      repeating-linear-gradient(0deg, rgba(36, 71, 60, .18) 0 1px, transparent 1px 64px);
  }

  .site-header {
    inset-block: 0 auto;
    width: 100%;
    height: 64px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    overflow: visible;
    background-image: linear-gradient(180deg, rgba(13, 40, 33, .98), rgba(7, 26, 21, .98));
    background-size: 100% 100%;
    background-position: left top;
    border-right: 0;
    border-bottom: 1px solid rgba(56, 242, 207, .22);
    box-shadow: 0 14px 40px -26px rgba(0, 0, 0, .95);
  }

  .rail-brand { width: auto; }
  .brand { flex-direction: row; gap: 10px; }
  .brand__mark { width: 34px; height: 34px; border-radius: 10px; font-size: 10.5px; }
  .brand__text { align-items: flex-start; gap: 0; }
  .brand__name {
    writing-mode: horizontal-tb;
    font-size: 17px;
    letter-spacing: .04em;
  }
  .brand__sub { display: none; }

  .nav-toggle { display: inline-flex; margin-left: auto; }

  .rail-foot {
    margin-top: 0;
    padding-top: 0;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .rail-status { display: none; }
  .rail-cta {
    writing-mode: horizontal-tb;
    padding: 8px 15px;
    font-size: 13px;
    letter-spacing: .06em;
    border-radius: 999px;
  }

  .rail-progress { display: none; }

  /* 抽屉 */
  .site-nav {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 120;
    width: min(340px, 86vw);
    margin-top: 0;
    padding: 26px 22px 32px;
    align-items: stretch;
    gap: 8px;
    background-color: #0A231C;
    background-image:
      repeating-linear-gradient(0deg, rgba(36, 71, 60, .35) 0 1px, transparent 1px 56px),
      linear-gradient(180deg, #0E2A22, #071C17);
    border-right: 1px solid rgba(56, 242, 207, .28);
    box-shadow: 24px 0 70px -30px rgba(0, 0, 0, .95);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-104%);
    transition: transform .28s var(--ease);
  }
  .site-header[data-open] .site-nav { transform: translateX(0); }

  .nav-list { gap: 2px; align-items: stretch; margin-top: 46px; }
  .nav-list__item { justify-content: flex-start; }

  .nav-link {
    flex-direction: row;
    align-items: baseline;
    gap: 14px;
    padding: 13px 12px;
    border-radius: 12px;
    border-bottom: 1px solid rgba(36, 71, 60, .7);
  }
  .nav-link::after { width: 0; height: 0; }
  .nav-link__index { font-size: 11px; color: rgba(159, 181, 172, .75); }
  .nav-link__label {
    writing-mode: horizontal-tb;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .06em;
  }
  .nav-link[aria-current="page"] { background: rgba(56, 242, 207, .12); }
  .nav-link[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 3px;
    border-radius: 3px;
    background: var(--cyan);
    box-shadow: 0 0 12px rgba(56, 242, 207, .9);
  }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(3, 14, 11, .68);
    opacity: 0;
    visibility: hidden;
    transition: opacity .26s var(--ease), visibility .26s var(--ease);
  }
  .site-header[data-open] .nav-scrim { opacity: 1; visibility: visible; }

  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-contact { grid-column: auto; }
  .footer-legal__copy { margin-right: 0; flex-basis: 100%; }

  .to-top { padding: 9px 13px; font-size: 10px; }
}

@media (max-width: 640px) {
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .chapter__no { padding-top: 0; }
  .footer-nav { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .to-top__label { display: none; }
}

/* ---------- 16. Motion / contrast preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .site-nav { transition: none; }
}
