*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-page: #F7F4ED;
  --bg-card: #FFFFFF;
  --bg-surface: #EFEBE3;
  --bg-hero: #EDE8DE;
  --text-main: #2C2620;
  --text-secondary: #5A5248;
  --text-muted: #8A8279;
  --primary: #7A6650;
  --primary-hover: #5E4D3C;
  --accent: #A89680;
  --border-light: #D9D1C5;
  --border-medium: #C4BBAE;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(44, 38, 32, 0.06);
  --shadow-md: 0 6px 18px rgba(44, 38, 32, 0.10);
  --container-max: 1120px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3.5rem;
  --spacing-xl: 5rem;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-main);
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: var(--spacing-sm); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); margin-bottom: var(--spacing-md); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); margin-bottom: var(--spacing-xs); }
p { margin-bottom: var(--spacing-sm); color: var(--text-secondary); }
.text-muted { color: var(--text-muted); font-size: 0.92rem; }

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 237, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.nav ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
}
.nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav a:hover, .nav a:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
}
.nav a[aria-current="page"] {
  color: var(--primary);
  border-color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  border: none;
  font-size: 1rem;
}
.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--bg-surface);
}

/* Sections */
section {
  padding: var(--spacing-xl) 0;
}
.section-grid {
  display: grid;
  gap: var(--spacing-md);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.bg-surface { background: var(--bg-surface); border-radius: var(--radius-lg); padding: var(--spacing-lg) var(--spacing-md); }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover, .card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--spacing-sm);
  stroke: var(--primary);
  stroke-width: 1.5;
  fill: none;
}
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text-main); }
.card-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: var(--spacing-xs); display: block; }

/* Table */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 0.95rem;
}
th, td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
th { background: var(--bg-surface); font-weight: 600; color: var(--text-main); }
td:last-child { white-space: normal; }

/* FAQ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-main);
  list-style: none;
  position: relative;
  padding-right: 2.5rem;
  transition: background 0.2s;
}
.faq-item summary:hover { background: var(--bg-surface); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform 0.3s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p {
  padding: 0 1.2rem 1.2rem;
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Links List */
.link-list { list-style: none; }
.link-list li {
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border-light);
}
.link-list li:last-child { border-bottom: none; }
.link-list a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.link-list a:hover { color: var(--primary-hover); text-decoration: underline; }
.link-desc { display: block; font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Footer */
.site-footer {
  background: var(--text-main);
  color: #D9D1C5;
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  align-items: center;
  text-align: center;
}
.footer-links { display: flex; gap: var(--spacing-md); flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #A89680; text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: #FFFFFF; }
.copyright { font-size: 0.85rem; color: #8A8279; }

/* SVG Base */
.svg-container {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}
svg { width: 100%; height: auto; display: block; }

/* Keyframes & Animations */
@keyframes rotate-align {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(160deg); }
}
@keyframes float-sync {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50% { transform: translateY(-12px); opacity: 1; }
}
@keyframes draw-line {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
.anim-rotate {
  animation: rotate-align 8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.anim-float {
  animation: float-sync 6s ease-in-out infinite;
}
.anim-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-line 12s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
  .anim-rotate, .anim-float, .anim-draw {
    animation: none !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: var(--spacing-sm) 0; }
  .nav ul { gap: var(--spacing-sm); margin-top: var(--spacing-xs); }
  section { padding: var(--spacing-lg) 0; }
  .bg-surface { padding: var(--spacing-md); }
}
