/* 小蓝APP - xl-app.baby */
:root {
  --blue: #2f6bff;
  --blue-dark: #1a4fd6;
  --blue-light: #e8f0ff;
  --cyan: #3dd4e0;
  --ink: #1a1f2e;
  --muted: #5a6478;
  --line: #dce3f0;
  --bg: #f5f8fc;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(31, 74, 180, 0.1);
  --max: 1120px;
  --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: var(--bg);
  line-height: 1.75;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
ul, ol { padding-left: 1.2em; }
h1, h2, h3, h4 { line-height: 1.35; color: var(--ink); margin: 0 0 0.6em; }
p { margin: 0 0 1em; color: var(--muted); }

.container { width: min(100% - 32px, var(--max)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}
.brand:hover { text-decoration: none; color: var(--blue); }
.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
}
.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav a:hover,
.nav a.active { color: var(--blue); }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle .menu-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink);
}
.menu-toggle[aria-expanded="true"] .menu-icon {
  background: transparent;
  box-shadow: none;
}
.menu-toggle[aria-expanded="true"] .menu-icon::before,
.menu-toggle[aria-expanded="true"] .menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(61, 212, 224, 0.25), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(47, 107, 255, 0.28), transparent 50%),
    linear-gradient(165deg, #eef4ff 0%, #f8fbff 45%, #e8f7fa 100%);
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.55rem);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.hero .lead {
  font-size: 1.05rem;
  max-width: 38em;
  margin-bottom: 22px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #4aa8ff);
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.35);
}
.btn-primary:hover { color: #fff; }
.btn-ghost {
  background: var(--white);
  color: var(--blue-dark);
  border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--blue); }
.hero-visual {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 4px solid #fff;
  background: #fff;
}
.hero-visual img {
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 520px;
  object-fit: cover;
  object-position: top;
}

/* Sections */
.section {
  padding: 56px 0;
}
.section.alt { background: var(--white); }
.section-head {
  margin-bottom: 28px;
  max-width: 46em;
}
.section-head h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
}
.section-head p { margin-bottom: 0; }
.eyebrow {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

/* Feature / media grids */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(26, 31, 46, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.feature-card .thumb {
  aspect-ratio: 9/14;
  overflow: hidden;
  background: #eef2f8;
}
.feature-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.feature-card .body { padding: 16px 18px 20px; }
.feature-card h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.94rem;
  margin-bottom: 0;
}

.media-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 40px;
}
.media-row.reverse { grid-template-columns: 1.2fr 1fr; }
.media-row.reverse .media-text { order: 2; }
.media-row.reverse .media-shot { order: 1; }
.media-shot {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fff;
}
.media-shot img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  object-position: top;
}
.media-text h3 { font-size: 1.35rem; }
.checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.checklist li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--muted);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

/* Content prose */
.prose {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: 0 4px 16px rgba(26, 31, 46, 0.03);
}
.prose h2, .prose h3 { margin-top: 1.4em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose a { font-weight: 600; }

.toc {
  background: var(--blue-light);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 24px;
}
.toc strong { display: block; margin-bottom: 8px; color: var(--blue-dark); }
.toc a {
  display: inline-block;
  margin-right: 14px;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 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(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { font-size: 0.9rem; margin: 0; }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery figure {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.gallery img {
  width: 100%;
  aspect-ratio: 9/13;
  object-fit: cover;
  object-position: top;
}
.gallery figcaption {
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.cta-band {
  margin: 20px 0 0;
  padding: 36px 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1a4fd6 0%, #2f6bff 45%, #3dd4e0 100%);
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255, 255, 255, 0.9); max-width: 38em; margin: 0 auto 18px; }
.cta-band .btn-primary {
  background: #fff;
  color: var(--blue-dark);
  box-shadow: none;
}
.cta-band .btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

/* Page header for inner pages */
.page-hero {
  padding: 42px 0 28px;
  background:
    linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.breadcrumb a { font-weight: 600; }

/* Error pages */
.error-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 16px;
}
.error-code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}

/* Footer */
.site-footer {
  background: #121826;
  color: #c5cde0;
  padding: 42px 0 24px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 12px;
}
.site-footer a { color: #c5cde0; }
.site-footer a:hover { color: #fff; }
.footer-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  font-size: 0.88rem;
  color: #8b95ab;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}
.tag {
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .media-row,
  .media-row.reverse,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .media-row.reverse .media-text,
  .media-row.reverse .media-shot { order: initial; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .hero-visual img { max-height: 420px; }
}

@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    width: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 120;
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav a:last-child { border-bottom: none; }
  .hero { padding: 36px 0 28px; }
  .section { padding: 40px 0; }
  .feature-grid,
  .steps,
  .gallery { grid-template-columns: 1fr 1fr; }
  .prose { padding: 20px 16px; }
  .cta-band { padding: 28px 18px; }
}

@media (max-width: 480px) {
  .feature-grid,
  .gallery { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
