/* =========================================================
   626在线登录 · 共享站点样式 /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, p, figure, blockquote, ul, ol, dl, dd {
  margin: 0;
}

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

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

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

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

h1, h2, h3, h4 { font-weight: inherit; font-size: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  --navy: #0B2545;
  --navy-deep: #071A33;
  --navy-mid: #103E6B;
  --cyan: #00E5FF;
  --cyan-soft: #7CF3FF;
  --orange: #FF6B35;
  --orange-soft: #FFB199;
  --green: #12B886;
  --paper: #EEF3F8;
  --white: #FFFFFF;
  --slate: #5A7184;
  --line: #D6E2EE;

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

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 104px;
  --radius: 16px;
}

/* ---------- 3. 中文排版与基础 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--navy);
  background: var(--paper);
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--cyan);
  color: var(--navy-deep);
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(7, 26, 51, 0.45);
  border-radius: 6px;
}

/* ---------- 4. 布局基础 ---------- */
.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  position: relative;
  padding-block: clamp(56px, 8vw, 112px);
}

.section--paper { background: var(--paper); color: var(--navy); }
.section--navy  { background: var(--navy); color: #EEF3F8; }
.section--deep  { background: var(--navy-deep); color: #EEF3F8; }

.section--navy .lead,
.section--deep .lead { color: rgba(238, 243, 248, 0.72); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

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

.hairline {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--line);
}

.section--navy .hairline,
.section--deep .hairline { background: rgba(214, 226, 238, 0.18); }

.texture-halftone {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0, 229, 255, 0.22) 1px, transparent 1.2px);
  background-size: 14px 14px;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(120% 90% at 82% 8%, #000 0%, transparent 70%);
  mask-image: radial-gradient(120% 90% at 82% 8%, #000 0%, transparent 70%);
}

/* ---------- 5. 文字层级 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section--navy .eyebrow,
.section--deep .eyebrow { color: var(--cyan-soft); }

.display-1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 8vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.3;
}

.lead {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.75;
  color: var(--slate);
  max-width: 38em;
}

.prose {
  max-width: 38em;
  font-size: 16.5px;
  line-height: 1.75;
}

.prose p + p { margin-top: 1.2em; }

.text-mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: 0.06em;
}

.chapter-num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 140px);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 229, 255, 0.38);
  transition: color 0.32s var(--ease), -webkit-text-stroke-color 0.32s var(--ease), transform 0.32s var(--ease);
}

[data-chapter].is-active .chapter-num {
  color: rgba(0, 229, 255, 0.14);
  -webkit-text-stroke-color: var(--cyan);
  transform: scale(1.04);
}

/* ---------- 6. 按钮 ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: #FFFFFF;
  --btn-bd: rgba(255, 255, 255, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
              border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

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

.btn--accent {
  --btn-bg: var(--orange);
  --btn-fg: var(--navy-deep);
  --btn-bd: var(--orange);
}
.btn--accent:hover {
  --btn-bg: #FF5A1F;
  --btn-bd: #FF5A1F;
}

.btn--ghost {
  --btn-bg: rgba(255, 255, 255, 0.06);
  --btn-fg: #FFFFFF;
  --btn-bd: rgba(255, 255, 255, 0.34);
}
.btn--ghost:hover {
  --btn-bg: rgba(0, 229, 255, 0.12);
  --btn-bd: var(--cyan);
  --btn-fg: var(--cyan-soft);
}

.btn--line {
  --btn-bg: transparent;
  --btn-fg: var(--navy);
  --btn-bd: var(--line);
}
.btn--line:hover {
  --btn-bd: var(--cyan);
  --btn-bg: rgba(0, 229, 255, 0.1);
}

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

/* ---------- 7. 通用组件 ---------- */
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 20px 40px -36px rgba(7, 26, 51, 0.8);
  transition: border-color 0.24s var(--ease), box-shadow 0.24s var(--ease), transform 0.24s var(--ease);
}

.card:hover {
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 26px 50px -34px rgba(7, 26, 51, 0.55);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.tag:hover {
  border-color: var(--cyan);
  color: var(--navy);
}

.tag--active,
.tag[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cyan);
  box-shadow: inset 3px 0 0 var(--orange);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  background: var(--paper);
  color: var(--navy-mid);
}

.badge--ok {
  background: rgba(18, 184, 134, 0.16);
  color: #0A6B50;
}

.badge--warn {
  background: var(--orange-soft);
  color: var(--navy-deep);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}

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

.crumbs li + li::before {
  content: "/";
  opacity: 0.45;
}

.crumbs a { border-bottom: 1px solid transparent; }
.crumbs a:hover { color: var(--navy); border-bottom-color: var(--cyan); }

.section--navy .crumbs,
.section--deep .crumbs { color: rgba(238, 243, 248, 0.6); }

.section--navy .crumbs a:hover,
.section--deep .crumbs a:hover { color: var(--cyan-soft); }

/* ---------- 8. 图片容器基础规则 ---------- */
.figure {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 120% at 18% 0%, rgba(0, 229, 255, 0.2), transparent 58%),
    linear-gradient(150deg, #0B2545 0%, #071A33 100%);
}

.figure img,
.figure video,
.figure svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x3  { aspect-ratio: 4 / 3; }
.figure--1x1  { aspect-ratio: 1 / 1; }
.figure--tall { aspect-ratio: 3 / 4; }

.figure__label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 4px 9px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 5px;
  background: rgba(7, 26, 51, 0.62);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.figure__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.section--navy .figure,
.section--deep .figure { border-color: rgba(214, 226, 238, 0.18); }

/* ---------- 9. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--cyan);
  color: var(--navy-deep);
  font-weight: 700;
  font-size: 14px;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

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

/* ---------- 10. 头部 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  color: #FFFFFF;
  isolation: isolate;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--navy);
  box-shadow: 0 1px 0 rgba(0, 229, 255, 0.22), 0 18px 44px -30px rgba(7, 26, 51, 0.95);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, rgba(7, 26, 51, 0.9) 0%, rgba(7, 26, 51, 0.36) 62%, rgba(7, 26, 51, 0) 100%);
  transition: opacity 0.3s var(--ease);
}

.site-header[data-scrolled="true"]::before { opacity: 1; }
.site-header[data-scrolled="true"]::after { opacity: 0; }

.header-rail {
  height: 32px;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 229, 255, 0.14);
  transition: height 0.28s var(--ease), border-color 0.28s var(--ease);
}

.site-header[data-scrolled="true"] .header-rail {
  height: 0;
  border-bottom-color: transparent;
}

.header-rail-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 32px;
}

.rail-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(238, 243, 248, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}

.rail-link {
  position: relative;
  padding-left: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: rgba(238, 243, 248, 0.62);
  transition: color 0.2s var(--ease);
}

.rail-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  background: var(--orange);
  opacity: 0.85;
  transform: translateY(-50%) rotate(45deg);
}

.rail-link:hover { color: var(--cyan-soft); }

.header-main { height: 72px; }

.header-main-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  background: var(--cyan);
  color: var(--navy-deep);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
  transition: background-color 0.22s var(--ease);
}

.brand:hover .brand-mark { background: var(--cyan-soft); }

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

.brand-line {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #FFFFFF;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.1em;
  color: rgba(238, 243, 248, 0.58);
  white-space: nowrap;
}

/* 导航 */
.primary-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

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

.nav-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: rgba(124, 243, 255, 0.45);
  transition: color 0.2s var(--ease);
}

.nav-list a:hover {
  color: var(--cyan-soft);
  background: rgba(0, 229, 255, 0.08);
}

.nav-list a:hover .nav-num { color: var(--cyan); }

.nav-list a[aria-current="page"] {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.1);
  box-shadow: inset 0 -2px 0 var(--cyan);
}

.nav-list a[aria-current="page"] .nav-num { color: var(--orange); }

.nav-extra { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin-left: 4px;
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.1);
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: background-color 0.24s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease);
}

.nav-toggle-bars::before { transform: translateY(-6px); }
.nav-toggle-bars::after  { transform: translateY(6px); }

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

/* 阅读进度 */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.read-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--cyan-soft) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.12s linear;
}

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  color: rgba(238, 243, 248, 0.72);
  border-top: 1px solid rgba(0, 229, 255, 0.16);
}

.footer-circuit {
  position: absolute;
  top: -70px;
  right: -70px;
  width: min(460px, 62vw);
  height: min(460px, 62vw);
  pointer-events: none;
  background:
    repeating-linear-gradient(115deg, rgba(0, 229, 255, 0.22) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(25deg, rgba(0, 229, 255, 0.12) 0 1px, transparent 1px 34px),
    radial-gradient(circle at 62% 38%, rgba(255, 107, 53, 0.24), transparent 58%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 8%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, #000 8%, transparent 72%);
  opacity: 0.9;
}

.footer-inner { position: relative; }

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(48px, 6vw, 80px) clamp(32px, 4vw, 52px);
}

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

.footer-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  background: var(--cyan);
  color: var(--navy-deep);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.footer-brand-line {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.3;
  color: #FFFFFF;
  letter-spacing: 0.01em;
}

.footer-brand-sub {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(124, 243, 255, 0.62);
}

.footer-note {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(238, 243, 248, 0.46);
}

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

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(124, 243, 255, 0.62);
}

.footer-links li + li { margin-top: 2px; }

.footer-links a {
  display: inline-block;
  padding: 6px 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(238, 243, 248, 0.76);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(0, 229, 255, 0.5);
}

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

.contact-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(214, 226, 238, 0.14);
  font-size: 14px;
  line-height: 1.55;
}

.contact-label {
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(124, 243, 255, 0.6);
}

.contact-value {
  color: #EEF3F8;
  overflow-wrap: anywhere;
}

.contact-note {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(238, 243, 248, 0.48);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  padding-block: 20px 26px;
  border-top: 1px solid rgba(214, 226, 238, 0.14);
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(238, 243, 248, 0.52);
}

.footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
}

.footer-legal-nav a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(238, 243, 248, 0.62);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-legal-nav a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(0, 229, 255, 0.5);
}

/* ---------- 12. 显现协议 ---------- */
[data-reveal] { opacity: 1; }

.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

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

/* ---------- 13. 响应式 ---------- */
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

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

@media (max-width: 1140px) {
  :root { --header-h: 90px; }

  .header-consult { display: none; }

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

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    margin: 0;
    padding: 18px 24px 28px;
    background: var(--navy-deep);
    border-top: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: 0 28px 46px -26px rgba(0, 0, 0, 0.65);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), visibility 0.24s var(--ease);
  }

  .primary-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-list a {
    padding: 13px 14px;
    border: 1px solid rgba(214, 226, 238, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 14.5px;
  }

  .nav-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--orange); }

  .nav-extra {
    display: block;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(214, 226, 238, 0.16);
  }

  .nav-extra-title {
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(124, 243, 255, 0.6);
  }

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

  .nav-legal a {
    display: inline-flex;
    padding: 6px 12px;
    border: 1px solid rgba(214, 226, 238, 0.2);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    color: rgba(238, 243, 248, 0.72);
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
  }

  .nav-legal a:hover {
    border-color: var(--cyan);
    color: var(--cyan-soft);
  }

  .nav-cta {
    width: 100%;
    margin-top: 18px;
  }
}

@media (max-width: 960px) {
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1; grid-row: 1; }
  .footer-contact { grid-column: 2; grid-row: 1; }
  .footer-cols { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 720px) {
  :root { --header-h: 86px; }

  .wrap { padding-inline: 18px; }

  .header-rail { height: 26px; }
  .header-rail-inner { height: 26px; }
  .header-main { height: 60px; }
  .brand-mark { width: 38px; height: 38px; font-size: 12.5px; }
  .brand-line { font-size: 15px; }
  .brand-sub { display: none; }
  .header-primary { display: none; }
  .primary-nav { max-height: calc(100vh - 86px); padding-inline: 18px; }
  .nav-list { grid-template-columns: minmax(0, 1fr); }

  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-bottom { padding-block: 18px 24px; }
  .footer-legal-nav { margin-left: 0; }
}

@media (max-width: 520px) {
  .rail-note { display: none; }
  .rail-links { gap: 14px; }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-brand,
  .footer-contact,
  .footer-cols { grid-column: 1 / -1; grid-row: auto; }
  .contact-row { grid-template-columns: 42px minmax(0, 1fr); }
}

/* ---------- 14. 无障碍与降级动效 ---------- */
@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;
  }

  [data-reveal],
  .has-js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .chapter-num,
  [data-chapter].is-active .chapter-num {
    transform: none !important;
    color: rgba(0, 229, 255, 0.14);
    -webkit-text-stroke-color: var(--cyan);
  }

  .read-progress-bar { transition: none !important; }
}
