/* ============================================================
   bat365在线 · 共享外壳样式 /assets/site.css
   深墨蓝 + 蓝图网格 + 荧光青 / 暖橙 / 电光紫
   ============================================================ */

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

:root {
  --ink: #06121F;
  --panel: #0B1E33;
  --line: #1D3B55;
  --white: #EAF2F8;
  --muted: #9DB2C6;
  --cyan: #2EF2C8;
  --orange: #FF9F43;
  --purple: #8B5CF6;
  --paper: #F4E8D0;
  --green: #62D98A;

  --rail-w: 88px;
  --bar-h: 62px;
  --maxw: 1440px;

  --font-display: "Barlow Condensed", "DIN Condensed", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html.is-nav-locked { overflow: hidden; }

body {
  margin: 0;
  padding-left: var(--rail-w);
  min-height: 100vh;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  background-color: var(--ink);
  background-image:
    radial-gradient(60vw 58vh at 84% -12%, rgba(139, 92, 246, .18), transparent 66%),
    radial-gradient(46vw 46vh at 2% 106%, rgba(46, 242, 200, .10), transparent 70%),
    linear-gradient(rgba(29, 59, 85, .26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 59, 85, .26) 1px, transparent 1px);
  background-size: auto, auto, 88px 88px, 88px 88px;
  background-attachment: fixed, fixed, fixed, fixed;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 {
  margin: 0 0 .5em;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--white);
}

h1 { font-size: clamp(34px, 5.2vw, 64px); }
h2 { font-size: clamp(24px, 3vw, 40px); }
h3 { font-size: clamp(18px, 2vw, 24px); }

p { margin: 0 0 1em; }

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

ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

strong { color: var(--white); font-weight: 700; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 1px;
}

#main-content { scroll-margin-top: calc(var(--bar-h) + 16px); }

/* ---------- 通用排版组件 ---------- */

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--cyan);
  flex: none;
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--line), rgba(29, 59, 85, 0));
}

/* ---------- 布局容器 ---------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 32px;
}

.section { padding-block: 56px; }

.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 10px 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-bottom: 32px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 34px);
}

.section-more {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.section-more:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.btn--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(46, 242, 200, .18);
}

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

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

.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding-inline: 4px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.btn--quiet:hover { color: var(--cyan); border-color: var(--cyan); }

/* ---------- 卡片 ---------- */

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 22px;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}

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

.card__kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--orange);
  margin-bottom: 10px;
}

.card__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-family: var(--font-display);
  font-weight: 800;
}

.card--paper {
  background: var(--paper);
  border-color: #D9C9A6;
  color: #1A2432;
}

.card--paper .card__title { color: #0E1A28; }
.card--paper .card__kicker { color: #8A4E10; }
.card--paper p { color: #33415A; }

/* ---------- 标签 / 筛选 ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}

.chip:hover { color: var(--white); border-color: var(--cyan); }

.chip[aria-pressed="true"] {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(46, 242, 200, .12);
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1.5;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.tag--orange { color: var(--orange); }
.tag--cyan { color: var(--cyan); }

/* ---------- 面包屑 ---------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb__sep { color: var(--line); }

/* ---------- 图片容器基础规则 ---------- */

.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    repeating-linear-gradient(135deg, rgba(29, 59, 85, .35) 0 1px, transparent 1px 12px),
    linear-gradient(150deg, #0E2740 0%, #06121F 100%);
}

.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.media::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 2px;
  background: var(--cyan);
  z-index: 2;
}

.media::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 26px;
  background: var(--orange);
  z-index: 2;
}

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

.media__caption {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
}

/* ---------- 滚动进度条（由 site.js 注入） ---------- */

.scroll-meter {
  position: fixed;
  left: var(--rail-w);
  right: 0;
  bottom: 0;
  height: 2px;
  z-index: 80;
  pointer-events: none;
  background: rgba(29, 59, 85, .55);
}

.scroll-meter > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--purple) 55%, var(--orange));
}

/* ============================================================
   头部 / 侧边轨道
   ============================================================ */

.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  z-index: 60;
  display: flex;
}

.rail {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  height: 100%;
  padding: 16px 9px 18px;
  overflow-y: auto;
  background: linear-gradient(180deg, #0B1E33 0%, #081726 55%, #06121F 100%);
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.rail__top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  color: var(--white);
}

.brand-mark:hover { color: var(--white); }

.brand-mark__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .01em;
  color: var(--white);
}

.brand-mark__sub {
  margin-top: 6px;
  padding-left: .3em;
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--cyan);
}

.brand-mark__latin {
  margin-top: 6px;
  padding-left: .24em;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .24em;
  color: var(--muted);
}

.brand-mark--bar {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}

.brand-mark--bar .brand-mark__num { font-size: 20px; }
.brand-mark--bar .brand-mark__sub { margin-top: 0; font-size: 11px; }

.drawer__close { display: none; }

.rail__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rail__version {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--orange);
}

.rail__status {
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
  color: var(--green);
}

.nav {
  flex: 1 1 auto;
  min-height: 0;
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__item { margin: 0; }

.nav__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 2px;
  font-size: 12.5px;
  line-height: 1.2;
  letter-spacing: .02em;
  text-align: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}

.nav__link:hover {
  color: var(--white);
  border-color: var(--line);
  background: rgba(29, 59, 85, .35);
}

.nav__index {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--line);
  transition: color .18s var(--ease);
}

.nav__label { display: block; }

.nav__link[aria-current="page"] {
  color: var(--cyan);
  border-color: rgba(46, 242, 200, .45);
  background: rgba(46, 242, 200, .09);
}

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

.rail__cta {
  display: block;
  padding: 10px 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  letter-spacing: .02em;
  color: var(--ink);
  background: var(--orange);
  border: 1px solid var(--orange);
  border-radius: 2px;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.rail__cta:hover {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(46, 242, 200, .18);
}

.rail__legal { display: none; }

.mobile-bar { display: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

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

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

.nav-toggle__bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
}

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

.nav-scrim { display: none; }

/* ---------- 跳至主内容 ---------- */

.skip-link {
  position: fixed;
  top: 10px;
  left: calc(var(--rail-w) + 14px);
  z-index: 200;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--ink);
  background: var(--cyan);
  border-radius: 2px;
  transform: translateY(-220%);
  transition: transform .18s var(--ease);
}

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

/* ============================================================
   页脚 · 图纸角标
   ============================================================ */

.site-footer {
  position: relative;
  margin-top: 96px;
  padding: 56px 0 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 30, 51, .58) 0%, rgba(6, 18, 31, .96) 100%);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 96px;
  height: 1px;
  background: var(--cyan);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px 24px;
}

.footer__mark {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: .01em;
  color: var(--white);
  line-height: 1.1;
}

.footer__mark:hover { color: var(--cyan); }

.footer__tagline {
  margin: 12px 0 14px;
  max-width: 260px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.footer__icp {
  display: inline-block;
  margin: 0;
  padding: 4px 9px;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.footer__title {
  margin: 0 0 14px;
  padding-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--orange);
  border-bottom: 1px solid var(--line);
}

.footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.footer__links a {
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer__links a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.footer__contact p {
  margin: 0 0 8px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  word-break: break-word;
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.footer__meta a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer__meta a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

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

@media (min-width: 768px) {
  .section { padding-block: 88px; }
  .grid { gap: 24px; }
  .grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer__contact { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.35fr .85fr .85fr 1.45fr; }
  .footer__contact { grid-column: auto; }
}

@media (max-width: 1023px) {
  :root { --rail-w: 0px; }

  body {
    padding-left: 0;
    padding-top: var(--bar-h);
    background-size: auto, auto, 44px 44px, 44px 44px;
  }

  .site-header {
    inset: 0 0 auto 0;
    width: auto;
    height: var(--bar-h);
    display: block;
    background: #06121F;
    border-bottom: 1px solid var(--line);
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    height: var(--bar-h);
    padding: 0 18px;
  }

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    width: min(86vw, 336px);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding: 16px 18px 28px;
    gap: 18px;
    z-index: 62;
    transform: translateX(-104%);
    transition: transform .22s var(--ease);
    border-right: 1px solid var(--line);
  }

  .site-header[data-open] .rail { transform: translateX(0); }

  .rail__top {
    justify-content: space-between;
    padding-bottom: 14px;
  }

  .rail .brand-mark {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .rail .brand-mark__sub { margin-top: 0; font-size: 11px; }
  .rail .brand-mark__latin { margin-top: 0; font-size: 8px; }

  .drawer__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 14px;
    line-height: 1;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 2px;
    cursor: pointer;
    transition: color .18s var(--ease), border-color .18s var(--ease);
  }

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

  .rail__meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
  }

  .rail__status { font-size: 11px; text-align: right; }

  .nav { flex: 0 0 auto; }

  .nav__link {
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 14px;
    padding: 13px 12px;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    border: 0;
    border-bottom: 1px solid rgba(29, 59, 85, .55);
    border-left: 2px solid transparent;
    border-radius: 0;
  }

  .nav__link:hover {
    background: rgba(29, 59, 85, .3);
    border-color: transparent;
    border-bottom-color: rgba(29, 59, 85, .55);
  }

  .nav__index { font-size: 10px; }

  .nav__link[aria-current="page"] {
    color: var(--cyan);
    border-left: 2px solid var(--cyan);
    background: linear-gradient(90deg, rgba(46, 242, 200, .16), rgba(46, 242, 200, 0));
  }

  .rail__cta {
    margin-top: 4px;
    padding: 14px 10px;
    font-size: 14px;
  }

  .rail__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 12px;
  }

  .rail__legal a {
    color: var(--muted);
    border-bottom: 1px solid transparent;
  }

  .rail__legal a:hover { color: var(--cyan); border-color: var(--cyan); }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 61;
    background: rgba(3, 9, 16, .74);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s var(--ease), visibility .2s var(--ease);
  }

  .site-header[data-open] .nav-scrim {
    opacity: 1;
    visibility: visible;
  }

  .skip-link { left: 14px; }

  .scroll-meter { left: 0; }

  .section-head { grid-template-columns: auto 1fr; }
  .section-more { grid-column: 2; justify-self: start; }
}

@media (max-width: 560px) {
  .container { padding-inline: 20px; }
  .section { padding-block: 44px; }
  .site-footer { margin-top: 64px; padding-top: 44px; }
  .footer__meta { font-size: 11.5px; gap: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
