:root {
  --bg: #0f0f14;
  --surface: #1a1a22;
  --surface-2: #1c1c27;
  --border: #2e2e3d;
  --border-soft: #1d1d27;
  --border-strong: #424257;
  --text: #fafafa;
  --text-muted: #a3a3a3;
  --text-dim: #737373;
  --accent: #ffcd20;
  --accent-hover: #CCA606;
  --accent-soft: rgba(255, 205, 32, 0.1);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.1);
  --radius: 8px;
  --radius-sm: 6px;
  --max-width: 1080px;
  --touch-target: 44px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
code, pre { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 15, 20, 0.85); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: var(--max-width); margin: 0 auto; gap: 12px; }
.logo { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--text); }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active:not(.nav-cta)::after { content: ""; display: block; height: 2px; background: var(--accent); border-radius: 2px; margin-top: 4px; }
.nav-cta { padding: 9px 16px; background: var(--accent); color: #0f0f14 !important; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; transition: background 0.15s; min-height: var(--touch-target); display: inline-flex; align-items: center; }
.nav-cta:hover { background: var(--accent-hover); }

/* Mobile hamburger toggle */
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); width: 40px; height: 40px; padding: 0; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle:hover { border-color: var(--text-muted); }
.nav-toggle .bars { display: block; width: 18px; height: 2px; background: var(--text); position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text); }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.nav-toggle.open .bars { background: transparent; }
.nav-toggle.open .bars::before { transform: rotate(45deg); top: 0; }
.nav-toggle.open .bars::after { transform: rotate(-45deg); top: 0; }

@media (max-width: 800px) {
  .nav { flex-wrap: wrap; padding: 12px 16px; }
  .nav-toggle { display: inline-flex; order: 3; }
  .nav-links {
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 480px; }
  .nav-links a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--border-soft);
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
  }
  .nav-links a:last-of-type { border-bottom: none; }
  .nav-links a.active:not(.nav-cta)::after { display: none; }
  .nav-links a.active { color: var(--accent); }
  .nav-cta { margin-top: 8px; justify-content: center; }
}

/* Hero - Sparked Host style */
.hero { padding: 80px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.hero-badge { display: inline-block; padding: 6px 14px; background: rgba(255, 205, 32, 0.1); color: #ffcd20; border: 1px solid rgba(255, 205, 32, 0.3); border-radius: 99px; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.hero-stat { color: #a3a3a3; font-size: 14px; margin-bottom: 12px; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 28px; }
.hero h1 .accent { color: var(--accent); }
.hero p { color: var(--text-muted); }
.hero-checks { list-style: none; padding: 0; margin-bottom: 32px; }
.hero-checks li { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 16px; color: #d4d4d8; }
.hero-checks .check { width: 20px; height: 20px; color: #ffcd20; flex-shrink: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-lg { padding: 14px 28px; font-size: 15px; min-height: 48px; }
.hero-scroll-stack { height: 580px; overflow-y: auto; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; padding-right: 8px; }
.hero-scroll-stack::-webkit-scrollbar { display: none; }
.scroll-card { margin-bottom: 12px; border-radius: 8px; overflow: hidden; border: 1px solid #2e2e3d; background: #1a1a22; }
.scroll-card img { width: 100%; height: auto; display: block; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-scroll-stack { display: none; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; transition: all 0.15s; cursor: pointer; border: none; font-family: inherit; min-height: var(--touch-target); }
.btn-primary { background: var(--accent); color: #0f0f14; }
.btn-primary:hover { background: var(--accent-hover); color: #0f0f14; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-muted); color: var(--text); }

/* Code tabs container (functional) */
.code-tabs-container { background: #0f0f14; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.code-tabs-container .code-tabs { display: flex; border-bottom: 1px solid var(--border); padding: 0 8px; background: var(--surface); margin: 0; }
.code-tabs-container .code-tab { padding: 12px 14px; font-size: 12px; color: var(--text-dim); background: none; border: none; cursor: pointer; font-family: inherit; border-bottom: 2px solid transparent; transition: all 0.15s; min-height: var(--touch-target); }
.code-tabs-container .code-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.code-tabs-container .code-tab:hover { color: var(--text); }
.code-content { display: none; }
.code-content.active { display: block; }
.code-content .code-block { border: none; border-radius: 0; margin: 0; }
.code-content pre { padding: 20px; color: #e5e5e5; font-size: 13px; line-height: 1.6; overflow-x: auto; }

/* Sections */
section { padding: 64px 0; border-top: 1px solid var(--border-soft); }
section:first-of-type { border-top: none; }
.section-h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.section-sub { color: var(--text-muted); margin-bottom: 40px; max-width: 600px; }
.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.feature-card { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.15s; }
.feature-card:hover { border-color: var(--border); }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.feature-card p { color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.feature-card .icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--accent-soft); color: var(--accent); border-radius: 6px; font-size: 16px; margin-bottom: 14px; font-weight: 700; }

/* SVG icon replacements (feature cards + elsewhere) */
.icon-svg { width: 24px; height: 24px; display: inline-block; vertical-align: middle; }
.feature-card .icon-svg-wrap { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(255, 205, 32, 0.1); border-radius: 8px; margin-bottom: 14px; }

/* Code block */
.code-block { background: #0f0f14; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.code-block pre { color: #e5e5e5; }
.code-block .comment { color: #737373; }
.code-block .keyword { color: #ffcd20; }
.code-block .string { color: #fbbf24; }
.code-tabs { display: flex; border-bottom: 1px solid var(--border); margin: -20px -20px 16px; padding: 0 8px; }
.code-tab { padding: 10px 14px; font-size: 12px; color: var(--text-dim); background: none; border: none; cursor: pointer; font-family: inherit; border-bottom: 2px solid transparent; transition: all 0.15s; }
.code-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Pricing - hero + Free banner */
.pricing-hero { text-align: center; padding: 72px 0 32px; }
.pricing-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 16px; }
.pricing-subtitle { color: var(--text-muted); font-size: 17px; max-width: 540px; margin: 0 auto; }

.pricing-free-section { padding: 0 0 32px; }
.pricing-free-banner { padding: 40px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; display: grid; grid-template-columns: 0.8fr 1.6fr; gap: 40px; align-items: center; }
.pricing-free-banner .banner-left { text-align: left; }
.pricing-free-banner .free-price-large { font-size: 64px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.pricing-free-banner .free-price-large .currency { font-size: 28px; vertical-align: top; color: var(--text-muted); margin-right: 2px; }
.pricing-free-banner .free-price-large .period { font-size: 16px; font-weight: 500; color: var(--text-dim); margin-left: 6px; }
.pricing-free-banner .free-tagline { color: var(--text-muted); font-size: 14px; margin-top: 12px; }
.pricing-free-banner .free-features-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
.pricing-free-banner .free-features-list li { font-size: 13px; color: #d4d4d8; display: flex; align-items: flex-start; gap: 8px; }
.pricing-free-banner .free-features-list li::before { content: ''; width: 5px; height: 5px; background: #ffcd20; border-radius: 50%; flex-shrink: 0; margin-top: 7px; }
@media (max-width: 760px) {
  .pricing-free-banner { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
  .pricing-free-banner .free-price-large { font-size: 48px; }
  .pricing-free-banner .free-features-list { grid-template-columns: 1fr; }
}

.price-desc { font-size: 13px; color: var(--text-muted); margin: -12px 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); }

.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .pricing-grid { grid-template-columns: 1fr; } }

.price-card { padding: 28px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; position: relative; transition: border-color 0.2s, transform 0.2s; }
.price-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.price-card.featured { border-color: var(--accent); }
.price-card.featured::before { content: 'Popular'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #0f0f14; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.price-name { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.price-amount { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 4px; line-height: 1; }
.price-amount .currency { font-size: 18px; vertical-align: top; color: #a3a3a3; margin-right: 2px; }
.price-period { color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }
.price-features { list-style: none; margin-bottom: 24px; flex: 1; padding: 0; }
.price-features li { font-size: 13px; color: #d4d4d8; padding: 6px 0; display: flex; align-items: flex-start; gap: 8px; }
.price-features li::before { content: ''; width: 5px; height: 5px; background: #ffcd20; border-radius: 50%; flex-shrink: 0; margin-top: 7px; }
.price-cta { display: flex; align-items: center; justify-content: center; text-align: center; padding: 11px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 6px; font-size: 13px; font-weight: 600; transition: all 0.15s; min-height: 44px; }
.price-card.featured .price-cta { background: var(--accent); color: #0f0f14; border-color: var(--accent); }
.price-cta:hover { border-color: var(--accent); color: var(--accent); }
.price-card.featured .price-cta:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #0f0f14; }

/* Comparison table */
.cmp-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 24px; }
.cmp-table th, .cmp-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.cmp-table th { color: var(--text-dim); font-weight: 500; font-size: 13px; }
.cmp-table td.yes { color: var(--accent); font-weight: 600; }
.cmp-table td.no { color: var(--red); opacity: 0.8; }
.cmp-table tr:hover td { background: var(--surface); }

/* Steps - remove leading zeros */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 32px; }
.step { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step-num { font-size: 32px; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 12px; }
.step h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--text-muted); }
.step code { display: block; margin-top: 12px; padding: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; color: var(--accent); overflow-x: auto; white-space: pre; }

/* FAQ accordion - Sparked Host style */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; overflow: hidden; background: var(--surface); transition: border-color 0.2s; }
.faq-item.open { border-color: var(--border-strong); }
.faq-q { padding: 18px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 600; color: var(--text); user-select: none; }
.faq-q .chevron { width: 18px; height: 18px; color: var(--text-dim); transition: transform 0.3s ease, color 0.2s; flex-shrink: 0; margin-left: 16px; }
.faq-item.open .faq-q .chevron { transform: rotate(180deg); color: var(--accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 24px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.faq-item.open .faq-a { max-height: 400px; padding: 0 24px 18px; }

/* Tools grid (MCP page) */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 24px; }
.tool-card { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tool-card code { color: var(--accent); font-size: 13px; }
.tool-card p { color: var(--text-muted); font-size: 13px; margin-top: 6px; }

/* Footer - Sparked Host style */
footer { border-top: 1px solid var(--border-soft); padding: 56px 0 32px; margin-top: 64px; background: var(--bg); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-brand .logo { font-size: 18px; margin-bottom: 12px; }
.footer-brand p { color: var(--text-dim); font-size: 13px; max-width: 280px; margin-bottom: 18px; }
.footer-social { display: flex; gap: 10px; align-items: center; }
.social-link { color: var(--text-dim); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; transition: color 0.15s, border-color 0.15s; min-height: 36px; }
.social-link:hover { color: var(--accent); border-color: var(--accent); }
.social-link img { width: 18px; height: 18px; display: block; }
.footer-col h5 { font-size: 13px; color: var(--text-dim); font-weight: 500; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-muted); font-size: 14px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { padding-top: 24px; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; font-size: 13px; color: var(--text-dim); flex-wrap: wrap; gap: 12px; }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}



/* Hero grid (legacy fallback used on a few inner pages) */
.hero-grid-fallback { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 800px) { .hero-grid-fallback { grid-template-columns: 1fr; } .hero-code { order: 2; } }

/* Stats row */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 24px; padding: 32px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.stat-num { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); }
.stat-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

/* CTA banner - hexagonal pattern, no gradient */
.cta-banner { padding: 56px 48px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-align: center; margin-top: 64px; position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg width='56' height='100' viewBox='0 0 56 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28 0L56 16.18V49.4L28 65.6L0 49.4V16.18L28 0Z' fill='none' stroke='%232e2e3d' stroke-width='1'/%3E%3C/svg%3E"); background-size: 56px 100px; opacity: 0.5; }
.cta-banner > * { position: relative; z-index: 1; }
.cta-hex { width: 160px; height: 184px; margin: 0 auto 24px; background: var(--accent); clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); display: flex; align-items: center; justify-content: center; color: #0f0f14; font-weight: 800; font-size: 14px; text-align: center; line-height: 1.2; padding: 0 20px; }
.cta-banner h3 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.cta-banner p { color: var(--text-muted); margin-bottom: 24px; }
.cta-banner .hero-cta { justify-content: center; }

/* Page-level fade-in */
body { animation: pageFadeIn 0.2s ease; }
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Inner page hero - centered CTA */
.hero-cta.center { justify-content: center; }
.pricing-page-hero .hero-cta,
.docs-hero .hero-cta,
.page-hero .hero-cta { justify-content: center; }
.hero[style*="center"] .hero-cta { justify-content: center; }

/* Free tier features list on index pricing section */
.free-features { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 24px; }
.free-features li { font-size: 13px; color: #d4d4d8; display: flex; align-items: center; gap: 6px; }
.free-features li::before { content: ''; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }
