/* WolfStack — styles.css v28 */

:root {
    --bg-primary: #181a20;
    --bg-secondary: #1e2028;
    --bg-tertiary: #272a33;
    --bg-card: #21242c;
    --bg-code: #1a1c24;
    --bg-sidebar: #1a1c22;

    --text-primary: #e8e8ed;
    --text-secondary: #a8a8b8;
    --text-muted: #6e6e82;

    --accent-primary: #dc2626;
    --accent-secondary: #ef4444;
    --accent-gradient: linear-gradient(135deg, #b91c1c 0%, #dc2626 50%, #ef4444 100%);
    --accent-glow: rgba(220, 38, 38, 0.3);
    --accent-subtle: rgba(220, 38, 38, 0.1);

    --success: #22c55e;
    --warning: #f59e0b;

    --border-color: rgba(255, 255, 255, 0.07);
    --border-glow: rgba(220, 38, 38, 0.35);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --sidebar-width: 220px;
    --container-width: 920px;
    --radius: 8px;
    --radius-sm: 5px;
    --transition: all 0.2s ease;
}

/* ── Light mode ───────────────────────────── */
[data-theme="light"] {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eaebed;
    --bg-card: #ffffff;
    --bg-code: #f0f1f3;
    --bg-sidebar: #f8f8fa;

    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5c;
    --text-muted: #7c7c90;

    --accent-primary: #c72020;
    --accent-secondary: #b91c1c;
    --accent-glow: rgba(220, 38, 38, 0.2);
    --accent-subtle: rgba(220, 38, 38, 0.07);

    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(220, 38, 38, 0.3);
}

[data-theme="light"] .sidebar-logo img,
[data-theme="light"] .nav-logo img,
[data-theme="light"] .logo-img { filter: none !important; }

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .hero-bg {
    background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(220, 38, 38, 0.05), transparent);
}

/* ── Reset ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 60px;
}

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

a { color: inherit; text-decoration: none; transition: var(--transition); }

code {
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 0.84em;
    color: var(--accent-secondary);
}

/* ── Top navbar (landing page) ────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(24, 26, 32, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 11px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
}

.logo-img {
    height: 24px;
    width: auto;
    filter: brightness(0) invert(1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-links a:not(.nav-btn) {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.82rem;
}

.nav-links a:not(.nav-btn):hover,
.nav-links a.active { color: var(--text-primary); }

.nav-btn {
    padding: 7px 15px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
}

.github-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}
.github-btn:hover { border-color: var(--border-glow); }

.sponsor-btn {
    background: var(--accent-primary);
    color: white;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: var(--transition);
}
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Top navbar ───────────────────────────── */
.wiki-layout {
    display: block;
    min-height: 100vh;
    position: relative;
}
.wiki-layout > .topnav {
    position: fixed;
    z-index: 10000;
}

.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(24, 26, 32, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}
[data-theme="light"] .topnav {
    background: rgba(255, 255, 255, 0.95);
}
.topnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 50px;
}
.topnav-logo {
    display: flex;
    align-items: center;
    margin-right: 24px;
    flex-shrink: 0;
}
.topnav-logo img {
    height: 24px;
}

.topnav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}
.topnav-item {
    position: relative;
}
.topnav-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-family);
    white-space: nowrap;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.topnav-link:hover,
.topnav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}
a.topnav-link.active {
    color: var(--accent-primary);
}

/* Sponsor CTA — elevated from a plain nav link so it reads as the one
   call-to-action among the nav's links and social icons. The pink heart is the
   universal "sponsor" signal; the label keeps --text-primary for AA contrast,
   and the pink stays distinct from the red commercial (Pricing/Enterprise) CTAs. */
.topnav-sponsor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 7px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid rgba(219, 97, 162, 0.45);
    background: rgba(219, 97, 162, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.topnav-sponsor svg {
    fill: #db61a2;
    flex-shrink: 0;
}
.topnav-sponsor:hover {
    background: rgba(219, 97, 162, 0.16);
    border-color: rgba(219, 97, 162, 0.8);
}

/* Pricing CTA — the primary conversion button in the top nav. Solid brand
   red so it reads as the money button, not a passive link. */
.topnav-pricing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 7px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid var(--accent-primary);
    background: var(--accent-primary);
    box-shadow: 0 1px 6px rgba(220, 38, 38, 0.30);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.topnav-pricing svg {
    fill: #fff;
    flex-shrink: 0;
}
.topnav-pricing:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.45);
}

.topnav-right-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.topnav-icon-link {
    font-size: 0.74rem;
    color: var(--text-muted) !important;
}
.topnav-icon-link:hover {
    color: var(--text-primary) !important;
}
.topnav-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-muted);
    transition: color 0.2s, background 0.2s, transform 0.2s;
    text-decoration: none;
}
.topnav-social:hover {
    color: var(--text-primary);
    background: var(--bg-hover, rgba(255,255,255,0.08));
    transform: scale(1.1);
}

/* Dropdown panels */
.dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    padding: 8px;
    min-width: 200px;
    z-index: 1001;
}
.has-dropdown:hover > .dropdown-panel,
.has-dropdown.open > .dropdown-panel {
    display: flex;
}
.dropdown-panel:not(.dropdown-mega) {
    flex-direction: column;
}
.dropdown-panel a {
    display: block;
    padding: 7px 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: var(--transition);
}
.dropdown-panel a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.dropdown-panel a.active {
    color: var(--accent-primary);
    background: var(--accent-subtle);
}
.dropdown-desc {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 1px;
}

/* Mega dropdown (multi-column) */
.dropdown-mega {
    display: none;
    left: 0;
    transform: none;
    padding: 16px;
    gap: 8px;
    min-width: auto;
}
.has-dropdown:hover > .dropdown-mega,
.has-dropdown.open > .dropdown-mega {
    display: flex;
}
.dropdown-col {
    min-width: 170px;
}
.dropdown-col-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 4px 12px 6px;
    margin-bottom: 2px;
}
.dropdown-col a {
    font-size: 0.78rem;
}

/* Hamburger toggle */
.topnav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}
.topnav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: var(--transition);
}
.topnav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.topnav-toggle.active span:nth-child(2) { opacity: 0; }
.topnav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* Legacy sidebar classes — hidden, kept for compat */
.sidebar, .sidebar-overlay { display: none !important; }

.wiki-main {
    margin-left: 0;
    min-width: 0;
}

/* ── Hero ──────────────────────────────────── */
.hero {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: center;
    padding: 100px 0 56px;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(220, 38, 38, 0.07), transparent);
    pointer-events: none;
}
.hero-content {
    position: relative;
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    padding: 5px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 28px;
    line-height: 1.65;
}
.hero-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

/* Hero screenshot showcase */
.hero-screenshot {
    max-width: 820px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.hero-screenshot img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Buttons ──────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    line-height: 1;
}
.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover {
    background: #c72020;
    box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover {
    border-color: var(--border-glow);
}
.btn-sponsor {
    background: var(--success);
    color: white;
}
.btn-sm {
    padding: 7px 14px;
    font-size: 0.8rem;
}

/* ── Stats ────────────────────────────────── */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 36px;
}
.stat { text-align: center; }
.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-primary);
}
.stat-label {
    font-size: 0.73rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Sections ─────────────────────────────── */
section { padding: 28px 0; }

.section-header {
    text-align: center;
    margin-bottom: 22px;
}
.section-header h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.section-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Overview / benefits grid */
.overview { background: var(--bg-secondary); }

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.benefit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}
.benefit-card:hover { border-color: var(--border-glow); }
.benefit-icon {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--accent-primary);
    font-weight: 700;
}
.benefit-card h3 { font-size: 0.92rem; margin-bottom: 6px; }
.benefit-card p { color: var(--text-secondary); font-size: 0.82rem; }

/* Feature / doc cards */
.why-wolfscale { background: var(--bg-primary); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.feature-link-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
}
.feature-link-card:hover { border-color: var(--accent-primary); }
.feature-link-card h3 { font-size: 0.96rem; margin-bottom: 6px; }
.feature-link-card p { color: var(--text-secondary); font-size: 0.82rem; margin-bottom: 10px; }
.learn-more {
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px;
    transition: var(--transition);
}
.feature-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.feature-icon { font-size: 1.5rem; margin-bottom: 10px; }
.feature-card h3 { font-size: 0.96rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 0.84rem; line-height: 1.55; margin: 0; }

/* Doc quick links */
.quick-links { background: var(--bg-secondary); }

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}
.doc-card:hover { border-color: var(--accent-primary); }
.doc-icon {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--accent-primary);
    font-weight: 700;
}
.doc-card h3 { font-size: 0.86rem; margin-bottom: 4px; }
.doc-card p { color: var(--text-muted); font-size: 0.72rem; }

/* CTA */
.cta {
    background: var(--bg-primary);
    text-align: center;
    padding: 56px 0;
}
.cta h2 { font-size: 1.4rem; margin-bottom: 8px; }
.cta p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; }
.cta-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Product cards (landing page) ─────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 26px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.product-card.flagship {
    border-color: var(--accent-primary);
    grid-column: 1 / -1;
}
.product-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.product-card-icon { font-size: 1.5rem; }
.product-card-title {
    font-size: 1.1rem;
    font-weight: 700;
}
.product-card-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: auto;
}
.product-card-badge.flagship {
    background: var(--accent-subtle);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}
.product-card-badge.available {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.product-card-badge.builtin {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.product-card-desc {
    color: var(--text-secondary);
    font-size: 0.84rem;
    margin-bottom: 14px;
    line-height: 1.55;
}

.product-card-features {
    list-style: none;
    margin-bottom: 18px;
    flex: 1;
}
.product-card-features li {
    padding: 4px 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
}
.product-card-features li::before {
    content: '·';
    color: var(--accent-primary);
    font-weight: 700;
    margin-right: 8px;
}

.product-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Support section (landing page) ───────── */
.support-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 48px 0;
    text-align: center;
}
.support-section h2 { font-size: 1.4rem; margin-bottom: 10px; }
.support-section > .container > p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.6;
}
.support-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Footer ───────────────────────────────── */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 14px 0;
}
/* Small × in the footer's top-right so visitors can dismiss the bar.
   State persists via localStorage (see inline script in footer.php). */
.footer-close {
    position: absolute;
    top: 4px;
    right: 10px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.footer-close:hover { opacity: 1; background: rgba(148,163,184,0.15); color: var(--text-primary); }
/* Re-open handle — a small translucent triangle pinned to bottom-right.
   Only visible when the footer has been hidden. Click to show it again. */
.footer-reopen {
    display: none;
    position: fixed;
    bottom: 8px;
    right: 10px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    z-index: 999;
    opacity: 0.5;
    transition: opacity 0.15s;
}
.footer-reopen:hover { opacity: 1; }
.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 16px;
    font-size: 0.74rem;
    color: var(--text-muted);
    text-align: center;
}
.footer-inner a { color: var(--accent-primary); }
.footer-inner a:hover { text-decoration: underline; }
[data-theme="dark"] .footer-disclaimer { color: #ffffff !important; }
[data-theme="light"] .footer-disclaimer { color: #000000 !important; }

/* Landing-page footer (wider) */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 28px 0;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
}
.footer-logo { height: 20px; width: auto; }
.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a { color: var(--text-secondary); font-size: 0.76rem; }
.footer-links a:hover { color: var(--accent-primary); }
.footer-copyright { color: var(--text-muted); font-size: 0.72rem; }
.footer-copyright a { color: var(--accent-primary); }

/* ── Wiki / doc page content ──────────────── */
.page-header {
    padding: 30px 36px 22px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}
.page-header h1 {
    font-size: 1.55rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.page-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.wiki-content {
    padding: 70px 36px 140px;
    margin-left: auto;
    margin-right: auto;
    background: var(--bg-primary);
    max-width: 860px;
    min-height: 100vh;
}

.content-section {
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 26px;
}
.content-section h1,
.content-section h2 {
    font-size: 1.18rem;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
.content-section h3 {
    font-size: 0.96rem;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--text-primary);
}
.content-section p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.86rem;
    line-height: 1.65;
}
.content-section ul,
.content-section ol {
    color: var(--text-secondary);
    margin-left: 20px;
    margin-bottom: 12px;
    font-size: 0.86rem;
}
.content-section li { margin-bottom: 5px; line-height: 1.6; }

.numbered-list {
    list-style: decimal;
    margin-left: 20px;
}
.numbered-list li {
    color: var(--text-secondary);
    margin-bottom: 6px;
    padding-left: 4px;
    font-size: 0.86rem;
}

/* ── Tables ───────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.data-table,
.comparison-table,
.content-section table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    font-size: 0.82rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 18px;
}
.data-table th,
.data-table td,
.comparison-table th,
.comparison-table td,
.content-section table th,
.content-section table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}
.data-table th,
.comparison-table th,
.content-section table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    font-size: 0.74rem;
    white-space: nowrap;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.data-table td,
.comparison-table td,
.content-section table td { color: var(--text-secondary); }

.data-table tr:last-child td,
.comparison-table tr:last-child td,
.content-section table tr:last-child td { border-bottom: none; }

/* Subtle alternating rows */
.data-table tbody tr:nth-child(even) td,
.content-section table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.015); }
[data-theme="light"] .data-table tbody tr:nth-child(even) td,
[data-theme="light"] .content-section table tbody tr:nth-child(even) td { background: rgba(0, 0, 0, 0.018); }

.data-table td:first-child,
.content-section table td:first-child { font-weight: 500; color: var(--text-primary); }
.data-table td.highlight,
.comparison-table td.highlight { color: var(--success); font-weight: 500; }
.data-table td.check { color: var(--success); font-weight: bold; }
.data-table td.method { width: 60px; }

/* ── Architecture diagrams ────────────────── */
.arch-diagram {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 18px 0;
    background: var(--bg-secondary);
}
.arch-layer {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}
.arch-layer:last-child { border-bottom: none; }
.arch-label {
    font-weight: 600;
    font-size: 0.92em;
    color: var(--text-primary);
}
.arch-sublabel {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-top: 2px;
}
.arch-components {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}
.arch-component {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.82em;
    color: var(--text-secondary);
    flex: 1;
    min-width: 140px;
    max-width: 240px;
    text-align: center;
}
.arch-component strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-size: 0.95em;
}
.arch-layer.accent {
    background: var(--accent-subtle);
    border-bottom-color: rgba(220, 38, 38, 0.15);
}
.arch-layer.accent .arch-label { color: var(--accent-secondary); }

/* Topology / network diagrams */
.topo-diagram {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: center;
    margin: 18px 0;
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}
.topo-site {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    min-width: 180px;
    flex: 1;
    max-width: 280px;
}
.topo-site-label {
    font-weight: 600;
    font-size: 0.88em;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.topo-node {
    font-family: var(--font-mono);
    font-size: 0.8em;
    color: var(--text-secondary);
    padding: 4px 0;
}
.topo-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--accent-secondary);
    font-size: 0.78em;
    font-weight: 600;
    padding: 0 8px;
    flex-shrink: 0;
}
.topo-connector::before {
    content: '';
    width: 48px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
}

/* Flow / sequence diagrams */
.flow-diagram {
    margin: 18px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}
.flow-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.flow-row:last-child { margin-bottom: 0; }
.flow-node {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.84em;
    text-align: center;
    min-width: 120px;
}
.flow-node strong { color: var(--text-primary); display: block; }
.flow-node span { color: var(--text-muted); font-size: 0.9em; }
.flow-node.accent {
    border-color: var(--accent-primary);
    background: var(--accent-subtle);
}
.flow-arrow {
    color: var(--accent-secondary);
    font-size: 1.2em;
    font-weight: bold;
    flex-shrink: 0;
}
.flow-arrow-down {
    display: flex;
    justify-content: center;
    color: var(--accent-secondary);
    font-size: 1.2em;
    font-weight: bold;
    padding: 4px 0;
}
.flow-caption {
    text-align: center;
    font-size: 0.82em;
    color: var(--text-muted);
    margin-top: 8px;
}
.flow-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.flow-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.84em;
    color: var(--text-secondary);
}
.flow-step-num {
    background: var(--accent-primary);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72em;
    font-weight: 700;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .topo-diagram { flex-direction: column; }
    .topo-connector::before { width: 2px; height: 24px; }
    .flow-row { flex-direction: column; }
    .flow-arrow { transform: rotate(90deg); }
    .arch-components { flex-direction: column; align-items: center; }
    .arch-component { max-width: 100%; }
}

/* ── Screenshots ─────────────────────────── */
.screenshot {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin: 18px 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.screenshot:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
[data-theme="light"] .screenshot {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .screenshot:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ── Layout helpers ───────────────────────── */
.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.three-column {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    margin-bottom: 18px;
}
.three-column > .column-card { flex: 1; min-width: 0; }

.column-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
}
.column-card.success { border-color: var(--success); }
.column-card h3 { font-size: 0.96rem; margin-bottom: 10px; }
.column-card ul { list-style: none; margin: 0; }
.column-card li {
    padding: 5px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
}
.column-card li:last-child { border-bottom: none; }

/* ── Highlight / info / warning boxes ─────── */
.highlight-box {
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
}
.highlight-box h3 { font-size: 1rem; margin-bottom: 10px; color: var(--accent-primary); }
.highlight-box p { color: var(--text-secondary); margin-bottom: 10px; font-size: 0.86rem; }
.highlight-box ul { list-style: none; margin-top: 12px; }
.highlight-box li {
    padding: 5px 0 5px 20px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.86rem;
}
.highlight-box li::before {
    content: '\2192';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin: 14px 0;
}
.info-box p {
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-size: 0.82rem;
}
.info-box p:last-child { margin-bottom: 0; }

.warning-box {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 14px 0;
}
.warning-box p { color: var(--text-secondary); font-size: 0.82rem; margin-bottom: 4px; }
.warning-box ul { margin-top: 8px; list-style: none; }
.warning-box li { color: var(--text-secondary); margin-bottom: 4px; font-size: 0.82rem; }

.example-box {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin: 10px 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ── Sizing grid ──────────────────────────── */
.sizing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.sizing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px 14px;
    text-align: center;
    position: relative;
}
.sizing-card.featured { border-color: var(--accent-primary); }
.sizing-card .badge {
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: white;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.sizing-nodes { font-size: 1.5rem; font-weight: 800; color: var(--accent-primary); }
.sizing-label { font-weight: 600; margin: 4px 0; font-size: 0.82rem; }
.sizing-desc { color: var(--text-muted); font-size: 0.72rem; }

/* Benefits row */
.benefits-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.benefit-item {
    background: var(--bg-card);
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}
.benefit-item strong { display: block; color: var(--accent-primary); margin-bottom: 3px; font-size: 0.86rem; }
.benefit-item span { font-size: 0.76rem; color: var(--text-muted); }

/* ── Cluster / flow diagrams ──────────────── */
.cluster-diagram {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.server-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}
.server-box.leader { border-color: var(--accent-primary); }
.server-title {
    padding: 8px 12px;
    font-weight: 600;
    background: var(--bg-tertiary);
    font-size: 0.82rem;
}
.server-box.leader .server-title {
    background: var(--accent-primary);
    color: white;
}
.server-content { padding: 10px; }
.server-content .component {
    background: var(--bg-tertiary);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    margin-bottom: 5px;
    font-size: 0.76rem;
    text-align: center;
}
.server-note {
    padding: 6px 10px;
    border-top: 1px solid var(--border-color);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
}

.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px;
}
.flow-step {
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    color: var(--text-secondary);
}
.flow-step.highlight {
    background: var(--accent-primary);
    color: white;
    font-weight: 600;
}
.flow-arrow {
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 0.82rem;
}

/* ── Code blocks ──────────────────────────── */
.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 14px;
}
.code-block.large pre { max-height: none; }
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 14px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}
.code-header span {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.copy-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.66rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: var(--font-family);
}
.copy-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}
.code-block pre {
    padding: 14px;
    overflow-x: auto;
    margin: 0;
    max-height: 320px;
}
.code-block code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
    background: none;
    padding: 0;
}

/* ── API endpoints ────────────────────────── */
.api-endpoint { margin-bottom: 16px; }
.endpoint-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.method {
    padding: 3px 7px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.method.get { background: rgba(34, 197, 94, 0.12); color: var(--success); }
.method.post { background: var(--accent-subtle); color: var(--accent-primary); }
.endpoint-header code { font-size: 0.86rem; }
.api-endpoint > p { color: var(--text-muted); font-size: 0.82rem; margin-left: 50px; }

/* ── Requirements / support grids ─────────── */
.req-grid {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.req-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    text-align: center;
    font-size: 0.82rem;
}

.support-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}
.support-link {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    transition: var(--transition);
}
.support-link:hover { border-color: var(--accent-primary); }
.support-link strong { display: block; margin-bottom: 3px; font-size: 0.86rem; }
.support-link span { color: var(--text-muted); font-size: 0.76rem; }

/* ── Page navigation ──────────────────────── */
.page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.page-nav a {
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 0.86rem;
}
.page-nav a:hover { text-decoration: underline; }

/* ── Support banner ───────────────────────── */
.support-banner {
    background: #991b1b;
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 200;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.support-banner a {
    color: #fde68a;
    font-weight: 700;
    text-decoration: underline;
}
.support-banner a:hover { color: #fff; }
.support-banner .banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 3px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.support-banner .banner-cta:hover {
    background: rgba(255, 255, 255, 0.25);
}
.support-banner .banner-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
}
.support-banner .banner-close:hover { color: #fff; }

/* ── Theme toggle ─────────────────────────── */
.theme-toggle {
    display: inline-block;
    position: relative;
    width: 38px;
    height: 22px;
    min-width: 38px;
    min-height: 22px;
    background-color: #333;
    border: 2px solid #444;
    border-radius: 11px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    overflow: visible;
}
.theme-toggle:hover { border-color: var(--accent-primary); }

.theme-toggle-slider {
    display: block;
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .theme-toggle {
    background-color: #e9ecef;
    border-color: var(--accent-primary);
}
[data-theme="light"] .theme-toggle-slider {
    transform: translateX(16px);
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 900px) {
    .topnav-toggle { display: flex; }

    .topnav-menu {
        display: none;
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        max-height: calc(100vh - 50px);
        background: var(--bg-primary);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        overflow-y: auto;
        z-index: 10001;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    }
    .topnav-menu.active { display: flex; }

    .topnav-item { position: static; }
    .has-dropdown > .dropdown-panel,
    .has-dropdown > .dropdown-mega {
        display: none;
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--bg-secondary);
        border-radius: var(--radius-sm);
        margin: 4px 0 8px;
        padding: 4px 8px;
    }
    .has-dropdown.open > .dropdown-panel,
    .has-dropdown.open > .dropdown-mega {
        display: flex;
    }
    /* Disable hover on mobile */
    .has-dropdown:hover > .dropdown-panel,
    .has-dropdown:hover > .dropdown-mega {
        display: none;
    }
    .has-dropdown.open:hover > .dropdown-panel,
    .has-dropdown.open:hover > .dropdown-mega {
        display: flex;
    }
    .dropdown-mega {
        flex-direction: column;
        gap: 4px;
    }
    .dropdown-col { min-width: auto; }

    .topnav-link { padding: 8px 12px; font-size: 0.86rem; width: 100%; text-align: left; }
    .topnav-right-group {
        margin-left: 0;
        padding: 12px 0;
        border-top: 1px solid var(--border-color);
        margin-top: 8px;
        justify-content: flex-start;
    }

    .wiki-content { padding: 62px 18px 36px; }
    .mobile-header { display: none; }

    .page-header { padding: 22px 18px 16px; }

    .hero { min-height: auto; padding: 70px 0 36px; }
    .hero h1 { font-size: 1.5rem; }
    .hero-stats { gap: 24px; }
    .hero-screenshot { border-radius: 6px; }

    section { padding: 36px 0; }
    .section-header h2 { font-size: 1.25rem; }

    .three-column { flex-direction: column; }
    .three-column > .column-card { flex: none; }

    .flow-diagram { flex-direction: column; gap: 5px; }
    .flow-arrow { transform: rotate(90deg); }

    .cta-buttons,
    .hero-buttons { flex-direction: column; align-items: center; }

    .product-grid { grid-template-columns: 1fr; }
    .product-card.flagship { grid-column: auto; }

    .support-banner { font-size: 0.72rem; }

    .footer-inner { flex-direction: column; text-align: center; }
}

@media (min-width: 901px) {
    .mobile-header { display: none; }
    .topnav-toggle { display: none; }
}

/* ── Pricing cards (enterprise page) ──────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin: 2rem 0;
}
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px 22px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}
.pricing-card:hover {
    border-color: rgba(220, 38, 38, 0.25);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}
.pricing-card.featured {
    border-color: rgba(220, 38, 38, 0.4);
}
.pricing-card.featured::before {
    content: '\2B50 Most Popular';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.pricing-tier {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.pricing-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.pricing-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}
.pricing-price .period {
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-muted);
}
.pricing-price .currency {
    font-size: 1.2rem;
    vertical-align: super;
}
.pricing-subtitle {
    font-size: 0.86rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}
.pricing-features li {
    padding: 6px 0;
    font-size: 0.84rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.86rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
    width: 100%;
}
.pricing-btn.primary {
    background: var(--accent-primary);
    color: white;
}
.pricing-btn.primary:hover { background: #c72020; }
.pricing-btn.secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.pricing-btn.secondary:hover { border-color: var(--border-glow); }
.pricing-btn.green {
    background: var(--success);
    color: white;
}

/* Enterprise what's-included grid */
.included-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 1.5rem 0;
}
.included-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.included-card .icon { font-size: 1.5rem; margin-bottom: 8px; }
.included-card h4 { font-size: 0.92rem; margin-bottom: 4px; }
.included-card p { color: var(--text-muted); font-size: 0.78rem; }

/* FAQ */
.faq-item { margin-bottom: 14px; }
.faq-item h4 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}
.faq-item p { color: var(--text-secondary); font-size: 0.84rem; }

/* Contact box */
.contact-box {
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    margin: 24px 0;
}
.contact-box h3 { font-size: 1.1rem; margin-bottom: 8px; }
.contact-box p { color: var(--text-secondary); font-size: 0.86rem; margin-bottom: 14px; }

/* ── Screenshot images in docs ────────────── */
.screenshot-wrap {
    margin: 16px 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.screenshot-wrap img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Animation helpers ────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate { animation: fadeInUp 0.6s ease-out both; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
.animate-delay-6 { animation-delay: 0.6s; }

/* ── Homepage layout ─────────────────────── */
.hp-hero {
    text-align: center;
    padding: 2rem 1rem 1rem;
    max-width: 640px;
    margin: 0 auto;
}
.hp-hero-logo {
    width: 220px;
    max-width: 60%;
    margin-bottom: 1rem;
    animation: float 4s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.hp-hero-headline {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}
.hp-hero-sub {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}
.hp-hero-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.hp-hero-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}
.hp-hero-meta a {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* Screenshot showcase */
.hp-screenshot {
    max-width: 800px;
    margin: 0 auto 2rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.hp-screenshot img {
    display: block;
    width: 100%;
    height: auto;
}

/* Install bar */
.hp-install {
    max-width: 1200px;
    margin: 0 auto 2rem;
    text-align: center;
    padding: 0 1rem;
}
.hp-install-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hp-install-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* Section headings */
.hp-section {
    max-width: 1200px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}
.hp-section-title {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
}
.hp-section-sub {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.84rem;
    margin-bottom: 1.25rem;
}

/* Feature grid */
.hp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}
.hp-feature {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    transition: var(--transition);
}
.hp-feature:hover {
    border-color: var(--border-glow);
}
.hp-feature h3 {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}
.hp-feature p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

/* Screenshots grid */
.hp-screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.hp-ss-card {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: var(--transition);
}
.hp-ss-card:hover {
    border-color: var(--border-glow);
}
.hp-ss-card img {
    width: 100%;
    display: block;
}
.hp-ss-caption {
    padding: 0.6rem 0.75rem;
}
.hp-ss-caption h3 {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}
.hp-ss-caption p {
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Steps */
.hp-steps {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.hp-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.hp-step-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 700;
    margin-top: 1px;
}
.hp-step h3 {
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.hp-step p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

/* Product grid */
.hp-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.75rem;
}
.hp-product {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}
.hp-product:hover {
    border-color: var(--border-glow);
}
.hp-product-flagship {
    border-color: var(--accent-primary);
    grid-column: 1 / -1;
}
.hp-product h3 {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.hp-product p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}
.hp-product-tag {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hp-tag-flagship {
    background: var(--accent-subtle);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}
.hp-tag-builtin {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* CTA */
.hp-cta {
    text-align: center;
    padding: 2rem 1rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
}
.hp-cta h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.hp-cta p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.hp-cta p a {
    color: var(--accent-primary);
    text-decoration: underline;
}
.hp-cta-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.hp-community {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}
.hp-community a {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}
.hp-community a:hover {
    color: var(--accent-primary);
}

@media (max-width: 900px) {
    .hp-hero { padding: 1.5rem 1rem 1rem; }
    .hp-hero-logo { width: 160px; }
    .hp-section { margin-bottom: 2rem; }
    .hp-screenshots-grid { grid-template-columns: 1fr; }
    .hp-products { grid-template-columns: 1fr; }
    .hp-product-flagship { grid-column: auto; }
    .hp-cta-actions { flex-direction: column; align-items: center; }
    .hp-cta-actions .btn { width: 100%; max-width: 240px; justify-content: center; }
}

/* ── Search ──────────────────────────────── */
.topnav-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-family);
    font-size: 0.78rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.topnav-search-btn:hover {
    border-color: var(--border-glow);
    color: var(--text-primary);
}
.search-shortcut {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    padding: 1px 5px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-muted);
    line-height: 1.4;
}
@media (max-width: 600px) {
    .search-shortcut { display: none; }
}

.search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    align-items: flex-start;
    justify-content: center;
    padding-top: min(20vh, 140px);
}
.search-overlay.active {
    display: flex;
}

.search-dialog {
    width: 100%;
    max-width: 560px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 16px 70px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: searchSlideIn 0.15s ease-out;
}
@keyframes searchSlideIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}
.search-input-wrap svg {
    flex-shrink: 0;
    color: var(--text-muted);
}
.search-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-family);
    font-size: 0.95rem;
    color: var(--text-primary);
}
.search-input-wrap input::placeholder {
    color: var(--text-muted);
}
.search-esc {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 6px;
}
.search-results:empty {
    display: none;
}
.search-results::-webkit-scrollbar { width: 6px; }
.search-results::-webkit-scrollbar-track { background: transparent; }
.search-results::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

.search-result {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}
.search-result:hover,
.search-result.active {
    background: var(--bg-tertiary);
}
.search-result-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.search-result-snippet {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.search-result-snippet mark {
    background: var(--accent-subtle);
    color: var(--accent-primary);
    border-radius: 2px;
    padding: 0 1px;
}
.search-no-results {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.84rem;
}

/* Search — light mode overrides */
[data-theme="light"] .search-overlay {
    background: rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .search-dialog {
    box-shadow: 0 16px 70px rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .search-result:hover,
[data-theme="light"] .search-result.active {
    background: var(--bg-tertiary);
}

/* ── Sponsor slot (EthicalAds) ─────────────── */
/* Aligned to the .wiki-content column width so the ad sits flush with body
   text rather than spanning the viewport. Empty until a publisher id is set,
   so these rules match nothing on the live site until the feature is enabled. */
.ea-slot {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 36px 40px;
}
.ea-slot-inner {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.ea-slot-note {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}
.ea-slot-note a {
    color: var(--accent-primary);
    text-decoration: none;
}
.ea-slot-note a:hover {
    text-decoration: underline;
}
@media (max-width: 768px) {
    .ea-slot { padding: 0 18px 32px; }
}

/* ── Floating docs table of contents (script.js builds it) ─────────── */
/* Hidden by default; only wide viewports have room beside the 860px
   content column without overlap. */
.doc-toc { display: none; }
@media (min-width: 1400px) {
    .doc-toc {
        display: block;
        position: fixed;
        top: 110px;
        right: 24px;
        width: 220px;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
        font-size: 0.78rem;
        line-height: 1.4;
        padding: 12px 14px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 10px;
    }
    .doc-toc-title {
        font-size: 0.66rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--text-muted);
        margin-bottom: 8px;
    }
    .doc-toc a {
        display: block;
        color: var(--text-secondary);
        text-decoration: none;
        padding: 3px 8px;
        border-left: 2px solid transparent;
        border-radius: 0 4px 4px 0;
    }
    .doc-toc a:hover { color: var(--text-primary); background: var(--bg-secondary); }
    .doc-toc a.active {
        color: var(--accent-primary);
        border-left-color: var(--accent-primary);
        font-weight: 600;
    }
}

/* ── Mobile mega-menu: collapsible columns (script.js toggles) ──────── */
@media (max-width: 900px) {
    .dropdown-mega .dropdown-col-title {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 12px;
        border-radius: 6px;
        background: var(--bg-primary);
        margin-bottom: 2px;
        -webkit-tap-highlight-color: transparent;
    }
    .dropdown-mega .dropdown-col-title::after {
        content: '▸';
        font-size: 0.7rem;
        color: var(--text-muted);
        transition: transform 0.15s;
    }
    .dropdown-mega .dropdown-col.col-open > .dropdown-col-title::after {
        transform: rotate(90deg);
    }
    .dropdown-mega .dropdown-col > a { display: none; }
    .dropdown-mega .dropdown-col.col-open > a { display: block; }
}
