:root {
  --ink: #172033;
  --muted: #5c6b7e;
  --blue: #1d6fe8;
  --blue-dark: #0e3f96;
  --header: #10284a;
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #e2e8f1;
  --note: #eef4ff;
  --warn: #fff6e8;
  --shadow: 0 10px 30px rgba(16, 40, 74, 0.08);
  --header-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.85;
  padding-top: var(--header-h);
}
img { max-width: 100%; }
a { color: var(--blue-dark); }
a:hover { color: var(--blue); }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--header);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}
.header-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 0;
}
.brand img { width: 42px; height: 42px; border-radius: 10px; background: #fff; }
.brand small {
  display: block;
  font-weight: 500;
  font-size: 12px;
  color: #c9d7ee;
  letter-spacing: 0.08em;
}
.nav-toggle {
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 160ms ease, opacity 160ms ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.site-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: #0c2140;
  padding: 8px 16px 16px;
  flex-direction: column;
  gap: 4px;
}
.site-nav.is-open { display: flex; }
.site-nav a {
  color: #e7eefb;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.08); color: #fff; }

.ads-bar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 45;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(16, 40, 74, 0.06);
}
.ads-bar[hidden] { display: none; }
#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 8px;
  width: min(1120px, calc(100% - 16px));
  margin: 8px auto;
}
#ads > div { width: 74px; }
#ads figure { margin: 0; }
#ads a { display: inline-block; text-decoration: none; border-radius: 16px; }
#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(24, 24, 24, 0.12);
  display: block;
  background: #fff;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
#ads a:hover img,
#ads a:focus-visible img {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(24, 24, 24, 0.18);
}
#ads .caption {
  height: 16px;
  margin-top: 4px;
  font-size: 11px;
  line-height: 16px;
  color: #666;
  text-align: center;
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.page { padding: 28px 0 64px; }
.hero {
  background: linear-gradient(180deg, #e7f0ff 0%, rgba(244, 247, 251, 0) 100%);
  padding: 36px 0 12px;
}
.kicker {
  display: inline-block;
  margin: 0 0 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #d9e7ff;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
}
h1 { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.35; margin: 0 0 12px; }
h2 { font-size: 1.45rem; line-height: 1.4; margin: 2.2rem 0 0.8rem; }
h3 { font-size: 1.12rem; margin: 1.4rem 0 0.4rem; }
.lead { font-size: 1.08rem; color: #24344a; margin-top: 0; }
.muted { color: var(--muted); }
.updated { color: var(--muted); font-size: 14px; }

.toc, .card, .note, .warn, .related {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.toc, .note, .warn, .related { padding: 16px 18px; margin: 18px 0; }
.note { background: var(--note); }
.warn { background: var(--warn); }
.toc ol { margin: 8px 0 0; padding-left: 1.2rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.prose p { margin: 0 0 0.9rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.prose li { margin: 0.25rem 0; }
.prose a { text-underline-offset: 3px; }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}
.shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.shot {
  margin: 0;
  background: #10192b;
  border-radius: 18px;
  padding: 12px 12px 10px;
  color: #d5deea;
}
.shot img {
  width: auto;
  max-width: 100%;
  max-height: 540px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
  background: #0b1220;
}
.shot figcaption {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: #d5deea;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 1rem;
  box-shadow: var(--shadow);
}
th, td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 12px;
  vertical-align: top;
}
th { background: #eef3fb; font-weight: 700; }
tr:last-child td { border-bottom: 0; }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 10px 0;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 4px; }

.error-panel {
  text-align: center;
  padding: 48px 16px 24px;
}
.error-panel strong {
  display: block;
  font-size: clamp(4rem, 12vw, 6.5rem);
  line-height: 1;
  color: var(--blue);
}
.link-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
}
.btn.secondary { background: #fff; color: var(--blue-dark); border: 1px solid #c9d8f2; }

.site-footer {
  background: #0f2748;
  color: #d5e2f5;
  padding: 28px 0 36px;
}
.site-footer a { color: #fff; text-decoration: none; margin-right: 14px; }
.site-footer a:hover { text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.footer-brand img { width: 32px; height: 32px; border-radius: 8px; background: #fff; }
.site-footer p { margin: 8px 0; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 0;
    background: transparent;
  }
  .site-nav a { padding: 8px 10px; }
  .split { grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.7fr); }
  .shots { grid-template-columns: 1fr 1fr; }
  .split .shots { grid-template-columns: 1fr; }
}
