/* Inline SVG diagrams drawn by docs/_variable_diagrams.py. Colours come from Furo's variables,
   so the diagrams follow its light and dark modes. */

.spz-diagram {
    --d-fg: var(--color-foreground-primary);
    --d-muted: var(--color-foreground-secondary);
    --d-line: var(--color-background-border);
    --d-panel: var(--color-background-secondary);
    --d-blue: #2563eb;
    --d-time: #bfdbfe;
    --d-val: #bbf7d0;
    --d-axis: #ddd6fe;
    --d-hl: #fdba74;
    --d-row: #fde68a;
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    font-family: var(--font-stack);
}

body[data-theme="dark"] .spz-diagram {
    --d-blue: #93c5fd;
    --d-time: #1e3a6e;
    --d-val: #14532d;
    --d-axis: #3f2a78;
    --d-hl: #c2410c;
    --d-row: #a16207;
}

@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) .spz-diagram {
        --d-blue: #93c5fd;
        --d-time: #1e3a6e;
        --d-val: #14532d;
        --d-axis: #3f2a78;
        --d-hl: #c2410c;
        --d-row: #a16207;
    }
}

.spz-diagram rect, .spz-diagram polygon {
    stroke: var(--d-fg);
    stroke-opacity: 0.45;
    stroke-width: 0.75;
    stroke-linejoin: round;
}

.spz-diagram .d-time { fill: var(--d-time); }
.spz-diagram .d-val { fill: var(--d-val); }
.spz-diagram .d-axis { fill: var(--d-axis); }
.spz-diagram .d-hl { fill: var(--d-hl); }
.spz-diagram .d-row { fill: var(--d-row); }
.spz-diagram .d-dim { fill: var(--d-panel); stroke-opacity: 0.2; }
.spz-diagram .d-card { fill: var(--d-panel); stroke: var(--d-line); stroke-opacity: 1; rx: 8px; }

/* Light from the top-left: the top faces are lighter, the side faces darker. */
.spz-diagram .d-lit { fill: #fff; fill-opacity: 0.35; stroke: none; }
.spz-diagram .d-shade { fill: #000; fill-opacity: 0.2; stroke: none; }

.spz-diagram .d-arrow { stroke: var(--d-muted); stroke-width: 1.5; }
.spz-diagram .d-arrowhead { fill: var(--d-muted); stroke: none; }

.spz-diagram text { font-size: 13px; fill: var(--d-fg); }
.spz-diagram .d-strong { font-weight: 600; }
.spz-diagram .d-muted { fill: var(--d-muted); font-size: 12px; }
.spz-diagram .d-code { font-family: var(--font-stack--monospace); font-size: 12px; fill: var(--d-blue); font-weight: 600; }

/* A sequential ramp for the spectrogram cells, readable in both modes. */
.spz-diagram .d-heat0 { fill: #1e1b4b; }
.spz-diagram .d-heat1 { fill: #3b2a8f; }
.spz-diagram .d-heat2 { fill: #2563eb; }
.spz-diagram .d-heat3 { fill: #0d9488; }
.spz-diagram .d-heat4 { fill: #84cc16; }
.spz-diagram .d-heat5 { fill: #facc15; }
