/* Demo figüründen sonra gelen sabit tablosu / kod başlığı */
.inst-demo+.doc-h3 {
    margin-top: 1.35rem;
}

/* figure: UA genelde margin-inline: 40px verir — metinle hizayı bozar */
figure.inst-demo {
    margin-block: 1.15rem 0;
    margin-inline: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.inst-demo {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(12, 14, 18, 0.55);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.inst-demo__hud {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

.inst-demo__tag {
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
}

.inst-demo__metrics {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.78);
}

.inst-demo__metric {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.25);
    font-size: 0.78rem;
}

.inst-demo__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 980px) {
    .inst-demo__grid {
        grid-template-columns: 1fr;
    }
}

.inst-demo__pane {
    position: relative;
    min-height: 340px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.inst-demo__pane--solo {
    min-height: 360px;
    border-right: none;
}

@media (max-width: 980px) {
    .inst-demo__pane {
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
}

.inst-demo__pane:last-child {
    border-right: none;
}

.inst-demo__pane-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 10px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.inst-demo__viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* WebGL canvas: satır içi hizadan kaçın, taşmayı kes */
.inst-demo__viewport canvas {
    display: block;
    margin: 0;
    max-width: 100%;
}

.inst-demo__caption {
    padding: 12px 16px 16px 16px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    line-height: 1.5;
}

.inst-demo__controls {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    overflow: visible;
}

.inst-demo__field {
    display: grid;
    gap: 6px;
    min-width: 220px;
    flex: 1;
}

.inst-demo__field--compact {
    min-width: 260px;
    flex: 0;
}

.inst-demo__field-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.inst-demo__range {
    width: 100%;
    margin: 12px 0;
}

.inst-demo__check {
    display: flex;
    gap: 8px;
    align-items: center;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}

.inst-demo__seg {
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.22);
}

.inst-demo__seg input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.inst-demo__seg-label {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    user-select: none;
}

.inst-demo__seg label+label {
    border-left: 1px solid rgba(255, 255, 255, 0.10);
}

.inst-demo__seg input:checked+.inst-demo__seg-label {
    color: rgba(255, 255, 255, 0.92);
    background: linear-gradient(180deg, rgba(46, 231, 242, 0.18), rgba(181, 108, 255, 0.10));
}