/* ==========================================================================
   Bike Universe Guide — 站点皮肤（按 DESIGN-BRIEF.md 从零写，非母版通用皮）
   设计语言来源：游戏内 HUD（底部 SHOP/BUILD/BIKES/PHONE/SPAWN 按钮、km/h 与 $ 读数、
   WANTED 通缉指示、特技动作提示条）+ 官方商店图黑底金饰 + 官方截图配色
   （沥青深蓝黑 #12161f / 天空浅蓝 #8fd0e8 / 商店金 #f5c451）。
   强度基线：3px 粗描边 + 零模糊硬阴影 + 巨型 display 标题 + 旋转贴纸。
   ========================================================================== */

@font-face { font-family: "BU Display"; src: url("assets/fonts/anton.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "BU Slab"; src: url("assets/fonts/archivoblack.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "BU Label"; src: url("assets/fonts/barlowcondensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --asphalt: #12161f;
  --asphalt-2: #1c2331;
  --asphalt-3: #262f42;
  --sky: #8fd0e8;
  --sky-deep: #2f7fb8;
  --money: #f5c451;
  --money-deep: #a3711d;
  --grass: #7f9147;
  --cop-red: #e5342c;
  --cop-blue: #2f7dfa;
  --ink: #0a0c11;
  --paper: #e9edf2;
  --text: #e9eef6;
  --text-dim: #b6c2d2;
  --line: 3px;
  --maxw: 1200px;
  --display: "BU Display", Impact, "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --slab: "BU Slab", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --label: "BU Label", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-lg: 8px 8px 0 var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font: 400 17px/1.68 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--asphalt);
  /* 沥青颗粒 + 两团冷光斑（低对比、无重复条纹） */
  background-image:
    radial-gradient(900px 420px at 12% -6%, rgba(143, 208, 232, .14), transparent 62%),
    radial-gradient(760px 380px at 92% 4%, rgba(245, 196, 81, .10), transparent 60%),
    radial-gradient(1200px 700px at 50% 120%, rgba(47, 127, 184, .12), transparent 70%);
  background-repeat: no-repeat;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: 1.02; margin: 0 0 .5em; }

a { color: var(--sky); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.skip { position: absolute; left: -9999px; }

/* ---------------------------------------------------------------- ribbon（警灯条） */
.ribbon {
  background: repeating-linear-gradient(90deg,
      var(--cop-red) 0 34px, #7d1512 34px 40px,
      var(--cop-blue) 40px 74px, #14356e 74px 80px);
  border-bottom: var(--line) solid var(--ink);
  animation: lights 1.6s steps(2, end) infinite;
}
@keyframes lights { 50% { filter: brightness(1.22) saturate(1.1); } }
.ribbon .wrap {
  display: flex; align-items: center; gap: 10px;
  font: 700 14px/1.6 var(--label); letter-spacing: .10em; text-transform: uppercase;
  color: #fff; text-shadow: 0 2px 0 var(--ink);
  padding: 5px 22px;
}
@media (prefers-reduced-motion: reduce) { .ribbon { animation: none; } }

/* ---------------------------------------------------------------- topbar + nav（游戏 HUD 按钮条） */
.topbar {
  background: var(--asphalt-2);
  border-bottom: var(--line) solid var(--ink);
  position: relative;
  z-index: 40;
}
.topbar::after {
  content: ""; display: block; height: 8px;
  background-image: repeating-linear-gradient(135deg, var(--money) 0 10px, var(--ink) 10px 20px);
  border-top: var(--line) solid var(--ink);
}
.bar { display: flex; align-items: center; gap: 18px; padding: 12px 22px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--slab); font-size: 20px; color: #fff; letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; color: var(--money); }
.brand img {
  width: 44px; height: 44px; border: var(--line) solid var(--ink);
  border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); background: #000;
}
.nav { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav > ul { display: flex; align-items: center; gap: 9px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav li { position: relative; }
.nav li > a {
  display: inline-block;
  padding: 9px 14px;
  background: var(--asphalt-3);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ink);
  color: #fff; font: 700 15px/1.2 var(--label); letter-spacing: .09em; text-transform: uppercase;
}
.nav li > a:hover { text-decoration: none; background: var(--sky-deep); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); color: #fff; }
.nav li.active > a { background: var(--money); color: var(--ink); }
.nav .has-kids > a::after { content: " ▾"; }
.nav .kids {
  display: none; position: absolute; left: -8px; top: calc(100% + 10px);
  min-width: 250px; margin: 0; padding: 8px; list-style: none;
  background: #05070c; border: var(--line) solid var(--money); border-radius: 10px;
  box-shadow: var(--shadow-lg); z-index: 60;
}
.nav .has-kids:hover .kids,
.nav .has-kids:has(:focus-visible) .kids { display: flex; flex-direction: column; gap: 2px; }
.nav .kids a {
  display: block; padding: 9px 12px; border-radius: 6px;
  color: var(--text); font: 700 14px/1.3 var(--label); letter-spacing: .06em; text-transform: uppercase;
}
.nav .kids a:hover { background: var(--sky-deep); color: #fff; text-decoration: none; }
/* 父项与面板之间的悬停死区：透明桥（面板外观不动） */
.nav .has-kids::after {
  content: ""; display: none; position: absolute; left: -8px; top: 100%; width: 264px; height: 12px;
}
.nav .has-kids:hover::after, .nav .has-kids:has(:focus-visible)::after { display: block; }
.nav .cta {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 16px; border: 2px solid var(--ink); border-radius: 8px;
  background: #bf2a23; color: #fff; box-shadow: 3px 3px 0 var(--ink);
  font: 700 15px/1.2 var(--label); letter-spacing: .09em; text-transform: uppercase;
}
.nav a.cta { color: #fff; }
.nav .cta:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); text-decoration: none; color: #fff; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  border-bottom: var(--line) solid var(--ink);
  background-color: #0b0f18;
  background-image:
    linear-gradient(90deg, rgba(7, 10, 16, .96) 0%, rgba(7, 10, 16, .82) 42%, rgba(7, 10, 16, .18) 78%, rgba(7, 10, 16, .34) 100%),
    var(--hero);
  background-repeat: no-repeat, no-repeat;
  background-position: center, min(50% + 190px, 100%) center;
  background-size: cover, cover;
}
.hero-in {
  display: grid; grid-template-columns: minmax(0, 1fr) 470px; gap: 34px; align-items: center;
  padding: 62px 22px 56px;
}
.hero-copy { min-width: 0; }
.hero-shot { margin: 0; }
.hero-shot img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 45%;
  border: var(--line) solid var(--ink); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 6px 12px;
  background: var(--money); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink);
  font: 700 14px/1.2 var(--label); letter-spacing: .14em; text-transform: uppercase;
  transform: rotate(-1.2deg);
}
.hero h1 {
  font-size: clamp(46px, 8.4vw, 104px);
  color: #fff; text-shadow: 5px 5px 0 var(--ink), 0 0 44px rgba(47, 127, 184, .40);
  margin: 0 0 12px;
}
.hero h1 .u2 { display: block; color: var(--sky); }
.hero .lead {
  max-width: 620px; margin: 0 0 22px; color: #dde7f3; font-size: 18.5px; line-height: 1.6;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .55);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.btn {
  display: inline-block; padding: 13px 20px;
  background: var(--money); color: var(--ink);
  border: var(--line) solid var(--ink); border-radius: 8px; box-shadow: var(--shadow);
  font: 700 16px/1.2 var(--label); letter-spacing: .10em; text-transform: uppercase;
}
.btn:hover { text-decoration: none; transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); color: var(--ink); }
.btn.ghost { background: var(--asphalt-2); color: #fff; }
.btn.ghost:hover { color: #fff; background: var(--sky-deep); }

/* ---------------------------------------------------------------- HUD 读数条 */
.facts-strip { background: var(--asphalt-2); border-bottom: var(--line) solid var(--ink); }
.facts { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px 22px; }
.fact {
  flex: 1 1 168px; padding: 12px 14px;
  background: #0b0f18; border: 2px solid var(--ink); border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ink);
}
.fact-k {
  display: block; color: var(--money);
  font: 700 12.5px/1.4 var(--label); letter-spacing: .16em; text-transform: uppercase;
}
.fact-v { display: block; color: var(--sky); font: 400 30px/1.15 var(--mono); letter-spacing: -.02em; }

/* ---------------------------------------------------------------- section head */
.section-head { margin: 42px 0 18px; }
.overline {
  display: inline-block; margin-bottom: 8px; padding: 4px 9px;
  background: var(--ink); color: var(--sky); border: 2px solid var(--sky);
  border-radius: 5px; font: 700 12.5px/1.3 var(--label); letter-spacing: .18em; text-transform: uppercase;
}
.section-head h2 { font-size: clamp(28px, 3.6vw, 44px); color: #fff; margin: 0; text-shadow: 3px 3px 0 var(--ink); }
.count-pill {
  display: inline-block; margin-left: 12px; padding: 3px 11px;
  background: var(--money); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px;
  font: 700 16px/1.4 var(--mono); vertical-align: middle; transform: rotate(2deg);
}

/* ---------------------------------------------------------------- cards */
.grid { display: flex; flex-wrap: wrap; gap: 18px; }
.grid[data-n="2"] > .card { flex: 1 1 340px; }
.grid[data-n="3"] > .card { flex: 1 1 300px; }
.card {
  flex: 1 1 300px; display: flex; flex-direction: column;
  background: var(--asphalt-2); border: var(--line) solid var(--ink); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden; color: var(--text);
}
.card:hover { text-decoration: none; transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); color: var(--text); }
.card .thumb { position: relative; display: block; border-bottom: var(--line) solid var(--ink); }
.card .thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pill-tag {
  position: absolute; left: 10px; top: 10px; padding: 4px 10px;
  background: var(--money); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink); transform: rotate(-2deg);
  font: 700 12.5px/1.3 var(--label); letter-spacing: .12em; text-transform: uppercase;
}
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 15px 16px 16px; }
.card-body h3 { font-size: 21px; margin: 0; color: #fff; }
.card-body p { margin: 0; color: var(--text-dim); font-size: 15.5px; line-height: 1.55; }
.card .go { color: var(--sky); font: 700 14px/1.4 var(--label); letter-spacing: .12em; text-transform: uppercase; }
.card .stamp { color: #8b98ab; font: 400 12.5px/1.4 var(--mono); }
.card.sm { flex: 1 1 236px; }
.card.sm .card-body { padding: 12px 14px; }
.card.sm .card-body h3 { font-size: 17px; }

/* ---------------------------------------------------------------- home prose / article */
.home-prose, article {
  background: var(--asphalt-2); border: var(--line) solid var(--ink); border-radius: 12px;
  box-shadow: var(--shadow); padding: 26px 26px 30px; margin: 26px 0 40px;
}
.home-prose > h2 { font-size: clamp(26px, 3.2vw, 38px); color: #fff; text-shadow: 3px 3px 0 var(--ink); }
article { counter-reset: h2c; }
article h2 {
  counter-increment: h2c; position: relative;
  font-size: clamp(24px, 3vw, 34px); color: #fff; margin: 40px 0 14px; padding-left: 62px;
  text-shadow: 3px 3px 0 var(--ink);
}
article h2::before {
  content: "[" counter(h2c, decimal-leading-zero) "]";
  position: absolute; left: 0; top: 4px;
  font: 700 17px/1.5 var(--mono); color: var(--money);
  background: var(--ink); border: 2px solid var(--money); border-radius: 6px; padding: 2px 7px;
}
article h3 { font-family: var(--slab); font-size: 19px; color: var(--sky); margin: 26px 0 8px; }
article ul, article ol { padding-left: 22px; margin: 0 0 18px; }
article li { margin-bottom: 7px; }
article p { margin: 0 0 16px; }
article strong, article b { color: #fff; }
article img.zoom {
  width: 100%; margin: 20px 0 6px; border: var(--line) solid var(--ink); border-radius: 10px;
  box-shadow: var(--shadow); cursor: zoom-in; background: #000;
}
/* 小尺寸官方素材禁拉满正文宽（420/768 源拉到 818 会糊）：按源原生尺寸显示 */
article img.zoom[src*="pass-"] { width: auto; max-width: min(100%, 300px); }
article img.zoom[src*="official-"] { width: auto; max-width: min(100%, 768px); }
article hr { border: 0; border-top: 2px dashed var(--asphalt-3); margin: 26px 0; }
.crumb { font: 400 13.5px/1.6 var(--mono); color: #93a1b4; margin: 20px 0 0; }
.crumb a { color: var(--sky); }
.crumb .sep { color: #93a1b4; }
.crumb .here { color: #fff; }
.art-lead { font-size: 18px; color: #cfdae8; border-left: 6px solid var(--sky); padding-left: 14px; margin: 14px 0 6px; }
.art-meta { font: 400 13.5px/1.6 var(--mono); color: #93a1b4; margin: 0 0 22px; }
.quick-answer {
  display: grid; gap: 8px; margin: 0 0 24px; padding: 16px 18px;
  background: #0b0f18; border: var(--line) solid var(--money); border-radius: 10px; box-shadow: var(--shadow);
}
.quick-answer p { margin: 0; color: var(--text); }
.qa-stamp {
  justify-self: start; padding: 4px 10px; background: var(--money); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px; transform: rotate(-1.4deg);
  font: 700 12.5px/1.3 var(--label); letter-spacing: .14em; text-transform: uppercase;
}

/* ---------------------------------------------------------------- article grid + toc */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 28px; align-items: start; }
.article-grid > div { min-width: 0; }
.toc { position: sticky; top: 24px; margin: 20px 0 40px; padding: 16px; background: var(--asphalt-2); border: var(--line) solid var(--ink); border-radius: 12px; box-shadow: var(--shadow); }
.toc .overline { margin-bottom: 12px; }
.toc-list { display: flex; flex-direction: column; gap: 7px; }
.toc-list a { color: var(--text-dim); font: 700 14px/1.35 var(--label); letter-spacing: .05em; }
.toc-list a:hover { color: var(--money); text-decoration: none; }

/* ---------------------------------------------------------------- tables */
.tbl-wrap { overflow-x: auto; margin: 0 0 22px; border: var(--line) solid var(--ink); border-radius: 10px; box-shadow: var(--shadow); background: var(--paper); }
.tbl-wrap table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 15.5px; }
.tbl-wrap th, .tbl-wrap td { padding: 11px 13px; border-bottom: 2px solid #c3ccd8; text-align: left; vertical-align: top; color: #101728; }
.tbl-wrap thead th { background: var(--ink); color: #fff; font: 700 14px/1.4 var(--label); letter-spacing: .1em; text-transform: uppercase; border-bottom: 0; }
.tbl-wrap tbody tr:nth-child(even) td { background: #dfe5ee; }
.tbl-wrap strong, .tbl-wrap b { color: inherit; }
.tbl-wrap code { background: #cfd6e0; color: #101728; padding: 1px 5px; border-radius: 4px; font-size: 14px; }

/* ---------------------------------------------------------------- callouts */
.callout {
  margin: 0 0 22px; padding: 15px 17px; border-radius: 10px;
  background: #0b0f18; border: var(--line) solid var(--sky-deep); box-shadow: var(--shadow);
  color: var(--text);
}
.callout p:last-child { margin-bottom: 0; }
.callout.hazard { border-color: var(--money); border-left-width: 14px; }
.callout.escape { border-color: var(--cop-blue); border-left-width: 14px; box-shadow: 5px 5px 0 var(--cop-red); }
.callout strong { color: var(--money); }

/* ---------------------------------------------------------------- all guides tail */
.all-guides { margin-top: 34px; padding-top: 26px; border-top: var(--line) dashed var(--asphalt-3); }
.all-guides .grid[data-n="4"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.all-guides .card.sm { flex: none; }
.all-more { margin: 16px 0 0; font: 700 15px/1.4 var(--label); letter-spacing: .08em; text-transform: uppercase; }

/* ---------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 99; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 6, 11, .94); cursor: zoom-out; padding: 20px;
}
.lightbox img { max-width: min(1500px, 96vw); max-height: 92vh; width: auto; height: auto; border: var(--line) solid var(--ink); box-shadow: var(--shadow-lg); }

/* ---------------------------------------------------------------- footer */
.foot {
  margin-top: 40px; border-top: var(--line) solid var(--ink); background: var(--asphalt-2);
  padding: 26px 0 34px; position: relative;
}
.foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background-image: repeating-linear-gradient(90deg, rgba(233, 237, 242, .10) 0 6px, transparent 6px 18px);
}
.foot .disclaimer { color: var(--text-dim); font-size: 14.5px; max-width: 900px; }
.foot-links { margin: 12px 0 6px; font: 700 15px/1.6 var(--label); letter-spacing: .08em; text-transform: uppercase; }
.muted { color: #93a1b4; font: 400 13px/1.6 var(--mono); }

/* ---------------------------------------------------------------- ad slot（未配 key 时不渲染） */
.ad-slot { max-width: var(--maxw); margin: 18px auto; }
.ad-slot-native, .ad-slot-mobile { min-height: 0; }
@media (hover: hover) and (pointer: fine) { .ad-slot-mobile { display: none; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; order: -1; margin-bottom: 18px; }
  .toc-list { flex-direction: row; flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 900px) {
  .hero { background-image: linear-gradient(180deg, rgba(7,10,16,.28) 0%, rgba(7,10,16,.62) 34%, rgba(7,10,16,.93) 66%, rgba(7,10,16,.98) 100%), var(--hero); background-position: center, center 22%; }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 34px 22px 40px; }
  .hero-shot { order: -1; }
}
@media (max-width: 760px) {
  .bar { gap: 12px; }
  .nav { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .nav > ul { gap: 7px; }
  .nav li > a { padding: 8px 11px; font-size: 13.5px; }
  .nav .kids { position: static; min-width: 0; width: 100%; margin-top: 7px; }
  .nav .has-kids::after { display: none; }
  .nav .cta { padding: 9px 13px; font-size: 13.5px; }
  .nav .has-kids { flex: 1 1 100%; }
  .grid > .card, .card.sm { flex: 1 1 100%; }
  .home-prose, article { padding: 20px 16px 24px; }
  article h2 { padding-left: 0; padding-top: 34px; }
  article h2::before { top: 0; }
  .btn, .hero-cta .btn { width: 100%; text-align: center; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .fact-v { font-size: 24px; }
  .tbl-wrap table { font-size: 14.5px; }
}
