/* ============================================================
   澳门服务 · 共享 Site Kit
   文件位置：/assets/site.css
   负责：reset、变量、中文排版、页头页脚、按钮、面包屑、容器、网格与基础组件
   ============================================================ */

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

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

body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:where(a, button) { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

/* ---------- 2. 变量 ---------- */
:root {
  --c-deep: #071C2C;
  --c-harbor: #0B2B3C;
  --c-ink: #0E3B34;
  --c-cobalt: #1F4E8C;
  --c-tile: #2E6FB0;
  --c-yellow: #F2C14E;
  --c-coral: #FF6B4A;
  --c-paper: #F4EFE4;
  --c-inktext: #10221F;
  --c-mist: #8FA3A8;
  --c-pine: #3FA37A;
  --c-text: #D9E4E6;

  --line: rgba(143, 163, 168, 0.28);
  --line-soft: rgba(143, 163, 168, 0.16);

  --font-display: "Noto Sans HK", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-12: 12px;
  --fs-16: 16px;
  --fs-20: 20px;
  --fs-28: 28px;
  --fs-40: 40px;
  --fs-64: 64px;
  --fs-96: 96px;

  --rail-w: 288px;
  --bar-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 1.75;
  color: var(--c-text);
  background-color: var(--c-deep);
  background-image:
    linear-gradient(rgba(143, 163, 168, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 163, 168, 0.055) 1px, transparent 1px),
    radial-gradient(880px 620px at 84% -12%, rgba(31, 78, 140, 0.42), transparent 70%),
    radial-gradient(720px 520px at -6% 104%, rgba(14, 59, 52, 0.55), transparent 66%);
  background-size: 96px 96px, 96px 96px, 100% 100%, 100% 100%;
  background-attachment: fixed, fixed, scroll, scroll;
  min-height: 100vh;
  padding-left: var(--rail-w);
  transition: padding-left 0.22s var(--ease);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: 0.01em;
  color: #FFFFFF;
}

p { max-width: 68ch; }

::selection { background: var(--c-yellow); color: var(--c-deep); }

:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 3px;
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  color: var(--c-deep);
  background: var(--c-yellow);
  border: 1px solid var(--c-deep);
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 头部：左侧导航柱 ---------- */
.site-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 28px 22px 22px;
  overflow-y: auto;
  background:
    repeating-linear-gradient(180deg, rgba(31, 78, 140, 0.16) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, #071C2C 0%, #072430 52%, #0B2B3C 100%);
  border-right: 1px solid var(--line);
}

.site-rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: repeating-linear-gradient(180deg,
    rgba(242, 193, 78, 0.55) 0 6px,
    transparent 6px 18px,
    rgba(46, 111, 176, 0.5) 18px 24px,
    transparent 24px 40px);
  pointer-events: none;
}

/* 滚动进度条 */
.rail__progress {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--rail-w);
  height: 3px;
  z-index: 90;
  background: rgba(143, 163, 168, 0.14);
  pointer-events: none;
}
.rail__progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--c-cobalt), var(--c-tile) 55%, var(--c-yellow));
}

/* 品牌区 */
.rail__head {
  display: grid;
  gap: 16px;
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #FFFFFF;
}
.brand__mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--c-yellow);
  border: 1px solid rgba(242, 193, 78, 0.7);
  background: rgba(31, 78, 140, 0.34);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.brand:hover .brand__mark,
.brand:focus-visible .brand__mark {
  background: var(--c-yellow);
  color: var(--c-deep);
}
.brand__text { display: grid; gap: 2px; }
.brand__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.1;
}
.brand__line {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--c-mist);
}

.rail__tagline {
  max-width: none;
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-mist);
  padding-left: 10px;
  border-left: 2px solid var(--c-cobalt);
}

/* 移动端按钮（桌面隐藏） */
.rail__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(31, 78, 140, 0.3);
  border: 1px solid var(--line);
  color: var(--c-yellow);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.rail__toggle:hover { background: rgba(46, 111, 176, 0.42); border-color: var(--c-yellow); }
.rail__toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.rail__toggle-bars::before,
.rail__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.rail__toggle-bars::before { top: -6px; }
.rail__toggle-bars::after { top: 6px; }

/* 面板 / 导航 */
.rail__panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 24px;
}

.rail__nav {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rail__index {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--c-mist);
}

.nav-list { display: grid; gap: 2px; }
.nav-list__item { display: block; }

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  color: #C4D3D7;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.nav-link__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--c-mist);
  transition: color 0.18s var(--ease);
}
.nav-link__label { font-size: 15px; letter-spacing: 0.03em; }

.nav-link:hover,
.nav-link:focus-visible {
  color: #FFFFFF;
  background: rgba(31, 78, 140, 0.36);
  border-left-color: var(--c-yellow);
  transform: translateX(2px);
}
.nav-link:hover .nav-link__num,
.nav-link:focus-visible .nav-link__num { color: var(--c-yellow); }

.nav-link[aria-current="page"] {
  color: #FFFFFF;
  font-weight: 700;
  background: rgba(46, 111, 176, 0.26);
  border-left-color: var(--c-coral);
}
.nav-link[aria-current="page"] .nav-link__num { color: var(--c-coral); }

/* 轨道底部 */
.rail__foot {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.rail__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--c-coral);
  color: #071C2C;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 1px solid var(--c-coral);
  transition: background 0.18s var(--ease), transform 0.18s var(--ease),
              box-shadow 0.18s var(--ease);
}
.rail__cta:hover,
.rail__cta:focus-visible {
  background: #FF8266;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 107, 74, 0.24);
}
.rail__cta-arrow { font-family: var(--font-mono); font-size: 14px; }

.rail__meta {
  max-width: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--c-mist);
}

.rail__top {
  justify-self: start;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--c-mist);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
              background 0.18s var(--ease);
}
.rail__top:hover,
.rail__top:focus-visible {
  color: var(--c-deep);
  background: var(--c-yellow);
  border-color: var(--c-yellow);
}

/* ---------- 6. 页脚 ---------- */
.site-foot {
  position: relative;
  margin-top: 0;
  padding: 52px 0 26px;
  background:
    repeating-linear-gradient(90deg, rgba(143, 163, 168, 0.08) 0 1px, transparent 1px 40px),
    linear-gradient(165deg, #0B2B3C 0%, #07222F 58%, #071C2C 100%);
  border-top: 1px solid var(--line);
}

.site-foot__inner {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1.25fr;
  gap: 36px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px);
}

.foot-brand__name {
  font-family: var(--font-display);
  font-size: var(--fs-28);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  line-height: 1.2;
}
.foot-brand__line {
  margin-top: 8px;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--c-yellow);
}
.foot-brand__note {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--c-mist);
}

.foot-nav__title {
  margin-bottom: 12px;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--c-mist);
  border-left: 2px solid var(--c-cobalt);
  padding-left: 8px;
}

.foot-list { display: grid; gap: 8px; }
.foot-list a {
  display: inline-block;
  font-size: 14px;
  color: #C4D3D7;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.foot-list a:hover,
.foot-list a:focus-visible {
  color: var(--c-yellow);
  border-bottom-color: var(--c-yellow);
}

.foot-contact { min-width: 0; }
.foot-contact__row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}
.foot-contact__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--c-mist);
  padding-top: 3px;
}
.foot-contact__value {
  font-size: 13px;
  line-height: 1.7;
  color: #DDE8EA;
  word-break: break-word;
}
.foot-note {
  margin-top: 14px;
  max-width: 32ch;
  font-size: 12px;
  line-height: 1.75;
  color: var(--c-mist);
}

.site-foot__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: 1180px;
  margin: 34px auto 0;
  padding: 18px clamp(18px, 4vw, 48px) 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--c-mist);
}
.foot-legal__copy,
.foot-legal__icp { max-width: none; }

/* ---------- 7. 通用容器与分节 ---------- */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px);
}

.section {
  position: relative;
  padding: clamp(38px, 5vw, 72px) 0;
}
.section--harbor {
  background: linear-gradient(180deg, rgba(11, 43, 60, 0.92), rgba(7, 28, 44, 0.55));
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.section--ink {
  background: linear-gradient(180deg, rgba(14, 59, 52, 0.9), rgba(7, 36, 34, 0.72));
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.section--paper {
  background: var(--c-paper);
  color: var(--c-inktext);
  border-top: 1px solid var(--c-inktext);
  border-bottom: 1px solid var(--c-inktext);
}
.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: var(--c-inktext); }
.section--paper .eyebrow,
.section--paper .lede,
.section--paper .card__meta { color: #4A5A57; }
.section--paper .card {
  background: #FFFFFF;
  border-color: rgba(16, 34, 31, 0.18);
}
.section--paper .card:hover { border-color: var(--c-cobalt); }

/* ---------- 8. 文字组件 ---------- */
.display {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0.005em;
  color: #FFFFFF;
}

.title-lg {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  font-weight: 900;
  line-height: 1.2;
  color: #FFFFFF;
}

.lede {
  max-width: 60ch;
  margin-top: 16px;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.85;
  color: #C4D3D7;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--c-yellow);
  text-transform: uppercase;
}

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

.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.85;
  color: #D3DFE1;
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.8em; font-size: clamp(1.4rem, 2vw, 1.85rem); }
.prose h3 { margin-top: 1.6em; font-size: 1.15rem; }
.prose a {
  color: var(--c-yellow);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 193, 78, 0.55);
}
.prose a:hover { border-bottom-color: var(--c-yellow); }
.prose ul { list-style: none; }
.prose ul > li {
  position: relative;
  padding-left: 20px;
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 8px;
  height: 1px;
  background: var(--c-tile);
}
.prose__note {
  max-width: 60ch;
  margin-top: 18px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.8;
  color: #C4D3D7;
  background: rgba(31, 78, 140, 0.2);
  border-left: 2px solid var(--c-cobalt);
}

/* ---------- 9. 索引网格与卡片 ---------- */
.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)); }

.index-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
  align-items: start;
}

.card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 18px;
  background: rgba(11, 43, 60, 0.7);
  border: 1px solid var(--line);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease),
              background 0.18s var(--ease);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--c-tile);
  background: rgba(20, 58, 78, 0.82);
}
.card--wide { grid-column: span 7; }
.card--narrow { grid-column: span 5; }

.card__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--c-yellow);
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.35;
  color: #FFFFFF;
}
.card__text {
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.8;
  color: #C4D3D7;
}
.card__meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--c-mist);
}

/* ---------- 10. 标签与细线 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--c-mist);
  border: 1px solid var(--line);
  background: rgba(31, 78, 140, 0.18);
}
.tag--yellow { color: var(--c-yellow); border-color: rgba(242, 193, 78, 0.55); }
.tag--coral { color: var(--c-coral); border-color: rgba(255, 107, 74, 0.55); }

.rule {
  height: 1px;
  border: 0;
  margin: 26px 0;
  background: linear-gradient(90deg, var(--c-cobalt), rgba(143, 163, 168, 0.15) 60%, transparent);
}

/* ---------- 11. 图片容器（无图也成立） ---------- */
.figure {
  display: grid;
  gap: 8px;
  margin: 0;
}
.figure__cap {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--c-mist);
}

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background-color: var(--c-harbor);
  background-image:
    linear-gradient(135deg, rgba(31, 78, 140, 0.55), rgba(7, 28, 44, 0.92)),
    repeating-linear-gradient(0deg, rgba(143, 163, 168, 0.13) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(143, 163, 168, 0.13) 0 1px, transparent 1px 26px);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.14);
  background: rgba(7, 28, 44, 0.12);
}
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 4 / 5; }

.media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.02);
}

.media__cap {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--c-yellow);
  background: rgba(7, 28, 44, 0.76);
  border: 1px solid rgba(242, 193, 78, 0.36);
}

/* ---------- 12. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease),
              border-color 0.16s var(--ease), transform 0.16s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--coral {
  background: var(--c-coral);
  color: #071C2C;
  border-color: var(--c-coral);
}
.btn--coral:hover,
.btn--coral:focus-visible { background: #FF8266; border-color: #FF8266; }

.btn--line {
  background: transparent;
  color: var(--c-yellow);
  border-color: rgba(242, 193, 78, 0.6);
}
.btn--line:hover,
.btn--line:focus-visible {
  background: rgba(242, 193, 78, 0.14);
  border-color: var(--c-yellow);
}

.btn--paper {
  background: var(--c-inktext);
  color: var(--c-paper);
  border-color: var(--c-inktext);
}
.btn--paper:hover,
.btn--paper:focus-visible { background: var(--c-cobalt); border-color: var(--c-cobalt); color: #FFFFFF; }

/* ---------- 13. 面包屑 ---------- */
.crumbs {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--c-mist);
}
.crumbs__list > li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(143, 163, 168, 0.6);
}
.crumbs a {
  color: var(--c-mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.crumbs a:hover,
.crumbs a:focus-visible { color: var(--c-yellow); border-bottom-color: var(--c-yellow); }
.crumbs [aria-current="page"] { color: var(--c-yellow); }

/* ---------- 14. 辅助类 ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* ---------- 15. 平板 ---------- */
@media (max-width: 1199px) {
  :root { --rail-w: 248px; }
  .site-rail { padding: 22px 18px 18px; }
  .site-foot__inner { gap: 26px; }
}

@media (max-width: 1023px) {
  .card { grid-column: span 6; }
  .card--wide,
  .card--narrow { grid-column: span 6; }
  .site-foot__inner { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 16. 移动端：顶栏 + 抽屉 ---------- */
@media (max-width: 959px) {
  html { scroll-padding-top: calc(var(--bar-h) + 20px); }

  body {
    padding-left: 0;
    padding-top: var(--bar-h);
    background-attachment: scroll;
  }

  .site-rail {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: var(--bar-h);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .site-rail::after {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(90deg,
      rgba(242, 193, 78, 0.5) 0 8px,
      transparent 8px 20px,
      rgba(46, 111, 176, 0.45) 20px 28px,
      transparent 28px 48px);
  }

  .rail__progress { width: 100%; height: 2px; }

  .rail__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }
  .brand__line { display: none; }
  .brand__name { font-size: 18px; }
  .brand__mark { width: 36px; height: 36px; font-size: 18px; }
  .rail__tagline { display: none; }
  .rail__toggle { display: inline-flex; }

  .rail__panel {
    position: fixed;
    top: var(--bar-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 65;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
    padding: 20px 18px 30px;
    overflow-y: auto;
    background:
      repeating-linear-gradient(180deg, rgba(31, 78, 140, 0.14) 0 1px, transparent 1px 44px),
      linear-gradient(180deg, #07222F 0%, #071C2C 100%);
    border-top: 1px solid var(--line);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform 0.22s var(--ease), visibility 0.22s var(--ease);
  }
  .site-rail[data-open] .rail__panel {
    transform: translateX(0);
    visibility: visible;
  }

  .rail__nav { border-top: 0; padding-top: 4px; }
  .nav-link { padding: 12px 10px; }
  .nav-link__label { font-size: 16px; }

  .rail__foot { margin-top: 16px; }
  .rail__top { display: none; }

  .site-foot { padding-top: 38px; }
  .site-foot__inner { grid-template-columns: 1fr; gap: 28px; }
  .site-foot__legal { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 639px) {
  body { font-size: 15px; }
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }
  .card,
  .card--wide,
  .card--narrow { grid-column: 1 / -1; }
  .index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-contact__row { grid-template-columns: 40px 1fr; }
  .rail__cta { font-size: 14px; padding: 11px 12px; }
}

/* ---------- 17. 减少动态偏好 ---------- */
@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;
    scroll-behavior: auto !important;
  }
  .card:hover,
  .nav-link:hover,
  .btn:hover,
  .rail__cta:hover { transform: none; }
}
