body {
    font-family: system-ui, -apple-system, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    line-height: 1.6;
}

/* Links */
a {
    color: #1976d2;
}

a:hover {
    color: #1565c0;
}

/* Site header */
.site-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.site-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.site-header a {
    display: flex;
    align-items: center;
}

/* Navigation */
.docs-nav {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1.5rem;
}

.docs-nav a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}

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

.docs-nav a.active {
    color: #1976d2;
    border-bottom-color: #1976d2;
}

/* Intro section */
.intro {
    margin-bottom: 2rem;
}

.intro p {
    margin-bottom: 0.75rem;
}

/* Audio Context container */
.audio-context {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.audio-context-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.audio-context-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #1e293b;
}

.context-info {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    font-size: 0.85rem;
}

.context-info dt {
    color: #64748b;
    font-weight: 500;
}

.context-info dd {
    margin: 0;
    color: #334155;
    font-family: ui-monospace, monospace;
}

/* Play/Stop button */
.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: #4269d0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.play-button:hover {
    background: #3558b8;
}

.play-button.playing {
    background: #dc2626;
}

.play-button.playing:hover {
    background: #b91c1c;
}

/* Node stack - vertical layout */
.node-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Node connector line */
.node-connector {
    width: 2px;
    height: 20px;
    background: #cbd5e1;
    position: relative;
}

.node-connector::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #cbd5e1;
}

/* Audio node blocks */
.audio-node {
    width: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

/* Node type color coding */
.audio-node.oscillator {
    border-left: 3px solid #3b82f6;
}

.audio-node.biquadfilter {
    border-left: 3px solid #f59e0b;
}

.audio-node.gain {
    border-left: 3px solid #10b981;
}

.audio-node.stereopanner {
    border-left: 3px solid #06b6d4;
}

.audio-node.compressor {
    border-left: 3px solid #f43f5e;
}

.audio-node.analyser {
    border-left: 3px solid #8b5cf6;
}

.audio-node.destination {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Node header */
.node-header {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.node-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

/* Node body */
.node-body {
    padding: 1rem;
}

.node-description {
    font-size: 0.9rem;
    color: #475569;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.node-description code {
    font-family: ui-monospace, monospace;
    background: #e2e8f0;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85em;
}

/* Node controls */
.node-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem 1.5rem;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-row[hidden] {
    display: none;
}

.control-row label {
    min-width: 75px;
    font-size: 0.8rem;
    color: #475569;
    font-weight: 500;
}

.control-row input[type="range"] {
    flex: 1;
    min-width: 80px;
}

.control-row select {
    flex: 1;
    padding: 0.3rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.85rem;
    background: white;
}

.control-row .value {
    min-width: 60px;
    font-size: 0.75rem;
    color: #64748b;
    text-align: right;
    font-family: ui-monospace, monospace;
}

/* Node visualization */
.node-visualization {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.visualization-canvas {
    display: block;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

/* Node info (for destination) */
.node-info {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    font-size: 0.85rem;
}

.node-info dt {
    color: #64748b;
    font-weight: 500;
}

.node-info dd {
    margin: 0;
    color: #334155;
    font-family: ui-monospace, monospace;
}

/* Input styling */
input, select {
    font-family: inherit;
    font-size: inherit;
}

input:focus, select:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

/* Responsive */
@media (max-width: 700px) {
    .audio-context-header {
        flex-direction: column;
        gap: 1rem;
    }

    .context-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .node-controls {
        grid-template-columns: 1fr;
    }

    .control-row {
        flex-wrap: wrap;
    }

    .control-row label {
        min-width: 100%;
    }
}
