/* ============================================================
   博赢BY 共享样式 / assets/site.css
   框架式导航 + 技术蓝图网格 + 夜间仪表盘
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #E6F1F2;
  background-color: #071A2B;
  background-image:
    linear-gradient(to right, rgba(47, 90, 110, 0.24) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(47, 90, 110, 0.16) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px;
  background-position: center top;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

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

table {
  border-collapse: collapse;
}

:focus-visible {
  outline: 2px solid #F2D27A;
  outline-offset: 3px;
  border-radius: 2px;
}

#main-content {
  scroll-margin-top: 110px;
}

/* ---------- 2. 设计变量 ---------- */
:root {
  --ink-900: #04101C;
  --ink-800: #071A2B;
  --ink-700: #0E2A41;
  --cyan: #39E0D4;
  --orange: #FF9E5A;
  --orange-hover: #FFB47E;
  --sage: #7E9C8F;
  --fog: #E6F1F2;
  --mist: #9BB3C4;
  --line: #2F5A6E;
  --focus: #F2D27A;

  --mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --shell: 1180px;
  --gutter: 28px;
}

/* ---------- 3. 排版工具 ---------- */
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #39E0D4;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: #39E0D4;
}

.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.8;
  color: #D3E3E6;
}

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

.prose h2 {
  margin-top: 2em;
  font-size: 22px;
  line-height: 1.35;
  color: #E6F1F2;
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 18px;
  line-height: 1.4;
  color: #E6F1F2;
}

.prose ul,
.prose ol {
  margin-top: 0.9em;
  padding-left: 1.2em;
  list-style: disc;
}

.prose li + li { margin-top: 0.4em; }

.prose a {
  color: #39E0D4;
  border-bottom: 1px solid rgba(57, 224, 212, 0.45);
}

.prose a:hover { border-bottom-color: #39E0D4; }

/* ---------- 4. 容器与栅格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 56px 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--aside { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  border: 1px solid transparent;
  text-align: center;
  transition: background-color 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn--primary {
  background: #FF9E5A;
  color: #04101C;
  border-color: #FF9E5A;
}

.btn--primary:hover {
  background: #FFB47E;
  border-color: #FFB47E;
}

.btn--accent {
  background: transparent;
  color: #39E0D4;
  border-color: #39E0D4;
}

.btn--accent:hover {
  background: rgba(57, 224, 212, 0.12);
  box-shadow: 0 0 0 3px rgba(57, 224, 212, 0.08);
}

.btn--ghost {
  background: transparent;
  color: #E6F1F2;
  border-color: #2F5A6E;
}

.btn--ghost:hover {
  border-color: #E6F1F2;
  background: rgba(14, 42, 65, 0.65);
}

.btn--block { width: 100%; }

/* ---------- 6. 面包屑 ---------- */
.breadcrumb {
  padding: 20px 0 0;
  font-size: 12.5px;
  color: #9BB3C4;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.breadcrumb-link {
  color: #9BB3C4;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.breadcrumb-link:hover {
  color: #39E0D4;
  border-bottom-color: #39E0D4;
}

.breadcrumb-sep {
  font-family: var(--mono);
  color: #2F5A6E;
}

.breadcrumb-current { color: #E6F1F2; }

/* ---------- 7. 基础组件 ---------- */
.panel {
  position: relative;
  background: #0E2A41;
  border: 1px solid #2F5A6E;
  padding: 26px 24px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.panel:hover {
  border-color: rgba(57, 224, 212, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -26px rgba(0, 0, 0, 0.9);
}

.panel-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: #E6F1F2;
}

.panel-text {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.75;
  color: #9BB3C4;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  border: 1px solid #2F5A6E;
  background: rgba(4, 16, 28, 0.5);
  color: #9BB3C4;
}

.tag--live {
  color: #39E0D4;
  border-color: rgba(57, 224, 212, 0.5);
}

.tag--warm {
  color: #04101C;
  background: #FF9E5A;
  border-color: #FF9E5A;
  font-weight: 700;
}

.tag--legacy {
  color: #E6F1F2;
  border-color: #7E9C8F;
  background: rgba(126, 156, 143, 0.16);
}

.note {
  border-left: 2px solid #7E9C8F;
  padding: 2px 0 2px 14px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #9BB3C4;
}

/* 图片容器基础规则（页面阶段放置 <img> 或占位） */
.media-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid #2F5A6E;
  background-color: #0E2A41;
  background-image:
    linear-gradient(135deg, rgba(47, 90, 110, 0.38) 0%, rgba(4, 16, 28, 0.92) 72%),
    repeating-linear-gradient(0deg, rgba(47, 90, 110, 0.22) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(47, 90, 110, 0.22) 0 1px, transparent 1px 28px);
}

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

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

.media-frame--flat {
  background-image: linear-gradient(135deg, rgba(47, 90, 110, 0.3) 0%, rgba(4, 16, 28, 0.9) 70%);
}

.media-frame__label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #9BB3C4;
  background: rgba(4, 16, 28, 0.82);
  border: 1px solid #2F5A6E;
}

/* ---------- 8. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 200;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #04101C;
  background: #F2D27A;
  border-radius: 0 0 4px 4px;
  transition: top 0.16s ease;
}

.skip-link:focus {
  top: 0;
  outline-offset: -3px;
}

/* ---------- 9. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(7, 26, 43, 0.98) 0%, rgba(4, 16, 28, 0.99) 100%);
  border-bottom: 1px solid #2F5A6E;
}

.header-rail {
  border-bottom: 1px solid rgba(47, 90, 110, 0.55);
  background: rgba(4, 16, 28, 0.62);
}

.rail-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 32px;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  color: #9BB3C4;
}

.rail-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.rail-item--coord { color: #7E9C8F; }

.rail-item--label { color: #7E9C8F; }

.rail-item--status {
  margin-left: auto;
  color: #39E0D4;
}

.rail-item--host {
  color: #9BB3C4;
  opacity: 0.72;
}

.rail-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF9E5A;
  box-shadow: 0 0 0 3px rgba(255, 158, 90, 0.18);
}

.header-bar { position: relative; }

.bar-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  flex: 0 0 auto;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #39E0D4;
  color: #39E0D4;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(57, 224, 212, 0.32);
  pointer-events: none;
}

.brand-mark-text {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.brand:hover .brand-mark {
  background: rgba(57, 224, 212, 0.14);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #E6F1F2;
}

.brand-tagline {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: #9BB3C4;
}

/* 移动端按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #2F5A6E;
  color: #E6F1F2;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.nav-toggle:hover {
  border-color: #39E0D4;
  background: rgba(14, 42, 65, 0.7);
}

.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle-icon span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.nav-toggle-label { white-space: nowrap; }

/* 框架式导航 */
.primary-nav {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: stretch;
  margin-left: auto;
}

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 70px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 500;
  color: #9BB3C4;
  border-left: 1px solid rgba(47, 90, 110, 0.42);
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-num {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #2F5A6E;
  transition: color 0.18s ease;
}

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

.nav-link:hover,
.nav-link:focus-visible {
  color: #E6F1F2;
  background: rgba(14, 42, 65, 0.7);
}

.nav-link:hover .nav-num,
.nav-link:focus-visible .nav-num {
  color: #39E0D4;
}

.nav-link[aria-current="page"] {
  color: #E6F1F2;
  background: rgba(14, 42, 65, 0.55);
}

.nav-link[aria-current="page"] .nav-num { color: #39E0D4; }

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  background: #F2D27A;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #04101C;
  background: #FF9E5A;
  white-space: nowrap;
  transition: background-color 0.18s ease;
}

.nav-cta:hover { background: #FFB47E; }

/* 阅读进度线 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #39E0D4 0%, #FF9E5A 100%);
  pointer-events: none;
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  margin-top: 88px;
  background: #04101C;
  border-top: 1px solid #2F5A6E;
  color: #9BB3C4;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.25fr 1.15fr 1.05fr;
  gap: 48px;
  padding: 64px 0 48px;
}

.footer-wordmark {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #E6F1F2;
}

.footer-wordmark::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  margin-top: 12px;
  background: #39E0D4;
}

.footer-summary {
  margin-top: 18px;
  max-width: 30ch;
  font-size: 14.5px;
  line-height: 1.75;
  color: #9BB3C4;
}

.footer-meta {
  margin-top: 20px;
  padding-left: 10px;
  border-left: 2px solid #7E9C8F;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #7E9C8F;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.footer-group-title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #E6F1F2;
  border-bottom: 1px solid rgba(47, 90, 110, 0.62);
}

.footer-list {
  display: grid;
  gap: 10px;
}

.footer-link {
  position: relative;
  display: inline-block;
  padding-left: 14px;
  font-size: 14.5px;
  color: #9BB3C4;
  transition: color 0.16s ease, padding-left 0.16s ease;
}

.footer-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: #2F5A6E;
  transition: width 0.16s ease, background-color 0.16s ease;
}

.footer-link:hover {
  color: #39E0D4;
  padding-left: 18px;
}

.footer-link:hover::before {
  width: 10px;
  background: #39E0D4;
}

.contact-list {
  display: grid;
  gap: 14px;
}

.contact-item {
  display: grid;
  gap: 2px;
  font-size: 14px;
  line-height: 1.6;
}

.contact-key {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: #7E9C8F;
}

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

.contact-value.mono { font-size: 13.5px; }

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #39E0D4;
  border: 1px solid #39E0D4;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.footer-cta:hover {
  background: #39E0D4;
  color: #04101C;
}

.footer-base {
  border-top: 1px solid rgba(47, 90, 110, 0.5);
  background: rgba(0, 0, 0, 0.22);
  padding: 18px 0;
}

.base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  font-size: 12.5px;
  color: #9BB3C4;
  opacity: 0.82;
}

.base-copy { color: #9BB3C4; }

.base-icp { color: #7E9C8F; }

.base-note { margin-left: auto; color: #2F5A6E; }

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-contact { grid-column: 1 / -1; }

  .nav-link { padding: 0 13px; font-size: 14px; }
}

@media (max-width: 980px) {
  :root { --gutter: 20px; }

  .rail-inner {
    gap: 12px;
    min-height: 30px;
    font-size: 10.5px;
  }

  .rail-item--coord { display: none; }

  .rail-item--host { display: none; }

  .rail-item--status { margin-left: auto; }

  .bar-inner {
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 0;
  }

  .brand { padding: 0; }

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

  .primary-nav {
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    margin-top: 12px;
    padding-top: 6px;
    border-top: 1px solid #2F5A6E;
  }

  .primary-nav[data-open="true"] { display: flex; }

  .nav-list {
    flex-direction: column;
    margin-left: 0;
  }

  .nav-item { display: block; }

  .nav-link {
    width: 100%;
    min-height: 50px;
    padding: 0 4px;
    border-left: 0;
    border-bottom: 1px solid rgba(47, 90, 110, 0.42);
  }

  .nav-link[aria-current="page"] { background: rgba(14, 42, 65, 0.5); }

  .nav-link[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 10px;
    bottom: 10px;
    width: 3px;
    height: auto;
  }

  .nav-cta {
    margin-top: 16px;
    min-height: 48px;
    width: 100%;
  }

  .footer-top { padding: 48px 0 36px; }

  .site-footer { margin-top: 64px; }

  .section { padding: 44px 0; }
}

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

  .grid--2,
  .grid--3,
  .grid--aside { grid-template-columns: minmax(0, 1fr); }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .footer-nav { grid-template-columns: 1fr 1fr; gap: 24px; }

  .base-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .base-note { margin-left: 0; }

  .brand-name { font-size: 16.5px; }

  .brand-tagline { display: none; }

  .section-head { align-items: flex-start; }
}

@media (max-width: 420px) {
  .rail-item--label { display: none; }

  .nav-toggle-label { display: none; }

  .nav-toggle { padding: 11px; }

  .footer-nav { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 12. 动效偏好 ---------- */
@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;
  }

  .panel:hover {
    transform: none;
    box-shadow: none;
  }
}
