:root {
  --bg: #f4f1ea;
  --bg-soft: #ece7dc;
  --surface: rgba(255, 253, 248, 0.72);
  --surface-solid: #fffdf8;
  --border: rgba(45, 58, 46, 0.12);
  --text: #2d3a2e;
  --text-soft: #5a6b5c;
  --text-muted: #7d8c7e;
  --accent: #6b8a68;
  --accent-strong: #4a6a48;
  --accent-warm: #e8c98a;
  --accent-warm-soft: #f3e2bd;
  --shadow-sm: 0 2px 8px rgba(45, 58, 46, 0.06);
  --shadow-md: 0 8px 28px rgba(45, 58, 46, 0.1);
  --shadow-lg: 0 18px 48px rgba(45, 58, 46, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --glass-blur: 16px;
  --maxw: 1080px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171f18;
    --bg-soft: #1d271e;
    --surface: rgba(34, 45, 36, 0.66);
    --surface-solid: #222d24;
    --border: rgba(232, 201, 138, 0.14);
    --text: #e7ede4;
    --text-soft: #b6c3b4;
    --text-muted: #8b9a8c;
    --accent: #8fb48a;
    --accent-strong: #a8cba2;
    --accent-warm: #e8c98a;
    --accent-warm-soft: #3a3524;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(107, 138, 104, 0.14), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(232, 201, 138, 0.16), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(107, 138, 104, 0.1), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--accent-strong);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover {
  color: var(--accent-warm);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  line-height: 1.35;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(1.75rem, 4.2vw, 2.85rem);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  margin: 0 0 1.1rem;
  position: relative;
  padding-bottom: 0.65rem;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

h3 {
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  margin: 1.6rem 0 0.7rem;
}

p {
  margin: 0 0 1rem;
  color: var(--text-soft);
}

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.45rem;
}

li::marker {
  color: var(--accent);
}

strong {
  color: var(--text);
}

/* ============ Header ============ */
header[role="banner"] {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

header[role="banner"] nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-shrink: 0;
}

.brand a {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text);
  background: linear-gradient(120deg, var(--accent-strong), var(--accent-warm));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: filter 0.3s var(--ease);
}

.brand a:hover {
  filter: brightness(1.15);
}

.brand .tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

header[role="banner"] nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  flex: 1 1 auto;
  justify-content: flex-end;
}

header[role="banner"] nav ul li {
  margin: 0;
}

header[role="banner"] nav ul li a {
  display: block;
  padding: 0.35rem 0.7rem;
  font-size: 0.86rem;
  color: var(--text-soft);
  border-radius: 999px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

header[role="banner"] nav ul li a:hover {
  color: var(--text);
  background: rgba(107, 138, 104, 0.16);
  transform: translateY(-1px);
}

/* ============ Breadcrumb ============ */
nav[aria-label="面包屑导航"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
}

nav[aria-label="面包屑导航"] ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

nav[aria-label="面包屑导航"] ol li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

nav[aria-label="面包屑导航"] ol li + li::before {
  content: "/";
  color: var(--text-muted);
  opacity: 0.6;
}

nav[aria-label="面包屑导航"] ol li[aria-current="page"] {
  color: var(--text-soft);
  font-weight: 600;
}

/* ============ Main layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

main > section {
  margin: 1.5rem 0;
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: rise-in 0.7s var(--ease) both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  main > section,
  .card,
  article,
  details {
    animation: none !important;
    transition: none !important;
  }
}

/* ============ Hero ============ */
#hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(45, 58, 46, 0.92) 0%, rgba(74, 106, 72, 0.86) 45%, rgba(107, 138, 104, 0.78) 100%),
    radial-gradient(circle at 80% 20%, rgba(232, 201, 138, 0.35), transparent 55%);
  color: #f2f6ef;
  border-color: rgba(232, 201, 138, 0.2);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(232, 201, 138, 0.28), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: float-slow 14s ease-in-out infinite;
}

@keyframes float-slow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 18px) scale(1.08); }
}

#hero h1 {
  color: #f7faf5;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
  position: relative;
}

#hero p {
  color: rgba(240, 246, 238, 0.88);
  position: relative;
  max-width: 72ch;
}

#hero figure {
  margin: 1.75rem 0 0;
  position: relative;
}

#hero figure svg {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(232, 201, 138, 0.18);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

#hero figure:hover svg {
  transform: scale(1.012);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

#hero figcaption {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: rgba(240, 246, 238, 0.7);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ============ Articles ============ */
#articles article {
  position: relative;
  margin: 1rem 0;
  padding: 1.15rem 1.25rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent-warm);
}

#articles article h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

#articles article h3 a {
  color: var(--text);
  background-image: linear-gradient(var(--accent-warm), var(--accent-warm));
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.35s var(--ease), color 0.3s var(--ease);
}

#articles article h3 a:hover {
  color: var(--accent-strong);
  background-size: 100% 2px;
}

#articles article p {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

#articles article p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

#articles article time {
  font-variant-numeric: tabular-nums;
}

/* ============ Blockquote ============ */
blockquote {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(107, 138, 104, 0.1), rgba(232, 201, 138, 0.1));
  border-left: 3px solid var(--accent-warm);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

blockquote:hover {
  transform: translateX(4px);
  background: linear-gradient(135deg, rgba(107, 138, 104, 0.16), rgba(232, 201, 138, 0.16));
}

blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text);
  font-size: 0.94rem;
}

/* ============ FAQ details ============ */
#faq details {
  margin: 0.65rem 0;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#faq details:hover {
  border-color: rgba(107, 138, 104, 0.35);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  border-color: rgba(107, 138, 104, 0.45);
  box-shadow: var(--shadow-md);
}

#faq summary {
  cursor: pointer;
  padding: 0.95rem 1.15rem 0.95rem 2.6rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  position: relative;
  list-style: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  user-select: none;
}

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

#faq summary::before {
  content: "+";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-strong);
  background: rgba(107, 138, 104, 0.14);
  border-radius: 50%;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

#faq details[open] summary::before {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: var(--accent-warm);
  color: #2d3a2e;
}

#faq summary:hover {
  background: rgba(107, 138, 104, 0.08);
}

#faq details p {
  margin: 0;
  padding: 0 1.15rem 1.15rem 2.6rem;
  font-size: 0.92rem;
  animation: fade-in 0.4s var(--ease);
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Contact & sitemap ============ */
#contact ul,
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
}

#contact ul li,
#sitemap ul li,
#links ul li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.92rem;
  transition: padding-left 0.25s var(--ease), color 0.25s var(--ease);
}

#contact ul li:last-child,
#sitemap ul li:last-child,
#links ul li:last-child {
  border-bottom: none;
}

#contact ul li:hover,
#sitemap ul li:hover,
#links ul li:hover {
  padding-left: 0.4rem;
}

#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0 1.5rem;
}

#sitemap ul li,
#links ul li {
  border-bottom: none;
  padding: 0.35rem 0;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  position: relative;
}

#sitemap ul li a::before {
  content: "›";
  margin-right: 0.4rem;
  color: var(--accent);
  transition: transform 0.25s var(--ease);
  display: inline-block;
}

#sitemap ul li a:hover::before {
  transform: translateX(3px);
}

/* ============ Footer ============ */
footer[role="contentinfo"] {
  margin-top: 2rem;
  background: linear-gradient(180deg, rgba(45, 58, 46, 0.06), rgba(45, 58, 46, 0.14));
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.25rem 1.5rem;
  color: var(--text-soft);
}

footer[role="contentinfo"] section {
  max-width: var(--maxw);
  margin: 0 auto 1.5rem;
}

footer[role="contentinfo"] h2 {
  font-size: 1rem;
  margin: 0 0 0.55rem;
  padding-bottom: 0.4rem;
}

footer[role="contentinfo"] h2::after {
  width: 32px;
  height: 2px;
}

footer[role="contentinfo"] p {
  font-size: 0.84rem;
  margin: 0 0 0.6rem;
  color: var(--text-muted);
}

footer[role="contentinfo"] > p {
  max-width: var(--maxw);
  margin: 1.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  header[role="banner"] nav {
    padding: 0.6rem 1rem;
    gap: 0.5rem;
  }

  header[role="banner"] nav ul {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  header[role="banner"] nav ul::-webkit-scrollbar {
    display: none;
  }

  header[role="banner"] nav ul li a {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }

  main {
    padding: 0.5rem 1rem 2rem;
  }

  main > section {
    margin: 1rem 0;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
    line-height: 1.7;
  }

  .brand .tagline {
    display: none;
  }

  .brand a {
    font-size: 1.35rem;
  }

  main > section {
    padding: 1.15rem 1rem;
  }

  h2::after {
    width: 40px;
  }

  #hero figure svg {
    border-radius: var(--radius-sm);
  }

  #articles article {
    padding: 1rem;
  }

  #faq summary {
    padding: 0.85rem 0.9rem 0.85rem 2.4rem;
    font-size: 0.9rem;
  }

  #faq details p {
    padding: 0 0.9rem 1rem 2.4rem;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
  }

  footer[role="contentinfo"] {
    padding: 2rem 1rem 1.25rem;
  }
}

@media (max-width: 380px) {
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }
}

/* ============ Print ============ */
@media print {
  header[role="banner"],
  nav[aria-label="面包屑导航"],
  #hero::before,
  footer[role="contentinfo"] {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}