/* ============================================================
   诺亚赛事 / 共享站点样式  ——  /assets/site.css
   午夜赛场 × 数据编辑部：深海蓝底、信号青信号、熔岩橙徽章
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h, 66px) + 20px);
}

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

ul, ol { list-style: none; }

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

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

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

input, select, textarea { font: inherit; }

hr {
  border: 0;
  border-top: 2px solid var(--metal-400);
}

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 色彩系统 */
  --abyss-900: #061321;
  --track-700: #0D2740;
  --signal-500: #1FE0CF;
  --condense-300: #8BF4EA;
  --lava-500: #FF6A2B;
  --ember-200: #FFBC8C;
  --metal-400: #C3D2DC;
  --frost-50: #F1F7FA;
  --mist-500: #6E8496;
  --final-400: #4BD08B;

  --ink: var(--frost-50);
  --ink-dim: var(--metal-400);
  --ink-faint: var(--mist-500);
  --hair: rgba(195, 210, 220, 0.28);

  /* 尺规 */
  --line: 2px;
  --rail: 84px;
  --rail-open: 252px;
  --topbar-h: 66px;
  --shell-max: 1160px;

  /* 硬阴影 */
  --shadow-hard: 8px 8px 0 rgba(31, 224, 207, 0.16);
  --shadow-hard-hover: 12px 12px 0 rgba(31, 224, 207, 0.26);
  --shadow-lava: 6px 6px 0 rgba(255, 106, 43, 0.5);
  --shadow-drop: 5px 5px 0 rgba(0, 0, 0, 0.55);

  /* 字体 */
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, "Courier New", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;
}

/* ---------- 2. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--abyss-900);
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(31, 224, 207, 0.03) 0 1px,
      transparent 1px 5px
    ),
    radial-gradient(circle at 76% -12%, rgba(31, 224, 207, 0.12), transparent 58%),
    radial-gradient(circle at 2% 92%, rgba(255, 106, 43, 0.10), transparent 54%);
  background-attachment: fixed, fixed, fixed;
  padding-left: var(--rail);
  overflow-x: hidden;
}

@media (min-width: 900px) {
  body { font-size: 17px; }
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--frost-50);
  text-wrap: balance;
}

h1 { font-size: clamp(30px, 5.2vw, 56px); }
h2 { font-size: clamp(23px, 3.1vw, 36px); }
h3 { font-size: clamp(19px, 2.1vw, 24px); }
h4 { font-size: 18px; }

p { max-width: 72ch; }

strong, b { font-weight: 700; color: var(--frost-50); }

::selection {
  background: var(--signal-500);
  color: #04141f;
}

:focus-visible {
  outline: 3px solid var(--signal-500);
  outline-offset: 3px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- 3. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #04141f;
  background: var(--signal-500);
  border: 2px solid var(--abyss-900);
  box-shadow: var(--shadow-drop);
  transform: translateY(-220%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 4. 容器 ---------- */
.shell {
  display: block;
  width: auto;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: clamp(18px, 4.4vw, 48px);
}

@media (min-width: 1080px) {
  .shell {
    margin-left: clamp(24px, 4.4vw, 84px);
    margin-right: auto;
  }
}

.main-content {
  display: block;
  padding-bottom: clamp(48px, 8vw, 104px);
}

/* ---------- 5. 顶栏 ---------- */
.site-header {
  position: relative;
  z-index: 90;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  background: rgba(6, 19, 33, 0.94);
  border-bottom: var(--line) solid var(--metal-400);
}

@supports ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
  .topbar {
    background: rgba(6, 19, 33, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

.topbar__inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-inline: clamp(14px, 3vw, 28px);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 滚动进度条 */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  pointer-events: none;
  background: transparent;
}

.scroll-meter > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--signal-500), var(--lava-500));
  box-shadow: 0 0 12px rgba(31, 224, 207, 0.75);
  transition: width 90ms linear;
}

/* ---------- 6. 品牌块 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand__mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #04141f;
  background: var(--signal-500);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 74% 100%, 0 100%);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.16;
}

.brand__name {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--frost-50);
}

.brand__domain {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  color: var(--mist-500);
}

/* ---------- 7. 侧边轨道导航 ---------- */
.rail-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 70;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, #08192B 0%, #050E19 100%);
  border-right: var(--line) solid var(--metal-400);
  overflow: hidden;
  transition: width 240ms var(--ease);
}

.rail-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(31, 224, 207, 0.06) 0 1px,
    transparent 1px 6px
  );
}

.rail-nav__top {
  flex: none;
  height: var(--topbar-h);
  display: grid;
  place-items: center;
  border-bottom: var(--line) solid var(--metal-400);
}

.rail-nav__mark {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--signal-500);
}

.rail-nav__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 0 12px;
  scrollbar-width: none;
}

.rail-nav__scroll::-webkit-scrollbar { display: none; }

.rail-nav__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--mist-500);
  padding: 0 0 12px 22px;
  opacity: 0;
  transition: opacity 160ms var(--ease);
}

.rail-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-nav__item { display: block; }

.rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 54px;
  padding-left: 20px;
  border-left: 4px solid transparent;
  color: var(--metal-400);
  white-space: nowrap;
  transition: color 180ms var(--ease), background-color 180ms var(--ease),
    border-color 180ms var(--ease);
}

.rail-link__num {
  flex: none;
  min-width: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--mist-500);
  transition: color 180ms var(--ease);
}

.rail-link__label {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.rail-link:hover {
  color: var(--frost-50);
  background: rgba(31, 224, 207, 0.07);
}

.rail-link:hover .rail-link__num { color: var(--signal-500); }

.rail-link[aria-current="page"] {
  color: var(--frost-50);
  background: rgba(31, 224, 207, 0.12);
  border-left-color: var(--signal-500);
}

.rail-link[aria-current="page"] .rail-link__num {
  color: var(--signal-500);
}

.rail-link[aria-current="page"] .rail-link__label {
  color: var(--frost-50);
}

.rail-nav__foot {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 22px;
  border-top: var(--line) solid var(--metal-400);
}

.rail-nav__foot > * {
  opacity: 0;
  transition: opacity 180ms var(--ease);
}

.rail-nav__cta {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 700;
  color: var(--signal-500);
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 2px solid rgba(31, 224, 207, 0.45);
}

.rail-nav__cta:hover { color: var(--condense-300); }

.rail-nav__meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--mist-500);
  white-space: nowrap;
}

/* 桌面端：悬停 / 键盘聚焦展开 */
@media (min-width: 901px) {
  .rail-nav:hover,
  .rail-nav:focus-within,
  .rail-nav[data-open] {
    width: var(--rail-open);
  }

  .rail-nav:hover .rail-link__label,
  .rail-nav:focus-within .rail-link__label,
  .rail-nav[data-open] .rail-link__label {
    opacity: 1;
    transform: translateX(0);
  }

  .rail-nav:hover .rail-nav__eyebrow,
  .rail-nav:focus-within .rail-nav__eyebrow,
  .rail-nav[data-open] .rail-nav__eyebrow {
    opacity: 1;
  }

  .rail-nav:hover .rail-nav__foot > *,
  .rail-nav:focus-within .rail-nav__foot > *,
  .rail-nav[data-open] .rail-nav__foot > * {
    opacity: 1;
  }
}

/* ---------- 8. 移动端抽屉 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--metal-400);
  background: var(--track-700);
  border: var(--line) solid var(--metal-400);
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}

.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
  color: var(--signal-500);
  border-color: var(--signal-500);
}

.nav-toggle__icon {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
  flex: none;
}

.nav-toggle__icon i {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}

.nav-toggle__icon i:nth-child(1) { top: 0; }
.nav-toggle__icon i:nth-child(2) { top: 5px; }
.nav-toggle__icon i:nth-child(3) { top: 10px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__icon i:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon i:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon i:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

@media (max-width: 900px) {
  body { padding-left: 0; }

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

  .rail-nav {
    top: var(--topbar-h);
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    max-height: calc(100vh - var(--topbar-h));
    max-height: calc(100dvh - var(--topbar-h));
    overflow-y: auto;
    border-right: 0;
    border-bottom: var(--line) solid var(--signal-500);
    box-shadow: 0 20px 0 rgba(6, 19, 33, 0.55);
    transform: translateY(calc(-100% - var(--topbar-h) - 6px));
    transition: transform 280ms var(--ease);
  }

  .rail-nav[data-open] {
    transform: translateY(0);
  }

  .rail-nav__top { display: none; }

  .rail-nav__scroll { padding: 16px 0 10px; }

  .rail-nav__eyebrow {
    opacity: 1;
    padding-left: 22px;
  }

  .rail-link {
    height: 56px;
    padding-right: 22px;
  }

  .rail-link__label {
    opacity: 1;
    transform: none;
    font-size: 15px;
  }

  .rail-nav__foot { padding: 18px 22px 26px; }

  .rail-nav__foot > * { opacity: 1; }
}

@media (max-width: 560px) {
  .topbar__actions .btn--ghost { display: none; }

  .topbar__actions .btn--primary {
    padding: 0 12px;
    font-size: 13px;
    min-height: 40px;
  }
}

@media (max-width: 430px) {
  .nav-toggle__text { display: none; }

  .nav-toggle { padding: 0 12px; }
}

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: var(--line) solid var(--metal-400);
  background: var(--track-700);
  color: var(--frost-50);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
  transition: background-color 200ms var(--ease), color 200ms var(--ease),
    border-color 200ms var(--ease), transform 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
}

.btn:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.btn--primary {
  color: #04141f;
  background: var(--signal-500);
  border-color: var(--signal-500);
  box-shadow: 4px 4px 0 rgba(255, 106, 43, 0.55);
}

.btn--primary:hover {
  background: var(--condense-300);
  border-color: var(--condense-300);
  box-shadow: 6px 6px 0 rgba(255, 106, 43, 0.72);
}

.btn--ghost {
  color: var(--metal-400);
  background: transparent;
  border-color: var(--metal-400);
  box-shadow: 3px 3px 0 rgba(195, 210, 220, 0.14);
}

.btn--ghost:hover {
  color: var(--signal-500);
  border-color: var(--signal-500);
  background: rgba(31, 224, 207, 0.08);
  box-shadow: 5px 5px 0 rgba(31, 224, 207, 0.26);
}

.btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13.5px;
}

/* ---------- 10. 徽章 / 标签 / 旁注 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--signal-500);
  background: rgba(31, 224, 207, 0.10);
  border: var(--line) solid currentColor;
}

.badge--lava {
  color: var(--lava-500);
  background: rgba(255, 106, 43, 0.12);
}

.badge--final {
  color: var(--final-400);
  background: rgba(75, 208, 139, 0.12);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--metal-400);
  background: rgba(195, 210, 220, 0.05);
  border: 1px solid var(--hair);
  transition: color 180ms var(--ease), border-color 180ms var(--ease),
    background-color 180ms var(--ease);
}

.tag:hover {
  color: var(--condense-300);
  border-color: var(--signal-500);
  background: rgba(31, 224, 207, 0.08);
}

.tag[aria-pressed="true"] {
  color: #04141f;
  background: var(--signal-500);
  border-color: var(--signal-500);
}

.note {
  padding: 14px 18px 16px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--metal-400);
  background: rgba(255, 106, 43, 0.07);
  border-left: 4px solid var(--lava-500);
}

.note__label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--lava-500);
}

.note--final {
  background: rgba(75, 208, 139, 0.07);
  border-left-color: var(--final-400);
}

.note--final .note__label { color: var(--final-400); }

/* ---------- 11. 卡片 / 章节头 / 面包屑 ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--track-700);
  border: var(--line) solid var(--metal-400);
  box-shadow: var(--shadow-hard);
  transition: transform 200ms var(--ease), border-color 200ms var(--ease),
    box-shadow 200ms var(--ease);
}

.card:hover {
  transform: translate(4px, -4px);
  border-color: var(--signal-500);
  box-shadow: var(--shadow-hard-hover);
}

.card--flat:hover { transform: none; }

.card--lava { box-shadow: var(--shadow-lava); }

.section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 18px;
  align-items: start;
  margin-bottom: clamp(22px, 3vw, 38px);
  padding-bottom: 16px;
  border-bottom: var(--line) solid var(--metal-400);
}

.section-head__num {
  grid-row: 1 / span 2;
  padding-top: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--signal-500);
}

.section-head__title {
  font-size: clamp(22px, 3vw, 34px);
}

.section-head__lead {
  grid-column: 2;
  max-width: 60ch;
  font-size: 15px;
  line-height: 1.8;
  color: var(--metal-400);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 20px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--mist-500);
}

.breadcrumb a {
  color: var(--metal-400);
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.breadcrumb a:hover {
  color: var(--signal-500);
  border-bottom-color: var(--signal-500);
}

.breadcrumb__sep {
  color: var(--mist-500);
  user-select: none;
}

.breadcrumb [aria-current="page"] { color: var(--frost-50); }

/* ---------- 12. 图片容器（页面阶段放 <img>） ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--track-700) 0%, var(--abyss-900) 100%);
  border: var(--line) solid var(--metal-400);
  box-shadow: 8px 8px 0 rgba(31, 224, 207, 0.14);
}

.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms var(--ease), filter 320ms var(--ease);
}

.media-frame:hover > img {
  transform: scale(1.03);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(6, 19, 33, 0.20) 0 1px,
    transparent 1px 4px
  );
}

.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--hero { aspect-ratio: 21 / 9; }

.media-frame__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  max-width: 100%;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--abyss-900);
  background: var(--signal-500);
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--track-700);
  border-top: var(--line) solid var(--signal-500);
  padding-block: clamp(38px, 5vw, 68px) clamp(24px, 3vw, 38px);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 96px;
  height: 6px;
  background: var(--lava-500);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 3.6vw, 46px);
}

@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .footer__grid {
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
  }
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer__line {
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--metal-400);
}

.footer__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.footer__col { min-width: 0; }

.footer__title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--signal-500);
  border-bottom: var(--line) solid rgba(31, 224, 207, 0.3);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: var(--metal-400);
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}

.footer__link::before {
  content: "";
  flex: none;
  width: 8px;
  height: 2px;
  background: var(--mist-500);
  transition: width 180ms var(--ease), background-color 180ms var(--ease);
}

.footer__link:hover {
  color: var(--frost-50);
  transform: translateX(4px);
}

.footer__link:hover::before {
  width: 15px;
  background: var(--lava-500);
}

.footer__contact {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: clamp(30px, 4vw, 52px);
  background: var(--abyss-900);
  border: var(--line) solid var(--metal-400);
}

@media (min-width: 840px) {
  .footer__contact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.footer__cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 20px clamp(16px, 2.4vw, 28px);
  border-bottom: var(--line) solid var(--hair);
}

.footer__cell:last-child { border-bottom: 0; }

@media (min-width: 840px) {
  .footer__cell {
    border-bottom: 0;
    border-right: var(--line) solid var(--hair);
  }
  .footer__cell:last-child { border-right: 0; }
}

.footer__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--mist-500);
}

.footer__value {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--frost-50);
  word-break: break-word;
}

.footer__value.mono { font-size: 15px; letter-spacing: 0.02em; }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 26px;
  margin-top: clamp(24px, 3vw, 38px);
  padding-top: 20px;
  border-top: var(--line) solid var(--metal-400);
}

.footer__legal-line {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist-500);
  max-width: none;
}

/* ---------- 14. 微型按钮 / 返回顶部 ---------- */
.chip-btn {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--signal-500);
  background: rgba(31, 224, 207, 0.06);
  border: var(--line) solid rgba(31, 224, 207, 0.5);
  transition: color 180ms var(--ease), background-color 180ms var(--ease),
    border-color 180ms var(--ease);
}

.chip-btn:hover {
  color: var(--abyss-900);
  background: var(--signal-500);
  border-color: var(--signal-500);
}

.chip-btn[data-state="ok"] {
  color: var(--final-400);
  background: rgba(75, 208, 139, 0.16);
  border-color: var(--final-400);
}

.chip-btn[data-state="err"] {
  color: var(--lava-500);
  background: rgba(255, 106, 43, 0.16);
  border-color: var(--lava-500);
}

.chip-btn--lava {
  color: var(--lava-500);
  background: rgba(255, 106, 43, 0.08);
  border-color: rgba(255, 106, 43, 0.55);
}

.chip-btn--lava:hover {
  color: #1A0800;
  background: var(--lava-500);
  border-color: var(--lava-500);
}

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 30px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 120;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: #1A0800;
  background: var(--lava-500);
  border: var(--line) solid #1A0800;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 220ms var(--ease), transform 220ms var(--ease),
    visibility 220ms var(--ease), background-color 180ms var(--ease);
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--condense-300);
  transform: translate(-2px, -2px);
}

/* ---------- 15. 滚动显现 ---------- */
.is-js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.is-js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 16. 无障碍与降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

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

  .card:hover,
  .btn:hover,
  .to-top:hover,
  .footer__link:hover {
    transform: none;
  }
}
