:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-alt: #f3f5f8;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #4b5563;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #eff6ff;
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.06), 0 8px 24px rgba(17, 24, 39, 0.04);
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.94rem;
  font-weight: 500;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--accent-hover); color: #ffffff; }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-alt); }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }

/* Hero */
.hero {
  padding: 64px 0 48px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 36px;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}
h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.lead {
  font-size: 1.12rem;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 58ch;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
  font-size: 0.87rem;
  color: var(--muted);
}
.trust-strip span::before {
  content: "✓ ";
  color: var(--emerald);
  font-weight: 700;
}

/* Interactive Demo Card */
.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.demo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.demo-lang-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.lang-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.lang-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.toggle-btn {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.demo-body {
  padding: 20px;
}
.demo-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}
.demo-line {
  position: relative;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  font-size: 0.98rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.demo-line:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.demo-hover-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 6px;
}
.demo-code {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #111827;
  color: #e5e7eb;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  overflow-x: auto;
}
.demo-footer-note {
  font-size: 0.8rem;
  color: var(--emerald);
  font-weight: 600;
  margin-top: 10px;
}

/* Sections & Grids */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.section-header {
  max-width: 68ch;
  margin-bottom: 28px;
}
h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
h3 {
  font-size: 1.08rem;
  margin: 0 0 8px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}
.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* Silo Directory */
.silo-block {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.silo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.silo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.silo-card a {
  font-weight: 650;
  color: var(--text);
  font-size: 0.98rem;
}
.silo-card a:hover { color: var(--accent); }
.silo-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Article Pages */
.article-hero {
  padding: 44px 0 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.breadcrumbs {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: #9ca3af;
}
.article-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 36px;
  padding: 40px 0 64px;
  align-items: start;
}
.article-prose section {
  margin-bottom: 32px;
}
.article-prose p {
  color: #1f2937;
  margin: 0 0 14px;
}
.compare-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}
.compare-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.compare-panel.translated {
  border-color: #bfdbfe;
  background: var(--accent-soft);
}
.compare-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}
.compare-panel.translated .compare-label { color: var(--accent); }
.steps-list {
  padding-left: 20px;
  margin: 12px 0 0;
}
.steps-list li {
  margin-bottom: 10px;
  color: #1f2937;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.faq-item h3 {
  font-size: 1rem;
  margin: 0 0 6px;
}
.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Sidebar */
.article-aside {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.aside-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.aside-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.aside-list li {
  padding: 7px 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.aside-list li:first-child { border-top: 0; padding-top: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 36px 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 900px) {
  .hero-grid, .article-grid, .feature-grid, .silo-grid, .compare-box {
    grid-template-columns: 1fr;
  }
  .article-aside { position: static; }
  .nav-links a.hide-sm { display: none; }
}
