/* ============================================================
   德赢导航 · /assets/site.css
   共享外壳与通用组件：reset / 变量 / 中文排版 / 头部 / 页脚 /
   按钮 / 面包屑 / 容器 / 网格 / 图片容器
   ============================================================ */

:root {
  /* 色彩体系 */
  --base: #0B2E4F;
  --shade: #071E33;
  --surface: #123A5E;
  --signal: #00E5C7;
  --mint: #7CF3E4;
  --diff: #FF7A3D;
  --diff-deep: #E85F1F;
  --paper: #F5F7FA;
  --ink: #101820;
  --muted: #8AA0B4;
  --grid: #C9D6E2;

  /* 线条 */
  --line: rgba(201, 214, 226, 0.16);
  --line-strong: rgba(201, 214, 226, 0.30);
  --line-signal: rgba(0, 229, 199, 0.45);

  /* 字体 */
  --font-display: "DIN Condensed", "Oswald", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 形状与尺度 */
  --r-card: 20px;
  --r-pill: 28px;
  --shell: 1280px;
  --gap: 24px;
  --block: 96px;
  --rail-w: 72px;
}

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

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

body {
  margin: 0;
  background-color: var(--base);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd { margin: 0; }

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

button { font: inherit; color: inherit; }

a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--signal); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

/* ---------- 焦点可见 ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 400;
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background-color: var(--signal);
  color: var(--base);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: top 180ms ease;
}

.skip-link:focus { top: 14px; color: var(--base); }

/* ============================================================
   头部
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: var(--shade);
  border-bottom: 1px solid var(--line);
}

/* 滚动进度条 */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background-color: rgba(0, 229, 199, 0.12);
  pointer-events: none;
}

.scroll-meter__fill {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  background-image: linear-gradient(90deg, var(--signal), var(--mint));
}

/* 状态栏 */
.status-bar {
  background-color: var(--shade);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.status-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 8px 24px;
  color: var(--muted);
}

.status-bar__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(0, 229, 199, 0.16);
}

.status-bar__text { color: var(--muted); }

/* 面包屑 */
.crumbs { min-width: 0; }

.crumbs__list {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.crumbs__item { display: inline-flex; align-items: center; min-width: 0; }

.crumbs__link {
  color: var(--mint);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.crumbs__link:hover { color: var(--signal); border-bottom-color: var(--line-signal); }

.crumbs__sep { color: rgba(138, 160, 180, 0.5); }

.crumbs__current {
  display: block;
  max-width: 42vw;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--paper);
}

/* 报头 */
.masthead {
  position: relative;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 20px 24px 0;
}

.masthead__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.masthead__aside {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.masthead__aside--right { justify-content: flex-end; }

.masthead__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--paper);
  text-align: center;
}

.masthead__brand:hover { color: var(--paper); }

.masthead__wordmark {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  color: var(--paper);
}

.masthead__tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.masthead__delta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.masthead__contact {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: color 180ms ease, border-color 180ms ease;
}

.masthead__contact:hover { color: var(--signal); border-color: var(--line-signal); }

/* 徽标 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--line-signal);
  border-radius: var(--r-pill);
  background-color: rgba(0, 229, 199, 0.08);
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.badge--diff {
  border-color: rgba(255, 122, 61, 0.5);
  background-color: rgba(255, 122, 61, 0.1);
  color: var(--diff);
}

.badge--quiet {
  border-color: var(--line-strong);
  background-color: transparent;
  color: var(--muted);
}

/* 移动目录按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background-color: transparent;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}

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

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition: background-color 180ms ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition: transform 200ms ease, top 200ms ease;
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

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

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

/* 主导航（移动优先） */
.primary-nav {
  display: none;
  margin-top: 16px;
  padding: 8px 0 18px;
  border-top: 1px solid var(--line);
  background-color: var(--shade);
}

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

.primary-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.primary-nav__item { width: 100%; }

.primary-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: 0.03em;
  transition: color 180ms ease, background-color 180ms ease;
}

.primary-nav__link:hover { color: var(--paper); background-color: rgba(201, 214, 226, 0.06); }

.primary-nav__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(138, 160, 180, 0.72);
}

.primary-nav__label { line-height: 1.5; }

.primary-nav__link[aria-current="page"] {
  color: var(--signal);
  background-color: rgba(0, 229, 199, 0.08);
}

.primary-nav__link[aria-current="page"] .primary-nav__index { color: var(--signal); }

.primary-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background-color: var(--signal);
}

/* 平板及以上：横向刊头索引 */
@media (min-width: 901px) {
  .primary-nav {
    display: block;
    margin-top: 14px;
    padding: 0;
    border-top: 1px solid var(--line);
    background-color: transparent;
  }

  .primary-nav__list {
    flex-direction: row;
    justify-content: center;
    gap: 2px;
  }

  .primary-nav__item { width: auto; }

  .primary-nav__link {
    padding: 14px 15px;
    border-radius: 14px 14px 0 0;
    font-size: 15px;
  }

  .primary-nav__link:hover { background-color: transparent; }

  .primary-nav__link[aria-current="page"] { background-color: transparent; }

  .primary-nav__link[aria-current="page"]::after {
    left: 15px;
    right: 15px;
    top: auto;
    bottom: 6px;
    width: auto;
    height: 2px;
  }
}

@media (max-width: 900px) {
  .site-header { position: static; }

  .masthead { padding: 16px 16px 0; }

  .masthead__inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .masthead__aside { display: none; }

  .masthead__brand {
    align-items: flex-start;
    text-align: left;
    gap: 2px;
  }

  .masthead__wordmark { font-size: 24px; }
  .masthead__tagline { letter-spacing: 0.08em; }

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

  .status-bar__inner { padding: 8px 16px; }
  .status-bar__text { display: none; }
  .crumbs__current { max-width: 48vw; }
  .badge { font-size: 11px; padding: 3px 10px; }
}

/* ============================================================
   页脚
   ============================================================ */

.site-footer { position: relative; }

/* 蓝图带 */
.blueprint-band {
  position: relative;
  height: 72px;
  overflow: hidden;
  border-top: 1px solid var(--line-signal);
  background-color: var(--shade);
  background-image:
    linear-gradient(to right, rgba(201, 214, 226, 0.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201, 214, 226, 0.10) 1px, transparent 1px);
  background-size: 64px 100%, 100% 24px;
}

.blueprint-band__scale {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15px;
  height: 6px;
  background-image: repeating-linear-gradient(
    to right,
    rgba(201, 214, 226, 0.42) 0,
    rgba(201, 214, 226, 0.42) 1px,
    transparent 1px,
    transparent 64px
  );
}

/* 页脚主体 */
.footer-body {
  padding: 64px 24px 28px;
  background-color: var(--shade);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.7fr;
  gap: 36px 28px;
  max-width: var(--shell);
  margin: 0 auto;
}

.footer-brand__mark {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--paper);
}

.footer-brand__mark:hover { color: var(--signal); }

.footer-brand__line {
  max-width: 30ch;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.footer-brand__meta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mint);
}

.footer-col__title,
.footer-contact__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.footer-col__list { display: flex; flex-direction: column; gap: 10px; }

.footer-col__link {
  display: inline-block;
  color: var(--paper);
  font-size: 15px;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.footer-col__link:hover { color: var(--signal); border-bottom-color: var(--line-signal); }

.footer-contact__list { display: flex; flex-direction: column; gap: 12px; }

.footer-contact__item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
  line-height: 1.7;
}

.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 1px;
}

.footer-contact__val {
  color: var(--paper);
  word-break: break-word;
}

/* 版权条 */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--shell);
  margin: 48px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.footer-legal__copy { margin: 0; }
.footer-legal__icp { margin: 0; color: var(--muted); }

/* 快捷坞 */
.quickdock {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 180;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.quickdock__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid var(--line-signal);
  border-radius: var(--r-pill);
  background-color: rgba(7, 30, 51, 0.92);
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.quickdock__btn:hover {
  background-color: var(--signal);
  color: var(--base);
  transform: translateY(-2px);
}

.quickdock__btn[hidden] { display: none; }

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .footer-body { padding: 48px 16px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-contact { grid-column: 1 / -1; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 36px; }
  .quickdock { right: 14px; bottom: 14px; }
  .quickdock__btn { padding: 11px 16px; }
}

/* ============================================================
   通用容器 / 章节
   ============================================================ */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: 24px;
}

.section { padding-block: var(--block); }

.section--tight { padding-block: 56px; }

.section__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: 24px;
}

.section--paper {
  background-color: var(--paper);
  color: var(--ink);
}

.section--paper .section__title { color: var(--base); }
.section--paper .section__lede { color: #45596B; }
.section--paper .eyebrow { color: var(--base); }
.section--paper a { color: var(--base); }
.section--paper a:hover { color: var(--diff-deep); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 36px;
}

.section__title {
  font-size: 32px;
  line-height: 1.2;
  color: var(--paper);
}

.section__lede {
  max-width: 62ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background-color: currentColor;
}

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

@media (max-width: 900px) {
  :root { --block: 64px; }
  .section__title { font-size: 24px; }
  .shell,
  .section__inner { padding-inline: 16px; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.btn--primary {
  background-color: var(--signal);
  border-color: var(--signal);
  color: var(--base);
}

.btn--primary:hover {
  background-color: var(--mint);
  border-color: var(--mint);
  color: var(--base);
}

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

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

.btn--quiet {
  background-color: rgba(0, 229, 199, 0.08);
  border-color: var(--line-signal);
  color: var(--signal);
}

.btn--quiet:hover {
  background-color: rgba(0, 229, 199, 0.16);
  color: var(--mint);
}

/* ============================================================
   面板 / 网格 / 图片容器
   ============================================================ */

.panel {
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  background-color: var(--surface);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

@media (max-width: 1024px) {
  .col-3,
  .col-4 { grid-column: span 6; }
  .col-6,
  .col-8 { grid-column: span 12; }
}

@media (max-width: 640px) {
  .grid { gap: 16px; }
  .col-3,
  .col-4,
  .col-6,
  .col-8,
  .col-12 { grid-column: span 12; }
}

/* 图片 / 示意图容器 */
.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  background-color: var(--surface);
}

.figure__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--surface);
  background-image:
    radial-gradient(120% 120% at 0% 0%, rgba(0, 229, 199, 0.14), transparent 60%),
    linear-gradient(160deg, rgba(18, 58, 94, 0.92), rgba(7, 30, 51, 0.96));
}

.figure__media > img,
.figure__media > svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.figure--tall .figure__media { aspect-ratio: 4 / 5; }
.figure--square .figure__media { aspect-ratio: 1 / 1; }

/* ============================================================
   左侧纵向索引轨道
   ============================================================ */

.rail { display: none; }

@media (min-width: 1100px) {
  .rail {
    display: block;
    position: sticky;
    top: 148px;
    flex: 0 0 var(--rail-w);
    width: var(--rail-w);
  }
}

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail__link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 12px 12px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  transition: color 240ms ease, border-color 240ms ease, background-color 240ms ease;
}

.rail__link:hover { color: var(--paper); background-color: rgba(201, 214, 226, 0.06); }

.rail__link[aria-current="true"] {
  color: var(--signal);
  border-left-color: var(--signal);
  background-color: rgba(0, 229, 199, 0.07);
}

.rail__index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(138, 160, 180, 0.72);
}

.rail__link[aria-current="true"] .rail__index { color: var(--signal); }

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

@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;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  .quickdock__btn:hover { transform: none; }
}

@media print {
  .site-header,
  .quickdock,
  .skip-link,
  .blueprint-band { display: none; }
  body { background: #fff; color: #000; }
}
