:root {
  --bg-primary: #0b0b0f;
  --bg-secondary: #121217;
  --bg-card: #18181f;
  --bg-hover: #22222b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(34, 197, 94, 0.4);
  --text-primary: #eaeaee;
  --text-secondary: #9a9aa6;
  --accent: #22c55e;
  --accent-glow: rgba(34, 197, 94, 0.15);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.section-spacer { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.text-muted { color: var(--text-secondary); }

/* Typography */
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 1rem; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; margin: 0 0 1.25rem; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 600; margin: 0 0 0.75rem; }
p { font-size: clamp(1rem, 1.4vw, 1.125rem); color: var(--text-secondary); margin: 0 0 1rem; }
strong { font-weight: 600; color: var(--text-primary); }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #3dd674; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 11, 15, 0.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand img { height: 30px; width: auto; display: block; filter: brightness(1.05); }
.brand-name { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); }

.main-nav ul { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  color: var(--text-secondary); font-weight: 500; font-size: 0.95rem;
  padding: 0.4rem 0; position: relative; transition: color 0.2s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--accent); }
.main-nav a[aria-current="page"]::after {
  content: ""; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.65rem; border-radius: var(--radius-md);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s, background 0.2s;
  cursor: pointer; border: none; user-select: none;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: #08100a; box-shadow: 0 4px 12px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(34, 197, 94, 0.25); background: #2bd166; }
.btn-outline { background: transparent; border: 1px solid var(--border-subtle); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* Cards & Grids */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 1.75rem;
  transition: border-color 0.3s, transform 0.2s;
}
.card:hover { border-color: var(--border-accent); transform: translateY(-3px); }
.card-icon { width: 48px; height: 48px; color: var(--accent); margin-bottom: 1.1rem; }
.card-meta { font-size: 0.85rem; color: var(--text-secondary); margin-top: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.9rem; border-radius: var(--radius-sm); }

/* Tables */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-subtle); }
th { font-weight: 600; color: var(--text-primary); background: var(--bg-secondary); }
td { color: var(--text-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
details { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; transition: border-color 0.2s; }
details[open] { border-color: var(--border-accent); }
summary {
  padding: 1.1rem 1.25rem; cursor: pointer; font-weight: 600; color: var(--text-primary);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; font-weight: 300; color: var(--accent); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0.5rem 1.25rem 1.25rem; color: var(--text-secondary); line-height: 1.6; }

/* Forms/Downloads */
.download-box { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: clamp(2rem, 4vw, 3rem); text-align: center; }
.download-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.5rem; }
.install-steps { display: grid; gap: 1rem; margin: 1.5rem 0; text-align: left; counter-reset: step; }
.step-item { display: flex; gap: 1rem; align-items: flex-start; background: var(--bg-card); padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); }
.step-num { min-width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--accent-glow); color: var(--accent); font-weight: 700; border-radius: 50%; font-size: 0.9rem; }
.step-content { flex: 1; }

/* SVG Animation Utilities */
.svg-viz { width: 100%; height: auto; overflow: visible; display: block; }
.svg-viz path, .svg-viz circle, .svg-viz rect { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-draw { animation: svg-draw 5s ease-in-out infinite alternate; }
.anim-breathe { animation: svg-pulse 7s infinite alternate ease-in-out; transform-box: fill-box; transform-origin: center; }
.anim-delay-1 { animation-delay: -1.5s; }
.anim-delay-2 { animation-delay: -3s; }
.anim-delay-3 { animation-delay: -4.5s; }

@keyframes svg-draw { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes svg-pulse { 0% { opacity: 0.5; transform: scale(0.96); } 100% { opacity: 0.95; transform: scale(1.03); } }

@media (prefers-reduced-motion: reduce) {
  .anim-draw, .anim-breathe { animation: none !important; stroke-dashoffset: 0; opacity: 0.8; }
  html { scroll-behavior: auto; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border-subtle); padding: 3rem 0 2rem; margin-top: 2rem; background: var(--bg-secondary); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.8rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent); }
.copyright { text-align: center; color: var(--text-secondary); font-size: 0.85rem; padding-top: 1.5rem; border-top: 1px solid var(--border-subtle); }

/* Utility */
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }
