:root {
  --color-bg-main: #f5f1ea;
  --color-bg-alt: #e8e3d9;
  --color-bg-card: #ffffff;
  --color-text-primary: #2a2520;
  --color-text-secondary: #5c554a;
  --color-accent: #3a634d;
  --color-accent-hover: #2a4a38;
  --color-border: #d4cdc1;
  --color-highlight: #7a6b55;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-soft: 0 4px 14px rgba(42, 37, 32, 0.06);
  --shadow-hover: 0 8px 24px rgba(42, 37, 32, 0.10);
  --font-sans: 'Inter', 'PingFang SC', 'Noto Sans SC', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Consolas', monospace;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-main);
  color: var(--color-text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--color-text-primary);
}

h1 { font-size: clamp(2.25rem, 5.5vw, 3.5rem); line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); color: var(--color-text-secondary); }
strong { font-weight: 600; color: var(--color-text-primary); }

a { color: var(--color-accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-accent-hover); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 2px; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-xl) 0;
  position: relative;
}

section.alt-section {
  background-color: var(--color-bg-alt);
}

.section-header {
  max-width: 780px;
  margin-bottom: var(--space-lg);
}

.section-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* Layout Utilities */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background-color: rgba(58, 99, 77, 0.08);
  text-decoration: none;
}

/* Cards */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card time {
  font-size: 0.85rem;
  color: var(--color-highlight);
  margin-bottom: var(--space-xs);
  display: block;
}

.news-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background-color: var(--color-bg-alt);
  font-weight: 600;
  color: var(--color-text-primary);
}

tr:last-child td { border-bottom: none; }
td[scope="col"] { width: 140px; }

/* FAQ */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  background: var(--color-bg-card);
}

.faq-item summary {
  padding: 1rem;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-text-secondary);
  border-bottom: 2px solid var(--color-text-secondary);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-2px); }

.faq-answer {
  padding: 0 1rem 1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* Header & Footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 241, 234, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-text-primary);
  text-decoration: none;
}

.brand img { height: 32px; width: auto; display: block; }

.nav-links { display: flex; gap: var(--space-md); }
.nav-links a { color: var(--color-text-secondary); font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-accent); }
.nav-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

.site-footer {
  background: var(--color-text-primary);
  color: #d4cdc1;
  padding: var(--space-xl) 0 var(--space-md);
  margin-top: var(--space-xl);
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-col h4 { color: #fff; margin-bottom: var(--space-sm); }
.footer-col a { color: #b8b0a3; display: block; margin-bottom: 0.4rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.copyright { text-align: center; font-size: 0.85rem; color: #8a8276; padding-top: var(--space-md); border-top: 1px solid #3a3530; }

/* SVG Animations */
.svg-anim { width: 100%; height: auto; overflow: visible; }
.draw-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawStroke 3s ease-out forwards;
}

.breathe-group {
  transform-origin: center;
  transform-box: fill-box;
  animation: breathe 5s ease-in-out infinite;
}

@keyframes drawStroke {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.02); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .draw-line { stroke-dashoffset: 0 !important; }
  .breathe-group { animation: none !important; }
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 0.5rem 0; }
  .nav-links { flex-wrap: wrap; justify-content: center; margin-top: 0.5rem; }
  section { padding: var(--space-lg) 0; }
}
