/*
Theme Name: MPSEO
Author: MPSEO
Description: 为百合德语内容与固定页面设计的轻量、响应式、搜索友好主题。
Version: 0.2.0
Requires at least: 7.0
Requires PHP: 8.1
Text Domain: mpseo-theme
*/

:root {
  --ink: #17231d;
  --muted: #66736c;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --line: #dce3dd;
  --brand: #126846;
  --brand-dark: #0b4e34;
  --accent: #e6a43a;
  --wide: 1160px;
  --content: 760px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.site-header { background: rgba(251,250,246,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.header-inner { max-width: var(--wide); margin: auto; min-height: 72px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.site-brand-icon { width: 32px; height: 32px; border-radius: 7px; object-fit: cover; }
.site-brand-name { color: var(--ink); }
.site-nav ul { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); font-size: 15px; text-decoration: none; }
.site-nav a:hover { color: var(--brand); }
.site-nav a[aria-current="page"] { color: var(--brand); font-weight: 750; }
.mobile-nav { display: none; }

.hero { border-bottom: 1px solid var(--line); background: radial-gradient(circle at 80% 10%, #dceee3 0, transparent 32%), var(--paper); }
.hero-inner { max-width: var(--wide); margin: auto; padding: 78px 22px 64px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr); gap: 70px; align-items: end; }
.eyebrow { color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 12px 0 22px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(42px, 6vw, 76px); line-height: 1.08; letter-spacing: -.045em; }
.hero-copy { max-width: 650px; margin: 0; color: var(--muted); font-size: 19px; }
.hero-note { border-left: 3px solid var(--accent); padding: 4px 0 4px 22px; color: var(--muted); font-size: 14px; }
.hero-note strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 5px; }

.home-pathways { border-bottom: 1px solid var(--line); background: #f2f6f2; }
.home-pathways-inner { max-width: var(--wide); margin: auto; padding: 54px 22px 62px; }
.pathway-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pathway-card { min-height: 280px; padding: 28px; display: flex; flex-direction: column; color: var(--ink); background: var(--surface); border: 1px solid var(--line); text-decoration: none; box-shadow: 0 12px 32px rgba(30,60,45,.04); transition: transform .2s ease, border-color .2s ease; }
.pathway-card:hover { color: var(--ink); border-color: #9ebdab; transform: translateY(-3px); }
.pathway-card > span { color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .14em; }
.pathway-card h3 { margin: 34px 0 10px; font: 700 27px/1.25 Georgia, "Noto Serif SC", serif; }
.pathway-card p { margin: 0 0 28px; color: var(--muted); }
.pathway-card strong { margin-top: auto; color: var(--brand); font-size: 14px; }
.pathway-card.pathway-accent { background: var(--brand); border-color: var(--brand); color: white; }
.pathway-card.pathway-accent > span, .pathway-card.pathway-accent p, .pathway-card.pathway-accent strong { color: #e3f2e9; }
.home-contact { border-bottom: 1px solid var(--line); }
.home-contact .office-contact { margin-top: 70px; }

.site-main { max-width: var(--wide); margin: 0 auto; padding: 54px 22px 90px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font: 700 29px/1.2 Georgia, "Noto Serif SC", serif; }
.article-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }
.article-card { grid-column: span 4; min-height: 330px; padding: 28px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 12px 32px rgba(30,60,45,.04); }
.article-card:first-child { grid-column: span 8; }
.article-card .meta { color: var(--muted); font-size: 13px; }
.article-card h2 { margin: 18px 0 12px; font: 700 27px/1.35 Georgia, "Noto Serif SC", serif; }
.article-card:first-child h2 { font-size: 36px; }
.article-card h2 a { color: var(--ink); text-decoration: none; }
.article-card h2 a:hover { color: var(--brand); }
.article-card p { color: var(--muted); margin: 0 0 24px; }
.article-card .read-more { margin-top: auto; font-size: 14px; font-weight: 750; text-decoration: none; }

.article-shell { max-width: var(--content); margin: 0 auto; padding: 64px 22px 100px; }
.article-header { margin-bottom: 44px; }
.article-header h1 { margin: 14px 0 20px; font: 700 clamp(38px, 6vw, 62px)/1.15 Georgia, "Noto Serif SC", serif; letter-spacing: -.035em; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 14px; }
.article-content { font-size: 18px; }
.article-content h2 { margin: 2.2em 0 .75em; font: 700 30px/1.3 Georgia, "Noto Serif SC", serif; }
.article-content h3 { margin-top: 1.8em; font-size: 23px; }
.article-content p { margin: 0 0 1.35em; }
.article-content blockquote { margin: 2em 0; padding: 6px 0 6px 24px; border-left: 3px solid var(--accent); color: #3e4b45; }
.article-content figure { margin: 2.4em 0; }
.article-content figcaption { color: var(--muted); font-size: 13px; text-align: center; }
.mpseo-editor-note, .mpseo-key-points { margin: 28px 0; padding: 24px 28px; background: #f0f6f2; border: 1px solid #d7e7dc; }
.mpseo-editor-note h2, .mpseo-key-points h2 { margin-top: 0; font-size: 22px; }
.mpseo-source-card { margin-top: 60px; padding: 26px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border: 1px solid var(--line); background: var(--surface); }
.mpseo-source-copy { display: grid; gap: 8px; }
.mpseo-source-copy span, .mpseo-source-copy p { color: var(--muted); font-size: 14px; margin: 0; }
.mpseo-original-link { display: inline-flex; width: fit-content; padding: 9px 15px; color: white; background: var(--brand); text-decoration: none; border-radius: 2px; }
.mpseo-source-qr { width: 132px; height: 132px; object-fit: contain; flex: 0 0 auto; }

.landing-page { background: var(--paper); }
.page-hero { overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 88% 12%, #dceee3 0, transparent 34%), var(--paper); }
.page-hero-courses { background: radial-gradient(circle at 88% 12%, #ecdfc2 0, transparent 34%), var(--paper); }
.referral-hero { background: radial-gradient(circle at 84% 18%, #f2d7a8 0, transparent 35%), #fffaf0; }
.page-hero-inner { max-width: var(--wide); margin: auto; min-height: 520px; padding: 86px 22px 72px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 72px; align-items: center; }
.page-hero h1 { max-width: 760px; margin: 14px 0 20px; font: 700 clamp(44px, 6vw, 72px)/1.08 Georgia, "Noto Serif SC", serif; letter-spacing: -.045em; }
.page-hero p { max-width: 670px; margin: 0; color: var(--muted); font-size: 19px; }
.button-row { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.button-primary, .button-secondary { display: inline-flex; min-height: 46px; padding: 10px 18px; align-items: center; justify-content: center; border: 1px solid var(--brand); border-radius: 2px; font-size: 15px; font-weight: 750; text-decoration: none; }
.button-primary { color: white; background: var(--brand); }
.button-primary:hover { color: white; background: var(--brand-dark); border-color: var(--brand-dark); }
.button-secondary { color: var(--brand); background: transparent; }
.button-secondary:hover { color: var(--brand-dark); border-color: var(--brand-dark); }
.trust-panel { padding: 28px; display: grid; gap: 26px; background: rgba(255,255,255,.84); border: 1px solid var(--line); box-shadow: 0 18px 55px rgba(30,60,45,.08); }
.trust-panel div { display: grid; gap: 5px; }
.trust-panel div + div { padding-top: 24px; border-top: 1px solid var(--line); }
.trust-panel strong { font: 700 22px/1.3 Georgia, "Noto Serif SC", serif; }
.trust-panel span { color: var(--muted); font-size: 14px; }
.hero-topic-list { display: flex; flex-wrap: wrap; gap: 11px; align-content: center; }
.hero-topic-list span { padding: 10px 16px; color: var(--brand-dark); background: rgba(255,255,255,.78); border: 1px solid #cad9d0; border-radius: 999px; font-size: 14px; font-weight: 750; }
.landing-content, .credential-section { max-width: 900px; margin: 0 auto; padding: 0 22px; }
.landing-content.article-content { padding-top: 68px; padding-bottom: 20px; }
.page-section { margin: 0 0 72px; scroll-margin-top: 100px; }
.page-section .lead { color: #33423b; font: 500 24px/1.65 Georgia, "Noto Serif SC", serif; }
.section-label { color: var(--brand); font-size: 12px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { padding: 24px; background: white; border: 1px solid var(--line); }
.feature-card h3 { margin: 0 0 10px; font-size: 21px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 15px; }
.page-toc { margin-bottom: 58px; padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 10px 20px; background: #edf4ef; border: 1px solid #d4e3d8; }
.page-toc strong { flex-basis: 100%; font-size: 13px; }
.page-toc a { font-size: 14px; font-weight: 700; text-decoration: none; }
.comparison-table { overflow-x: auto; border: 1px solid var(--line); background: white; }
.comparison-table table { width: 100%; min-width: 680px; border-collapse: collapse; }
.comparison-table th, .comparison-table td { padding: 15px 17px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.comparison-table thead th { color: white; background: var(--brand); }
.comparison-table tbody th { width: 22%; }
.notice-copy { margin-top: 14px; color: var(--muted); font-size: 14px; }
.page-section details { margin-bottom: 12px; padding: 14px 17px; background: white; border: 1px solid var(--line); }
.page-section summary { cursor: pointer; font-weight: 750; }
.page-section details p { margin: 12px 0 0; color: var(--muted); }
.credential-section { margin-top: 25px; margin-bottom: 70px; padding-top: 38px; padding-bottom: 38px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.credential-section h2 { margin: 6px 0 10px; font: 700 30px/1.3 Georgia, "Noto Serif SC", serif; }
.text-link { font-weight: 750; text-decoration: none; }

.office-contact { margin: 20px 0 90px; padding: 34px; display: grid; grid-template-columns: 1fr auto; gap: 38px; align-items: center; color: white; background: #183429; }
.office-contact-no-qr { grid-template-columns: 1fr; }
.office-contact h2 { margin: 6px 0 10px; color: white; font: 700 31px/1.25 Georgia, "Noto Serif SC", serif; }
.office-contact p { margin: 0 0 22px; color: #d4e3db; }
.office-contact .section-label { color: #eab657; }
.wechat-copy-row { width: fit-content; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; background: rgba(255,255,255,.08); }
.wechat-copy-row span { color: #c7d9cf; font-size: 13px; }
.wechat-copy-row strong { color: white; font-size: 20px; letter-spacing: .025em; user-select: all; }
.copy-button { padding: 6px 10px; color: #183429; background: #eab657; border: 0; border-radius: 2px; cursor: pointer; font-weight: 750; }
.copy-button:hover { background: #f2c978; }
.office-qr-link { display: grid; gap: 8px; color: white; font-size: 13px; text-align: center; text-decoration: none; }
.office-qr { width: 180px; height: 180px; padding: 7px; object-fit: contain; background: white; }
.contact-details { margin: 22px 0 0; display: grid; gap: 8px; font-size: 14px; }
.contact-details div { display: grid; grid-template-columns: 76px 1fr; gap: 12px; }
.contact-details dt { color: #a9c1b4; }
.contact-details dd { margin: 0; color: white; }
.contact-details a { color: #f4cf8d; }

.status-badge { display: inline-flex; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.status-active { color: #0b5f3d; background: #d9efe2; }
.status-paused { color: #785000; background: #f8e3b7; }
.status-ended { color: #6d3535; background: #eddada; }
.referral-highlight { min-height: 270px; padding: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; background: var(--brand); text-align: center; transform: rotate(1.5deg); box-shadow: 0 22px 60px rgba(26,70,49,.18); }
.referral-highlight span { font-size: 15px; }
.referral-highlight strong { margin: 8px 0; font: 700 51px/1 Georgia, "Noto Serif SC", serif; }
.referral-highlight small { color: #cfe1d6; }
.referral-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.reward-card { padding: 25px; display: grid; gap: 8px; background: white; border: 1px solid var(--line); }
.reward-card span { color: var(--muted); font-size: 13px; font-weight: 750; }
.reward-card strong { font: 700 22px/1.35 Georgia, "Noto Serif SC", serif; }
.reward-card-primary { color: white; background: var(--brand); border-color: var(--brand); }
.reward-card-primary span { color: #cfe1d6; }
.reward-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.reward-grid article { padding: 24px; background: white; border-top: 4px solid var(--accent); box-shadow: 0 10px 28px rgba(30,60,45,.05); }
.reward-grid span { color: var(--brand); font-size: 13px; font-weight: 850; }
.reward-grid h3 { margin: 12px 0 8px; font-size: 23px; }
.reward-grid p { margin: 0; color: var(--muted); font-size: 14px; }
.steps-list { padding: 0; list-style: none; counter-reset: steps; }
.steps-list li { position: relative; margin-bottom: 13px; padding: 20px 22px 20px 72px; display: grid; gap: 4px; background: white; border: 1px solid var(--line); counter-increment: steps; }
.steps-list li::before { content: counter(steps); position: absolute; left: 22px; top: 20px; width: 31px; height: 31px; display: grid; place-items: center; color: white; background: var(--brand); border-radius: 50%; font-weight: 850; }
.steps-list span { color: var(--muted); font-size: 15px; }
.terms-section { padding: 30px; background: #f0f4f1; border: 1px solid var(--line); }
.terms-section li { margin-bottom: 7px; }
.activity-notice { margin-top: 30px; padding: 20px 24px; background: #fff3d5; border-left: 4px solid var(--accent); }
.activity-notice p { margin: 5px 0 0; }
.page-reviewed { margin: -58px 0 90px; color: var(--muted); font-size: 13px; text-align: center; }

.pagination { margin-top: 42px; display: flex; gap: 12px; }
.pagination .page-numbers { padding: 7px 13px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.pagination .current { color: white; background: var(--brand); border-color: var(--brand); }
.empty-state { padding: 60px 0; color: var(--muted); }
.site-footer { color: #cbd7d0; background: #15271f; }
.footer-inner { max-width: var(--wide); margin: auto; padding: 48px 22px 35px; font-size: 14px; }
.footer-inner a { color: white; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 50px; }
.footer-brand { color: white; font-size: 22px; }
.footer-grid p { margin: 7px 0 0; }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 8px 28px; align-content: start; }
.footer-nav a { text-decoration: none; }
.footer-bottom { max-width: var(--wide); margin: auto; padding: 18px 22px 26px; color: #91a79b; border-top: 1px solid #2d4439; font-size: 12px; }

@media (max-width: 800px) {
  body { font-size: 16px; }
  .header-inner { min-height: 62px; flex-wrap: wrap; gap: 12px; }
  .site-nav-desktop { display: none; }
  .mobile-nav { display: block; margin-left: auto; }
  .mobile-nav summary { padding: 7px 11px; cursor: pointer; color: var(--brand); border: 1px solid var(--brand); border-radius: 2px; font-size: 14px; font-weight: 750; list-style: none; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav[open] { width: 100%; padding-bottom: 14px; }
  .mobile-nav[open] summary { width: fit-content; margin-left: auto; }
  .mobile-menu { margin: 10px 0 0; padding: 0; display: grid; list-style: none; background: white; border: 1px solid var(--line); }
  .mobile-menu li + li { border-top: 1px solid var(--line); }
  .mobile-menu a { display: block; padding: 11px 14px; color: var(--ink); text-decoration: none; }
  .mobile-menu a[aria-current="page"] { color: var(--brand); font-weight: 750; }
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding-top: 54px; }
  .hero h1 { font-size: 45px; }
  .pathway-grid { grid-template-columns: 1fr; }
  .pathway-card { min-height: 220px; }
  .article-card, .article-card:first-child { grid-column: span 12; min-height: 0; }
  .article-card:first-child h2 { font-size: 29px; }
  .article-shell { padding-top: 42px; }
  .article-content { font-size: 17px; }
  .mpseo-source-card { align-items: flex-start; flex-direction: column; }
  .page-hero-inner { min-height: 0; padding-top: 58px; grid-template-columns: 1fr; gap: 40px; }
  .page-hero h1 { font-size: 44px; }
  .trust-panel { padding: 22px; }
  .feature-grid, .reward-grid, .referral-summary { grid-template-columns: 1fr; }
  .landing-content.article-content { padding-top: 46px; }
  .page-section { margin-bottom: 54px; }
  .office-contact { padding: 26px; grid-template-columns: 1fr; }
  .office-qr-link { justify-content: start; text-align: left; }
  .referral-highlight { min-height: 220px; transform: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-nav { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .mpseo-source-qr { display: none; }
  body { background: white; color: black; }
  .article-shell { max-width: 100%; padding: 0; }
}
