.site-open {
    --open-bg: #060e17;
    --open-surface: rgba(13, 25, 39, 0.78);
    --open-surface-solid: #0d1927;
    --open-surface-2: #112234;
    --open-line: rgba(148, 197, 232, 0.12);
    --open-line-strong: rgba(123, 224, 239, 0.28);
    --open-text: #f1f7fc;
    --open-muted: #93adc2;
    --open-accent: #5eead4;
    --open-accent-blue: #38bdf8;
    --open-accent-soft: rgba(56, 189, 248, 0.1);
    --open-warn: #fbbf24;
    --open-warn-soft: rgba(251, 191, 36, 0.09);
    background:
        radial-gradient(ellipse 75% 40% at 72% -8%, rgba(14, 116, 144, 0.22), transparent 68%),
        radial-gradient(ellipse 45% 32% at 12% 18%, rgba(30, 64, 115, 0.16), transparent 65%),
        var(--open-bg);
    color: var(--open-text);
    -webkit-font-smoothing: antialiased;
}

.site-open .site-header-subbrand {
    color: var(--open-accent);
    font-weight: 500;
}

.open-shell {
    width: min(1720px, calc(100% - clamp(32px, 5vw, 96px)));
    margin: 0 auto;
    padding: clamp(20px, 2.5vw, 32px) 0 clamp(64px, 8vw, 112px);
    display: grid;
    grid-template-columns: clamp(232px, 16.5vw, 276px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(28px, 3.6vw, 60px);
}

/* Left sticky directory — clean borderless docs rail */
.open-sidebar {
    position: sticky;
    top: 84px;
    min-width: 0;
    padding-inline-end: 18px;
    border-inline-end: 1px solid var(--open-line);
}

.open-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.open-sidebar-head {
    padding: 0 8px 12px;
    border-bottom: 1px solid var(--open-line);
}

.open-sidebar-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--open-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.open-sidebar-title {
    margin: 6px 0 0;
    color: var(--open-text);
    font-size: 0.95rem;
    font-weight: 650;
}

.open-toc {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.open-toc-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.open-toc-heading {
    padding: 5px 8px;
    border-radius: 7px;
    color: var(--open-text);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.open-toc-link {
    display: block;
    padding: 6px 10px 6px 14px;
    margin-inline-start: 6px;
    border-inline-start: 1.5px solid var(--open-line);
    border-radius: 0 7px 7px 0;
    color: var(--open-muted);
    font-size: 0.83rem;
    line-height: 1.45;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.open-toc-heading:hover,
.open-toc-link:hover {
    color: var(--open-text);
    background: rgba(148, 197, 232, 0.06);
}

.open-toc-heading.is-active {
    color: var(--open-accent);
}

.open-toc-link.is-active {
    color: var(--open-accent);
    border-inline-start-color: var(--open-accent);
    background: linear-gradient(90deg, rgba(94, 234, 212, 0.1), transparent);
    font-weight: 600;
}

.open-sidebar-foot {
    padding-top: 14px;
    border-top: 1px solid var(--open-line);
}

.open-sidebar-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border: 1px solid var(--open-line-strong);
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.08);
    color: var(--open-accent);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.open-sidebar-cta:hover {
    border-color: var(--open-accent);
    background: rgba(94, 234, 212, 0.14);
    transform: translateY(-1px);
}

/* Right main content */
.open-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(32px, 4vw, 48px);
}

.open-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Hero */
.open-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: center;
    gap: clamp(24px, 3.5vw, 52px);
    padding: clamp(28px, 3.8vw, 44px);
    border: 1px solid var(--open-line-strong);
    border-radius: 24px;
    background:
        radial-gradient(ellipse 70% 80% at 88% 12%, rgba(56, 189, 248, 0.18), transparent 62%),
        linear-gradient(155deg, rgba(17, 36, 56, 0.92), rgba(9, 19, 31, 0.96));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 28px 64px rgba(2, 6, 14, 0.6);
    scroll-margin-top: 84px;
}

.open-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border: 1px solid var(--open-line-strong);
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--open-accent);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.open-hero h1 {
    margin: 16px 0 0;
    color: var(--open-text);
    font-size: clamp(2rem, 3.4vw, 3.1rem);
    font-weight: 750;
    line-height: 1.14;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.open-hero p {
    margin: 16px 0 0;
    color: var(--open-muted);
    font-size: 1.03rem;
    line-height: 1.68;
}

.open-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.open-button,
.open-button-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
    transition: all 0.16s ease;
}

.open-button {
    background: linear-gradient(135deg, #5eead4, #38bdf8);
    color: #041b24;
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
}

.open-button:hover {
    filter: brightness(1.08);
    color: #041b24;
    transform: translateY(-1px);
}

.open-button-ghost {
    border: 1px solid var(--open-line-strong);
    background: rgba(15, 31, 48, 0.65);
    color: var(--open-text);
}

.open-button-ghost:hover {
    border-color: var(--open-accent);
    color: var(--open-accent);
    background: rgba(56, 189, 248, 0.08);
}

/* Browser-style map frame */
.open-map-frame {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 197, 232, 0.22);
    border-radius: 14px;
    background: #08131f;
    box-shadow: 0 22px 44px rgba(2, 6, 14, 0.72);
}

.open-frame-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--open-line);
    background: #0e1c2b;
}

.open-frame-dots {
    display: inline-flex;
    gap: 6px;
}

.open-frame-dots i {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(148, 197, 232, 0.28);
}

.open-frame-url {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--open-muted);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.75rem;
}

.open-demo {
    display: block;
    width: 100%;
    height: clamp(260px, 26vw, 440px);
    border: 0;
}

/* Overview purpose cards */
.open-purpose {
    scroll-margin-top: 84px;
}

.open-purpose-title {
    margin: 0 0 14px;
    font-size: 1.12rem;
    font-weight: 650;
    color: var(--open-text);
}

.open-purpose-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.open-purpose-card {
    padding: 20px 22px;
    border: 1px solid var(--open-line);
    border-radius: 16px;
    background: var(--open-surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.open-purpose-card:hover {
    border-color: var(--open-line-strong);
    transform: translateY(-2px);
}

.open-purpose-num {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--open-accent-soft);
    color: var(--open-accent);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.74rem;
    font-weight: 700;
}

.open-purpose-card h3 {
    margin: 12px 0 7px;
    font-size: 1rem;
    color: var(--open-text);
}

.open-purpose-card p {
    margin: 0;
    color: var(--open-muted);
    font-size: 0.89rem;
    line-height: 1.62;
}

/* Quick start cards */
.open-topics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    scroll-margin-top: 84px;
}

.open-topic {
    position: relative;
    min-width: 0;
    padding: 24px 56px 24px 26px;
    border: 1px solid var(--open-line);
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(17, 34, 52, 0.85), rgba(11, 23, 36, 0.9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    color: var(--open-text);
    text-decoration: none;
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.open-topic:hover,
.open-topic:focus-visible {
    border-color: var(--open-accent);
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(2, 6, 14, 0.55);
}

.open-topic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.open-topic-meta code,
.open-card-title code {
    padding: 3px 8px;
    border: 1px solid var(--open-line-strong);
    border-radius: 6px;
    background: var(--open-accent-soft);
    color: var(--open-accent);
    font-size: 0.76rem;
    font-weight: 600;
}

.open-topic h2 {
    margin: 0;
    font-size: 1.18rem;
}

.open-topic p {
    margin: 8px 0 0;
    color: var(--open-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.open-topic-arrow {
    position: absolute;
    inset-inline-end: 22px;
    bottom: 24px;
    color: var(--open-accent);
    font-size: 1.25rem;
}

/* Doc sections */
.open-section {
    display: flex;
    flex-direction: column;
    gap: 18px;
    scroll-margin-top: 84px;
}

.open-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--open-line);
}

.open-section-kicker {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-top: 2px;
    border: 1px solid var(--open-line-strong);
    border-radius: 10px;
    background: var(--open-accent-soft);
    color: var(--open-accent);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.84rem;
    font-weight: 700;
}

.open-section-head h2 {
    margin: 0;
    font-size: clamp(1.38rem, 2.3vw, 1.75rem);
    letter-spacing: -0.02em;
}

.open-section-head p {
    margin: 4px 0 0;
    color: var(--open-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Doc cards */
.open-card {
    min-width: 0;
    padding: clamp(22px, 3vw, 30px);
    border: 1px solid var(--open-line);
    border-radius: 18px;
    background: var(--open-surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    scroll-margin-top: 84px;
}

.open-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--open-line);
}

.open-card-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.open-card-title h3 {
    margin: 0;
    color: var(--open-text);
    font-size: 1.15rem;
}

.open-ext-link {
    color: var(--open-accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.open-ext-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.open-spec {
    max-width: 78ch;
    margin: 16px 0 0;
    padding-inline-start: 1.25rem;
    color: var(--open-muted);
    line-height: 1.72;
}

.open-spec li + li {
    margin-top: 10px;
}

.open-spec li::marker {
    color: var(--open-accent);
}

.open-subblock {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--open-line);
    scroll-margin-top: 84px;
}

.open-subblock h4 {
    margin: 0 0 14px;
    color: var(--open-text);
    font-size: 0.98rem;
    font-weight: 650;
}

.open-lead-copy {
    max-width: 78ch;
    margin: 16px 0 0;
    color: var(--open-text);
    font-size: 0.98rem;
    line-height: 1.68;
}

.open-callout {
    margin-top: 16px;
    padding: 13px 16px;
    border-inline-start: 3px solid var(--open-accent);
    border-radius: 0 10px 10px 0;
    background: var(--open-accent-soft);
}

.open-callout.is-warn {
    border-inline-start-color: var(--open-warn);
    background: var(--open-warn-soft);
}

.open-callout-label {
    display: block;
    margin-bottom: 4px;
    color: var(--open-accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.open-callout.is-warn .open-callout-label {
    color: var(--open-warn);
}

.open-callout p {
    margin: 0;
    color: var(--open-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Tables */
.open-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--open-line);
    border-radius: 12px;
    background: rgba(6, 14, 23, 0.55);
}

.open-schema-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.open-schema-table th,
.open-schema-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--open-line);
    vertical-align: top;
}

.open-schema-table th {
    background: rgba(17, 34, 52, 0.85);
    color: var(--open-text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.open-schema-table td {
    color: var(--open-muted);
    line-height: 1.6;
}

.open-schema-table tbody tr:hover {
    background: rgba(56, 189, 248, 0.04);
}

.open-schema-table tr:last-child td {
    border-bottom: 0;
}

.open-schema-table td:first-child code {
    color: var(--open-accent);
    font-weight: 600;
    white-space: nowrap;
}

.open-schema-table td:nth-child(2) code,
.open-schema-table td:nth-child(3) code {
    color: #cbd5e1;
    font-size: 0.82rem;
}

/* Steps */
.open-steps {
    counter-reset: open-step;
    list-style: none;
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
    padding: 0;
}

.open-steps li {
    counter-increment: open-step;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--open-muted);
    line-height: 1.65;
}

.open-steps li::before {
    content: counter(open-step);
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-top: 2px;
    border: 1px solid var(--open-line-strong);
    border-radius: 50%;
    background: var(--open-accent-soft);
    color: var(--open-accent);
    font-size: 0.8rem;
    font-weight: 700;
}

/* Code box */
.open-depth-json {
    margin-top: 16px;
}

.open-code-box {
    border: 1px solid var(--open-line);
    border-radius: 12px;
    overflow: hidden;
    background: #07101a;
}

.open-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--open-line);
    background: #0d1c2b;
}

.open-code-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.open-code-lang {
    padding: 2px 7px;
    border-radius: 5px;
    background: var(--open-accent-soft);
    color: var(--open-accent);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 700;
}

.open-code-head h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.open-code-head button {
    padding: 5px 11px;
    border: 1px solid var(--open-line-strong);
    border-radius: 7px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--open-text);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.open-code-head button:hover {
    border-color: var(--open-accent);
    background: rgba(94, 234, 212, 0.18);
}

.open-code-box pre {
    max-width: 100%;
    margin: 0;
    padding: 16px;
    overflow: auto;
    color: #cfe8f6;
    font-size: 0.85rem;
    line-height: 1.65;
}

.open-copy-status {
    margin: 0;
    padding: 0 16px 12px;
    color: var(--open-accent);
    font-size: 0.82rem;
}

.open-copy-status:empty {
    display: none;
}

.open-card-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.open-shell a:focus-visible,
.open-shell button:focus-visible {
    outline: 2px solid var(--open-accent);
    outline-offset: 2px;
}

/* Widescreen & Responsive */
@media (min-width: 1360px) {
    .open-card-pair {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .open-hero {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr);
    }
}

@media (max-width: 980px) {
    .open-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .open-sidebar {
        position: static;
        padding-inline-end: 0;
        padding-bottom: 14px;
        border-inline-end: 0;
        border-bottom: 1px solid var(--open-line);
    }

    .open-toc {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 14px;
    }

    .open-toc-group {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
    }

    .open-toc-link {
        margin-inline-start: 0;
        padding: 5px 9px;
        border-inline-start: 0;
        border-radius: 7px;
    }

    .open-hero,
    .open-purpose-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .open-shell {
        width: calc(100% - 24px);
    }

    .open-topics {
        grid-template-columns: minmax(0, 1fr);
    }

    .open-demo {
        height: 220px;
    }
}

.open-gl-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.site-open .site-header,
.site-open .open-shell,
.site-open footer {
    position: relative;
    z-index: 1;
}

.site-open .site-header-shared {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding-inline: clamp(16px, 2vw, 28px);
    box-sizing: border-box;
}
