/* ==========================================================================
   Site Kit — 至尊信誉服务 / 海图坐标系统
   共享层：reset、变量、中文排版、页头、页脚、按钮、通用区块、媒体容器
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol { 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;
  cursor: pointer;
}

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

table { border-collapse: collapse; }

:root {
  /* 色彩 —— 高明度双色体系：钴蓝/墨黑为底，信号橙与灯塔金制造节奏 */
  --deep: #0B2545;
  --night: #05080F;
  --chart: #1D4E89;
  --mist: #8FB3C7;
  --steel: #C9D2DB;
  --paper: #F4F7FA;
  --signal: #FF6B1A;
  --gold: #F2B544;
  --coral: #D95C5C;
  --foam: #5FB7A3;

  /* 字体 —— 仅使用本地可用字体栈，不加载远程资源 */
  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 尺度 */
  --w-max: 1280px;
  --gutter: clamp(18px, 4.6vw, 64px);
  --hair: 1px solid rgba(143, 179, 199, 0.26);
  --header-h: 84px;
}

/* ---------- 中文排版基线 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--deep);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 7.2vw, 88px); }
h2 { font-size: clamp(28px, 3.6vw, 44px); }
h3 { font-size: clamp(20px, 2.1vw, 26px); }
h4 { font-size: 18px; letter-spacing: 0.04em; }

p { text-wrap: pretty; }

strong { font-weight: 700; }

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

/* ---------- 无障碍 ---------- */
.skip-link {
  position: fixed;
  top: -96px;
  left: 16px;
  z-index: 300;
  padding: 11px 18px;
  background: var(--signal);
  color: #0A1120;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid #0A1120;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

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

/* ==========================================================================
   页头 —— 刻度尺 / 进度线 / 左右分置
   ========================================================================== */

.chart-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--night);
  color: var(--paper);
  border-bottom: 1px solid rgba(143, 179, 199, 0.22);
}

.chart-header__scale {
  height: 7px;
  background:
    repeating-linear-gradient(90deg, rgba(242, 181, 68, 0.62) 0 1px, transparent 1px 24px),
    linear-gradient(90deg, var(--chart) 0%, var(--night) 62%, var(--night) 100%);
}

.chart-header__progress {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--signal), var(--gold));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

.chart-header__inner {
  max-width: var(--w-max);
  margin-inline: auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* --- 品牌标记 --- */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 0 1 auto;
}

.brand-mark__glyph {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(143, 179, 199, 0.42);
  background:
    linear-gradient(135deg, transparent 46%, var(--signal) 46%, var(--signal) 54%, transparent 54%),
    repeating-linear-gradient(90deg, rgba(143, 179, 199, 0.24) 0 1px, transparent 1px 11px),
    linear-gradient(160deg, rgba(29, 78, 137, 0.55), rgba(5, 8, 15, 0.9));
}

.brand-mark__glyph::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 7px;
  height: 7px;
  background: var(--gold);
}

.brand-mark__text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.brand-mark__name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.09em;
  color: var(--paper);
  white-space: nowrap;
}

.brand-mark__descriptor {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-mark--footer .brand-mark__glyph {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

.brand-mark--footer .brand-mark__name { font-size: 22px; }

/* --- 移动端工具栏按钮 --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(143, 179, 199, 0.42);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 1;
}

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

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--signal);
  transition: transform 0.25s ease;
}

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

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

.nav-toggle__text { white-space: nowrap; }

/* --- 导航轨 --- */
.nav-rail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.nav-rail__list {
  display: flex;
  align-items: center;
  gap: 2px;
  counter-reset: nav;
}

.nav-rail__list > li { counter-increment: nav; }

.nav-rail__list a {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--steel);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-rail__list a::before {
  content: counter(nav, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--mist);
  opacity: 0.72;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-rail__list a:hover {
  color: var(--paper);
  background: rgba(29, 78, 137, 0.45);
}

.nav-rail__list a:hover::before { color: var(--gold); opacity: 1; }

.nav-rail__list a[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--signal);
}

.nav-rail__list a[aria-current="page"]::before {
  color: var(--signal);
  opacity: 1;
}

.nav-rail__pier {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid rgba(143, 179, 199, 0.26);
}

.version-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
  border: 1px solid rgba(242, 181, 68, 0.4);
  padding: 5px 8px;
  white-space: nowrap;
}

/* ==========================================================================
   按钮族
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn--signal {
  background: var(--signal);
  border-color: var(--signal);
  color: #0A1120;
}

.btn--signal:hover { background: var(--gold); border-color: var(--gold); }
.btn--signal:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  border-color: rgba(143, 179, 199, 0.5);
  color: var(--paper);
}

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

.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--block { width: 100%; }

/* ==========================================================================
   页脚 —— 墨黑层次 / 四列 / 法律条
   ========================================================================== */

.chart-footer {
  position: relative;
  background: var(--night);
  color: var(--steel);
  border-top: 1px solid var(--chart);
}

.chart-footer::before {
  content: "";
  display: block;
  height: 6px;
  background:
    repeating-linear-gradient(90deg, rgba(242, 181, 68, 0.5) 0 1px, transparent 1px 24px),
    linear-gradient(90deg, rgba(29, 78, 137, 0.9), transparent 70%);
}

.chart-footer__inner {
  max-width: var(--w-max);
  margin-inline: auto;
  padding: 52px var(--gutter) 40px;
  display: grid;
  grid-template-columns: 1.6fr 0.72fr 0.72fr 1.05fr;
  gap: 40px 34px;
  align-items: start;
}

.chart-footer__brand { min-width: 0; }

.chart-footer__summary {
  margin-top: 18px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--mist);
}

.chart-footer__note {
  margin-top: 12px;
  max-width: 36ch;
  padding-left: 12px;
  border-left: 2px solid rgba(242, 181, 68, 0.55);
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(143, 179, 199, 0.85);
}

.chart-footer__col { min-width: 0; }

.foot-col__title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--gold);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(143, 179, 199, 0.22);
}

.foot-col__list li + li { margin-top: 10px; }

.foot-col__list a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--steel);
  transition: color 0.2s ease;
}

.foot-col__list a::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: var(--chart);
  transition: background 0.2s ease, transform 0.2s ease;
}

.foot-col__list a:hover { color: var(--paper); }

.foot-col__list a:hover::before {
  background: var(--signal);
  transform: rotate(45deg);
}

.chart-footer__contact-block { min-width: 0; }

.foot-contact__item {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
}

.foot-contact__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--mist);
}

.foot-contact__value {
  font-size: 14px;
  line-height: 1.65;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.chart-footer__base {
  border-top: 1px solid rgba(143, 179, 199, 0.18);
  background: rgba(5, 8, 15, 0.92);
}

.chart-footer__base-inner {
  max-width: var(--w-max);
  margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.chart-footer__copy { min-width: 0; }

.chart-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.chart-footer__legal a {
  color: var(--steel);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.chart-footer__legal a:hover {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

/* ==========================================================================
   通用内容层（页面阶段复用）
   ========================================================================== */

.content-shell {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
}

.prose > * + * { margin-top: 1.05em; }

.prose h2,
.prose h3 { margin-top: 1.8em; }

.prose ul,
.prose ol {
  padding-left: 1.4em;
  list-style: none;
}

.prose li { position: relative; }

.prose ul li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: 0.72em;
  width: 6px;
  height: 6px;
  background: var(--signal);
}

.prose ol { counter-reset: prose; }
.prose ol li { counter-increment: prose; }
.prose ol li::before {
  content: counter(prose, decimal-leading-zero);
  position: absolute;
  left: -1.7em;
  top: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--signal);
}

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

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

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--chart);
}

.breadcrumb a { transition: color 0.2s ease; }
.breadcrumb a:hover { color: var(--signal); }
.breadcrumb [aria-current="page"] { color: var(--steel); }

/* --- 章节头 --- */
.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(29, 78, 137, 0.35);
}

.section-head__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--signal);
}

.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: inherit;
}

.section-head__note {
  grid-column: 1 / -1;
  font-size: 14px;
  line-height: 1.7;
  max-width: 64ch;
  color: inherit;
  opacity: 0.72;
}

/* --- 坐标标签 --- */
.coord-tag {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 3px 8px;
  background: var(--signal);
  color: #0A1120;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  line-height: 1.6;
}

/* --- 入口锚点卡 --- */
.anchor-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px 20px;
  background: rgba(29, 78, 137, 0.18);
  border: 1px solid rgba(143, 179, 199, 0.3);
  transition: border-color 0.22s ease, background 0.22s ease;
}

.anchor-card:hover,
.anchor-card:focus-within {
  border-color: var(--signal);
  background: rgba(29, 78, 137, 0.32);
}

.anchor-card__code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.anchor-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--paper);
}

.anchor-card__desc {
  font-size: 14px;
  line-height: 1.72;
  color: var(--mist);
}

.anchor-card__link {
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--signal);
}

.anchor-card__link::after {
  content: "→";
  margin-left: 6px;
}

/* --- 媒体容器（页面阶段放入 img 即可） --- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(143, 179, 199, 0.35);
  background:
    repeating-linear-gradient(90deg, rgba(143, 179, 199, 0.14) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(0deg, rgba(143, 179, 199, 0.14) 0 1px, transparent 1px 32px),
    linear-gradient(140deg, var(--deep), var(--night) 72%);
}

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

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

.media-frame__caption {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

/* --- 网格 --- */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

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

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

/* --- 路径分隔线 --- */
.chart-rule {
  height: 1px;
  border: 0;
  margin-block: 32px;
  background: linear-gradient(90deg, var(--signal), rgba(143, 179, 199, 0.25) 42%, transparent 100%);
}

/* --- 状态与标签 --- */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
}

.status-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--foam);
  box-shadow: 0 0 0 3px rgba(95, 183, 163, 0.18);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid rgba(143, 179, 199, 0.42);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  line-height: 1.7;
}

.pill--signal { border-color: rgba(255, 107, 26, 0.62); color: var(--signal); }
.pill--gold { border-color: rgba(242, 181, 68, 0.62); color: var(--gold); }

/* --- 显现动效 --- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 1120px) {
  .nav-rail__list a { padding: 9px 9px; font-size: 13px; }
  .nav-rail__list a::before { display: none; }
  .version-chip { display: none; }
}

@media (max-width: 927px) {
  :root { --header-h: 74px; }

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

  .chart-header__inner { padding: 12px var(--gutter); gap: 12px; }

  .brand-mark__descriptor { display: none; }
  .brand-mark__name { font-size: 18px; }
  .brand-mark__glyph { flex-basis: 40px; width: 40px; height: 40px; }

  .nav-rail {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: block;
    flex: none;
    padding: 8px var(--gutter) 22px;
    background: var(--night);
    border-top: 1px solid rgba(143, 179, 199, 0.22);
    border-bottom: 1px solid var(--chart);
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height 0.38s ease, opacity 0.26s ease, visibility 0.38s ease;
  }

  .nav-rail[data-open] {
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }

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

  .nav-rail__list a {
    padding: 14px 6px;
    font-size: 15px;
    border-bottom: 1px solid rgba(143, 179, 199, 0.16);
    border-left: 2px solid transparent;
    border-top: 0;
    border-right: 0;
  }

  .nav-rail__list a::before { display: inline; font-size: 10px; }

  .nav-rail__list a[aria-current="page"] {
    border-bottom-color: rgba(143, 179, 199, 0.16);
    border-left-color: var(--signal);
    background: rgba(29, 78, 137, 0.32);
    padding-left: 14px;
  }

  .nav-rail__pier {
    margin-top: 18px;
    padding-left: 0;
    border-left: 0;
    justify-content: space-between;
    gap: 12px;
  }

  .version-chip { display: inline-block; }

  .chart-footer__inner {
    grid-template-columns: 1fr 1fr;
    padding-top: 40px;
    gap: 32px 26px;
  }

  .chart-footer__brand,
  .chart-footer__contact-block { grid-column: 1 / -1; }

  .chart-footer__summary,
  .chart-footer__note { max-width: 52ch; }
}

@media (max-width: 600px) {
  body { font-size: 15.5px; }

  .nav-toggle__text { display: none; }

  .chart-footer__inner {
    grid-template-columns: 1fr;
    padding-bottom: 30px;
  }

  .chart-footer__brand,
  .chart-footer__contact-block { grid-column: auto; }

  .chart-footer__base-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-head { grid-template-columns: 1fr; gap: 6px; }
  .section-head__note { grid-column: auto; }
}

/* ==========================================================================
   动效降级
   ========================================================================== */

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

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

  .chart-header__progress {
    transition: none !important;
  }

  .foot-col__list a:hover::before { transform: none; }
}
