/* 合唱蛙官网 · 文章页样式（/articles/ 与 /articles/<slug>/）
   设计变量与首页 public/index.html 内联 CSS 同步维护：改品牌色要两处一起改。
   下方「共享部分」逐段复制自首页内联 CSS；「文章专用」为本文件新增。 */

/* ===================== 共享部分（同首页） ===================== */
:root {
  --forest: #1f2a2a;
  --forest-shadow: rgba(31, 42, 42, 0.16);
  --almond: #fcf8f4;
  --cloud: #dedbd5;
  --sage: #e6f4d6;
  --lime: #cfff73;
  --peach: #ff8a65;
  --sky: #b9d7ff;
  --text: #1a2c2d;
  --muted: #5a6b6c;
  --light: #8a9a9b;
  --white: #ffffff;
  --good: #3fb37f;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--almond);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

main {
  overflow-x: clip;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

b,
strong {
  color: var(--forest);
  font-weight: 800;
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled,
.nav.open {
  background: rgba(252, 248, 244, 0.9);
  box-shadow: 0 1px 20px var(--forest-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-inner {
  align-items: center;
  display: flex;
  gap: 32px;
  margin: 0 auto;
  max-width: 1200px;
  padding: 16px 24px;
}

.brand {
  align-items: center;
  color: var(--forest);
  display: flex;
  font-size: 1.25rem;
  font-weight: 800;
  gap: 10px;
}

.brand-mark {
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(31, 42, 42, 0.18);
  flex-shrink: 0;
  height: 36px;
  overflow: hidden;
  width: 36px;
}

.brand-mark img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.nav-links {
  display: flex;
  gap: 32px;
  margin-left: auto;
}

.nav-links a,
.mobile-menu a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover {
  color: var(--forest);
}

.pill-btn {
  align-items: center;
  background: var(--forest);
  border: 2px solid var(--forest);
  border-radius: 999px;
  color: var(--white);
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  padding: 9px 22px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.pill-btn:hover {
  box-shadow: 0 4px 16px var(--forest-shadow);
  transform: translateY(-2px);
}

.pill-btn.lg {
  font-size: 1rem;
  padding: 14px 30px;
}

.pill-btn.ghost {
  background: transparent;
  color: var(--forest);
}

.pill-btn.ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
}

.pill-btn.lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--forest);
}

.pill-btn.block {
  display: flex;
  width: 100%;
}

.nav-toggle {
  background: transparent;
  border: 0;
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 4px;
}

.nav-toggle span {
  background: var(--forest);
  border-radius: 2px;
  display: block;
  height: 2px;
  transition: opacity 0.25s ease, transform 0.25s ease;
  width: 24px;
}

.nav.open .nav-toggle span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.nav.open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav.open .nav-toggle span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  background: rgba(252, 248, 244, 0.98);
  display: none;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  text-align: center;
  transition: max-height 0.3s ease;
}

.nav.open .mobile-menu {
  max-height: 420px;
}

.mobile-menu a {
  border-bottom: 1px solid var(--cloud);
  padding: 12px 24px;
}

/* ---------- 通用排版 ---------- */
h1 {
  color: var(--forest);
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 24px;
}

h1 span,
.accent {
  color: var(--peach);
}

h2 {
  color: var(--forest);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 20px;
}

h3 {
  color: var(--forest);
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 8px;
}

p {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.75;
}
.panel {
  background: var(--forest);
  overflow: hidden;
  position: relative;
}

.panel .blob-lime {
  opacity: 0.45;
}

.panel .blob-peach {
  opacity: 0.5;
}

.panel-inner {
  margin: 0 auto;
  max-width: 1180px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.panel-inner > p {
  margin: 0 auto;
  max-width: 720px;
}

.panel h2,
.panel h3 {
  color: var(--white);
}

.panel p {
  color: rgba(255, 255, 255, 0.72);
}

.panel b {
  color: var(--white);
}
.footer {
  background: var(--forest);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 24px calc(40px + env(safe-area-inset-bottom));
}

.footer-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1200px;
}

.footer-brand {
  align-items: center;
  color: var(--white);
  display: flex;
  font-weight: 850;
  gap: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-about {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 24px auto 0;
  max-width: 1200px;
}

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  gap: 8px 24px;
  margin: 28px auto 0;
  max-width: 1200px;
  padding-top: 24px;
}

/* ---------- 客服 Modal ---------- */
.modal-overlay {
  align-items: center;
  animation: modalFadeIn 0.15s ease;
  background: rgba(31, 42, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 2000;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  animation: modalSlideUp 0.2s ease;
  background: var(--almond);
  border-radius: 28px;
  box-shadow: 0 30px 60px rgba(31, 42, 42, 0.3);
  max-width: 380px;
  padding: 40px 28px 32px;
  position: relative;
  text-align: center;
  width: 100%;
}

.modal-close {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: 999px;
  color: var(--forest);
  display: flex;
  font-size: 1.25rem;
  height: 36px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
}

.modal-close:hover {
  background: var(--forest);
  color: var(--white);
}

.modal-title {
  font-size: 1.25rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-qr {
  background: var(--white);
  border: 8px solid var(--forest);
  border-radius: 24px;
  height: 236px;
  margin: 0 auto 18px;
  overflow: hidden;
  padding: 8px;
  width: 236px;
}

.modal-qr img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.modal-tip {
  color: var(--forest);
  font-size: 1rem;
  margin-bottom: 4px;
}

.modal-sub {
  color: var(--light);
  font-size: 0.82rem;
}

/* ---------- 动效 ---------- */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ===================== 文章专用 ===================== */
.article,
.article-list {
  padding: 120px 24px 72px;
}

.article-wrap {
  margin: 0 auto;
  max-width: 720px;
}

.article-wrap.wide {
  max-width: 1200px;
}

.breadcrumb {
  color: var(--light);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.875rem;
  gap: 6px 8px;
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--forest);
}

.breadcrumb [aria-current] {
  color: var(--light);
}

.article-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 16px;
}

.article-meta {
  color: var(--light);
  font-size: 0.92rem;
  margin-bottom: 28px;
}

.article-intro {
  margin-bottom: 40px;
  max-width: 720px;
}

.article-cover {
  aspect-ratio: 16 / 9;
  background: var(--cloud);
  border-radius: 20px;
  height: auto;
  margin-bottom: 40px;
  object-fit: cover;
  width: 100%;
}

/* 长文排版 */
.article-body {
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.85;
}

.article-body > * + * {
  margin-top: 1.1em;
}

.article-body h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  margin: 2.2em 0 0.6em;
  scroll-margin-top: 96px;
}

.article-body h3 {
  font-size: 1.2rem;
  margin: 1.8em 0 0.4em;
}

.article-body p {
  color: var(--text);
  font-size: inherit;
  line-height: inherit;
}

.article-body a {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
}

.article-body li + li {
  margin-top: 0.4em;
}

.article-body li::marker {
  color: var(--peach);
  font-weight: 800;
}

.article-body blockquote {
  background: var(--sage);
  border-left: 4px solid var(--good);
  border-radius: 0 14px 14px 0;
  padding: 16px 20px;
}

.article-body blockquote p {
  color: var(--forest);
}

.article-body img {
  border-radius: 14px;
  height: auto;
}

.article-body table {
  border-collapse: collapse;
  font-size: 0.95rem;
  table-layout: fixed;
  width: 100%;
}

.article-body td {
  overflow-wrap: anywhere;
}

.article-body th,
.article-body td {
  border: 1px solid var(--cloud);
  padding: 10px 12px;
  text-align: left;
}

.article-body th {
  background: var(--white);
  color: var(--forest);
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--cloud);
  margin: 2em 0;
}

.article-body code {
  background: var(--white);
  border-radius: 6px;
  font-size: 0.9em;
  padding: 2px 6px;
}

/* 文末 CTA 面板 */
.article-cta {
  border-radius: 24px;
  margin-top: 56px;
  padding: 40px 32px;
  text-align: center;
}

.article-cta h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin-bottom: 12px;
}

.article-cta p {
  margin: 0 auto 24px;
  max-width: 520px;
}

/* 文末 FAQ */
.article-faq {
  margin-top: 56px;
}

.article-faq h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
}

.article-faq details {
  background: var(--white);
  border: 1px solid var(--cloud);
  border-radius: 16px;
  margin-top: 12px;
}

.article-faq summary {
  color: var(--forest);
  cursor: pointer;
  font-weight: 850;
  list-style: none;
  padding: 18px 56px 18px 22px;
  position: relative;
}

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

.article-faq summary::after {
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
  position: absolute;
  right: 22px;
  top: 16px;
}

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

.article-faq details p {
  padding: 0 22px 20px;
}

/* 相关文章 */
.article-related {
  padding: 0 24px 120px;
}

.article-related h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  margin-bottom: 28px;
}

/* 文章卡片网格（首页内联 CSS 有同一份） */
.article-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}

.article-card {
  background: var(--white);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.article-card:hover {
  box-shadow: 0 16px 40px rgba(31, 42, 42, 0.12);
  transform: translateY(-4px);
}

.article-card img {
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.article-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 24px 24px;
}

.article-card h3 {
  line-height: 1.45;
}

.article-card p {
  display: -webkit-box;
  font-size: 0.95rem;
  line-height: 1.7;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.article-card time {
  color: var(--light);
  font-size: 0.85rem;
  margin-top: auto;
  padding-top: 14px;
}

.articles-empty {
  text-align: center;
}

/* ===================== 响应式 ===================== */
@media (max-width: 1080px) {
  .nav-links {
    gap: 22px;
  }
}

@media (max-width: 900px) {
  .nav-links,
  .nav .pill-btn {
    display: none;
  }

  .nav-toggle,
  .mobile-menu {
    display: flex;
  }

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

  .article-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .article,
  .article-list {
    padding: 96px 20px 56px;
  }

  .article-related {
    padding: 0 20px 72px;
  }

  .article-cta {
    padding: 32px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .article-card,
  .pill-btn {
    transition: none;
  }
}
