:root {
  --brand: #1a8cff;
  --brand-dark: #0d6fd8;
  --brand-soft: #e8f4ff;
  --ink: #1a2332;
  --muted: #5a6577;
  --line: #e2e8f0;
  --bg: #f7fafc;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(26, 140, 255, 0.08);
  --max: 1100px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #eef6ff 0%, var(--bg) 220px, var(--bg) 100%);
  line-height: 1.75;
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

#ads img {
  max-width: 65px;
  width: 65px;
  height: 65px;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 1 / 1;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: var(--ink);
}

.nav-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover,
.nav a.active {
  color: var(--brand-dark);
}

/* Hero */
.hero {
  padding: 48px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hero-lead {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: var(--white);
}

.btn-ghost {
  background: var(--white);
  color: var(--brand-dark);
  border: 1px solid #cfe4ff;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  max-width: 320px;
  margin-inline: auto;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* Sections */
.section {
  padding: 42px 0;
}

.section-alt {
  background: var(--white);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.35;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.prose h2,
.prose h3 {
  line-height: 1.4;
  margin-top: 1.6em;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1em;
  color: #2a3444;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.25em;
  color: #2a3444;
}

.prose li {
  margin-bottom: 0.45em;
}

.prose strong {
  color: var(--ink);
}

/* Feature / media blocks */
.feature-list {
  display: grid;
  gap: 28px;
}

.feature-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.feature-item.reverse {
  grid-template-columns: 1fr 220px;
}

.feature-item.reverse .feature-media {
  order: 2;
}

.feature-media img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.feature-body h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.feature-body p {
  margin: 0 0 10px;
  color: var(--muted);
}

.feature-body p:last-child {
  margin-bottom: 0;
}

/* Grid gallery */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.shot-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.shot-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  background: #f0f4f8;
}

.shot-card .cap {
  padding: 12px 14px 14px;
}

.shot-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.shot-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}

.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* FAQ */
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary {
  color: var(--brand-dark);
  margin-bottom: 8px;
}

.faq details p {
  margin: 0;
  color: var(--muted);
}

/* TOC / related */
.toc {
  background: var(--brand-soft);
  border: 1px solid #cfe4ff;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0 28px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.2em;
}

.toc li {
  margin-bottom: 4px;
}

.related {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.related a {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.related a span {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.related a:hover {
  border-color: #9ec8ff;
  background: #f5faff;
}

/* Page hero for inner pages */
.page-hero {
  padding: 36px 0 10px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--muted);
}

.content-wrap {
  padding: 20px 0 48px;
}

.content-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow);
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 16px;
}

.error-page h1 {
  font-size: 3.5rem;
  margin: 0 0 8px;
  color: var(--brand);
}

.error-page p {
  color: var(--muted);
  margin: 0 0 20px;
}

/* Footer */
.site-footer {
  background: #122033;
  color: #c8d4e4;
  padding: 36px 0 22px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.site-footer h3 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 1rem;
}

.site-footer a {
  color: #c8d4e4;
  display: block;
  margin-bottom: 8px;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  font-size: 0.88rem;
  color: #8fa0b5;
}

/* Utilities */
.mt-0 { margin-top: 0; }
.note {
  background: #fff8e8;
  border-left: 4px solid #f0b429;
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  color: #6b5a2e;
  margin: 16px 0;
}

/* Mobile */
@media (max-width: 900px) {
  .hero-grid,
  .feature-item,
  .feature-item.reverse,
  .footer-grid,
  .related,
  .steps {
    grid-template-columns: 1fr;
  }

  .feature-item.reverse .feature-media {
    order: 0;
  }

  .shot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-item {
    grid-template-columns: 160px 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    width: min(280px, calc(100vw - 32px));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 60;
  }

  .nav a {
    padding: 10px 12px;
    border-radius: 8px;
  }

  .nav a:hover,
  .nav a.active {
    background: var(--brand-soft);
  }

  .nav.open {
    display: flex;
  }

  .header-inner {
    flex-wrap: nowrap;
  }

  .hero {
    padding-top: 28px;
  }

  .content-panel {
    padding: 20px 16px;
  }
}

@media (max-width: 560px) {
  .shot-grid {
    grid-template-columns: 1fr;
  }

  .feature-item {
    grid-template-columns: 1fr;
  }

  .hero-visual img {
    max-width: 260px;
  }
}
