/* ==========================================================================
   6676网页 · 共享站点样式  /assets/site.css
   深海青通道 · 珊瑚橙航标 · 沙岩旧版分区
   ========================================================================== */

/* ---------- 1. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }

/* ---------- 2. 设计变量 ---------- */
:root {
  --c-deep: #0B3C49;
  --c-channel: #165A6B;
  --c-electric: #5BC0BE;
  --c-coral: #FF6B4A;
  --c-coral-soft: #FFB39B;
  --c-sand: #D9C6A5;
  --c-warm: #F4EFE6;
  --c-mist: #F4F7F5;
  --c-ink: #101820;
  --c-ink-soft: #12212A;
  --c-slate: #5C6B73;

  --font-head: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --frame: 3px;
  --radius: 2px;
  --shadow-hard: 8px 8px 0 var(--c-ink);
  --bar-h: 4.75rem;
  --wrap: 1220px;
}

/* ---------- 3. 中文排版基础 ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--c-ink);
  background: var(--c-mist);
  padding-top: var(--bar-h);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; line-height: 1.08; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); line-height: 1.25; }
p { max-width: 34em; }
code, kbd, samp, pre { font-family: var(--font-mono); }
#main-content { scroll-margin-top: calc(var(--bar-h) + 1.25rem); }

/* ---------- 4. 容器与骨架 ---------- */
.container { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 90;
  display: inline-block;
  padding: 0.8rem 1.15rem;
  background: var(--c-coral);
  color: var(--c-ink-soft);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  border: var(--frame) solid var(--c-ink);
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0.6rem; }

/* ---------- 6. 顶部路径进度条 ---------- */
.route-progress {
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: rgba(244, 247, 245, 0.14);
  overflow: hidden;
}
.route-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--c-electric), var(--c-coral));
  transition: transform 0.12s linear;
}

/* ---------- 7. 命令栏 ---------- */
.command-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--c-deep);
  color: var(--c-mist);
  border-bottom: var(--frame) solid var(--c-ink);
}
.command-bar__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
  min-height: var(--bar-h);
  padding-top: 4px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--c-mist);
  padding: 0.3rem 0.2rem;
  flex: none;
}
.brand-mark__beacon {
  width: 13px;
  height: 13px;
  flex: none;
  background: var(--c-coral);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.2), 0 0 14px rgba(255, 107, 74, 0.6);
}
.brand-mark__stack { display: flex; flex-direction: column; line-height: 1.12; }
.brand-mark__name { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; letter-spacing: 0.01em; }
.brand-mark__tag { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.22em; color: var(--c-electric); }

.path-index {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
  padding: 0.35rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--c-electric);
  border: 2px solid rgba(244, 247, 245, 0.28);
}
.path-index__num { font-weight: 700; font-size: 0.92rem; color: var(--c-coral-soft); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--c-mist);
  border: 2px solid rgba(244, 247, 245, 0.35);
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.nav-toggle__bars { display: grid; gap: 3.5px; width: 20px; }
.nav-toggle__bars span { display: block; height: 2.5px; background: currentColor; }
.nav-toggle__text { white-space: nowrap; }
.command-bar[data-open="true"] .nav-toggle { background: var(--c-coral); border-color: var(--c-coral); color: var(--c-ink-soft); }

.command-nav { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; }
.command-nav__list { display: flex; align-items: center; gap: 0.15rem; }
.command-nav__link {
  display: block;
  padding: 0.45rem 0.7rem;
  font-size: 0.9rem;
  color: rgba(244, 247, 245, 0.82);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.command-nav__link:hover { color: #fff; background: rgba(244, 247, 245, 0.08); border-bottom-color: var(--c-coral-soft); }
.command-nav__link[aria-current="page"] {
  color: var(--c-ink-soft);
  background: var(--c-coral);
  border-bottom-color: var(--c-ink);
  font-weight: 700;
}
.command-nav__status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 30ch;
  padding-left: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.55;
  color: rgba(244, 247, 245, 0.62);
  border-left: 2px solid rgba(244, 247, 245, 0.2);
}
.status-lamp {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--c-electric);
  animation: lamp 2.6s ease-out infinite;
}
@keyframes lamp {
  0% { box-shadow: 0 0 0 0 rgba(91, 192, 190, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(91, 192, 190, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 192, 190, 0); }
}
.command-nav__cta { flex: none; padding: 0.62rem 1rem; font-size: 0.86rem; }

/* ---------- 8. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: var(--radius);
  background: var(--c-coral);
  color: var(--c-ink-soft);
  border: var(--frame) solid var(--c-ink);
  box-shadow: 5px 5px 0 var(--c-ink);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--c-ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--c-ink); }
.btn--coral { background: var(--c-coral); color: var(--c-ink-soft); }
.btn--deep { background: var(--c-deep); color: var(--c-mist); box-shadow: 5px 5px 0 var(--c-coral); }
.btn--deep:hover { box-shadow: 8px 8px 0 var(--c-coral); }
.btn--line { background: transparent; color: var(--c-ink); border-color: var(--c-ink); box-shadow: none; }
.btn--line:hover { background: var(--c-ink); color: var(--c-mist); transform: none; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--c-mist); border-color: rgba(244, 247, 245, 0.5); box-shadow: none; }
.btn--ghost:hover {
  background: var(--c-coral);
  border-color: var(--c-coral);
  color: var(--c-ink-soft);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(16, 24, 32, 0.4);
}

/* ---------- 9. 面包屑 ---------- */
.breadcrumb { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--c-slate); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.breadcrumb li { display: flex; align-items: center; gap: 0.45rem; }
.breadcrumb li + li::before { content: "/"; color: var(--c-coral); }
.breadcrumb a { text-decoration: none; border-bottom: 1px solid transparent; }
.breadcrumb a:hover { color: var(--c-deep); border-bottom-color: var(--c-coral); }

/* ---------- 10. 章节分区 ---------- */
.section { position: relative; padding-block: clamp(2.5rem, 6vw, 5rem); }
.section--warm { background: var(--c-warm); }
.section--sand { background: var(--c-sand); color: var(--c-ink); }
.section--deep { background: var(--c-deep); color: var(--c-mist); }
.section--channel { background: var(--c-channel); color: var(--c-mist); }
.section--edge { border-top: var(--frame) solid var(--c-ink); border-bottom: var(--frame) solid var(--c-ink); }

/* ---------- 11. 展签与眉题 ---------- */
.eyebrow {
  max-width: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--c-coral);
}
.plaque {
  display: inline-flex;
  align-items: stretch;
  max-width: none;
  border: 2px solid var(--c-ink);
  background: var(--c-mist);
  color: var(--c-ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}
.plaque__num {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.55rem;
  background: var(--c-coral);
  color: var(--c-ink-soft);
  font-weight: 700;
}
.plaque__label { display: inline-flex; align-items: center; padding: 0.35rem 0.75rem; }
.section--deep .plaque, .section--channel .plaque { background: var(--c-warm); border-color: var(--c-warm); }

/* ---------- 12. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border: var(--frame) solid var(--c-ink);
  box-shadow: var(--shadow-hard);
  background: var(--c-channel);
}
.media-frame__img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.media-frame__ph {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(155deg, var(--c-channel) 0%, var(--c-deep) 58%, var(--c-ink) 100%);
}
.media-frame__ph::after {
  content: "";
  display: block;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(91, 192, 190, 0.24) 48%, transparent 96%);
}
.media-frame__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 88%;
  padding: 0.45rem 0.8rem;
  background: var(--c-ink);
  color: var(--c-mist);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
}
.media-frame--wide .media-frame__img, .media-frame--wide .media-frame__ph { aspect-ratio: 21 / 9; }
.media-frame--tall .media-frame__img, .media-frame--tall .media-frame__ph { aspect-ratio: 3 / 4; }
.media-frame--sand .media-frame__ph { background: linear-gradient(150deg, var(--c-sand) 0%, #BCA483 70%, #8C7659 100%); }

/* ---------- 13. 网格 ---------- */
.grid { display: grid; gap: clamp(1rem, 2.4vw, 2rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--rail { grid-template-columns: minmax(0, 0.32fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); }

/* ---------- 14. 排版工具 ---------- */
.measure { max-width: 34em; }
.lede { font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.7; color: var(--c-slate); }
.section--deep .lede, .section--channel .lede, .site-footer .lede { color: rgba(244, 247, 245, 0.78); }
.mono { font-family: var(--font-mono); }
.num-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
  color: var(--c-coral);
}
.rule { border: 0; border-top: var(--frame) solid var(--c-ink); }
.flow > * + * { margin-top: 1.05em; }

/* ---------- 15. 章节目录跟随 ---------- */
.section-rail { position: sticky; top: calc(var(--bar-h) + 1.5rem); align-self: start; }
.section-rail__list { display: grid; gap: 0.1rem; }
.section-rail__link {
  display: block;
  padding: 0.5rem 0 0.5rem 0.85rem;
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--c-slate);
  border-left: 3px solid rgba(92, 107, 115, 0.25);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.section-rail__link:hover { color: var(--c-ink); border-left-color: var(--c-coral-soft); }
.section-rail__link[aria-current="true"] { color: var(--c-ink); font-weight: 700; border-left-color: var(--c-coral); }

/* ---------- 16. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(2rem, 5vw, 4rem);
  background: var(--c-deep);
  color: var(--c-mist);
}
.site-footer__rail {
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--c-channel) 0%, var(--c-electric) 42%, var(--c-coral-soft) 72%, var(--c-coral) 100%);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 1.15fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding-block: clamp(3rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
}
.footer-brand__name {
  max-width: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.1;
}
.footer-brand__summary {
  max-width: 32em;
  margin-top: 0.9rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: rgba(244, 247, 245, 0.72);
}
.footer-brand .btn { margin-top: 1.5rem; }
.footer-col { min-width: 0; }
.footer-col--contact { min-width: 0; }
.footer-col__title {
  max-width: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-electric);
}
.footer-links { display: grid; gap: 0.5rem; margin-top: 1.1rem; }
.footer-links a {
  display: inline-block;
  padding-bottom: 2px;
  font-size: 0.94rem;
  color: rgba(244, 247, 245, 0.86);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 247, 245, 0.2);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.footer-links a:hover { color: var(--c-coral-soft); border-bottom-color: var(--c-coral); }
.contact-list { display: grid; gap: 1rem; margin-top: 1.1rem; }
.contact-item { display: grid; gap: 0.2rem; }
.contact-item__key { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; color: rgba(244, 247, 245, 0.5); }
.contact-item__value { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.contact-item__text { font-family: var(--font-mono); font-size: 0.9rem; color: var(--c-mist); word-break: break-all; }
.copy-btn {
  padding: 0.25rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: rgba(244, 247, 245, 0.8);
  border: 2px solid rgba(244, 247, 245, 0.3);
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}
.copy-btn:hover { border-color: var(--c-coral); color: var(--c-coral-soft); }
.copy-btn[data-copied="true"] { border-color: var(--c-electric); color: var(--c-electric); background: rgba(91, 192, 190, 0.12); }
.footer-note {
  max-width: 38em;
  margin-top: 1.1rem;
  padding-left: 0.85rem;
  font-size: 0.8rem;
  line-height: 1.7;
  color: rgba(244, 247, 245, 0.6);
  border-left: 2px solid rgba(244, 247, 245, 0.2);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding-block: 1.25rem 2.25rem;
  border-top: 1px solid rgba(244, 247, 245, 0.16);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  letter-spacing: 0.06em;
  color: rgba(244, 247, 245, 0.58);
}
.footer-legal__item { max-width: none; }

/* ---------- 17. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 70;
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  background: var(--c-deep);
  color: var(--c-mist);
  border: var(--frame) solid var(--c-ink);
  box-shadow: 5px 5px 0 var(--c-coral);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.9rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background-color 0.16s ease, color 0.16s ease;
}
.to-top[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--c-coral); color: var(--c-ink-soft); }

/* ---------- 18. 焦点可见 ---------- */
:focus-visible { outline: 3px solid var(--c-coral); outline-offset: 3px; }

/* ---------- 19. 平板 ---------- */
@media (max-width: 1100px) {
  .command-nav__status { display: none; }
}
@media (max-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--rail { grid-template-columns: minmax(0, 1fr); }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- 20. 移动端命令栏 ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .command-nav {
    position: fixed;
    top: calc(var(--bar-h) + 3px);
    left: 0;
    right: 0;
    z-index: 59;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
    margin-left: 0;
    padding: 1.25rem 1.25rem 1.75rem;
    background: var(--c-deep);
    border-top: var(--frame) solid var(--c-coral);
    border-bottom: var(--frame) solid var(--c-ink);
    box-shadow: 0 18px 0 rgba(16, 24, 32, 0.16);
    max-height: calc(100vh - var(--bar-h));
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-1rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }
  .command-bar[data-open="true"] .command-nav { opacity: 1; visibility: visible; transform: none; }
  .command-nav__list { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .command-nav__link {
    padding: 0.8rem 0.9rem;
    font-size: 1rem;
    border-bottom: 2px solid rgba(244, 247, 245, 0.14);
  }
  .command-nav__link[aria-current="page"] { border-bottom-color: var(--c-coral); }
  .command-nav__status {
    display: flex;
    max-width: none;
    padding-left: 0;
    padding-top: 0.9rem;
    border-left: 0;
    border-top: 2px solid rgba(244, 247, 245, 0.16);
  }
  .command-nav__cta { width: 100%; padding: 0.85rem 1rem; font-size: 0.95rem; }
}

/* ---------- 21. 小屏 ---------- */
@media (max-width: 640px) {
  :root { --bar-h: 4.25rem; }
  body { font-size: 16px; }
  .container { width: min(var(--wrap), 100% - 1.75rem); }
  .command-bar__inner { width: min(var(--wrap), 100% - 1.5rem); gap: 0.6rem; }
  .path-index__label { display: none; }
  .brand-mark__tag { letter-spacing: 0.16em; }
  .nav-toggle__text { display: none; }
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
  .footer-legal { justify-content: flex-start; }
  .media-frame { box-shadow: 5px 5px 0 var(--c-ink); }
}

/* ---------- 22. 降低动效 ---------- */
@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;
  }
  .btn:hover, .btn:active, .btn--ghost:hover { transform: none; }
  .route-progress__bar { transition: none; }
  .to-top { transition: none; }
}
