*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-padding-top: 4rem;
}

html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #0f172a;
    color: #e2e8f0;
    -webkit-font-smoothing: antialiased;
}

/*
 * The shared chrome (header/footer/sidebar/pager) is rendered by Lit web
 * components into light DOM. `display: contents` removes the custom-element
 * wrapper from layout so the real `.site-header` / `.docs-sidebar` / etc.
 * inside behave as the flex children they always were.
 */
rig-header,
rig-footer,
rig-docs-sidebar,
rig-docs-pager {
    display: contents;
}

a {
    color: #6ee7b7;
}

.hero {
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-text h1 {
    font-size: 3.5rem;
    white-space: nowrap;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #f8fafc;
    margin: 0 0 1.5rem;
}

.hero-text h1 .highlight {
    background: linear-gradient(135deg, #6ee7b7, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #94a3b8;
    margin: 0 0 2rem;
}

.adj-parametric {
    color: #6ee7b7;
    font-weight: 600;
}

.adj-interactive {
    color: #60a5fa;
    font-weight: 600;
}

.adj-component {
    color: #c084fc;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-primary-hero {
    background: #6ee7b7;
    color: #0f172a;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    display: inline-block;
}

.btn-primary-hero:hover {
    background: #a7f3d0;
    transform: translateY(-2px);
}

.btn-secondary-hero {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
}

.btn-secondary-hero:hover {
    color: #f8fafc;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    max-height: 480px;
    border-radius: 16px;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.4));
}


.features {
    padding: 6rem 2rem;
    background: #1e293b;
}

.features-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.features-inner h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.features-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    margin: 0 0 3.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2rem;
    text-align: left;
    transition: border-color 0.3s, transform 0.3s;
}

.feature-card:hover {
    border-color: rgba(110, 231, 183, 0.3);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0 0 0.75rem;
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0;
}

.sample-section {
    padding: 6rem 2rem;
    background: #0f172a;
}

.why-rig {
    padding: 6rem 2rem;
    background: #0f172a;
}

.why-rig-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.why-rig-inner h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
    text-align: center;
}

.why-rig-inner h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 2.5rem auto 0.75rem;
    letter-spacing: -0.01em;
    max-width: 760px;
}

.why-rig-inner p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #cbd5e1;
    margin: 0 auto 1.25rem;
    max-width: 760px;
}

.why-rig-inner pre {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 0 auto 1.25rem;
    max-width: 760px;
}

.why-rig-inner pre code {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e2e8f0;
}

.problem-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 2.5rem 0 1rem;
}

.problem-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.75rem 1.5rem;
    text-align: left;
}

.problem-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.problem-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
    max-width: none;
}

.problem-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0;
    max-width: none;
}

.solves-heading {
    margin-top: 3.5rem !important;
    text-align: center;
}

@media (max-width: 900px) {
    .problem-cards {
        grid-template-columns: 1fr;
    }
}

.ai-section {
    padding: 6rem 2rem;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.problem-cards.two-up {
    grid-template-columns: repeat(2, 1fr);
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.workflow-section {
    padding: 6rem 2rem;
    background: #1e293b;
}

.workflow-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.workflow-inner h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.workflow-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    margin: 0 0 3rem;
}

.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    text-align: left;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.3s;
}

.workflow-step:hover {
    border-color: rgba(110, 231, 183, 0.2);
}

.workflow-step-number {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(110, 231, 183, 0.15);
    color: #6ee7b7;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(110, 231, 183, 0.3);
}

.workflow-step-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
    margin: 0 0 0.35rem;
}

.workflow-step-content p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0;
}

.workflow-step-content code {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85em;
    background: rgba(30, 41, 59, 0.8);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    color: #6ee7b7;
}

.sample-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.sample-text h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.sample-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #94a3b8;
    margin: 0 0 1.5rem;
}

.sample-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sample-highlights li {
    padding: 0.5rem 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    position: relative;
    padding-left: 1.5rem;
}

.sample-highlights li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #6ee7b7;
    font-weight: 700;
}

.sample-code {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2rem;
    overflow-x: auto;
}

.sample-code pre {
    margin: 0;
}

.sample-code code {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #e2e8f0;
}

@media (max-width: 768px) {
    .hero {
        padding: 6rem 1.5rem 3rem;
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-text h1 {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        max-height: 300px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .sample-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

}

.docs-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 4rem;
    min-height: 100vh;
}

.docs-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 4rem;
    height: calc(100vh - 4rem);
    overflow-y: auto;
    padding: 2rem 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.docs-nav h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6ee7b7;
    margin: 1.75rem 0 0.5rem;
}

.docs-nav h4:first-child {
    margin-top: 0;
}

.docs-nav a {
    display: block;
    padding: 0.3rem 0;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}

.docs-nav a:hover {
    color: #f8fafc;
}

.docs-content {
    flex: 1;
    min-width: 0;
    padding: 2.5rem 3rem 4rem;
}

.docs-section {
    margin-bottom: 3.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.docs-section:last-child,
.docs-section:has(+ .docs-pager) {
    border-bottom: none;
}

.docs-lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #94a3b8;
    max-width: 700px;
}

.docs-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 1rem;
    letter-spacing: -0.03em;
}

.docs-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 0 0 1rem;
}

.docs-page-header h1 {
    margin: 0;
}

.docs-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.docs-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 2rem 0 0.75rem;
}

.docs-content p {
    font-size: 1rem;
    line-height: 1.75;
    color: #94a3b8;
    margin: 0 0 1rem;
    max-width: 700px;
}

.docs-content ul,
.docs-content ol {
    color: #94a3b8;
    padding-left: 1.5rem;
    margin: 0 0 1.25rem;
    max-width: 700px;
}

.docs-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.docs-content pre {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 0 0 1.25rem;
}

.docs-content code {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #e2e8f0;
}

.docs-content p code,
.docs-content li code,
.docs-content td code {
    background: rgba(30, 41, 59, 0.8);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: #6ee7b7;
}

.code-block-with-copy {
    position: relative;
}

.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(15, 23, 42, 0.85);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.3rem 0.65rem;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.code-block-with-copy:hover .code-copy-btn,
.code-copy-btn:focus-visible {
    opacity: 1;
}

.code-copy-btn:hover {
    color: #f8fafc;
    border-color: rgba(110, 231, 183, 0.4);
    background: rgba(30, 41, 59, 0.95);
}

.code-copy-btn.copied {
    color: #6ee7b7;
    border-color: rgba(110, 231, 183, 0.5);
    opacity: 1;
}

.docs-table-wrapper {
    overflow-x: auto;
    margin: 0 0 1.25rem;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.docs-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: rgba(30, 41, 59, 0.6);
    color: #f8fafc;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.docs-table td {
    padding: 0.65rem 1rem;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    line-height: 1.6;
}

.docs-table tr:hover td {
    background: rgba(30, 41, 59, 0.3);
}

.docs-note {
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid #6366f1;
    border-radius: 0 8px 8px 0;
    padding: 0.875rem 1.25rem;
    margin: 0 0 1.25rem;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.docs-download {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(110, 231, 183, 0.08), rgba(99, 102, 241, 0.06));
    border: 1px solid rgba(110, 231, 183, 0.25);
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin: 0 0 1.5rem;
    max-width: 700px;
}

.docs-download-text {
    flex: 1;
    min-width: 0;
}

.docs-download-title {
    color: #f8fafc;
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0 0 0.25rem;
}

.docs-download-subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.docs-download-button {
    background: #6ee7b7;
    color: #0f172a;
    padding: 0.65rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.docs-download-button:hover {
    background: #a7f3d0;
    transform: translateY(-2px);
    color: #0f172a;
}

.docs-download-button[aria-disabled="true"] {
    background: rgba(110, 231, 183, 0.25);
    color: rgba(15, 23, 42, 0.6);
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 600px) {
    .docs-download {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 900px) {
    .docs-layout {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 1.5rem;
    }

    .docs-content {
        padding: 2rem 1.5rem 3rem;
    }
}

.docs-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.docs-pager-link {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.4);
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    min-width: 0;
}

.docs-pager-link:hover {
    border-color: rgba(110, 231, 183, 0.3);
    background: rgba(30, 41, 59, 0.6);
    transform: translateY(-2px);
}

.docs-pager-prev {
    grid-column: 1;
    text-align: left;
}

.docs-pager-next {
    grid-column: 2;
    text-align: right;
}

.docs-pager-spacer {
    display: block;
}

.docs-pager-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #6ee7b7;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.docs-pager-prev .docs-pager-label::before {
    content: "\2190  ";
}

.docs-pager-next .docs-pager-label::after {
    content: "  \2192";
}

.docs-pager-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .docs-pager {
        grid-template-columns: 1fr;
    }

    .docs-pager-prev,
    .docs-pager-next {
        grid-column: 1;
        text-align: left;
    }
}

.docs-nav a.active,
.docs-nav a[aria-current="page"] {
    color: #6ee7b7;
    font-weight: 600;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    height: 1.5rem;
    width: 1.5rem;
    object-fit: contain;
}

.logo:hover {
    color: #6ee7b7;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: #fff;
}

.header-nav .btn-docs {
    background: #6ee7b7;
    color: #0f172a;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.header-nav .btn-docs:hover {
    background: #a7f3d0;
    transform: translateY(-1px);
}

.site-footer {
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem 0;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-inner p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 640px) {
    .header-nav {
        gap: 1rem;
    }

    .header-nav a:not(.btn-docs) {
        display: none;
    }
}
