:root {
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-border: #E2E8F0;
  --color-text-heading: #0F172A;
  --color-text-body: #334155;
  --color-text-muted: #64748B;
  --color-brand: #25D366;
  --color-brand-hover: #1DB854;
  --color-brand-dark: #166534;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-sans: ui-rounded, -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-w: 1160px;
  --space-section: clamp(3.5rem, 7vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-brand); text-decoration: none; transition: color 0.2s ease; }
a:hover, a:focus-visible { color: var(--color-brand-hover); }
a:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--color-text-heading); font-weight: 600; text-wrap: balance; line-height: 1.35; margin-bottom: 0.75rem; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-top: 0; }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); margin-top: 0; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.35rem; margin-bottom: 1rem; }
li { margin-bottom: 0.6rem; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
section { padding: var(--space-section) 0; }
.section-sub { color: var(--color-text-muted); font-size: 0.95rem; max-width: 680px; margin-bottom: 2.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover { box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08); transform: translateY(-2px); }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-brand); color: #FFF; font-weight: 500;
  padding: 0.85rem 1.8rem; border-radius: var(--radius-md); border: none; cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--color-brand-hover); transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--color-text-heading);
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); border: 1px solid var(--color-border);
  transition: border-color 0.2s ease;
}
.btn-secondary:hover { border-color: var(--color-brand); color: var(--color-brand); }

.hero-cta-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* Header & Nav */
.site-header { background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--color-border); }
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--color-text-heading); font-weight: 600; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-list { display: flex; gap: 1.5rem; list-style: none; }
.nav-link { color: var(--color-text-body); padding: 0.5rem 0; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-brand); border-bottom-color: var(--color-brand); }

/* Footer */
.site-footer { background: #0F172A; color: #CBD5E1; padding: 3rem 0 2rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col h4 { color: #F8FAFC; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-copy { text-align: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #1E293B; font-size: 0.9rem; color: #64748B; }

/* Table */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 0.9rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #F1F5F9; font-weight: 500; color: var(--color-text-heading); }
tr:last-child td { border-bottom: none; }

/* Details / FAQ */
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 1rem; padding: 0; overflow: hidden; }
summary { padding: 1.1rem 1.3rem; cursor: pointer; font-weight: 500; color: var(--color-text-heading); list-style: none; display: flex; align-items: center; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; font-size: 1.2rem; color: var(--color-text-muted); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
.details-content { padding: 0 1.3rem 1.2rem; color: var(--color-text-body); }

/* Cards (News) */
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.news-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.4; }
.news-excerpt { flex-grow: 1; font-size: 0.95rem; margin-bottom: 1rem; }
.link-btn { font-size: 0.95rem; font-weight: 500; display: inline-block; }

/* Related */
.related-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.related-item { padding: 1rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.related-title { font-weight: 500; margin-bottom: 0.3rem; }
.related-desc { font-size: 0.9rem; color: var(--color-text-muted); }

/* SVG Animations */
.draw-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: route-draw 4.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.float-node {
  animation: node-float 6s ease-in-out infinite 3.8s;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes route-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes node-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@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; }
  .draw-line, .float-node { animation: none !important; }
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-4 { margin-bottom: 2rem; }
.highlight { background: linear-gradient(to right, rgba(37, 211, 102, 0.15), transparent); padding: 0.1rem 0.3rem; border-radius: 4px; }
.icon-svg { width: 24px; height: 24px; stroke-width: 1.8; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--color-brand); color: #FFF; border-radius: 50%; font-weight: 600; font-size: 0.9rem; margin-right: 0.6rem; vertical-align: middle; }
.install-step { display: flex; align-items: flex-start; margin-bottom: 1rem; }
.install-step p { margin-bottom: 0; }
