:root {
  --color-dark: #0b1419;
  --color-primary: #25D366;
  --color-deep-green: #075E54;
  --color-lime-accent: #DCF8C6;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F0F2F5;
  --color-surface: #FFFFFF;
  --color-text: #111B21;
  --color-text-secondary: #54656F;
  --color-border: #E9EDEF;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --shadow-card: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 24px rgba(37,211,102,0.15);
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --container-width: 1200px;
  --section-gap: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; max-width: 68ch; }
.text-muted { color: var(--color-text-secondary); }
.mono-accent { font-family: var(--font-mono); font-size: 0.85em; letter-spacing: -0.02em; }

/* Layout */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }
section { padding: var(--section-gap) 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.bg-alt { background: var(--color-bg-alt); }
.bg-dark { background: var(--color-dark); color: #fff; }
.bg-dark p, .bg-dark h2, .bg-dark h3, .bg-dark .text-muted { color: #fff; }
.bg-dark .text-muted { color: rgba(255,255,255,0.85); }

/* Header & Nav */
header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-border); padding: 12px 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 1.15rem; }
nav ul { display: flex; list-style: none; gap: 28px; }
nav a { text-decoration: none; color: var(--color-text-secondary); font-weight: 500; transition: color 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-deep-green); }
@media(max-width:768px){ nav ul{flex-wrap:wrap;gap:16px;} }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; text-decoration: none; cursor: pointer; border: none; transition: all 0.2s ease; font-size: 1rem; }
.btn-primary { background: linear-gradient(135deg, var(--color-deep-green), var(--color-primary)); color: #fff; box-shadow: 0 4px 12px rgba(37,211,102,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; border: 2px solid var(--color-deep-green); color: var(--color-deep-green); }
.btn-outline:hover { background: var(--color-deep-green); color: #fff; }
.btn:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }

/* Cards */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 24px; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card-icon { width: 40px; height: 40px; margin-bottom: 16px; stroke: var(--color-deep-green); flex-shrink: 0; }
.card h3 { margin-top: 0; }
.card-body { flex-grow: 1; }

/* Table */
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-bg-alt); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }

/* FAQ / Details */
details { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; }
summary { padding: 16px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; font-weight: 300; }
details[open] summary::after { content: "−"; }
details p { padding: 0 16px 16px 16px; margin: 0; }

/* Links / Related */
.related-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.related-list li a { display: block; padding: 12px; border-radius: var(--radius-sm); background: var(--color-bg-alt); text-decoration: none; color: var(--color-text); font-size: 0.95rem; transition: background 0.2s; height: 100%; }
.related-list li a:hover { background: #e4e8eb; }
.related-meta { display: block; font-size: 0.8rem; color: var(--color-text-secondary); margin-top: 6px; }

/* Footer */
footer { background: var(--color-dark); color: rgba(255,255,255,0.8); padding: 48px 0 24px; margin-top: 48px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: start; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.footer-brand img { width: 24px; height: 24px; filter: brightness(0) invert(1); }
.footer-links { list-style: none; display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.8); text-decoration: none; }
.footer-links a:hover { color: var(--color-primary); }
.copyright { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; text-align: center; color: rgba(255,255,255,0.5); }

/* SVG Animations */
.svg-path-flow { stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes dashFlow {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
.anim-flow { animation: dashFlow 5s linear infinite; }

.dot-flow { fill: var(--color-primary); }
@keyframes dotMove {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
.anim-dot { offset-path: path("M20,40 C60,10 100,70 140,40 S180,-10 220,40"); animation: dotMove 4s linear infinite; }
.anim-dot-delay { animation-delay: 1.5s; }

@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; }
  .svg-path-flow, .anim-flow, .anim-dot { animation: none !important; }
}
