/* ============================================================
   竞博 CN · 共享 Site Kit
   01 变量  02 Reset  03 中文排版  04 通用组件  05 头部  06 页脚  07 响应式
   ============================================================ */

/* ---------- 01 变量 ---------- */
:root {
  --blue: #0A4D8C;
  --blue-deep: #06325C;
  --blue-mid: #1E6DB0;
  --blue-mist: #7FA8CC;
  --blue-pale: #E4EDF6;
  --paper: #F7F9FC;
  --white: #FFFFFF;
  --orange: #FF6B35;
  --orange-deep: #C6410F;
  --orange-pale: #FFE3D6;
  --ink: #1A2530;
  --ink-soft: #5B6B7A;
  --line: rgba(127, 168, 204, 0.55);
  --line-soft: rgba(127, 168, 204, 0.32);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --pill: 999px;
  --shadow-1: 0 1px 0 rgba(6, 50, 92, 0.04), 0 14px 30px -22px rgba(6, 50, 92, 0.55);
  --shadow-2: 0 22px 46px -26px rgba(6, 50, 92, 0.65);
  --font-display: "Noto Sans SC", "Source Han Sans SC", "Source Han Sans CN", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, "Courier New", monospace;
  --bar-h: 68px;
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 44px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --space-section: clamp(44px, 6vw, 88px);
}

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

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

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

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

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

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

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

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 03 中文排版 ---------- */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

p { text-wrap: pretty; }

strong { font-weight: 700; }

::selection {
  background: var(--orange-pale);
  color: var(--orange-deep);
}

/* ---------- 04 通用组件 ---------- */
#main-content {
  display: block;
  scroll-margin-top: calc(var(--bar-h) + 16px);
}

.wrap {
  width: min(calc(100% - var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

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

.band--pale { background: var(--blue-pale); }

.idx {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-mid);
}

.idx::after {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--line);
}

.sec-head {
  display: grid;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 34px);
  max-width: 70ch;
}

.sec-head__title {
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 900;
  line-height: 1.2;
}

.sec-head__lede {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 38ch;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.crumbs a { color: var(--blue-mid); }

.crumbs a:hover { color: var(--blue); text-decoration: underline; }

.crumbs__sep { color: var(--blue-mist); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--cta {
  background: var(--orange);
  color: var(--blue-deep);
  box-shadow: 0 10px 20px -12px rgba(255, 107, 53, 0.95);
}

.btn--cta:hover { background: #FF8155; transform: translateY(-1px); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
}

.btn--ghost:hover { background: rgba(255, 255, 255, 0.2); }

.btn--blue {
  background: var(--blue);
  color: #FFFFFF;
}

.btn--blue:hover { background: var(--blue-deep); transform: translateY(-1px); }

.btn--outline {
  background: transparent;
  border-color: var(--blue-mid);
  color: var(--blue-mid);
}

.btn--outline:hover { background: var(--blue-pale); border-color: var(--blue); color: var(--blue); }

.btn--lg { height: 48px; padding: 0 26px; font-size: 15px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.tag--blue { background: var(--blue-pale); color: var(--blue); }
.tag--orange { background: var(--orange-pale); color: var(--orange-deep); }
.tag--outline { border: 1px solid var(--line); color: var(--ink-soft); }

.note {
  border-left: 3px solid var(--orange);
  padding: 2px 0 2px 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.panel {
  background: var(--blue-pale);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 36px);
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(18px, 2vw, 26px);
  box-shadow: var(--shadow-1);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 0;
  background: var(--orange);
  border-radius: 0 3px 3px 0;
  transition: width 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: rgba(127, 168, 204, 0.85);
}

.card:hover::before { width: 24px; }

.card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.card__meta {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.grid--12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

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

.prose { max-width: 64ch; }
.prose p + p { margin-top: 1em; }

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--blue-pale);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

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

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

.media--ph {
  display: grid;
  place-items: center;
  background-image: radial-gradient(rgba(127, 168, 204, 0.45) 1px, transparent 1px);
  background-size: 16px 16px;
}

.media--ph::after {
  content: attr(data-placeholder);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--blue-mid);
  padding: 6px 12px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.85);
}

.media__caption {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* 滚动显现 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

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

/* 返回顶部 */
.to-top {
  position: fixed;
  right: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--pill);
  background: var(--blue);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  box-shadow: var(--shadow-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s var(--ease), background-color 0.2s var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover { background: var(--blue-deep); }

.to-top__arrow {
  width: 8px;
  height: 8px;
  border-left: 2px solid var(--orange);
  border-top: 2px solid var(--orange);
  transform: rotate(45deg);
}

.to-top__text { padding-top: 1px; }

/* ---------- 05 头部 ---------- */
.skip-link {
  position: absolute;
  top: -120px;
  left: var(--gutter);
  z-index: 200;
  padding: 12px 22px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--orange);
  color: var(--blue-deep);
  font-size: 14px;
  font-weight: 700;
  transition: top 0.22s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { top: 0; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blue);
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px -26px rgba(6, 50, 92, 0.95);
}

.masthead__bar {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 22px);
  width: min(calc(100% - var(--gutter) * 2), var(--wrap));
  height: var(--bar-h);
  margin-inline: auto;
  transition: height 0.28s var(--ease);
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  border-radius: var(--pill);
}

.masthead__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--orange);
  color: var(--blue-deep);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.masthead__name {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.masthead__ver {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.masthead__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--pill);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}

.masthead__toggle:hover { background: rgba(255, 255, 255, 0.16); }

.masthead__toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #FFFFFF;
  transition: background-color 0.2s var(--ease);
}

.masthead__toggle-bars::before,
.masthead__toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #FFFFFF;
  transition: transform 0.24s var(--ease);
}

.masthead__toggle-bars::before { top: -5px; }
.masthead__toggle-bars::after { top: 5px; }

.masthead__toggle[aria-expanded="true"] .masthead__toggle-bars { background: transparent; }
.masthead__toggle[aria-expanded="true"] .masthead__toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.masthead__toggle[aria-expanded="true"] .masthead__toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

.nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--pill);
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--blue-mist);
  transition: color 0.2s var(--ease);
}

.nav__link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.nav__link:hover .nav__idx { color: #FFFFFF; }

.nav__link[aria-current="page"] {
  background: var(--orange);
  color: var(--blue-deep);
  font-weight: 700;
}

.nav__link[aria-current="page"] .nav__idx {
  color: var(--blue-deep);
  opacity: 0.72;
}

.masthead__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
}

.lookup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.lookup:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
  color: #FFFFFF;
}

.lookup__icon {
  position: relative;
  display: block;
  width: 13px;
  height: 13px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  flex: none;
}

.lookup__icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  transform: rotate(45deg);
}

.lookup__text { letter-spacing: 0.01em; }

.masthead__progress {
  position: relative;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.masthead__progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--orange);
  transition: width 0.1s linear;
}

/* ---------- 06 页脚 ---------- */
.site-foot {
  position: relative;
  margin-top: var(--space-section);
  background: var(--blue-deep);
  color: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.site-foot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(127, 168, 204, 0.3) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.35;
  pointer-events: none;
}

.site-foot__inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
  padding-block: clamp(36px, 5vw, 64px) clamp(20px, 3vw, 32px);
}

.site-foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.3fr 0.8fr;
  gap: clamp(24px, 3vw, 48px);
}

.site-foot__col { min-width: 0; }

.site-foot__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
}

.site-foot__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--orange);
  color: var(--blue-deep);
  font-size: 16px;
  font-weight: 900;
}

.site-foot__name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.site-foot__lede {
  margin-top: 14px;
  max-width: 26ch;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.site-foot__vers {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: var(--blue-mist);
}

.site-foot__title {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #FFFFFF;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.site-foot__list {
  display: grid;
  gap: 9px;
}

.site-foot__link {
  display: inline-block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.site-foot__link:hover {
  color: #FFFFFF;
  border-color: var(--orange);
}

.site-foot__contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  font-size: 14px;
  line-height: 1.7;
}

.site-foot__label {
  flex: none;
  min-width: 62px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--blue-mist);
}

.site-foot__value {
  color: #FFFFFF;
  overflow-wrap: anywhere;
}

.site-foot__hint {
  margin-top: 16px;
  padding: 10px 14px;
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 107, 53, 0.14);
  font-size: 13px;
  line-height: 1.65;
  color: var(--orange-pale);
}

.site-foot__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(26px, 4vw, 44px);
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
}

.site-foot__copy,
.site-foot__icp { line-height: 1.6; }

/* ---------- 07 响应式 ---------- */
@media (max-width: 1439px) {
  .nav__link { padding: 7px 10px; font-size: 13.5px; }
}

@media (max-width: 1359px) {
  .lookup { padding: 0 12px; justify-content: center; }
  .lookup__text { display: none; }
  .masthead__name { font-size: 18px; }
}

@media (max-width: 1179px) {
  :root { --bar-h: 60px; }

  .masthead__toggle { display: inline-flex; }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: block;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: var(--blue-deep);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 26px 44px -30px rgba(0, 0, 0, 0.85);
    transition: max-height 0.34s var(--ease), visibility 0.34s var(--ease);
  }

  .nav[data-open] {
    max-height: min(72vh, 520px);
    overflow-y: auto;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: min(calc(100% - var(--gutter) * 2), var(--wrap));
    margin-inline: auto;
    padding: 8px 0 16px;
  }

  .nav__item + .nav__item { border-top: 1px solid rgba(255, 255, 255, 0.12); }

  .nav__link {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 8px;
    border-radius: 12px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.92);
  }

  .nav__idx { font-size: 11px; }

  .nav__link[aria-current="page"] {
    background: var(--orange);
    color: var(--blue-deep);
    padding-inline: 12px;
  }

  .site-foot__grid { grid-template-columns: 1fr 1fr; }
  .site-foot__col--brand { grid-column: span 2; }
  .site-foot__lede { max-width: 42ch; }
}

@media (max-width: 1023px) {
  .grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-3, .col-4, .col-5 { grid-column: span 3; }
  .col-6, .col-7, .col-8 { grid-column: span 6; }
}

@media (min-width: 1180px) {
  .masthead[data-compact] .masthead__bar { height: 52px; }

  .masthead[data-compact] .lookup,
  .masthead[data-compact] .btn--ghost { display: none; }
}

@media (max-width: 719px) {
  .grid--12 { grid-template-columns: minmax(0, 1fr); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-12 { grid-column: span 1; }

  .sec-head__lede { max-width: none; }

  .site-foot__grid { grid-template-columns: minmax(0, 1fr); }
  .site-foot__col--brand { grid-column: span 1; }

  .site-foot__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 559px) {
  .masthead__ver { display: none; }
  .masthead__name { font-size: 17px; }
  .masthead__mark { width: 28px; height: 28px; font-size: 15px; border-radius: 9px; }
  .masthead__toggle-text { display: none; }
  .masthead__toggle { padding: 0 12px; }
  .btn { padding: 0 13px; font-size: 13px; }
}

@media (max-width: 419px) {
  .masthead__actions .btn--ghost { display: none; }
  .masthead__bar { gap: 8px; }
}

@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] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card:hover { transform: none; }
  .btn:hover { transform: none; }
}
