:root {
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-text: #111418;
  --color-text-secondary: #4a5056;
  --color-primary: #008069;
  --color-primary-dark: #006353;
  --color-accent: #d4e6df;
  --color-border: #e2e5e8;
  --color-highlight: #00a884;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 2px 6px rgba(17,20,24,0.05);
  --shadow-hover: 0 8px 20px rgba(17,20,24,0.08);
  --container-width: 1120px;
  --space-section: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s, opacity 0.2s; }
a:hover { opacity: 0.85; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
  color: var(--color-text);
}
h1 { font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.8rem); margin-bottom: 0.4em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.4rem); margin-bottom: 0.6em; color: #0c1318; }
h3 { font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.45rem); margin-bottom: 0.45em; }
p { margin-bottom: 1.1em; color: var(--color-text-secondary); }
ul, ol { padding-left: 1.2em; margin-bottom: 1.1em; }
li { margin-bottom: 0.4em; }

.container { width: 92%; max-width: var(--container-width); margin: 0 auto; }
section { padding: var(--space-section) 0; }
section:nth-child(even) { background: var(--color-surface); }

/* Header & Footer */
header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(1.2);
}
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; color: var(--color-text); text-decoration: none; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
nav ul { display: flex; list-style: none; gap: 1.6rem; }
nav a { font-size: 0.95rem; color: var(--color-text-secondary); padding: 0.25rem 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-primary); border-bottom-color: var(--color-primary); }

footer { background: #0f1215; color: #8a9198; padding: 3.5rem 0 2rem; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: #dce1e6; margin-bottom: 0.8rem; font-size: 1rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: #a3aab0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2a3035; padding-top: 1.5rem; text-align: center; font-size: 0.85rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem; border-radius: var(--radius-md); font-weight: 500; font-size: 1rem;
  cursor: pointer; border: 1px solid transparent; transition: all 0.2s; text-align: center;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); opacity: 1; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-accent); opacity: 1; }
.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }

/* Cards & Grids */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-icon { width: 42px; height: 42px; margin-bottom: 1rem; stroke: var(--color-primary); }
.two-col-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 768px) { .two-col-layout { grid-template-columns: 1fr; } }

/* Table */
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--color-border); text-align: left; }
th { background: #f4f6f8; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfc; }

/* FAQ / Details */
details { margin-bottom: 0.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
summary { padding: 1rem; cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.25rem; color: var(--color-primary); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details[open] summary { border-bottom: 1px solid var(--color-border); background: #fafafa; }
details p { padding: 1rem; margin: 0; font-size: 0.95rem; }

/* News & Related */
.news-card { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.meta-date { font-size: 0.85rem; color: #7a828a; margin-bottom: 0.6rem; font-variant-numeric: tabular-nums; }
.related-list { list-style: none; padding: 0; columns: 2; column-gap: 1.5rem; }
@media (max-width: 600px) { .related-list { columns: 1; } }
.related-list li { margin-bottom: 0.7rem; break-inside: avoid; }
.related-list a { color: var(--color-text-secondary); display: flex; gap: 0.5rem; align-items: baseline; }
.related-list a::before { content: "→"; color: var(--color-primary); font-size: 0.9rem; }
.related-list a:hover { color: var(--color-primary); }

/* Accessibility */
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* SVG Animations */
.svg-container { position: relative; overflow: hidden; display: flex; justify-content: center; align-items: center; }
.orbit-path { fill: none; stroke-linecap: round; stroke-linejoin: round; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.ring-1 { stroke: var(--color-primary); stroke-width: 1.8; opacity: 0.65; }
.ring-2 { stroke: var(--color-text-secondary); stroke-width: 1.2; opacity: 0.4; }
.ring-3 { stroke: var(--color-accent); stroke-width: 0.8; opacity: 0.5; }

@keyframes breathe-h { 0%, 100% { opacity: 0.5; transform: scale(0.96); } 50% { opacity: 0.85; transform: scale(1.04); } }
@keyframes breathe-v { 0%, 100% { opacity: 0.4; transform: scale(0.94); } 50% { opacity: 0.75; transform: scale(1.06); } }
@keyframes draw-loop { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }

.anim-breathe-h { animation: breathe-h 6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.anim-breathe-v { animation: breathe-v 8s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.anim-draw { animation: draw-loop 10s linear infinite alternate; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
