.pyramid-example-box {
    margin: 1.2rem 0;
    padding: 1rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}
.pyramid-example-box pre {
    margin: 0;
    font-family: "Courier New", monospace;
    font-size: 1.25rem;
    line-height: 1.25;
}
.stepwise-widget {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid #dbeafe;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}
.stepwise-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.stepwise-tab {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: white;
    color: #334155;
    padding: 0.55rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.stepwise-tab:hover,
.stepwise-tab.active {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
    transform: translateY(-1px);
}
.stepwise-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1rem;
}
.stepwise-panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1rem;
    min-height: 280px;
}
.stepwise-panel h3 {
    margin-top: 0;
    color: #34387f;
}
.stepwise-card {
    margin-bottom: 0.7rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.stepwise-card.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}
.stepwise-card strong {
    display: block;
    margin-bottom: 0.25rem;
}
.stepwise-code,
.code-block,
.reveal .slide-code {
    white-space: pre-wrap;
    font-family: "Courier New", monospace;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem;
    line-height: 1.55;
    color: #0f172a;
}
.reveal .slide-code {
    font-size: 1rem;
    max-width: 980px;
    margin: 1rem auto;
}
.stepwise-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.stepwise-controls button {
    border: none;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    background: #0f172a;
    color: white;
    font-weight: 800;
    cursor: pointer;
}
.stepwise-controls button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.stepwise-output {
    padding: 1rem;
    border-radius: 18px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
}
.stepwise-output pre {
    margin: 0;
    font-family: "Courier New", monospace;
    font-size: 1.2rem;
    line-height: 1.25;
}
.stepwise-state-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
}
.stepwise-state {
    padding: 0.8rem;
    border-radius: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.stepwise-state span {
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    color: #166534;
}
.stepwise-state strong {
    display: block;
    font-size: 1.15rem;
    color: #14532d;
}
@media (max-width: 800px) {
    .stepwise-grid {
        grid-template-columns: 1fr;
    }
    .stepwise-state-grid {
        grid-template-columns: 1fr;
    }
}