/* ==========================================================================
   乐盈主页 · 共享样式表 /assets/site.css
   深墨蓝数字资料室 —— 双轨色系（暖金 WELCOME / 冷银 资料库）
   ========================================================================== */

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

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

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

ul, ol { padding: 0; }

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

:root {
  --ink-900: #071521;
  --ink-850: #091a29;
  --ink-800: #0C2032;
  --ink-700: #16354D;

  --gold: #D7A64A;
  --gold-soft: #E7C588;
  --amber: #F2A33A;
  --silver: #B9C4CE;
  --paper: #F2E8D5;
  --text: #E8EDF1;
  --ember: #E0583F;
  --shadow: #03080D;

  --line: rgba(185, 196, 206, .16);
  --line-soft: rgba(185, 196, 206, .1);
  --line-gold: rgba(215, 166, 74, .3);
  --glass: rgba(22, 53, 77, .52);

  --font-display: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --shell-w: min(1320px, calc(100% - 2 * clamp(16px, 3.4vw, 44px)));
}

/* --------------------------------------------------------------------------
   基础排版
   -------------------------------------------------------------------------- */

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.8;
  letter-spacing: .01em;
  color: var(--text);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(880px 520px at 88% -8%, rgba(215, 166, 74, .11), transparent 62%),
    radial-gradient(720px 460px at 4% 2%, rgba(22, 53, 77, .85), transparent 66%),
    linear-gradient(rgba(185, 196, 206, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 196, 206, .028) 1px, transparent 1px),
    linear-gradient(180deg, #071521 0%, #081b2b 46%, #071521 100%);
  background-size: auto, auto, 72px 72px, 72px 72px, auto;
  background-repeat: no-repeat, no-repeat, repeat, repeat, no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--text);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  font-weight: 700;
}

h2 { font-size: clamp(1.6rem, 2.6vw, 2.6rem); line-height: 1.15; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.3; }

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

a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(215, 166, 74, .45);
  text-underline-offset: 3px;
  transition: color .16s var(--ease), text-decoration-color .16s var(--ease);
}

a:hover { color: var(--amber); text-decoration-color: var(--amber); }

strong { color: #fff; font-weight: 700; }

::selection { background: rgba(242, 163, 58, .34); color: #fff; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: .08em;
  font-size: .8125rem;
}

.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;
}

/* --------------------------------------------------------------------------
   布局容器
   -------------------------------------------------------------------------- */

.wrap {
  width: var(--shell-w);
  margin-inline: auto;
}

#main-content { display: block; }

.section { padding-block: clamp(40px, 6vw, 88px); }
.section--tight { padding-block: clamp(24px, 3.5vw, 52px); }

.section-head {
  max-width: 72ch;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--gold);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(215, 166, 74, 0));
}

.section-title {
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-lead {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--silver);
  max-width: 62ch;
}

.divider {
  height: 1px;
  border: 0;
  margin: clamp(24px, 3vw, 40px) 0;
  background: linear-gradient(90deg, rgba(215, 166, 74, .5), rgba(185, 196, 206, .14) 42%, transparent);
}

/* --------------------------------------------------------------------------
   跳过链接
   -------------------------------------------------------------------------- */

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 400;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--amber);
  color: #071521;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 14px 30px -18px rgba(242, 163, 58, .95);
  transition: top .18s var(--ease);
}

.skip-link:focus { top: 14px; color: #071521; }

/* --------------------------------------------------------------------------
   头部
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: clamp(10px, 1.5vw, 18px) clamp(12px, 3vw, 34px) 0;
  transition: padding .2s var(--ease);
}

.site-header[data-scrolled="true"] { padding-top: clamp(6px, .9vw, 10px); }

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  width: var(--shell-w);
  margin-inline: auto;
  padding: 10px 12px 10px 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(215, 166, 74, .26);
  background: rgba(12, 32, 50, .82);
  box-shadow:
    0 18px 42px -28px var(--shadow),
    inset 0 1px 0 rgba(232, 237, 241, .08);
  backdrop-filter: blur(16px) saturate(118%);
  -webkit-backdrop-filter: blur(16px) saturate(118%);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}

.site-header[data-scrolled="true"] .header-shell {
  background: rgba(10, 27, 43, .95);
  box-shadow:
    0 26px 54px -32px var(--shadow),
    inset 0 1px 0 rgba(232, 237, 241, .12);
}

/* 品牌 */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--text);
}

.brand:hover { color: var(--text); }

.brand-tag {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  color: #071521;
  background: linear-gradient(150deg, var(--gold-soft) 0%, var(--gold) 52%, #a97c33 100%);
  box-shadow:
    inset 0 0 0 1px rgba(7, 21, 33, .28),
    0 10px 20px -14px rgba(215, 166, 74, .95);
}

.brand-tag--lg {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 1.25rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 3px;
}

.brand-mark {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--text);
}

.brand-note {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .08em;
  color: var(--silver);
}

/* 导航胶囊 */

.capsule-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.capsule-nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  padding: 4px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(185, 196, 206, .14);
  background: rgba(7, 21, 33, .55);
}

.capsule-nav-list a {
  display: block;
  padding: 8px 13px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--silver);
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}

.capsule-nav-list a:hover {
  color: var(--text);
  background: rgba(215, 166, 74, .15);
}

.capsule-nav-list a[aria-current="page"] {
  color: #071521;
  background: var(--amber);
  box-shadow: 0 8px 18px -10px rgba(242, 163, 58, .95);
}

.capsule-nav-list a[aria-current="page"]:hover {
  color: #071521;
  background: #ffb44f;
}

/* 移动端版本入口（桌面隐藏） */

.nav-versions {
  display: none;
  gap: 8px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

/* 版本切换 */

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.version-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(185, 196, 206, .16);
  background: rgba(7, 21, 33, .6);
}

.version-pill {
  display: block;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--silver);
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}

.version-pill:hover { color: var(--text); background: rgba(232, 237, 241, .08); }

.version-pill[data-active-version="welcome"] {
  color: #F7DCA6;
  background: rgba(215, 166, 74, .2);
  box-shadow: inset 0 0 0 1px rgba(215, 166, 74, .48);
}

.version-pill[data-active-version="library"] {
  color: #EDF3F8;
  background: rgba(185, 196, 206, .18);
  box-shadow: inset 0 0 0 1px rgba(185, 196, 206, .42);
}

/* 移动导航按钮 */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(215, 166, 74, .38);
  background: rgba(7, 21, 33, .72);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease);
}

.nav-toggle:hover { border-color: var(--amber); background: rgba(242, 163, 58, .16); }

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(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(-5px) rotate(-45deg); }

.nav-toggle-label { white-space: nowrap; }

/* 阅读进度 */

.read-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s var(--ease);
}

.read-progress[data-visible="true"] { opacity: 1; }

[data-progress-bar] {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold) 0%, var(--amber) 62%, #ffcb7d 100%);
  box-shadow: 0 0 14px rgba(242, 163, 58, .65);
}

/* --------------------------------------------------------------------------
   通用按钮 / 标签 / 卡片 / 面板
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s var(--ease), background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease);
}

.btn-primary {
  background: var(--amber);
  color: #071521;
  box-shadow: 0 14px 30px -18px rgba(242, 163, 58, .95);
}

.btn-primary:hover {
  background: #ffb44f;
  color: #071521;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-gold);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
  transform: translateY(-1px);
}

.btn-quiet {
  background: rgba(185, 196, 206, .1);
  border-color: var(--line);
  color: var(--text);
}

.btn-quiet:hover { background: rgba(185, 196, 206, .18); color: #fff; }

.btn-sm { padding: 8px 16px; font-size: .8125rem; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(185, 196, 206, .08);
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1.6;
  text-decoration: none;
}

.tag-gold {
  border-color: rgba(215, 166, 74, .48);
  background: rgba(215, 166, 74, .13);
  color: var(--gold-soft);
}

.tag-silver {
  border-color: rgba(185, 196, 206, .4);
  background: rgba(185, 196, 206, .14);
  color: #DDE6EE;
}

.tag-amber {
  border-color: rgba(242, 163, 58, .54);
  background: rgba(242, 163, 58, .15);
  color: #FFCE87;
}

.tag-ember {
  border-color: rgba(224, 88, 63, .5);
  background: rgba(224, 88, 63, .14);
  color: #F2967F;
}

.card {
  position: relative;
  padding: clamp(18px, 2.2vw, 28px);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(12, 32, 50, .94), rgba(9, 26, 41, .9));
  box-shadow: 0 24px 48px -36px var(--shadow);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}

.card:hover { border-color: rgba(215, 166, 74, .36); }

.panel {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 2.6vw, 34px);
  border-radius: var(--r-lg);
  border: 1px solid rgba(215, 166, 74, .26);
  background:
    radial-gradient(420px 240px at 100% 0%, rgba(215, 166, 74, .16), transparent 64%),
    linear-gradient(160deg, var(--glass), rgba(7, 21, 33, .88));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 30px 60px -42px var(--shadow),
    inset 0 1px 0 rgba(232, 237, 241, .09);
}

.panel--glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(62% 52% at 82% 0%, rgba(242, 163, 58, .34), transparent 70%);
  animation: panel-breathe 8s ease-in-out infinite;
}

@keyframes panel-breathe {
  0%, 100% { opacity: .32; }
  50% { opacity: .78; }
}

/* --------------------------------------------------------------------------
   栅格 / 面包屑 / 图片容器 / 长文
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 28px);
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.breadcrumbs { margin-bottom: clamp(18px, 2.4vw, 28px); }

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--silver);
}

.breadcrumbs li { display: flex; align-items: center; gap: 6px; }

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: rgba(185, 196, 206, .42);
}

.breadcrumbs a {
  color: var(--silver);
  text-decoration: none;
}

.breadcrumbs a:hover { color: var(--gold-soft); }

.breadcrumbs [aria-current="page"] { color: var(--text); }

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(215, 166, 74, .14), transparent 60%),
    linear-gradient(150deg, var(--ink-700) 0%, var(--ink-800) 56%, var(--ink-900) 100%);
  box-shadow: inset 0 0 0 1px rgba(232, 237, 241, .04);
}

.media-frame > img,
.media-frame > svg,
.media-frame > picture,
.media-frame > .media-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 4 / 5; }

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  color: rgba(185, 196, 206, .82);
}

.prose {
  max-width: 72ch;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #DCE4EA;
}

.prose h2 { margin-top: 2em; margin-bottom: .6em; font-size: clamp(1.3rem, 2vw, 1.75rem); }
.prose h3 { margin-top: 1.7em; margin-bottom: .5em; }
.prose ul, .prose ol { padding-left: 1.35em; margin-bottom: 1em; }
.prose li { margin-bottom: .45em; }
.prose a { color: var(--gold-soft); }

.prose blockquote {
  margin: 1.6em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: rgba(215, 166, 74, .08);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  margin-top: clamp(60px, 9vw, 128px);
  padding-block: clamp(44px, 5.4vw, 76px) clamp(24px, 3vw, 40px);
  border-top: 1px solid rgba(215, 166, 74, .3);
  background:
    radial-gradient(760px 380px at 10% -12%, rgba(215, 166, 74, .14), transparent 64%),
    radial-gradient(620px 320px at 92% 4%, rgba(22, 53, 77, .9), transparent 72%),
    linear-gradient(180deg, #0a1d2d 0%, #06121d 62%, #03080D 100%);
  color: var(--silver);
}

.footer-shell {
  width: var(--shell-w);
  margin-inline: auto;
}

.footer-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-bottom: clamp(20px, 2.6vw, 32px);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand-text { display: flex; flex-direction: column; gap: 2px; }

.footer-brand-mark {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}

.footer-brand-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--silver);
}

.footer-ledger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(215, 166, 74, .32);
  background: rgba(215, 166, 74, .08);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
}

.ledger-label { color: var(--gold); }
.ledger-value { color: var(--paper); }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(260px, 1.2fr);
  gap: clamp(20px, 3vw, 44px);
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--line-soft);
}

.footer-col-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.4;
  color: var(--gold);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-links a {
  display: inline-block;
  font-size: .9375rem;
  color: var(--silver);
  text-decoration: none;
  transition: color .16s var(--ease), transform .16s var(--ease);
}

.footer-links a:hover {
  color: var(--text);
  transform: translateX(2px);
}

.contact-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.contact-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .12em;
  color: var(--gold);
}

.contact-value {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}

.copy-btn {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(185, 196, 206, .26);
  background: rgba(185, 196, 206, .08);
  color: var(--silver);
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}

.copy-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.copy-btn[data-copied="true"] {
  border-color: rgba(242, 163, 58, .72);
  background: rgba(242, 163, 58, .22);
  color: #FFD79A;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(215, 166, 74, .42);
  background: rgba(215, 166, 74, .12);
  color: var(--gold-soft);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}

.footer-cta::after {
  content: "→";
  font-family: var(--font-mono);
}

.footer-cta:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: #071521;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: clamp(22px, 3vw, 34px);
  padding-top: clamp(18px, 2.4vw, 26px);
  border-top: 1px solid var(--line-soft);
}

.footer-note {
  margin: 0;
  max-width: 62ch;
  font-size: .8125rem;
  line-height: 1.75;
  color: rgba(185, 196, 206, .84);
}

.footer-base-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  color: rgba(185, 196, 206, .7);
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(185, 196, 206, .22);
  background: rgba(185, 196, 206, .07);
  color: var(--silver);
  font-family: var(--font-sans);
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}

.to-top:hover {
  border-color: var(--gold);
  background: rgba(215, 166, 74, .16);
  color: var(--gold-soft);
}

.to-top-arrow {
  font-family: var(--font-mono);
  line-height: 1;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .header-tools .btn { display: none; }
  .capsule-nav-list a { padding: 8px 10px; font-size: .8125rem; }
}

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

@media (max-width: 980px) {
  .brand-note { display: none; }

  .header-tools { display: none; }
  .nav-toggle { display: inline-flex; }

  .header-shell {
    flex-wrap: nowrap;
    padding: 9px 10px 9px 12px;
  }

  .capsule-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    padding: 12px;
    border-radius: 22px;
    border: 1px solid rgba(215, 166, 74, .3);
    background: rgba(9, 26, 41, .98);
    box-shadow: 0 30px 60px -34px #03080D;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .capsule-nav[data-open="true"] { display: block; }

  .capsule-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .capsule-nav-list a {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: .9375rem;
  }

  .capsule-nav-list a[aria-current="page"] { box-shadow: none; }

  .nav-versions { display: flex; flex-wrap: wrap; }
}

@media (max-width: 760px) {
  body { font-size: .9688rem; }

  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .footer-masthead { align-items: flex-start; }
}

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

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-base-actions {
    width: 100%;
    justify-content: space-between;
  }

  .brand-tag { width: 34px; height: 34px; font-size: .95rem; }
  .brand-mark { font-size: .9375rem; }

  .btn { padding: 11px 18px; font-size: .875rem; }
}

@media (max-width: 400px) {
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: 10px 12px; }
}

/* --------------------------------------------------------------------------
   动效降级
   -------------------------------------------------------------------------- */

@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;
  }

  .panel--glow::after { animation: none; opacity: .5; }
  .footer-links a:hover { transform: none; }
  .btn:hover { transform: none; }
}
