/* ==========================================================================
   PA視訊指南 — 共享外壳样式 /assets/site.css
   夜航墨蓝 · 信号橙 · 荧光青 · 纸感奶油
   ========================================================================== */

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

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

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0a1826;
  --ink-deep: #061019;
  --paper: #f1e7d6;
  --bone: #ede6da;
  --signal: #ff6b2c;
  --signal-soft: #ff8a57;
  --cyan: #37e3d3;
  --amber: #f0b84a;
  --mist: #7e90a3;
  --brown: #1e1710;
  --moss: #2f6d5b;
  --line: #bfd6d8;

  --line-soft: rgba(191, 214, 216, 0.16);
  --line-mid: rgba(191, 214, 216, 0.34);
  --surface: rgba(237, 230, 218, 0.045);

  --font-display: "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Source Code Pro", ui-monospace,
    SFMono-Regular, Menlo, Consolas, monospace;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shell: 1200px;
  --rail: 88px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. 基础排版 ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-stretch: 88%;
  color: inherit;
}

h1 {
  font-size: clamp(36px, 5.4vw, 64px);
}

h2 {
  font-size: clamp(24px, 3.2vw, 36px);
}

h3 {
  font-size: clamp(18px, 2.2vw, 22px);
}

h4 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

p {
  margin: 0 0 1.2em;
}

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

a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(55, 227, 211, 0.45);
}

a:hover {
  text-decoration-color: currentColor;
}

strong {
  font-weight: 700;
}

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

/* ---------- 4. 焦点 / 无障碍 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(10, 24, 38, 0.4);
  border-radius: 4px;
}

.paper :focus-visible,
.media-frame--paper :focus-visible {
  outline-color: var(--moss);
  box-shadow: 0 0 0 6px rgba(241, 231, 214, 0.85);
}

.visually-hidden {
  position: absolute;
  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;
}

/* ---------- 5. 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 24px);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

/* ---------- 6. 文本工具 ---------- */
.lede {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.7;
  color: var(--bone);
  max-width: 46ch;
  margin: 0 0 1.2em;
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  margin: 0;
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s var(--ease), background-color 0.16s var(--ease),
    color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--signal {
  background-color: var(--signal);
  color: var(--ink-deep);
}

.btn--signal:hover {
  background-color: var(--signal-soft);
  color: var(--ink-deep);
}

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

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--paper {
  background-color: var(--brown);
  color: var(--paper);
}

.btn--paper:hover {
  background-color: var(--moss);
  color: #eaf3ee;
}

/* ---------- 8. 标签 / 胶囊 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background-color: rgba(191, 214, 216, 0.14);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.tag--amber {
  background-color: var(--amber);
  color: var(--brown);
}

.tag--mint {
  background-color: var(--moss);
  color: #eaf3ee;
}

.tag--cyan {
  background-color: transparent;
  border-color: var(--cyan);
  color: var(--cyan);
}

.tag--signal {
  background-color: transparent;
  border-color: var(--signal);
  color: var(--signal-soft);
}

.num-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background-color: rgba(191, 214, 216, 0.14);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.panel:hover .num-pill,
.panel:focus-within .num-pill {
  background-color: var(--signal);
  color: var(--ink-deep);
}

/* ---------- 9. 面板与纸感区块 ---------- */
.panel {
  position: relative;
  background-color: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2.4vw, 26px);
  transition: transform 0.16s var(--ease), border-color 0.16s var(--ease),
    background-color 0.16s var(--ease);
}

.panel:hover,
.panel:focus-within {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background-color: rgba(55, 227, 211, 0.05);
}

.paper {
  background-color: var(--paper);
  background-image: repeating-linear-gradient(
      0deg,
      rgba(30, 23, 16, 0.05) 0 1px,
      transparent 1px 24px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(30, 23, 16, 0.05) 0 1px,
      transparent 1px 24px
    );
  color: var(--brown);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.4vw, 40px);
}

.paper a {
  color: var(--moss);
  text-decoration-color: rgba(47, 109, 91, 0.45);
}

.paper .section-head {
  border-top-color: rgba(30, 23, 16, 0.18);
}

.paper .section-num {
  color: #b34a17;
}

.paper .section-sub {
  color: #5c5347;
}

/* ---------- 10. 编号章节 / 刻度分隔 ---------- */
.section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 20px;
  align-items: start;
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.section-num {
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--signal-soft);
  padding-top: 8px;
}

.section-title {
  grid-column: 2;
  margin: 0;
}

.section-sub {
  grid-column: 2;
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--mist);
  max-width: 60ch;
}

.tick-rule {
  height: 16px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid rgba(191, 214, 216, 0.4);
  background-image: repeating-linear-gradient(
    90deg,
    var(--line) 0 1px,
    transparent 1px 24px
  );
  background-size: 100% 8px;
  background-position: left bottom;
  background-repeat: no-repeat;
  opacity: 0.6;
}

.paper .tick-rule {
  border-bottom-color: rgba(30, 23, 16, 0.35);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(30, 23, 16, 0.4) 0 1px,
    transparent 1px 24px
  );
}

/* ---------- 11. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background-color: var(--ink-deep);
  background-image: repeating-linear-gradient(
      0deg,
      rgba(191, 214, 216, 0.07) 0 1px,
      transparent 1px 24px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(191, 214, 216, 0.07) 0 1px,
      transparent 1px 24px
    );
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 -28px 44px -26px rgba(6, 16, 25, 0.85);
}

.media-frame--wide {
  aspect-ratio: 21 / 9;
}

.media-frame--tall {
  aspect-ratio: 3 / 4;
}

.media-frame--square {
  aspect-ratio: 1 / 1;
}

.media-frame--crop img,
.media-frame--crop .media-frame__img {
  object-position: center top;
  transform: scale(1.04);
}

.media-frame--paper {
  background-color: var(--paper);
  border-color: rgba(30, 23, 16, 0.14);
  background-image: repeating-linear-gradient(
      0deg,
      rgba(30, 23, 16, 0.06) 0 1px,
      transparent 1px 24px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(30, 23, 16, 0.06) 0 1px,
      transparent 1px 24px
    );
}

.media-frame--paper::after {
  box-shadow: inset 0 -28px 44px -30px rgba(30, 23, 16, 0.5);
}

.media-frame > .tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
}

/* ---------- 12. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.breadcrumb a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.breadcrumb a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(55, 227, 211, 0.5);
}

.breadcrumb__sep {
  color: var(--mist);
  opacity: 0.55;
}

.breadcrumb__current {
  color: var(--bone);
}

/* ---------- 13. 跳转链接 / 进度条 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 130;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  background-color: var(--signal);
  color: var(--ink-deep);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: top 0.16s var(--ease);
}

.skip-link:focus {
  top: 0;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 120;
  background-image: linear-gradient(
    90deg,
    var(--signal),
    var(--amber) 55%,
    var(--cyan)
  );
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- 14. 头部 ---------- */
.site-header {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  background-color: var(--ink);
  color: var(--bone);
  border-bottom: 1px solid var(--line-soft);
}

.rail {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 0 22px;
  background-color: var(--ink-deep);
  border-right: 1px solid var(--line-soft);
}

.rail__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background-color: var(--signal);
  color: var(--ink-deep);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rail__scale {
  flex: 1 1 auto;
  width: 1px;
  min-height: 44px;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(191, 214, 216, 0.55) 0 1px,
    transparent 1px 10px
  );
  opacity: 0.55;
}

.rail__text {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
}

.rail__dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background-color: var(--signal);
}

.header-body {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding: clamp(16px, 2.6vw, 26px) clamp(16px, 3.2vw, 44px) 0;
  display: flex;
  flex-direction: column;
}

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-bottom: clamp(14px, 2vw, 20px);
}

.masthead__aside {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.masthead__aside--right {
  align-items: flex-end;
}

.masthead__code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--amber);
}

.masthead__note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--bone);
  text-decoration: none;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 88%;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--mist);
}

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

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

.batch-seal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 6px 10px 5px;
  border: 1px solid var(--signal);
  border-radius: var(--radius-sm);
  color: var(--signal-soft);
  font-family: var(--font-mono);
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.batch-seal__label {
  font-size: 10px;
  letter-spacing: 0.2em;
}

.batch-seal__num {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.batch-seal:hover {
  background-color: var(--signal);
  color: var(--ink-deep);
}

.nav-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-block: 10px;
  border-top: 1px solid var(--line-soft);
}

.primary-nav {
  display: block;
}

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(4px, 1.6vw, 26px);
}

.primary-nav__link {
  display: inline-block;
  padding: 8px 4px 10px;
  color: var(--bone);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.primary-nav__link:hover {
  color: var(--cyan);
  border-bottom-color: rgba(55, 227, 211, 0.5);
}

.primary-nav__link[aria-current="page"] {
  color: var(--signal-soft);
  font-weight: 600;
  border-bottom-color: var(--signal);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  min-height: 40px;
  border: 1px solid var(--line-mid);
  border-radius: 999px;
  background-color: transparent;
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 9px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1px;
  background-color: currentColor;
  transition: top 0.16s var(--ease), transform 0.16s var(--ease);
}

.nav-toggle__bars::before {
  top: 0;
}

.nav-toggle__bars::after {
  top: 8px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 4px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 4px;
  transform: rotate(-45deg);
}

.nav-toggle__text {
  line-height: 1;
}

/* ---------- 15. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  background-color: var(--ink-deep);
  color: var(--bone);
  border-top: 1px solid var(--line-soft);
}

.site-footer::before {
  content: "";
  display: block;
  height: 1px;
  background-color: var(--signal);
  opacity: 0.55;
}

.footer-inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 60px) clamp(20px, 4vw, 40px) 26px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-soft);
}

.brand--footer {
  align-items: flex-start;
  text-align: left;
}

.brand--footer .brand__name {
  font-size: clamp(24px, 3vw, 30px);
}

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

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid var(--line-mid);
  border-radius: 999px;
  background-color: transparent;
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease),
    background-color 0.16s var(--ease);
}

.to-top::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid currentColor;
}

.to-top:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background-color: rgba(55, 227, 211, 0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
  padding-block: 30px;
}

.footer-col {
  min-width: 0;
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--mist);
  text-transform: uppercase;
}

.footer-col__title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background-color: var(--line-soft);
}

.footer-list {
  display: grid;
  gap: 8px;
}

.footer-list a {
  display: inline-block;
  color: var(--bone);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.footer-list a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(55, 227, 211, 0.5);
}

.footer-contact {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background-color: rgba(237, 230, 218, 0.05);
}

.footer-contact__item {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mist);
}

.footer-contact__value {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: var(--bone);
  overflow-wrap: anywhere;
}

.footer-note {
  margin: 0;
  padding-block: 18px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--mist);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.footer-bottom__text {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.footer-bottom__closing {
  color: var(--mist);
  opacity: 0.9;
}

/* ---------- 16. 折叠章节（通用协议） ---------- */
.accordion {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-soft);
}

.accordion__item {
  border-bottom: 1px solid var(--line-soft);
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 0;
  color: inherit;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: color 0.16s var(--ease);
}

.accordion__trigger::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s var(--ease);
}

.accordion__trigger[aria-expanded="true"] {
  color: var(--signal-soft);
}

.accordion__trigger[aria-expanded="true"]::after {
  transform: rotate(-135deg) translateY(-2px);
}

.accordion__trigger:hover {
  color: var(--cyan);
}

.paper .accordion {
  border-top-color: rgba(30, 23, 16, 0.18);
}

.paper .accordion__item {
  border-bottom-color: rgba(30, 23, 16, 0.18);
}

.paper .accordion__trigger[aria-expanded="true"] {
  color: #b34a17;
}

.accordion__panel {
  padding: 0 0 18px;
  font-size: 16px;
  line-height: 1.85;
  color: inherit;
}

/* ---------- 17. 显现 ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

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

/* ---------- 18. 平板 / 移动断点 ---------- */
@media (max-width: 960px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .rail {
    grid-column: 1;
    grid-row: 1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 8px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .rail__mark {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 11px;
  }

  .rail__scale {
    width: auto;
    min-height: 0;
    height: 1px;
    flex: 1 1 auto;
    background-image: repeating-linear-gradient(
      90deg,
      rgba(191, 214, 216, 0.55) 0 1px,
      transparent 1px 12px
    );
  }

  .rail__text {
    writing-mode: horizontal-tb;
    font-size: 11px;
    letter-spacing: 0.16em;
  }

  .rail__dot {
    width: 6px;
    height: 6px;
  }

  .header-body {
    grid-column: 1;
    grid-row: 2;
    padding: 14px 16px 0;
  }

  .masthead {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
  }

  .masthead__aside--left {
    display: none;
  }

  .brand {
    align-items: flex-start;
  }

  .brand__name {
    font-size: 24px;
  }

  .brand__sub {
    font-size: 10px;
    letter-spacing: 0.2em;
  }

  .nav-row {
    flex-wrap: wrap;
    justify-content: space-between;
    padding-block: 8px;
  }

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

  .primary-nav {
    display: none;
    order: 2;
    flex: 1 0 100%;
    width: 100%;
  }

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

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: 6px 10px;
  }

  .primary-nav__link {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 17px;
  }

  .primary-nav__link[aria-current="page"] {
    border-bottom-color: var(--signal);
    border-bottom-width: 1px;
  }

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

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

@media (max-width: 560px) {
  body {
    font-size: 16px;
    line-height: 1.8;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

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

/* ---------- 19. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .btn:hover,
  .panel:hover,
  .panel:focus-within {
    transform: none;
  }

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

  .scroll-progress {
    transition: none;
  }
}
