/* Base */
:root {
  --bg: #08101f;
  --bg-2: #0d1730;
  --panel: rgba(9, 16, 32, 0.74);
  --panel-2: rgba(14, 24, 47, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f7ff;
  --muted: #aab4d2;
  --accent: #ff7b6b;
  --accent-2: #8b5cf6;
  --accent-3: #ffb14a;
  --accent-4: #33d0c8;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --wrap: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 123, 107, 0.16), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(139, 92, 246, 0.18), transparent 26%),
    radial-gradient(circle at 80% 90%, rgba(51, 208, 200, 0.12), transparent 24%),
    linear-gradient(180deg, #07101e 0%, #0a1225 45%, #07101e 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 80%);
  opacity: 0.4;
}

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

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

button,
a.btn {
  font: inherit;
}

.wrap {
  width: min(calc(100% - 32px), var(--wrap));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(8, 16, 31, 0.88), rgba(8, 16, 31, 0.62));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-shell {
  position: relative;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand img {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.26);
}

.brand strong {
  font-size: 1.12rem;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.24s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 12px 14px;
  cursor: pointer;
}

.hero {
  padding: 42px 0 26px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 26px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffd8d0;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 18px 0 16px;
}

.hero h1 .accent {
  color: #ffd5be;
}

.hero p {
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.85;
  font-size: 1.02rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #10131f;
  background: linear-gradient(135deg, #ffd166, #ff7b6b 54%, #ff9f43);
  box-shadow: 0 14px 30px rgba(255, 123, 107, 0.25);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.hero-tags,
.check-list,
.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-tags li,
.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e9edff;
  font-size: 0.9rem;
}

.hero-media {
  position: relative;
}

.glow-card,
.panel,
.info-card,
.feature-card,
.quote-card,
.faq-card,
.entry-card,
.guide-step,
.article-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 26, 50, 0.92), rgba(8, 15, 31, 0.88));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.glow-card::after,
.panel::after,
.info-card::after,
.feature-card::after,
.quote-card::after,
.faq-card::after,
.entry-card::after,
.guide-step::after,
.article-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% auto;
  width: 170px;
  height: 170px;
  background: radial-gradient(circle, rgba(255, 123, 107, 0.16), transparent 68%);
  pointer-events: none;
}

.glow-card {
  padding: 18px;
}

.glow-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
}

.glow-card .caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.caption strong {
  display: block;
  font-size: 1rem;
}

.caption span {
  color: var(--muted);
  font-size: 0.9rem;
}

.caption .badge {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 177, 74, 0.14);
  color: #ffd9a1;
  border: 1px solid rgba(255, 177, 74, 0.22);
  white-space: nowrap;
}

.panel {
  padding: 24px;
}

.stat-grid,
.feature-grid,
.entry-grid,
.review-grid,
.faq-grid,
.detail-grid {
  display: grid;
  gap: 18px;
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  padding: 18px 18px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat strong {
  display: block;
  font-size: 1.65rem;
  margin-bottom: 6px;
}

.stat span {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.section {
  padding: 26px 0;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 60ch;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.entry-card,
.quote-card,
.faq-card,
.guide-step,
.article-card {
  padding: 22px;
}

.feature-card h3,
.entry-card h3,
.quote-card h3,
.faq-card summary,
.guide-step h3,
.article-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.feature-card p,
.entry-card p,
.quote-card p,
.faq-card p,
.guide-step p,
.article-card p {
  color: var(--muted);
  line-height: 1.85;
  margin: 0;
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 123, 107, 0.18), rgba(139, 92, 246, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.4rem;
}

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

.gallery-grid figure {
  margin: 0;
}

.gallery-large {
  grid-column: span 6;
}

.gallery-small {
  grid-column: span 3;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-grid figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 10px;
}

/* Home page balance */
body.theme-home .hero-media {
  justify-self: end;
  width: min(100%, 540px);
}

body.theme-home .glow-card {
  padding: 14px;
}

body.theme-home .glow-card img {
  aspect-ratio: 16 / 10;
  max-height: 320px;
}

body.theme-home .gallery-grid {
  align-items: start;
}

body.theme-home .gallery-grid img {
  height: 210px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

body.theme-home .gallery-large img {
  height: 240px;
}

body.theme-home .gallery-grid figcaption {
  line-height: 1.65;
}

.entry-grid,
.review-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.entry-card {
  min-height: 100%;
}

.entry-card .link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #ffe3d9;
}

.quote-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.quote-card blockquote {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.85;
  color: #eef2ff;
}

.quote-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.faq-preview {
  display: grid;
  gap: 14px;
}

.faq-summary {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.faq-summary h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.faq-summary p {
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
}

.download-strip {
  padding: 22px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 123, 107, 0.2), rgba(139, 92, 246, 0.18), rgba(51, 208, 200, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.download-strip .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.download-strip p {
  color: #f6f8ff;
  margin: 0;
  line-height: 1.75;
}

.page-top {
  padding: 18px 0 8px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.crumbs a {
  color: #fff;
}

.prose {
  padding: 28px;
}

.prose p,
.prose li {
  line-height: 1.95;
  color: #d7def3;
}

.prose p + p {
  margin-top: 16px;
}

.prose h2 {
  margin: 28px 0 12px;
  font-size: 1.35rem;
}

.prose h3 {
  margin: 22px 0 10px;
  font-size: 1.08rem;
}

.step-list {
  counter-reset: step;
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.step-list li {
  position: relative;
  padding: 18px 18px 18px 62px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #07101e;
  background: linear-gradient(135deg, #ffd166, #ff7b6b);
  font-weight: 800;
}

.step-list strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
}

.note {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 4px solid var(--accent-3);
  border-radius: 16px;
  background: rgba(255, 177, 74, 0.08);
  color: #ffe7bd;
}

.anchor {
  color: #ffd7a2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.figure-stack {
  display: grid;
  gap: 16px;
}

.figure-stack figure {
  margin: 0;
}

.figure-stack img {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.figure-stack figcaption {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.faq-grid {
  gap: 14px;
}

.faq-card {
  padding: 0;
}

.faq-card summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 56px 22px 22px;
  position: relative;
}

.faq-card summary::-webkit-details-marker {
  display: none;
}

.faq-card summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 20px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: 0.2s ease;
}

.faq-card[open] summary::after {
  content: "−";
}

.faq-card .answer {
  padding: 0 22px 22px;
}

.page-footer {
  padding: 36px 0 26px;
}

.footer-shell {
  padding: 24px;
  border-radius: var(--radius-xl);
  background: rgba(9, 15, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: start;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.85;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f0f4ff;
}

.fineprint {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #d8def0;
  line-height: 1.9;
}

.jsonld-note {
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes drift {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.floaty {
  animation: drift 6s ease-in-out infinite;
}

.theme-home {
  --accent: #ff7b6b;
  --accent-2: #8b5cf6;
}

.theme-guide {
  --accent: #33d0c8;
  --accent-2: #ffb14a;
}

.theme-faq {
  --accent: #8b5cf6;
  --accent-2: #ff7b6b;
}

body.theme-guide .eyebrow {
  color: #d2fff9;
}

body.theme-guide .btn-primary {
  background: linear-gradient(135deg, #65e8de, #ffd166);
}

body.theme-faq .btn-primary {
  background: linear-gradient(135deg, #bba0ff, #ff7b6b);
}

body.theme-guide .download-strip {
  background: linear-gradient(135deg, rgba(51, 208, 200, 0.18), rgba(255, 177, 74, 0.12));
}

body.theme-faq .download-strip {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(255, 123, 107, 0.13));
}

@media (max-width: 1080px) {
  .hero-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .entry-grid,
  .review-grid,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-large,
  .gallery-small {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 82px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 20px;
    background: rgba(8, 16, 31, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  .hero {
    padding-top: 28px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

  .feature-grid,
  .entry-grid,
  .review-grid,
  .stat-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-large,
  .gallery-small {
    grid-column: auto;
  }

  body.theme-home .hero-media {
    width: 100%;
    justify-self: stretch;
  }

  body.theme-home .glow-card img,
  body.theme-home .gallery-grid img,
  body.theme-home .gallery-large img {
    height: auto;
    max-height: none;
  }

  .download-strip .inner {
    flex-direction: column;
    align-items: start;
  }

  .prose {
    padding: 20px;
  }

  .faq-card summary {
    padding-right: 50px;
  }
}
