:root {
  --bg: #f6f1e8;
  --paper: #fffdf9;
  --ink: #1d2a2a;
  --muted: #5c6b68;
  --line: #d8cfc3;
  --accent: #14532d;
  --accent-soft: #ecfdf3;
  --warm: #b45309;
  --shadow: 0 20px 50px rgba(29, 42, 42, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(20, 83, 45, 0.08), transparent 28%),
    linear-gradient(180deg, #f8f3ea 0%, #f4efe6 100%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(248, 243, 234, 0.88);
  border-bottom: 1px solid rgba(216, 207, 195, 0.7);
}

.header-inner,
.footer-inner,
.meta-row,
.cta-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.header-inner,
.footer-inner {
  padding: 16px 0;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #1f7a46);
  color: white;
  font-weight: 700;
}

.brand small,
.meta-row,
.eyebrow,
.related-type,
.fact-label,
.pill,
.note {
  color: var(--muted);
}

.main-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.home-hero,
.hero {
  padding: 48px 0 20px;
}

.home-grid,
.article-hero,
.article-layout,
.process-grid {
  display: grid;
  gap: 20px;
}

.home-grid,
.article-hero {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  align-items: start;
}

.article-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.6fr);
  align-items: start;
}

.hero.compact { padding-bottom: 8px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin: 0 0 10px;
}

h1, h2, h3 {
  line-height: 1.15;
  font-family: Georgia, "Source Han Serif SC", "Songti SC", serif;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  margin: 0 0 12px;
}

h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }

.lead {
  font-size: 1.12rem;
  line-height: 1.8;
  color: #2a3b39;
  max-width: 820px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 600;
}

.button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.button.secondary {
  background: rgba(255,255,255,0.5);
  color: var(--ink);
}

.hero-points {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-points span,
.metric-card,
.process-step,
.hero-card {
  background: var(--paper);
  border: 1px solid rgba(216, 207, 195, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-points span {
  padding: 8px 14px;
  font-size: 0.92rem;
}

.hero-card {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250, 246, 239, 0.95)),
    radial-gradient(circle at top right, rgba(180, 83, 9, 0.08), transparent 35%);
}

.compact-card {
  position: sticky;
  top: 92px;
}

.stack-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.9;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.metric-card {
  padding: 20px;
  text-align: center;
}

.metric-value {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  font-family: Georgia, "Source Han Serif SC", "Songti SC", serif;
}

.home-band {
  padding: 14px 0 10px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2,
.feature-card h3,
.process-step h3 {
  margin-top: 0;
}

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

.process-step {
  padding: 22px;
}

.process-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--warm), #d97706);
  color: white;
  font-weight: 700;
}

.inline-link {
  font-weight: 700;
}

.section-grid,
.fact-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.section-card,
.panel,
.related-card,
.fact-card {
  background: var(--paper);
  border: 1px solid rgba(216, 207, 195, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-card,
.related-card { padding: 22px; }

.panel {
  padding: 26px;
  margin: 20px 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
}

.fact-card {
  padding: 18px;
  background: linear-gradient(180deg, #fffefb 0%, #faf6ef 100%);
}

.fact-value {
  font-size: 1.1rem;
  font-weight: 700;
}

.article { padding-bottom: 56px; }
.article-main .panel:first-child { margin-top: 0; }
.article-side { position: relative; }
.side-panel { margin-top: 0; }

.breadcrumb {
  padding-top: 28px;
  font-size: 0.95rem;
  color: var(--muted);
}

.breadcrumb span { margin: 0 6px; }

.check-list,
.source-list {
  padding-left: 20px;
  line-height: 1.8;
}

.prose p,
.prose li {
  line-height: 1.9;
}

.prose table,
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: top;
}

.table-wrap {
  overflow-x: auto;
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  background: #fffdfa;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  background: var(--accent-soft);
  border-radius: 999px;
}

.related-card {
  color: inherit;
}

.related-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  transition: transform 0.18s ease;
}

.site-footer {
  border-top: 1px solid rgba(216, 207, 195, 0.8);
  background: rgba(255, 253, 249, 0.8);
}

@media (max-width: 760px) {
  .home-grid,
  .article-hero,
  .article-layout,
  .process-grid,
  .metrics-row {
    grid-template-columns: 1fr;
  }

  .panel,
  .section-card,
  .related-card,
  .hero-card,
  .metric-card,
  .process-step {
    padding: 18px;
  }

  .compact-card {
    position: static;
  }

  h1 { font-size: 2.3rem; }
}

/* ── Features Grid (core_features) ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--paper);
  border: 1px solid rgba(216, 207, 195, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.feature-title {
  font-size: 1rem;
  margin: 0 0 8px;
  color: var(--accent);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}

.feature-meaning { margin: 0 0 8px; line-height: 1.7; }
.feature-scene { margin: 0 0 6px; font-size: 0.9rem; line-height: 1.7; }

/* ── Fit / Not-Fit Columns ── */
.fit-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.fit-col h3 {
  font-size: 0.95rem;
  margin: 0 0 10px;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-weight: 700;
}

.fit-col.fit-yes h3 { color: var(--accent); }
.fit-col.fit-no h3  { color: var(--warm); }

.fit-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.9;
}

/* ── Selection Factors ── */
.factors-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.factor-item {
  background: var(--paper);
  border: 1px solid rgba(216, 207, 195, 0.9);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.factor-item h3 {
  font-size: 0.95rem;
  margin: 0 0 8px;
  color: var(--accent);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}

.factor-item p { margin: 0; line-height: 1.8; }

/* ── Selection Steps ── */
.steps-list {
  padding-left: 24px;
  line-height: 1;
}

.steps-list li {
  margin-bottom: 18px;
  line-height: 1.8;
}

.steps-list li strong {
  display: block;
  margin-bottom: 4px;
}

.steps-list li p {
  margin: 0;
  color: var(--muted);
}

/* ── Common Mistakes ── */
.mistakes-list { display: grid; gap: 16px; }

.mistake-item {
  border-left: 3px solid var(--warm);
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.04), transparent);
  border-radius: 0 12px 12px 0;
}

.mistake-title {
  margin: 0 0 8px;
  color: var(--warm);
  font-weight: 700;
}

.mistake-correction { margin: 0; line-height: 1.7; }

/* ── Pricing Note ── */
.pricing-note {
  background: linear-gradient(135deg, rgba(20, 83, 45, 0.04), var(--paper));
}

/* ── Source Note ── */
.source-note-panel {
  background: linear-gradient(135deg, rgba(29, 42, 42, 0.03), var(--paper));
}

/* ── CTA Panel ── */
.cta-panel {
  text-align: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--paper));
  border: 1px solid rgba(20, 83, 45, 0.2);
}

.cta-text {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 6px;
  font-family: Georgia, "Source Han Serif SC", serif;
}

.cta-subtext { margin: 0 0 16px; }

/* ── Responsive adjustments for new modules ── */
@media (max-width: 760px) {
  .fit-columns,
  .features-grid,
  .factors-list {
    grid-template-columns: 1fr;
  }
}
