/* ============================================================
   尊龙娱乐馆 · /assets/site.css
   夜航资料舱：墨黑舱底 / 赤金规则 / 电光青导航 / 暖砂米试用
   ============================================================ */

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

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

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption,
blockquote, dl, dt, dd, details, summary, fieldset { margin: 0; }

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

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

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

a { color: inherit; }

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0B0D10;
  --panel: #141922;
  --panel-2: #101520;
  --line: #2A3340;
  --text: #E9EDF2;
  --muted: #A7B0BD;
  --gold: #E8A33D;
  --gold-deep: #A96C1E;
  --cyan: #35E0D0;
  --cyan-dim: #1B7F78;
  --sand: #E8D8BF;
  --alert: #FF7A5C;
  --ok: #7FE0A8;

  --font-display: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --maxw: 1280px;
  --gutter: clamp(18px, 4vw, 48px);
  --header-h: 78px;
  --cut: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-soft: 0 18px 44px rgba(0, 0, 0, .45);
}

/* ---------- 3. 中文排版基础 ---------- */
html { background-color: var(--ink); }

body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    linear-gradient(90deg, rgba(42, 51, 64, .30) 1px, transparent 1px),
    radial-gradient(1100px 560px at 88% -8%, rgba(53, 224, 208, .10), transparent 62%),
    radial-gradient(900px 520px at 4% 2%, rgba(232, 163, 61, .085), transparent 60%);
  background-size: clamp(90px, 11vw, 150px) 100%, 100% 100%, 100% 100%;
  background-repeat: repeat-x, no-repeat, no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: .01em;
  overflow-x: hidden;
}

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

h1 { font-size: clamp(34px, 6vw, 64px); }
h2 { font-size: clamp(26px, 3.6vw, 40px); }
h3 { font-size: clamp(20px, 2.4vw, 28px); }
h4 { font-size: 20px; letter-spacing: -.01em; }

p { max-width: 66ch; }

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

em { font-style: normal; color: var(--gold); }

::selection { background: rgba(232, 163, 61, .32); color: #fff; }

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

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

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

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 0; left: 50%;
  z-index: 200;
  transform: translate(-50%, -140%);
  padding: 10px 20px;
  background: var(--gold);
  color: #14100A;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: transform 200ms var(--ease);
}

.skip-link:focus-visible,
.skip-link:focus {
  transform: translate(-50%, 0);
  outline-offset: -4px;
}

/* ---------- 5. 布局容器与通用栅格 ---------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }

.layout-split {
  display: grid;
  grid-template-columns: minmax(210px, 3fr) minmax(0, 9fr);
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
}

.stack > * + * { margin-top: clamp(16px, 2vw, 26px); }

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

/* ---------- 6. 切角面板与卡片 ---------- */
.cut {
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

.panel {
  position: relative;
  background: linear-gradient(165deg, #161C26 0%, var(--panel) 52%, #101519 100%);
  border: 1px solid var(--line);
  padding: clamp(20px, 2.6vw, 34px);
}

.panel--sand {
  background: linear-gradient(165deg, #F2E7D4 0%, var(--sand) 100%);
  color: #1A1611;
  border-color: rgba(232, 216, 191, .5);
}

.panel--sand h2,
.panel--sand h3 { color: #16120D; }
.panel--sand .lead { color: #463C2E; }

.card {
  position: relative;
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: clamp(18px, 2vw, 26px);
  text-decoration: none;
  color: inherit;
  transition: transform 200ms var(--ease), border-color 200ms var(--ease), background-color 200ms var(--ease);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--cyan-dim);
  background: #17202B;
}

/* ---------- 7. 文字组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.section-title { letter-spacing: -.03em; }

.lead {
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.9;
}

.note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--cyan);
  border: 1px solid var(--cyan-dim);
  background: rgba(53, 224, 208, .06);
}

.tag--gold { color: var(--gold); border-color: rgba(232, 163, 61, .45); background: rgba(232, 163, 61, .08); }
.tag--sand { color: #4A3E2C; border-color: rgba(74, 62, 44, .35); background: rgba(232, 216, 191, .16); }
.tag--alert { color: var(--alert); border-color: rgba(255, 122, 92, .45); background: rgba(255, 122, 92, .08); }

/* ---------- 8. 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background-color 200ms var(--ease), color 200ms var(--ease),
              border-color 200ms var(--ease), transform 200ms var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #D98F2A 100%);
  color: #14100A;
}

.btn-primary:hover,
.btn-primary:focus-visible { background: linear-gradient(135deg, #F3BA5C 0%, var(--gold) 100%); }

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

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--cyan-dim);
  color: var(--cyan);
}

.btn-quiet {
  background: transparent;
  border: 0;
  padding: 6px 0;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid rgba(53, 224, 208, .35);
}

.btn-quiet:hover { color: var(--gold); border-bottom-color: rgba(232, 163, 61, .5); }

.btn:active { transform: translateY(1px); }

/* ---------- 9. 面包屑 ---------- */
.breadcrumb { padding-block: 18px; }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb li + li::before {
  content: "/";
  color: var(--line);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms var(--ease);
}

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

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

/* ---------- 10. 站点头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(11, 13, 16, .97) 0%, rgba(11, 13, 16, .88) 100%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2.6vw, 40px);
  padding-block: 10px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 26px);
  min-width: 0;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding-inline: 8px;
  background: linear-gradient(150deg, var(--gold) 0%, var(--gold-deep) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}

.brand-mark-line {
  display: block;
  height: 2px;
  background: #0B0D10;
}

.brand-mark-line:nth-child(2) { width: 62%; }
.brand-mark-line:nth-child(3) { width: 84%; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -.01em;
  color: var(--text);
}

.brand-meta {
  font-size: 9.5px;
  letter-spacing: .22em;
  color: var(--gold);
  opacity: .85;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-left: clamp(14px, 1.8vw, 26px);
  border-left: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(53, 224, 208, .55);
  animation: status-pulse 3.2s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53, 224, 208, .45); opacity: 1; }
  50% { box-shadow: 0 0 0 6px rgba(53, 224, 208, 0); opacity: .72; }
}

/* 头部导航：桌面横排 */
.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  min-width: 0;
}

.nav-list-wrap { min-width: 0; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 11px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms var(--ease);
}

.nav-num {
  font-size: 9.5px;
  letter-spacing: .1em;
  color: var(--gold-deep);
  transition: color 180ms var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms var(--ease), background-color 200ms var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible { color: var(--text); }

.nav-link:hover .nav-num,
.nav-link:focus-visible .nav-num { color: var(--gold); }

.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

.nav-link[aria-current="page"] { color: var(--gold); font-weight: 700; }

.nav-link[aria-current="page"] .nav-num { color: var(--gold); }

.nav-link[aria-current="page"]::after {
  background: var(--gold);
  transform: scaleX(1);
}

.header-cta {
  padding: 10px 18px;
  font-size: 14px;
  flex: none;
}

.nav-foot { display: none; }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}

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

.nav-toggle[aria-expanded="true"] {
  color: var(--cyan);
  border-color: var(--cyan-dim);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
  flex: none;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform 200ms var(--ease);
}

.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }

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

/* 滚动进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--gold) 100%);
  transition: transform 120ms linear;
  pointer-events: none;
}

/* ---------- 11. 站点页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 120px);
  background:
    radial-gradient(680px 320px at 82% 0%, rgba(53, 224, 208, .07), transparent 65%),
    linear-gradient(180deg, #141922 0%, #0C1015 100%);
  border-top: 1px solid var(--line);
  color: var(--text);
}

.footer-rail {
  height: 5px;
  background: repeating-linear-gradient(115deg,
    var(--gold) 0 12px,
    var(--gold-deep) 12px 18px,
    var(--cyan-dim) 18px 24px,
    #0C1015 24px 40px);
  opacity: .75;
}

.footer-inner {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
  padding-block: clamp(36px, 5vw, 64px) 26px;
}

.footer-lead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
}

.footer-summary {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 3vw, 30px);
  letter-spacing: -.03em;
  line-height: 1.3;
  color: var(--text);
  max-width: 22ch;
}

.footer-lead-cta { font-size: 14px; padding: 10px 18px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(28px, 4vw, 44px);
}

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

.footer-brand-link {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -.01em;
  border-bottom: 2px solid transparent;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}

.footer-brand-link:hover .footer-brand-name {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.footer-brand-note {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 24ch;
}

.footer-mono {
  margin-top: 12px;
  font-size: 10.5px;
  letter-spacing: .22em;
  color: var(--gold-deep);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--cyan);
  margin-bottom: 14px;
}

.footer-list li + li { margin-top: 4px; }

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms var(--ease), transform 160ms var(--ease);
}

.footer-link::before {
  content: "";
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 180ms var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--cyan);
  transform: translateX(2px);
}

.footer-link:hover::before,
.footer-link:focus-visible::before { width: 12px; }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 28px;
  padding-block: clamp(20px, 2.6vw, 28px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.footer-contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.footer-contact-label {
  flex: none;
  padding: 2px 8px;
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--gold);
  border: 1px solid rgba(232, 163, 61, .35);
}

.footer-contact-value {
  font-size: 13.5px;
  color: var(--text);
  word-break: break-all;
}

.copy-btn {
  flex: none;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  transition: color 180ms var(--ease), border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.copy-btn:hover,
.copy-btn:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan-dim);
}

.copy-btn.is-done {
  color: var(--ok);
  border-color: rgba(127, 224, 168, .55);
  background: rgba(127, 224, 168, .08);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 22px;
}

.footer-legal {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .06em;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
}

.legal-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.legal-link:hover,
.legal-link:focus-visible {
  color: var(--cyan);
  border-bottom-color: rgba(53, 224, 208, .5);
}

/* ---------- 12. 图片容器基础规则 ---------- */
.figure-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(140deg, #171E28 0%, #0E1319 60%, #141B24 100%);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}

.figure-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.figure-frame--placeholder {
  display: flex;
  align-items: flex-end;
  padding: clamp(12px, 2vw, 20px);
  background-image:
    repeating-linear-gradient(115deg,
      rgba(53, 224, 208, .10) 0 1px,
      transparent 1px 16px),
    linear-gradient(140deg, #171E28 0%, #0E1319 100%);
}

.figure-frame--placeholder::before {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 46%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.figure-frame figcaption {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
}

/* ---------- 13. 标签页 ---------- */
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  padding: 11px 18px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 180ms var(--ease), border-color 180ms var(--ease), background-color 180ms var(--ease);
}

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

.tab[aria-selected="true"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(232, 163, 61, .06);
  font-weight: 700;
}

.tab-panel { padding-top: clamp(20px, 2.6vw, 32px); }

.tab-panel[hidden] { display: none; }

/* ---------- 14. 手风琴条款卡 ---------- */
.rule-fold {
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 10px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease);
}

.rule-fold[open] { border-color: var(--cyan-dim); background: #17202B; }

.rule-fold-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--text);
}

.rule-fold-head::-webkit-details-marker { display: none; }

.rule-fold-head::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--gold);
  transition: transform 220ms var(--ease), color 220ms var(--ease);
}

.rule-fold[open] .rule-fold-head::after {
  transform: rotate(45deg);
  color: var(--cyan);
}

.rule-fold-body {
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 15px;
}

.rule-fold-body p + p { margin-top: 12px; }

/* ---------- 15. 粘性目录 ---------- */
.index-rail {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.index-rail-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .22em;
  color: var(--muted);
  margin-bottom: 12px;
}

.index-rail a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-left: -18px;
  padding: 7px 0 7px 14px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background-color 160ms var(--ease);
}

.index-rail a:hover { color: var(--text); }

.index-rail a[aria-current="true"] {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(232, 163, 61, .06);
}

.index-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--gold-deep);
}

/* ---------- 16. 本地面板筛选 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  transition: color 180ms var(--ease), border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.chip:hover { color: var(--cyan); border-color: var(--cyan-dim); }

.chip[aria-pressed="true"] {
  color: #14100A;
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 700;
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
  margin-left: auto;
}

[data-filter-item][hidden] { display: none; }

/* ---------- 17. 渐入 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 18. 响应式 ---------- */
@media (max-width: 1180px) {
  .header-status { display: none; }
}

@media (max-width: 1024px) {
  :root { --header-h: 68px; }

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

  .header-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-height: 84vh;
    overflow-y: auto;
    padding: 22px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(20, 25, 34, .99) 0%, #0B0D10 100%);
    border-top: 1px solid var(--line);
    box-shadow: 0 -26px 60px rgba(0, 0, 0, .65);
    transform: translateY(108%);
    visibility: hidden;
    transition: transform 240ms var(--ease), visibility 240ms var(--ease);
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list li + li { border-top: 1px solid var(--line); }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
    padding: 15px 2px;
    font-size: 17px;
  }

  .nav-link::after {
    left: 0;
    right: auto;
    bottom: 8px;
    width: 0;
    transform: none;
    transition: width 200ms var(--ease);
  }

  .nav-link:hover::after,
  .nav-link:focus-visible::after,
  .nav-link[aria-current="page"]::after { width: 26px; transform: none; }

  .header-cta {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
  }

  .nav-foot {
    display: block;
    font-size: 10.5px;
    letter-spacing: .2em;
    color: var(--muted);
    text-align: center;
  }

  html.is-nav-open { overflow: hidden; }

  .layout-split { grid-template-columns: minmax(0, 1fr); }

  .index-rail {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
  }

  .index-rail a { margin-left: 0; border-left: 0; padding-left: 0; }

  .index-rail a[aria-current="true"] { background: transparent; }

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

@media (max-width: 760px) {
  body { font-size: 15.5px; line-height: 1.85; }

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

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

  .footer-lead-cta { width: 100%; }

  .footer-summary { max-width: none; }

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

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

  .figure-frame--wide { aspect-ratio: 16 / 10; }

  .filter-count { margin-left: 0; width: 100%; }
}

@media (max-width: 420px) {
  .brand-meta { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-name { font-size: 16.5px; }
  .nav-toggle-text { display: none; }
}

/* ---------- 19. 动效降级 ---------- */
@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;
  }

  .status-dot { animation: none; box-shadow: 0 0 0 3px rgba(53, 224, 208, .18); }

  .reveal { opacity: 1; transform: none; }

  .card:hover,
  .card:focus-visible,
  .footer-link:hover { transform: none; }
}
